@wix/create-app 0.0.227 → 0.0.229

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
@@ -14032,6 +14032,553 @@ var require_index_node = __commonJS({
14032
14032
  }
14033
14033
  });
14034
14034
 
14035
+ // ../../node_modules/agent-base/dist/helpers.js
14036
+ var require_helpers = __commonJS({
14037
+ "../../node_modules/agent-base/dist/helpers.js"(exports) {
14038
+ "use strict";
14039
+ init_esm_shims();
14040
+ var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
14041
+ if (k2 === void 0) k2 = k;
14042
+ var desc = Object.getOwnPropertyDescriptor(m, k);
14043
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
14044
+ desc = { enumerable: true, get: function() {
14045
+ return m[k];
14046
+ } };
14047
+ }
14048
+ Object.defineProperty(o, k2, desc);
14049
+ } : function(o, m, k, k2) {
14050
+ if (k2 === void 0) k2 = k;
14051
+ o[k2] = m[k];
14052
+ });
14053
+ var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
14054
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
14055
+ } : function(o, v) {
14056
+ o["default"] = v;
14057
+ });
14058
+ var __importStar2 = exports && exports.__importStar || function(mod) {
14059
+ if (mod && mod.__esModule) return mod;
14060
+ var result = {};
14061
+ if (mod != null) {
14062
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
14063
+ }
14064
+ __setModuleDefault2(result, mod);
14065
+ return result;
14066
+ };
14067
+ Object.defineProperty(exports, "__esModule", { value: true });
14068
+ exports.req = exports.json = exports.toBuffer = void 0;
14069
+ var http3 = __importStar2(__require("http"));
14070
+ var https2 = __importStar2(__require("https"));
14071
+ async function toBuffer(stream) {
14072
+ let length = 0;
14073
+ const chunks = [];
14074
+ for await (const chunk of stream) {
14075
+ length += chunk.length;
14076
+ chunks.push(chunk);
14077
+ }
14078
+ return Buffer.concat(chunks, length);
14079
+ }
14080
+ exports.toBuffer = toBuffer;
14081
+ async function json(stream) {
14082
+ const buf = await toBuffer(stream);
14083
+ const str = buf.toString("utf8");
14084
+ try {
14085
+ return JSON.parse(str);
14086
+ } catch (_err) {
14087
+ const err = _err;
14088
+ err.message += ` (input: ${str})`;
14089
+ throw err;
14090
+ }
14091
+ }
14092
+ exports.json = json;
14093
+ function req(url, opts = {}) {
14094
+ const href = typeof url === "string" ? url : url.href;
14095
+ const req2 = (href.startsWith("https:") ? https2 : http3).request(url, opts);
14096
+ const promise = new Promise((resolve4, reject) => {
14097
+ req2.once("response", resolve4).once("error", reject).end();
14098
+ });
14099
+ req2.then = promise.then.bind(promise);
14100
+ return req2;
14101
+ }
14102
+ exports.req = req;
14103
+ }
14104
+ });
14105
+
14106
+ // ../../node_modules/agent-base/dist/index.js
14107
+ var require_dist = __commonJS({
14108
+ "../../node_modules/agent-base/dist/index.js"(exports) {
14109
+ "use strict";
14110
+ init_esm_shims();
14111
+ var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
14112
+ if (k2 === void 0) k2 = k;
14113
+ var desc = Object.getOwnPropertyDescriptor(m, k);
14114
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
14115
+ desc = { enumerable: true, get: function() {
14116
+ return m[k];
14117
+ } };
14118
+ }
14119
+ Object.defineProperty(o, k2, desc);
14120
+ } : function(o, m, k, k2) {
14121
+ if (k2 === void 0) k2 = k;
14122
+ o[k2] = m[k];
14123
+ });
14124
+ var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
14125
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
14126
+ } : function(o, v) {
14127
+ o["default"] = v;
14128
+ });
14129
+ var __importStar2 = exports && exports.__importStar || function(mod) {
14130
+ if (mod && mod.__esModule) return mod;
14131
+ var result = {};
14132
+ if (mod != null) {
14133
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
14134
+ }
14135
+ __setModuleDefault2(result, mod);
14136
+ return result;
14137
+ };
14138
+ var __exportStar2 = exports && exports.__exportStar || function(m, exports2) {
14139
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding2(exports2, m, p);
14140
+ };
14141
+ Object.defineProperty(exports, "__esModule", { value: true });
14142
+ exports.Agent = void 0;
14143
+ var net2 = __importStar2(__require("net"));
14144
+ var http3 = __importStar2(__require("http"));
14145
+ var https_1 = __require("https");
14146
+ __exportStar2(require_helpers(), exports);
14147
+ var INTERNAL2 = Symbol("AgentBaseInternalState");
14148
+ var Agent3 = class extends http3.Agent {
14149
+ constructor(opts) {
14150
+ super(opts);
14151
+ this[INTERNAL2] = {};
14152
+ }
14153
+ /**
14154
+ * Determine whether this is an `http` or `https` request.
14155
+ */
14156
+ isSecureEndpoint(options) {
14157
+ if (options) {
14158
+ if (typeof options.secureEndpoint === "boolean") {
14159
+ return options.secureEndpoint;
14160
+ }
14161
+ if (typeof options.protocol === "string") {
14162
+ return options.protocol === "https:";
14163
+ }
14164
+ }
14165
+ const { stack } = new Error();
14166
+ if (typeof stack !== "string")
14167
+ return false;
14168
+ return stack.split("\n").some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1);
14169
+ }
14170
+ // In order to support async signatures in `connect()` and Node's native
14171
+ // connection pooling in `http.Agent`, the array of sockets for each origin
14172
+ // has to be updated synchronously. This is so the length of the array is
14173
+ // accurate when `addRequest()` is next called. We achieve this by creating a
14174
+ // fake socket and adding it to `sockets[origin]` and incrementing
14175
+ // `totalSocketCount`.
14176
+ incrementSockets(name) {
14177
+ if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) {
14178
+ return null;
14179
+ }
14180
+ if (!this.sockets[name]) {
14181
+ this.sockets[name] = [];
14182
+ }
14183
+ const fakeSocket = new net2.Socket({ writable: false });
14184
+ this.sockets[name].push(fakeSocket);
14185
+ this.totalSocketCount++;
14186
+ return fakeSocket;
14187
+ }
14188
+ decrementSockets(name, socket) {
14189
+ if (!this.sockets[name] || socket === null) {
14190
+ return;
14191
+ }
14192
+ const sockets = this.sockets[name];
14193
+ const index = sockets.indexOf(socket);
14194
+ if (index !== -1) {
14195
+ sockets.splice(index, 1);
14196
+ this.totalSocketCount--;
14197
+ if (sockets.length === 0) {
14198
+ delete this.sockets[name];
14199
+ }
14200
+ }
14201
+ }
14202
+ // In order to properly update the socket pool, we need to call `getName()` on
14203
+ // the core `https.Agent` if it is a secureEndpoint.
14204
+ getName(options) {
14205
+ const secureEndpoint = typeof options.secureEndpoint === "boolean" ? options.secureEndpoint : this.isSecureEndpoint(options);
14206
+ if (secureEndpoint) {
14207
+ return https_1.Agent.prototype.getName.call(this, options);
14208
+ }
14209
+ return super.getName(options);
14210
+ }
14211
+ createSocket(req, options, cb) {
14212
+ const connectOpts = {
14213
+ ...options,
14214
+ secureEndpoint: this.isSecureEndpoint(options)
14215
+ };
14216
+ const name = this.getName(connectOpts);
14217
+ const fakeSocket = this.incrementSockets(name);
14218
+ Promise.resolve().then(() => this.connect(req, connectOpts)).then((socket) => {
14219
+ this.decrementSockets(name, fakeSocket);
14220
+ if (socket instanceof http3.Agent) {
14221
+ try {
14222
+ return socket.addRequest(req, connectOpts);
14223
+ } catch (err) {
14224
+ return cb(err);
14225
+ }
14226
+ }
14227
+ this[INTERNAL2].currentSocket = socket;
14228
+ super.createSocket(req, options, cb);
14229
+ }, (err) => {
14230
+ this.decrementSockets(name, fakeSocket);
14231
+ cb(err);
14232
+ });
14233
+ }
14234
+ createConnection() {
14235
+ const socket = this[INTERNAL2].currentSocket;
14236
+ this[INTERNAL2].currentSocket = void 0;
14237
+ if (!socket) {
14238
+ throw new Error("No socket was returned in the `connect()` function");
14239
+ }
14240
+ return socket;
14241
+ }
14242
+ get defaultPort() {
14243
+ return this[INTERNAL2].defaultPort ?? (this.protocol === "https:" ? 443 : 80);
14244
+ }
14245
+ set defaultPort(v) {
14246
+ if (this[INTERNAL2]) {
14247
+ this[INTERNAL2].defaultPort = v;
14248
+ }
14249
+ }
14250
+ get protocol() {
14251
+ return this[INTERNAL2].protocol ?? (this.isSecureEndpoint() ? "https:" : "http:");
14252
+ }
14253
+ set protocol(v) {
14254
+ if (this[INTERNAL2]) {
14255
+ this[INTERNAL2].protocol = v;
14256
+ }
14257
+ }
14258
+ };
14259
+ exports.Agent = Agent3;
14260
+ }
14261
+ });
14262
+
14263
+ // ../../node_modules/https-proxy-agent/dist/parse-proxy-response.js
14264
+ var require_parse_proxy_response = __commonJS({
14265
+ "../../node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports) {
14266
+ "use strict";
14267
+ init_esm_shims();
14268
+ var __importDefault2 = exports && exports.__importDefault || function(mod) {
14269
+ return mod && mod.__esModule ? mod : { "default": mod };
14270
+ };
14271
+ Object.defineProperty(exports, "__esModule", { value: true });
14272
+ exports.parseProxyResponse = void 0;
14273
+ var debug_1 = __importDefault2(require_src());
14274
+ var debug3 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response");
14275
+ function parseProxyResponse2(socket) {
14276
+ return new Promise((resolve4, reject) => {
14277
+ let buffersLength = 0;
14278
+ const buffers = [];
14279
+ function read() {
14280
+ const b = socket.read();
14281
+ if (b)
14282
+ ondata(b);
14283
+ else
14284
+ socket.once("readable", read);
14285
+ }
14286
+ function cleanup() {
14287
+ socket.removeListener("end", onend);
14288
+ socket.removeListener("error", onerror);
14289
+ socket.removeListener("readable", read);
14290
+ }
14291
+ function onend() {
14292
+ cleanup();
14293
+ debug3("onend");
14294
+ reject(new Error("Proxy connection ended before receiving CONNECT response"));
14295
+ }
14296
+ function onerror(err) {
14297
+ cleanup();
14298
+ debug3("onerror %o", err);
14299
+ reject(err);
14300
+ }
14301
+ function ondata(b) {
14302
+ buffers.push(b);
14303
+ buffersLength += b.length;
14304
+ const buffered = Buffer.concat(buffers, buffersLength);
14305
+ const endOfHeaders = buffered.indexOf("\r\n\r\n");
14306
+ if (endOfHeaders === -1) {
14307
+ debug3("have not received end of HTTP headers yet...");
14308
+ read();
14309
+ return;
14310
+ }
14311
+ const headerParts = buffered.slice(0, endOfHeaders).toString("ascii").split("\r\n");
14312
+ const firstLine = headerParts.shift();
14313
+ if (!firstLine) {
14314
+ socket.destroy();
14315
+ return reject(new Error("No header received from proxy CONNECT response"));
14316
+ }
14317
+ const firstLineParts = firstLine.split(" ");
14318
+ const statusCode = +firstLineParts[1];
14319
+ const statusText = firstLineParts.slice(2).join(" ");
14320
+ const headers = {};
14321
+ for (const header of headerParts) {
14322
+ if (!header)
14323
+ continue;
14324
+ const firstColon = header.indexOf(":");
14325
+ if (firstColon === -1) {
14326
+ socket.destroy();
14327
+ return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`));
14328
+ }
14329
+ const key = header.slice(0, firstColon).toLowerCase();
14330
+ const value2 = header.slice(firstColon + 1).trimStart();
14331
+ const current = headers[key];
14332
+ if (typeof current === "string") {
14333
+ headers[key] = [current, value2];
14334
+ } else if (Array.isArray(current)) {
14335
+ current.push(value2);
14336
+ } else {
14337
+ headers[key] = value2;
14338
+ }
14339
+ }
14340
+ debug3("got proxy server response: %o %o", firstLine, headers);
14341
+ cleanup();
14342
+ resolve4({
14343
+ connect: {
14344
+ statusCode,
14345
+ statusText,
14346
+ headers
14347
+ },
14348
+ buffered
14349
+ });
14350
+ }
14351
+ socket.on("error", onerror);
14352
+ socket.on("end", onend);
14353
+ read();
14354
+ });
14355
+ }
14356
+ exports.parseProxyResponse = parseProxyResponse2;
14357
+ }
14358
+ });
14359
+
14360
+ // ../../node_modules/https-proxy-agent/dist/index.js
14361
+ var require_dist2 = __commonJS({
14362
+ "../../node_modules/https-proxy-agent/dist/index.js"(exports) {
14363
+ "use strict";
14364
+ init_esm_shims();
14365
+ var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
14366
+ if (k2 === void 0) k2 = k;
14367
+ var desc = Object.getOwnPropertyDescriptor(m, k);
14368
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
14369
+ desc = { enumerable: true, get: function() {
14370
+ return m[k];
14371
+ } };
14372
+ }
14373
+ Object.defineProperty(o, k2, desc);
14374
+ } : function(o, m, k, k2) {
14375
+ if (k2 === void 0) k2 = k;
14376
+ o[k2] = m[k];
14377
+ });
14378
+ var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
14379
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
14380
+ } : function(o, v) {
14381
+ o["default"] = v;
14382
+ });
14383
+ var __importStar2 = exports && exports.__importStar || function(mod) {
14384
+ if (mod && mod.__esModule) return mod;
14385
+ var result = {};
14386
+ if (mod != null) {
14387
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
14388
+ }
14389
+ __setModuleDefault2(result, mod);
14390
+ return result;
14391
+ };
14392
+ var __importDefault2 = exports && exports.__importDefault || function(mod) {
14393
+ return mod && mod.__esModule ? mod : { "default": mod };
14394
+ };
14395
+ Object.defineProperty(exports, "__esModule", { value: true });
14396
+ exports.HttpsProxyAgent = void 0;
14397
+ var net2 = __importStar2(__require("net"));
14398
+ var tls2 = __importStar2(__require("tls"));
14399
+ var assert_1 = __importDefault2(__require("assert"));
14400
+ var debug_1 = __importDefault2(require_src());
14401
+ var agent_base_1 = require_dist();
14402
+ var url_1 = __require("url");
14403
+ var parse_proxy_response_1 = require_parse_proxy_response();
14404
+ var debug3 = (0, debug_1.default)("https-proxy-agent");
14405
+ var setServernameFromNonIpHost = (options) => {
14406
+ if (options.servername === void 0 && options.host && !net2.isIP(options.host)) {
14407
+ return {
14408
+ ...options,
14409
+ servername: options.host
14410
+ };
14411
+ }
14412
+ return options;
14413
+ };
14414
+ var HttpsProxyAgent3 = class extends agent_base_1.Agent {
14415
+ constructor(proxy, opts) {
14416
+ super(opts);
14417
+ this.options = { path: void 0 };
14418
+ this.proxy = typeof proxy === "string" ? new url_1.URL(proxy) : proxy;
14419
+ this.proxyHeaders = opts?.headers ?? {};
14420
+ debug3("Creating new HttpsProxyAgent instance: %o", this.proxy.href);
14421
+ const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, "");
14422
+ const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80;
14423
+ this.connectOpts = {
14424
+ // Attempt to negotiate http/1.1 for proxy servers that support http/2
14425
+ ALPNProtocols: ["http/1.1"],
14426
+ ...opts ? omit2(opts, "headers") : null,
14427
+ host,
14428
+ port
14429
+ };
14430
+ }
14431
+ /**
14432
+ * Called when the node-core HTTP client library is creating a
14433
+ * new HTTP request.
14434
+ */
14435
+ async connect(req, opts) {
14436
+ const { proxy } = this;
14437
+ if (!opts.host) {
14438
+ throw new TypeError('No "host" provided');
14439
+ }
14440
+ let socket;
14441
+ if (proxy.protocol === "https:") {
14442
+ debug3("Creating `tls.Socket`: %o", this.connectOpts);
14443
+ socket = tls2.connect(setServernameFromNonIpHost(this.connectOpts));
14444
+ } else {
14445
+ debug3("Creating `net.Socket`: %o", this.connectOpts);
14446
+ socket = net2.connect(this.connectOpts);
14447
+ }
14448
+ const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders };
14449
+ const host = net2.isIPv6(opts.host) ? `[${opts.host}]` : opts.host;
14450
+ let payload6 = `CONNECT ${host}:${opts.port} HTTP/1.1\r
14451
+ `;
14452
+ if (proxy.username || proxy.password) {
14453
+ const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`;
14454
+ headers["Proxy-Authorization"] = `Basic ${Buffer.from(auth).toString("base64")}`;
14455
+ }
14456
+ headers.Host = `${host}:${opts.port}`;
14457
+ if (!headers["Proxy-Connection"]) {
14458
+ headers["Proxy-Connection"] = this.keepAlive ? "Keep-Alive" : "close";
14459
+ }
14460
+ for (const name of Object.keys(headers)) {
14461
+ payload6 += `${name}: ${headers[name]}\r
14462
+ `;
14463
+ }
14464
+ const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket);
14465
+ socket.write(`${payload6}\r
14466
+ `);
14467
+ const { connect: connect3, buffered } = await proxyResponsePromise;
14468
+ req.emit("proxyConnect", connect3);
14469
+ this.emit("proxyConnect", connect3, req);
14470
+ if (connect3.statusCode === 200) {
14471
+ req.once("socket", resume2);
14472
+ if (opts.secureEndpoint) {
14473
+ debug3("Upgrading socket connection to TLS");
14474
+ return tls2.connect({
14475
+ ...omit2(setServernameFromNonIpHost(opts), "host", "path", "port"),
14476
+ socket
14477
+ });
14478
+ }
14479
+ return socket;
14480
+ }
14481
+ socket.destroy();
14482
+ const fakeSocket = new net2.Socket({ writable: false });
14483
+ fakeSocket.readable = true;
14484
+ req.once("socket", (s2) => {
14485
+ debug3("Replaying proxy buffer for failed request");
14486
+ (0, assert_1.default)(s2.listenerCount("data") > 0);
14487
+ s2.push(buffered);
14488
+ s2.push(null);
14489
+ });
14490
+ return fakeSocket;
14491
+ }
14492
+ };
14493
+ HttpsProxyAgent3.protocols = ["http", "https"];
14494
+ exports.HttpsProxyAgent = HttpsProxyAgent3;
14495
+ function resume2(socket) {
14496
+ socket.resume();
14497
+ }
14498
+ function omit2(obj, ...keys) {
14499
+ const ret = {};
14500
+ let key;
14501
+ for (key in obj) {
14502
+ if (!keys.includes(key)) {
14503
+ ret[key] = obj[key];
14504
+ }
14505
+ }
14506
+ return ret;
14507
+ }
14508
+ }
14509
+ });
14510
+
14511
+ // ../../node_modules/proxy-from-env/index.js
14512
+ var require_proxy_from_env = __commonJS({
14513
+ "../../node_modules/proxy-from-env/index.js"(exports) {
14514
+ "use strict";
14515
+ init_esm_shims();
14516
+ var parseUrl2 = __require("url").parse;
14517
+ var DEFAULT_PORTS = {
14518
+ ftp: 21,
14519
+ gopher: 70,
14520
+ http: 80,
14521
+ https: 443,
14522
+ ws: 80,
14523
+ wss: 443
14524
+ };
14525
+ var stringEndsWith = String.prototype.endsWith || function(s2) {
14526
+ return s2.length <= this.length && this.indexOf(s2, this.length - s2.length) !== -1;
14527
+ };
14528
+ function getProxyForUrl2(url) {
14529
+ var parsedUrl = typeof url === "string" ? parseUrl2(url) : url || {};
14530
+ var proto2 = parsedUrl.protocol;
14531
+ var hostname2 = parsedUrl.host;
14532
+ var port = parsedUrl.port;
14533
+ if (typeof hostname2 !== "string" || !hostname2 || typeof proto2 !== "string") {
14534
+ return "";
14535
+ }
14536
+ proto2 = proto2.split(":", 1)[0];
14537
+ hostname2 = hostname2.replace(/:\d*$/, "");
14538
+ port = parseInt(port) || DEFAULT_PORTS[proto2] || 0;
14539
+ if (!shouldProxy(hostname2, port)) {
14540
+ return "";
14541
+ }
14542
+ var proxy = getEnv2("npm_config_" + proto2 + "_proxy") || getEnv2(proto2 + "_proxy") || getEnv2("npm_config_proxy") || getEnv2("all_proxy");
14543
+ if (proxy && proxy.indexOf("://") === -1) {
14544
+ proxy = proto2 + "://" + proxy;
14545
+ }
14546
+ return proxy;
14547
+ }
14548
+ function shouldProxy(hostname2, port) {
14549
+ var NO_PROXY = (getEnv2("npm_config_no_proxy") || getEnv2("no_proxy")).toLowerCase();
14550
+ if (!NO_PROXY) {
14551
+ return true;
14552
+ }
14553
+ if (NO_PROXY === "*") {
14554
+ return false;
14555
+ }
14556
+ return NO_PROXY.split(/[,\s]/).every(function(proxy) {
14557
+ if (!proxy) {
14558
+ return true;
14559
+ }
14560
+ var parsedProxy = proxy.match(/^(.+):(\d+)$/);
14561
+ var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
14562
+ var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
14563
+ if (parsedProxyPort && parsedProxyPort !== port) {
14564
+ return true;
14565
+ }
14566
+ if (!/^[.*]/.test(parsedProxyHostname)) {
14567
+ return hostname2 !== parsedProxyHostname;
14568
+ }
14569
+ if (parsedProxyHostname.charAt(0) === "*") {
14570
+ parsedProxyHostname = parsedProxyHostname.slice(1);
14571
+ }
14572
+ return !stringEndsWith.call(hostname2, parsedProxyHostname);
14573
+ });
14574
+ }
14575
+ function getEnv2(key) {
14576
+ return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
14577
+ }
14578
+ exports.getProxyForUrl = getProxyForUrl2;
14579
+ }
14580
+ });
14581
+
14035
14582
  // ../../node_modules/void-elements/index.js
14036
14583
  var require_void_elements = __commonJS({
14037
14584
  "../../node_modules/void-elements/index.js"(exports, module2) {
@@ -29454,7 +30001,7 @@ var require_kebabCase = __commonJS({
29454
30001
  });
29455
30002
 
29456
30003
  // ../../node_modules/@vercel/detect-agent/dist/index.js
29457
- var require_dist = __commonJS({
30004
+ var require_dist3 = __commonJS({
29458
30005
  "../../node_modules/@vercel/detect-agent/dist/index.js"(exports, module2) {
29459
30006
  "use strict";
29460
30007
  init_esm_shims();
@@ -30593,7 +31140,7 @@ var require_bi_logger_factory = __commonJS({
30593
31140
  });
30594
31141
 
30595
31142
  // ../../node_modules/@wix/wix-bi-logger-client/dist/index.js
30596
- var require_dist2 = __commonJS({
31143
+ var require_dist4 = __commonJS({
30597
31144
  "../../node_modules/@wix/wix-bi-logger-client/dist/index.js"(exports, module2) {
30598
31145
  "use strict";
30599
31146
  init_esm_shims();
@@ -32101,7 +32648,7 @@ var require_ca_file = __commonJS({
32101
32648
  });
32102
32649
 
32103
32650
  // ../../node_modules/@pnpm/network.ca-file/dist/index.js
32104
- var require_dist3 = __commonJS({
32651
+ var require_dist5 = __commonJS({
32105
32652
  "../../node_modules/@pnpm/network.ca-file/dist/index.js"(exports) {
32106
32653
  "use strict";
32107
32654
  init_esm_shims();
@@ -32527,7 +33074,7 @@ var require_env_replace = __commonJS({
32527
33074
  });
32528
33075
 
32529
33076
  // ../../node_modules/@pnpm/config.env-replace/dist/index.js
32530
- var require_dist4 = __commonJS({
33077
+ var require_dist6 = __commonJS({
32531
33078
  "../../node_modules/@pnpm/config.env-replace/dist/index.js"(exports) {
32532
33079
  "use strict";
32533
33080
  init_esm_shims();
@@ -32547,7 +33094,7 @@ var require_util = __commonJS({
32547
33094
  init_esm_shims();
32548
33095
  var fs6 = __require("fs");
32549
33096
  var path4 = __require("path");
32550
- var { envReplace } = require_dist4();
33097
+ var { envReplace } = require_dist6();
32551
33098
  var parseKey = (key) => {
32552
33099
  if (typeof key !== "string") {
32553
33100
  return key;
@@ -32791,7 +33338,7 @@ var require_conf = __commonJS({
32791
33338
  "../../node_modules/@pnpm/npm-conf/lib/conf.js"(exports, module2) {
32792
33339
  "use strict";
32793
33340
  init_esm_shims();
32794
- var { readCAFileSync } = require_dist3();
33341
+ var { readCAFileSync } = require_dist5();
32795
33342
  var fs6 = __require("fs");
32796
33343
  var path4 = __require("path");
32797
33344
  var { ConfigChain } = require_config_chain();
@@ -41089,6 +41636,8 @@ function revokeRefreshToken(payload6) {
41089
41636
  // ../cli-http-client/src/create-http-client.ts
41090
41637
  init_esm_shims();
41091
41638
  var import_http_client2 = __toESM(require_index_node(), 1);
41639
+ var import_https_proxy_agent = __toESM(require_dist2(), 1);
41640
+ var import_proxy_from_env = __toESM(require_proxy_from_env(), 1);
41092
41641
 
41093
41642
  // ../cli-http-client/src/is-http-error.ts
41094
41643
  init_esm_shims();
@@ -41165,6 +41714,10 @@ var baseUrls = {
41165
41714
  api: "https://www.wixapis.com",
41166
41715
  standalone: void 0
41167
41716
  };
41717
+ function createProxyAgent(baseUrl) {
41718
+ const proxyUrl = baseUrl ? (0, import_proxy_from_env.getProxyForUrl)(baseUrl) : process.env.HTTPS_PROXY ?? process.env.https_proxy ?? "";
41719
+ return proxyUrl ? new import_https_proxy_agent.HttpsProxyAgent(proxyUrl) : void 0;
41720
+ }
41168
41721
  function interceptRequest(client2, fn) {
41169
41722
  return (...args) => fn.apply(client2, args).catch((error) => {
41170
41723
  if (isHttpError(error) && !client2.isCancel(error) && !error.response) {
@@ -41194,6 +41747,8 @@ function createHttpClient({
41194
41747
  Cookie: "XSRF-TOKEN=nocheck",
41195
41748
  "User-Agent": "wix-cli"
41196
41749
  }),
41750
+ proxy: false,
41751
+ httpsAgent: createProxyAgent(baseUrls[type]),
41197
41752
  // https://github.com/axios/axios/issues/4263 - fixed in Axios ^1.x.x but currently cannot be bumped in Wix Http Client
41198
41753
  maxBodyLength: Infinity,
41199
41754
  maxContentLength: Infinity
@@ -48749,6 +49304,7 @@ function buildVerificationUris(verificationUri) {
48749
49304
  coloredUri.searchParams.set("studio", "true");
48750
49305
  const signupUri = new URL("https://users.wix.com/login/signup/password");
48751
49306
  signupUri.searchParams.set("redirectTo", coloredUri.href);
49307
+ signupUri.searchParams.set("referralInfo", "cli");
48752
49308
  return {
48753
49309
  coloredVerificationUri: coloredUri.toString(),
48754
49310
  signupUri: signupUri.toString()
@@ -53641,7 +54197,7 @@ function parseProxyResponse(socket) {
53641
54197
  function debug2(...args) {
53642
54198
  logger.log("[https-proxy-agent]", ...args);
53643
54199
  }
53644
- var HttpsProxyAgent = class extends Agent2 {
54200
+ var HttpsProxyAgent2 = class extends Agent2 {
53645
54201
  static __initStatic() {
53646
54202
  this.protocols = ["http", "https"];
53647
54203
  }
@@ -53728,7 +54284,7 @@ var HttpsProxyAgent = class extends Agent2 {
53728
54284
  return fakeSocket;
53729
54285
  }
53730
54286
  };
53731
- HttpsProxyAgent.__initStatic();
54287
+ HttpsProxyAgent2.__initStatic();
53732
54288
  function resume(socket) {
53733
54289
  socket.resume();
53734
54290
  }
@@ -53772,7 +54328,7 @@ function makeNodeTransport(options) {
53772
54328
  );
53773
54329
  const nativeHttpModule = isHttps ? https : http2;
53774
54330
  const keepAlive = options.keepAlive === void 0 ? false : options.keepAlive;
53775
- const agent = proxy ? new HttpsProxyAgent(proxy) : new nativeHttpModule.Agent({ keepAlive, maxSockets: 30, timeout: 2e3 });
54331
+ const agent = proxy ? new HttpsProxyAgent2(proxy) : new nativeHttpModule.Agent({ keepAlive, maxSockets: 30, timeout: 2e3 });
53776
54332
  return suppressTracing(() => {
53777
54333
  const requestExecutor = createRequestExecutor(options, _nullishCoalesce(options.httpModule, () => nativeHttpModule), agent);
53778
54334
  return createTransport(options, requestExecutor);
@@ -55906,7 +56462,7 @@ function getFullCommandName(command) {
55906
56462
  }
55907
56463
 
55908
56464
  // src/index.tsx
55909
- var import_detect_agent = __toESM(require_dist(), 1);
56465
+ var import_detect_agent = __toESM(require_dist3(), 1);
55910
56466
  import { randomUUID as randomUUID2 } from "node:crypto";
55911
56467
 
55912
56468
  // src/bi/index.ts
@@ -55971,7 +56527,7 @@ init_esm_shims();
55971
56527
  // ../../node_modules/@wix/standalone-node-bi-logger/dist/es/src/index.js
55972
56528
  init_esm_shims();
55973
56529
  init_tslib_es6();
55974
- var import_wix_bi_logger_client = __toESM(require_dist2());
56530
+ var import_wix_bi_logger_client = __toESM(require_dist4());
55975
56531
  var import_http_client5 = __toESM(require_index_node());
55976
56532
  var defaultOptions2 = {
55977
56533
  baseUrl: process.env.BI_BASE_URL || "https://frog.wix.com",
@@ -56118,6 +56674,8 @@ function reportCommandStartEvent({
56118
56674
  flow,
56119
56675
  cliVersion,
56120
56676
  projectId,
56677
+ msid,
56678
+ appId,
56121
56679
  extensions,
56122
56680
  extraFields
56123
56681
  }) {
@@ -56141,16 +56699,22 @@ function reportCommandStartEvent({
56141
56699
  ...commandFields,
56142
56700
  ...projectId ? { projectId } : {},
56143
56701
  ...extraFields ? { extraFields: JSON.stringify(extraFields) } : {},
56702
+ ...msid ? { _msid: msid } : {},
56703
+ ...appId ? { _appId: appId } : {},
56144
56704
  isValid: true
56145
56705
  })
56146
56706
  );
56147
56707
  return {
56148
- succeed() {
56708
+ succeed(fields10) {
56709
+ const _msid = fields10?.msid ?? msid;
56710
+ const _appId = fields10?.appId ?? appId;
56149
56711
  void biLogger.report(
56150
56712
  wixCliCliCommandStatus({
56151
56713
  ...commandFields,
56152
56714
  ...extensions ? { extensions: JSON.stringify(extensions) } : {},
56153
56715
  duration: getDuration(),
56716
+ ..._msid ? { _msid } : {},
56717
+ ..._appId ? { _appId } : {},
56154
56718
  isSuccess: true,
56155
56719
  isValid: true
56156
56720
  })
@@ -56187,7 +56751,7 @@ function reportCommandStartEvent({
56187
56751
  var package_default = {
56188
56752
  name: "@wix/create-app",
56189
56753
  description: "Create Wix apps",
56190
- version: "0.0.227",
56754
+ version: "0.0.229",
56191
56755
  author: "Ihor Machuzhak",
56192
56756
  bin: "bin/index.cjs",
56193
56757
  devDependencies: {
@@ -58079,7 +58643,7 @@ function queryApp(payload6) {
58079
58643
  return __queryApp;
58080
58644
  }
58081
58645
 
58082
- // ../../node_modules/@wix/ambassador-headless-v1-o-auth-app/build/es/http.impl.js
58646
+ // ../../node_modules/@wix/ambassador-headless-v1-o-auth-app/es/build/http.impl.js
58083
58647
  init_esm_shims();
58084
58648
  var _createOAuthAppRequest = { oAuthApp: "_oAuthApp" };
58085
58649
  var _createOAuthAppResponse = { oAuthApp: "_oAuthApp" };
@@ -65647,7 +66211,8 @@ var DevCenterClient = class {
65647
66211
  mask: [
65648
66212
  "allowedDomains",
65649
66213
  "allowedRedirectUris",
65650
- "redirectUrlWixPages"
66214
+ "redirectUrlWixPages",
66215
+ "origin"
65651
66216
  ]
65652
66217
  })
65653
66218
  );