@@ -25,6 +25,8 @@ import fs from "fs";
2525// const cmd = require("./tests/tools/cmd");
2626import cmd from "./lib/cmd.js" ;
2727
28+ const log = ( ...args ) => console . log ( "playwright.config.js log:" , ...args ) ;
29+
2830if ( Object . keys ( all ( ) || { } ) . length === 0 ) {
2931 throw new Error ( `playwright.config.js error: all() can't return 0 - load preprocessed.js first` ) ;
3032}
@@ -49,6 +51,15 @@ if (typeof process.env.ENVFILE === "string" && process.env.ENVFILE.trim()) {
4951 dotenv . config ( ) ;
5052}
5153
54+
55+ // WARNING: this is tweak introduced with introduction of https for local development vvv
56+ // WARNING: this is tweak introduced with introduction of https for local development vvv
57+ // WARNING: this is tweak introduced with introduction of https for local development vvv
58+ process . env . NODE_API_PORT = process . env . NODE_API_PORT_HTTPS ;
59+ // WARNING: this is tweak introduced with introduction of https for local development ^^^
60+ // WARNING: this is tweak introduced with introduction of https for local development ^^^
61+ // WARNING: this is tweak introduced with introduction of https for local development ^^^
62+
5263mockEnv ( process . env ) ;
5364
5465const protocolRegex = / ^ h t t p s ? : \/ \/ / ;
@@ -70,7 +81,7 @@ function envcheck(name, ret) {
7081}
7182
7283if ( envcheck ( "BASE_URL" , true ) ) {
73- console . log ( `existing BASE_URL: >${ process . env . BASE_URL } <` ) ;
84+ log ( `existing BASE_URL: >${ process . env . BASE_URL } <` ) ;
7485} else {
7586 envcheck ( "NODE_API_PROTOCOL" ) ;
7687
@@ -86,7 +97,7 @@ if (envcheck("BASE_URL", true)) {
8697 process . env . BASE_URL += `:${ process . env . NODE_API_PORT } ` ;
8798 }
8899
89- console . log ( `generated BASE_URL: >${ process . env . BASE_URL } <` ) ;
100+ log ( `generated BASE_URL: >${ process . env . BASE_URL } <` ) ;
90101}
91102
92103envcheck ( "BASE_URL" ) ;
0 commit comments