@wix/create-new 0.0.89 → 0.0.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -8187,6 +8187,553 @@ var require_index_node = __commonJS({
8187
8187
  }
8188
8188
  });
8189
8189
 
8190
+ // ../../node_modules/agent-base/dist/helpers.js
8191
+ var require_helpers = __commonJS({
8192
+ "../../node_modules/agent-base/dist/helpers.js"(exports) {
8193
+ "use strict";
8194
+ init_esm_shims();
8195
+ var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
8196
+ if (k2 === void 0) k2 = k;
8197
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8198
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8199
+ desc = { enumerable: true, get: function() {
8200
+ return m[k];
8201
+ } };
8202
+ }
8203
+ Object.defineProperty(o, k2, desc);
8204
+ } : function(o, m, k, k2) {
8205
+ if (k2 === void 0) k2 = k;
8206
+ o[k2] = m[k];
8207
+ });
8208
+ var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
8209
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
8210
+ } : function(o, v) {
8211
+ o["default"] = v;
8212
+ });
8213
+ var __importStar2 = exports && exports.__importStar || function(mod) {
8214
+ if (mod && mod.__esModule) return mod;
8215
+ var result = {};
8216
+ if (mod != null) {
8217
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
8218
+ }
8219
+ __setModuleDefault2(result, mod);
8220
+ return result;
8221
+ };
8222
+ Object.defineProperty(exports, "__esModule", { value: true });
8223
+ exports.req = exports.json = exports.toBuffer = void 0;
8224
+ var http3 = __importStar2(__require("http"));
8225
+ var https2 = __importStar2(__require("https"));
8226
+ async function toBuffer(stream) {
8227
+ let length = 0;
8228
+ const chunks = [];
8229
+ for await (const chunk of stream) {
8230
+ length += chunk.length;
8231
+ chunks.push(chunk);
8232
+ }
8233
+ return Buffer.concat(chunks, length);
8234
+ }
8235
+ exports.toBuffer = toBuffer;
8236
+ async function json(stream) {
8237
+ const buf = await toBuffer(stream);
8238
+ const str = buf.toString("utf8");
8239
+ try {
8240
+ return JSON.parse(str);
8241
+ } catch (_err) {
8242
+ const err = _err;
8243
+ err.message += ` (input: ${str})`;
8244
+ throw err;
8245
+ }
8246
+ }
8247
+ exports.json = json;
8248
+ function req(url, opts = {}) {
8249
+ const href = typeof url === "string" ? url : url.href;
8250
+ const req2 = (href.startsWith("https:") ? https2 : http3).request(url, opts);
8251
+ const promise = new Promise((resolve4, reject) => {
8252
+ req2.once("response", resolve4).once("error", reject).end();
8253
+ });
8254
+ req2.then = promise.then.bind(promise);
8255
+ return req2;
8256
+ }
8257
+ exports.req = req;
8258
+ }
8259
+ });
8260
+
8261
+ // ../../node_modules/agent-base/dist/index.js
8262
+ var require_dist = __commonJS({
8263
+ "../../node_modules/agent-base/dist/index.js"(exports) {
8264
+ "use strict";
8265
+ init_esm_shims();
8266
+ var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
8267
+ if (k2 === void 0) k2 = k;
8268
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8269
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8270
+ desc = { enumerable: true, get: function() {
8271
+ return m[k];
8272
+ } };
8273
+ }
8274
+ Object.defineProperty(o, k2, desc);
8275
+ } : function(o, m, k, k2) {
8276
+ if (k2 === void 0) k2 = k;
8277
+ o[k2] = m[k];
8278
+ });
8279
+ var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
8280
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
8281
+ } : function(o, v) {
8282
+ o["default"] = v;
8283
+ });
8284
+ var __importStar2 = exports && exports.__importStar || function(mod) {
8285
+ if (mod && mod.__esModule) return mod;
8286
+ var result = {};
8287
+ if (mod != null) {
8288
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
8289
+ }
8290
+ __setModuleDefault2(result, mod);
8291
+ return result;
8292
+ };
8293
+ var __exportStar2 = exports && exports.__exportStar || function(m, exports2) {
8294
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding2(exports2, m, p);
8295
+ };
8296
+ Object.defineProperty(exports, "__esModule", { value: true });
8297
+ exports.Agent = void 0;
8298
+ var net2 = __importStar2(__require("net"));
8299
+ var http3 = __importStar2(__require("http"));
8300
+ var https_1 = __require("https");
8301
+ __exportStar2(require_helpers(), exports);
8302
+ var INTERNAL2 = Symbol("AgentBaseInternalState");
8303
+ var Agent3 = class extends http3.Agent {
8304
+ constructor(opts) {
8305
+ super(opts);
8306
+ this[INTERNAL2] = {};
8307
+ }
8308
+ /**
8309
+ * Determine whether this is an `http` or `https` request.
8310
+ */
8311
+ isSecureEndpoint(options) {
8312
+ if (options) {
8313
+ if (typeof options.secureEndpoint === "boolean") {
8314
+ return options.secureEndpoint;
8315
+ }
8316
+ if (typeof options.protocol === "string") {
8317
+ return options.protocol === "https:";
8318
+ }
8319
+ }
8320
+ const { stack } = new Error();
8321
+ if (typeof stack !== "string")
8322
+ return false;
8323
+ return stack.split("\n").some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1);
8324
+ }
8325
+ // In order to support async signatures in `connect()` and Node's native
8326
+ // connection pooling in `http.Agent`, the array of sockets for each origin
8327
+ // has to be updated synchronously. This is so the length of the array is
8328
+ // accurate when `addRequest()` is next called. We achieve this by creating a
8329
+ // fake socket and adding it to `sockets[origin]` and incrementing
8330
+ // `totalSocketCount`.
8331
+ incrementSockets(name) {
8332
+ if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) {
8333
+ return null;
8334
+ }
8335
+ if (!this.sockets[name]) {
8336
+ this.sockets[name] = [];
8337
+ }
8338
+ const fakeSocket = new net2.Socket({ writable: false });
8339
+ this.sockets[name].push(fakeSocket);
8340
+ this.totalSocketCount++;
8341
+ return fakeSocket;
8342
+ }
8343
+ decrementSockets(name, socket) {
8344
+ if (!this.sockets[name] || socket === null) {
8345
+ return;
8346
+ }
8347
+ const sockets = this.sockets[name];
8348
+ const index = sockets.indexOf(socket);
8349
+ if (index !== -1) {
8350
+ sockets.splice(index, 1);
8351
+ this.totalSocketCount--;
8352
+ if (sockets.length === 0) {
8353
+ delete this.sockets[name];
8354
+ }
8355
+ }
8356
+ }
8357
+ // In order to properly update the socket pool, we need to call `getName()` on
8358
+ // the core `https.Agent` if it is a secureEndpoint.
8359
+ getName(options) {
8360
+ const secureEndpoint = typeof options.secureEndpoint === "boolean" ? options.secureEndpoint : this.isSecureEndpoint(options);
8361
+ if (secureEndpoint) {
8362
+ return https_1.Agent.prototype.getName.call(this, options);
8363
+ }
8364
+ return super.getName(options);
8365
+ }
8366
+ createSocket(req, options, cb) {
8367
+ const connectOpts = {
8368
+ ...options,
8369
+ secureEndpoint: this.isSecureEndpoint(options)
8370
+ };
8371
+ const name = this.getName(connectOpts);
8372
+ const fakeSocket = this.incrementSockets(name);
8373
+ Promise.resolve().then(() => this.connect(req, connectOpts)).then((socket) => {
8374
+ this.decrementSockets(name, fakeSocket);
8375
+ if (socket instanceof http3.Agent) {
8376
+ try {
8377
+ return socket.addRequest(req, connectOpts);
8378
+ } catch (err) {
8379
+ return cb(err);
8380
+ }
8381
+ }
8382
+ this[INTERNAL2].currentSocket = socket;
8383
+ super.createSocket(req, options, cb);
8384
+ }, (err) => {
8385
+ this.decrementSockets(name, fakeSocket);
8386
+ cb(err);
8387
+ });
8388
+ }
8389
+ createConnection() {
8390
+ const socket = this[INTERNAL2].currentSocket;
8391
+ this[INTERNAL2].currentSocket = void 0;
8392
+ if (!socket) {
8393
+ throw new Error("No socket was returned in the `connect()` function");
8394
+ }
8395
+ return socket;
8396
+ }
8397
+ get defaultPort() {
8398
+ return this[INTERNAL2].defaultPort ?? (this.protocol === "https:" ? 443 : 80);
8399
+ }
8400
+ set defaultPort(v) {
8401
+ if (this[INTERNAL2]) {
8402
+ this[INTERNAL2].defaultPort = v;
8403
+ }
8404
+ }
8405
+ get protocol() {
8406
+ return this[INTERNAL2].protocol ?? (this.isSecureEndpoint() ? "https:" : "http:");
8407
+ }
8408
+ set protocol(v) {
8409
+ if (this[INTERNAL2]) {
8410
+ this[INTERNAL2].protocol = v;
8411
+ }
8412
+ }
8413
+ };
8414
+ exports.Agent = Agent3;
8415
+ }
8416
+ });
8417
+
8418
+ // ../../node_modules/https-proxy-agent/dist/parse-proxy-response.js
8419
+ var require_parse_proxy_response = __commonJS({
8420
+ "../../node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports) {
8421
+ "use strict";
8422
+ init_esm_shims();
8423
+ var __importDefault2 = exports && exports.__importDefault || function(mod) {
8424
+ return mod && mod.__esModule ? mod : { "default": mod };
8425
+ };
8426
+ Object.defineProperty(exports, "__esModule", { value: true });
8427
+ exports.parseProxyResponse = void 0;
8428
+ var debug_1 = __importDefault2(require_src());
8429
+ var debug3 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response");
8430
+ function parseProxyResponse2(socket) {
8431
+ return new Promise((resolve4, reject) => {
8432
+ let buffersLength = 0;
8433
+ const buffers = [];
8434
+ function read() {
8435
+ const b2 = socket.read();
8436
+ if (b2)
8437
+ ondata(b2);
8438
+ else
8439
+ socket.once("readable", read);
8440
+ }
8441
+ function cleanup() {
8442
+ socket.removeListener("end", onend);
8443
+ socket.removeListener("error", onerror);
8444
+ socket.removeListener("readable", read);
8445
+ }
8446
+ function onend() {
8447
+ cleanup();
8448
+ debug3("onend");
8449
+ reject(new Error("Proxy connection ended before receiving CONNECT response"));
8450
+ }
8451
+ function onerror(err) {
8452
+ cleanup();
8453
+ debug3("onerror %o", err);
8454
+ reject(err);
8455
+ }
8456
+ function ondata(b2) {
8457
+ buffers.push(b2);
8458
+ buffersLength += b2.length;
8459
+ const buffered = Buffer.concat(buffers, buffersLength);
8460
+ const endOfHeaders = buffered.indexOf("\r\n\r\n");
8461
+ if (endOfHeaders === -1) {
8462
+ debug3("have not received end of HTTP headers yet...");
8463
+ read();
8464
+ return;
8465
+ }
8466
+ const headerParts = buffered.slice(0, endOfHeaders).toString("ascii").split("\r\n");
8467
+ const firstLine = headerParts.shift();
8468
+ if (!firstLine) {
8469
+ socket.destroy();
8470
+ return reject(new Error("No header received from proxy CONNECT response"));
8471
+ }
8472
+ const firstLineParts = firstLine.split(" ");
8473
+ const statusCode = +firstLineParts[1];
8474
+ const statusText = firstLineParts.slice(2).join(" ");
8475
+ const headers = {};
8476
+ for (const header of headerParts) {
8477
+ if (!header)
8478
+ continue;
8479
+ const firstColon = header.indexOf(":");
8480
+ if (firstColon === -1) {
8481
+ socket.destroy();
8482
+ return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`));
8483
+ }
8484
+ const key = header.slice(0, firstColon).toLowerCase();
8485
+ const value2 = header.slice(firstColon + 1).trimStart();
8486
+ const current = headers[key];
8487
+ if (typeof current === "string") {
8488
+ headers[key] = [current, value2];
8489
+ } else if (Array.isArray(current)) {
8490
+ current.push(value2);
8491
+ } else {
8492
+ headers[key] = value2;
8493
+ }
8494
+ }
8495
+ debug3("got proxy server response: %o %o", firstLine, headers);
8496
+ cleanup();
8497
+ resolve4({
8498
+ connect: {
8499
+ statusCode,
8500
+ statusText,
8501
+ headers
8502
+ },
8503
+ buffered
8504
+ });
8505
+ }
8506
+ socket.on("error", onerror);
8507
+ socket.on("end", onend);
8508
+ read();
8509
+ });
8510
+ }
8511
+ exports.parseProxyResponse = parseProxyResponse2;
8512
+ }
8513
+ });
8514
+
8515
+ // ../../node_modules/https-proxy-agent/dist/index.js
8516
+ var require_dist2 = __commonJS({
8517
+ "../../node_modules/https-proxy-agent/dist/index.js"(exports) {
8518
+ "use strict";
8519
+ init_esm_shims();
8520
+ var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
8521
+ if (k2 === void 0) k2 = k;
8522
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8523
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8524
+ desc = { enumerable: true, get: function() {
8525
+ return m[k];
8526
+ } };
8527
+ }
8528
+ Object.defineProperty(o, k2, desc);
8529
+ } : function(o, m, k, k2) {
8530
+ if (k2 === void 0) k2 = k;
8531
+ o[k2] = m[k];
8532
+ });
8533
+ var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
8534
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
8535
+ } : function(o, v) {
8536
+ o["default"] = v;
8537
+ });
8538
+ var __importStar2 = exports && exports.__importStar || function(mod) {
8539
+ if (mod && mod.__esModule) return mod;
8540
+ var result = {};
8541
+ if (mod != null) {
8542
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
8543
+ }
8544
+ __setModuleDefault2(result, mod);
8545
+ return result;
8546
+ };
8547
+ var __importDefault2 = exports && exports.__importDefault || function(mod) {
8548
+ return mod && mod.__esModule ? mod : { "default": mod };
8549
+ };
8550
+ Object.defineProperty(exports, "__esModule", { value: true });
8551
+ exports.HttpsProxyAgent = void 0;
8552
+ var net2 = __importStar2(__require("net"));
8553
+ var tls2 = __importStar2(__require("tls"));
8554
+ var assert_1 = __importDefault2(__require("assert"));
8555
+ var debug_1 = __importDefault2(require_src());
8556
+ var agent_base_1 = require_dist();
8557
+ var url_1 = __require("url");
8558
+ var parse_proxy_response_1 = require_parse_proxy_response();
8559
+ var debug3 = (0, debug_1.default)("https-proxy-agent");
8560
+ var setServernameFromNonIpHost = (options) => {
8561
+ if (options.servername === void 0 && options.host && !net2.isIP(options.host)) {
8562
+ return {
8563
+ ...options,
8564
+ servername: options.host
8565
+ };
8566
+ }
8567
+ return options;
8568
+ };
8569
+ var HttpsProxyAgent3 = class extends agent_base_1.Agent {
8570
+ constructor(proxy, opts) {
8571
+ super(opts);
8572
+ this.options = { path: void 0 };
8573
+ this.proxy = typeof proxy === "string" ? new url_1.URL(proxy) : proxy;
8574
+ this.proxyHeaders = opts?.headers ?? {};
8575
+ debug3("Creating new HttpsProxyAgent instance: %o", this.proxy.href);
8576
+ const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, "");
8577
+ const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80;
8578
+ this.connectOpts = {
8579
+ // Attempt to negotiate http/1.1 for proxy servers that support http/2
8580
+ ALPNProtocols: ["http/1.1"],
8581
+ ...opts ? omit2(opts, "headers") : null,
8582
+ host,
8583
+ port
8584
+ };
8585
+ }
8586
+ /**
8587
+ * Called when the node-core HTTP client library is creating a
8588
+ * new HTTP request.
8589
+ */
8590
+ async connect(req, opts) {
8591
+ const { proxy } = this;
8592
+ if (!opts.host) {
8593
+ throw new TypeError('No "host" provided');
8594
+ }
8595
+ let socket;
8596
+ if (proxy.protocol === "https:") {
8597
+ debug3("Creating `tls.Socket`: %o", this.connectOpts);
8598
+ socket = tls2.connect(setServernameFromNonIpHost(this.connectOpts));
8599
+ } else {
8600
+ debug3("Creating `net.Socket`: %o", this.connectOpts);
8601
+ socket = net2.connect(this.connectOpts);
8602
+ }
8603
+ const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders };
8604
+ const host = net2.isIPv6(opts.host) ? `[${opts.host}]` : opts.host;
8605
+ let payload7 = `CONNECT ${host}:${opts.port} HTTP/1.1\r
8606
+ `;
8607
+ if (proxy.username || proxy.password) {
8608
+ const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`;
8609
+ headers["Proxy-Authorization"] = `Basic ${Buffer.from(auth).toString("base64")}`;
8610
+ }
8611
+ headers.Host = `${host}:${opts.port}`;
8612
+ if (!headers["Proxy-Connection"]) {
8613
+ headers["Proxy-Connection"] = this.keepAlive ? "Keep-Alive" : "close";
8614
+ }
8615
+ for (const name of Object.keys(headers)) {
8616
+ payload7 += `${name}: ${headers[name]}\r
8617
+ `;
8618
+ }
8619
+ const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket);
8620
+ socket.write(`${payload7}\r
8621
+ `);
8622
+ const { connect: connect3, buffered } = await proxyResponsePromise;
8623
+ req.emit("proxyConnect", connect3);
8624
+ this.emit("proxyConnect", connect3, req);
8625
+ if (connect3.statusCode === 200) {
8626
+ req.once("socket", resume2);
8627
+ if (opts.secureEndpoint) {
8628
+ debug3("Upgrading socket connection to TLS");
8629
+ return tls2.connect({
8630
+ ...omit2(setServernameFromNonIpHost(opts), "host", "path", "port"),
8631
+ socket
8632
+ });
8633
+ }
8634
+ return socket;
8635
+ }
8636
+ socket.destroy();
8637
+ const fakeSocket = new net2.Socket({ writable: false });
8638
+ fakeSocket.readable = true;
8639
+ req.once("socket", (s2) => {
8640
+ debug3("Replaying proxy buffer for failed request");
8641
+ (0, assert_1.default)(s2.listenerCount("data") > 0);
8642
+ s2.push(buffered);
8643
+ s2.push(null);
8644
+ });
8645
+ return fakeSocket;
8646
+ }
8647
+ };
8648
+ HttpsProxyAgent3.protocols = ["http", "https"];
8649
+ exports.HttpsProxyAgent = HttpsProxyAgent3;
8650
+ function resume2(socket) {
8651
+ socket.resume();
8652
+ }
8653
+ function omit2(obj, ...keys) {
8654
+ const ret = {};
8655
+ let key;
8656
+ for (key in obj) {
8657
+ if (!keys.includes(key)) {
8658
+ ret[key] = obj[key];
8659
+ }
8660
+ }
8661
+ return ret;
8662
+ }
8663
+ }
8664
+ });
8665
+
8666
+ // ../../node_modules/proxy-from-env/index.js
8667
+ var require_proxy_from_env = __commonJS({
8668
+ "../../node_modules/proxy-from-env/index.js"(exports) {
8669
+ "use strict";
8670
+ init_esm_shims();
8671
+ var parseUrl2 = __require("url").parse;
8672
+ var DEFAULT_PORTS = {
8673
+ ftp: 21,
8674
+ gopher: 70,
8675
+ http: 80,
8676
+ https: 443,
8677
+ ws: 80,
8678
+ wss: 443
8679
+ };
8680
+ var stringEndsWith = String.prototype.endsWith || function(s2) {
8681
+ return s2.length <= this.length && this.indexOf(s2, this.length - s2.length) !== -1;
8682
+ };
8683
+ function getProxyForUrl2(url) {
8684
+ var parsedUrl = typeof url === "string" ? parseUrl2(url) : url || {};
8685
+ var proto2 = parsedUrl.protocol;
8686
+ var hostname2 = parsedUrl.host;
8687
+ var port = parsedUrl.port;
8688
+ if (typeof hostname2 !== "string" || !hostname2 || typeof proto2 !== "string") {
8689
+ return "";
8690
+ }
8691
+ proto2 = proto2.split(":", 1)[0];
8692
+ hostname2 = hostname2.replace(/:\d*$/, "");
8693
+ port = parseInt(port) || DEFAULT_PORTS[proto2] || 0;
8694
+ if (!shouldProxy(hostname2, port)) {
8695
+ return "";
8696
+ }
8697
+ var proxy = getEnv2("npm_config_" + proto2 + "_proxy") || getEnv2(proto2 + "_proxy") || getEnv2("npm_config_proxy") || getEnv2("all_proxy");
8698
+ if (proxy && proxy.indexOf("://") === -1) {
8699
+ proxy = proto2 + "://" + proxy;
8700
+ }
8701
+ return proxy;
8702
+ }
8703
+ function shouldProxy(hostname2, port) {
8704
+ var NO_PROXY = (getEnv2("npm_config_no_proxy") || getEnv2("no_proxy")).toLowerCase();
8705
+ if (!NO_PROXY) {
8706
+ return true;
8707
+ }
8708
+ if (NO_PROXY === "*") {
8709
+ return false;
8710
+ }
8711
+ return NO_PROXY.split(/[,\s]/).every(function(proxy) {
8712
+ if (!proxy) {
8713
+ return true;
8714
+ }
8715
+ var parsedProxy = proxy.match(/^(.+):(\d+)$/);
8716
+ var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
8717
+ var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
8718
+ if (parsedProxyPort && parsedProxyPort !== port) {
8719
+ return true;
8720
+ }
8721
+ if (!/^[.*]/.test(parsedProxyHostname)) {
8722
+ return hostname2 !== parsedProxyHostname;
8723
+ }
8724
+ if (parsedProxyHostname.charAt(0) === "*") {
8725
+ parsedProxyHostname = parsedProxyHostname.slice(1);
8726
+ }
8727
+ return !stringEndsWith.call(hostname2, parsedProxyHostname);
8728
+ });
8729
+ }
8730
+ function getEnv2(key) {
8731
+ return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
8732
+ }
8733
+ exports.getProxyForUrl = getProxyForUrl2;
8734
+ }
8735
+ });
8736
+
8190
8737
  // ../../node_modules/react/cjs/react.production.min.js
8191
8738
  var require_react_production_min = __commonJS({
8192
8739
  "../../node_modules/react/cjs/react.production.min.js"(exports) {
@@ -30494,7 +31041,7 @@ var require_bi_logger_factory = __commonJS({
30494
31041
  });
30495
31042
 
30496
31043
  // ../../node_modules/@wix/wix-bi-logger-client/dist/index.js
30497
- var require_dist = __commonJS({
31044
+ var require_dist3 = __commonJS({
30498
31045
  "../../node_modules/@wix/wix-bi-logger-client/dist/index.js"(exports, module2) {
30499
31046
  "use strict";
30500
31047
  init_esm_shims();
@@ -47355,7 +47902,7 @@ var require_startCase = __commonJS({
47355
47902
  });
47356
47903
 
47357
47904
  // ../../node_modules/@vercel/detect-agent/dist/index.js
47358
- var require_dist2 = __commonJS({
47905
+ var require_dist4 = __commonJS({
47359
47906
  "../../node_modules/@vercel/detect-agent/dist/index.js"(exports, module2) {
47360
47907
  "use strict";
47361
47908
  init_esm_shims();
@@ -48395,6 +48942,8 @@ function revokeRefreshToken(payload7) {
48395
48942
  // ../cli-http-client/src/create-http-client.ts
48396
48943
  init_esm_shims();
48397
48944
  var import_http_client2 = __toESM(require_index_node(), 1);
48945
+ var import_https_proxy_agent = __toESM(require_dist2(), 1);
48946
+ var import_proxy_from_env = __toESM(require_proxy_from_env(), 1);
48398
48947
 
48399
48948
  // ../cli-http-client/src/is-http-error.ts
48400
48949
  init_esm_shims();
@@ -48471,6 +49020,10 @@ var baseUrls = {
48471
49020
  api: "https://www.wixapis.com",
48472
49021
  standalone: void 0
48473
49022
  };
49023
+ function createProxyAgent(baseUrl) {
49024
+ const proxyUrl = baseUrl ? (0, import_proxy_from_env.getProxyForUrl)(baseUrl) : process.env.HTTPS_PROXY ?? process.env.https_proxy ?? "";
49025
+ return proxyUrl ? new import_https_proxy_agent.HttpsProxyAgent(proxyUrl) : void 0;
49026
+ }
48474
49027
  function interceptRequest(client2, fn) {
48475
49028
  return (...args) => fn.apply(client2, args).catch((error) => {
48476
49029
  if (isHttpError(error) && !client2.isCancel(error) && !error.response) {
@@ -48500,6 +49053,8 @@ function createHttpClient({
48500
49053
  Cookie: "XSRF-TOKEN=nocheck",
48501
49054
  "User-Agent": "wix-cli"
48502
49055
  }),
49056
+ proxy: false,
49057
+ httpsAgent: createProxyAgent(baseUrls[type]),
48503
49058
  // https://github.com/axios/axios/issues/4263 - fixed in Axios ^1.x.x but currently cannot be bumped in Wix Http Client
48504
49059
  maxBodyLength: Infinity,
48505
49060
  maxContentLength: Infinity
@@ -68392,7 +68947,7 @@ function parseProxyResponse(socket) {
68392
68947
  function debug2(...args) {
68393
68948
  logger.log("[https-proxy-agent]", ...args);
68394
68949
  }
68395
- var HttpsProxyAgent = class extends Agent2 {
68950
+ var HttpsProxyAgent2 = class extends Agent2 {
68396
68951
  static __initStatic() {
68397
68952
  this.protocols = ["http", "https"];
68398
68953
  }
@@ -68479,7 +69034,7 @@ var HttpsProxyAgent = class extends Agent2 {
68479
69034
  return fakeSocket;
68480
69035
  }
68481
69036
  };
68482
- HttpsProxyAgent.__initStatic();
69037
+ HttpsProxyAgent2.__initStatic();
68483
69038
  function resume(socket) {
68484
69039
  socket.resume();
68485
69040
  }
@@ -68523,7 +69078,7 @@ function makeNodeTransport(options) {
68523
69078
  );
68524
69079
  const nativeHttpModule = isHttps ? https : http2;
68525
69080
  const keepAlive = options.keepAlive === void 0 ? false : options.keepAlive;
68526
- const agent = proxy ? new HttpsProxyAgent(proxy) : new nativeHttpModule.Agent({ keepAlive, maxSockets: 30, timeout: 2e3 });
69081
+ const agent = proxy ? new HttpsProxyAgent2(proxy) : new nativeHttpModule.Agent({ keepAlive, maxSockets: 30, timeout: 2e3 });
68527
69082
  return suppressTracing(() => {
68528
69083
  const requestExecutor = createRequestExecutor(options, _nullishCoalesce(options.httpModule, () => nativeHttpModule), agent);
68529
69084
  return createTransport(options, requestExecutor);
@@ -70726,7 +71281,7 @@ init_esm_shims();
70726
71281
  // ../../node_modules/@wix/standalone-node-bi-logger/dist/es/src/index.js
70727
71282
  init_esm_shims();
70728
71283
  init_tslib_es6();
70729
- var import_wix_bi_logger_client = __toESM(require_dist());
71284
+ var import_wix_bi_logger_client = __toESM(require_dist3());
70730
71285
  var import_http_client6 = __toESM(require_index_node());
70731
71286
  var defaultOptions2 = {
70732
71287
  baseUrl: process.env.BI_BASE_URL || "https://frog.wix.com",
@@ -72018,7 +72573,7 @@ function queryApp(payload7) {
72018
72573
  return __queryApp;
72019
72574
  }
72020
72575
 
72021
- // ../../node_modules/@wix/ambassador-headless-v1-o-auth-app/build/es/http.impl.js
72576
+ // ../../node_modules/@wix/ambassador-headless-v1-o-auth-app/es/build/http.impl.js
72022
72577
  init_esm_shims();
72023
72578
  var _createOAuthAppRequest = { oAuthApp: "_oAuthApp" };
72024
72579
  var _createOAuthAppResponse = { oAuthApp: "_oAuthApp" };
@@ -79586,7 +80141,8 @@ var DevCenterClient = class {
79586
80141
  mask: [
79587
80142
  "allowedDomains",
79588
80143
  "allowedRedirectUris",
79589
- "redirectUrlWixPages"
80144
+ "redirectUrlWixPages",
80145
+ "origin"
79590
80146
  ]
79591
80147
  })
79592
80148
  );
@@ -82858,7 +83414,8 @@ var useCreateProject = (businessId) => {
82858
83414
  `${prodBaseDomain}/${loginRoute}`,
82859
83415
  `${prodBaseDomain}/${logoutRoute}`
82860
83416
  ],
82861
- redirectUrlWixPages: prodBaseDomain
83417
+ redirectUrlWixPages: prodBaseDomain,
83418
+ origin: "other"
82862
83419
  });
82863
83420
  const environmentVariables = await upsertAppEnvironmentVariables(
82864
83421
  appProject.id,
@@ -94430,14 +94987,14 @@ var getHeadlessCommand = ({
94430
94987
  };
94431
94988
 
94432
94989
  // src/index.tsx
94433
- var import_detect_agent = __toESM(require_dist2(), 1);
94990
+ var import_detect_agent = __toESM(require_dist4(), 1);
94434
94991
  import { randomUUID as randomUUID3 } from "node:crypto";
94435
94992
 
94436
94993
  // package.json
94437
94994
  var package_default = {
94438
94995
  name: "@wix/create-new",
94439
94996
  description: "General entry point for creating Wix projects",
94440
- version: "0.0.89",
94997
+ version: "0.0.90",
94441
94998
  bin: "bin/index.cjs",
94442
94999
  devDependencies: {
94443
95000
  "@commander-js/extra-typings": "^13.0.0",