@wix/create-headless-site 0.0.15 → 0.0.17
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 +1650 -427
- package/build/index.js.map +1 -1
- package/package.json +4 -3
package/build/index.js
CHANGED
|
@@ -7668,10 +7668,10 @@ var require_variant_tools = __commonJS({
|
|
|
7668
7668
|
init_esm_shims();
|
|
7669
7669
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7670
7670
|
exports.nil = exports.payload = exports.fields = void 0;
|
|
7671
|
-
function fields10(
|
|
7671
|
+
function fields10(defaults4 = {}) {
|
|
7672
7672
|
return (...args) => {
|
|
7673
7673
|
const [arg] = args;
|
|
7674
|
-
return Object.assign(Object.assign({},
|
|
7674
|
+
return Object.assign(Object.assign({}, defaults4), arg);
|
|
7675
7675
|
};
|
|
7676
7676
|
}
|
|
7677
7677
|
exports.fields = fields10;
|
|
@@ -12367,30 +12367,30 @@ var require_utils = __commonJS({
|
|
|
12367
12367
|
exports.changeHost = changeHost;
|
|
12368
12368
|
function getGlobalConfig() {
|
|
12369
12369
|
const defaultConfig = { httpMockServer: { enabled: false } };
|
|
12370
|
-
let
|
|
12370
|
+
let globalConfig2;
|
|
12371
12371
|
if ((0, env_util_1.isNode)() && process.env.HTTP_CLIENT_GLOBAL_CONFIG) {
|
|
12372
12372
|
try {
|
|
12373
|
-
|
|
12373
|
+
globalConfig2 = JSON.parse(process.env.HTTP_CLIENT_GLOBAL_CONFIG);
|
|
12374
12374
|
} catch (e2) {
|
|
12375
12375
|
}
|
|
12376
12376
|
}
|
|
12377
|
-
if (!
|
|
12377
|
+
if (!globalConfig2) {
|
|
12378
12378
|
if ((0, env_util_1.isBrowser)()) {
|
|
12379
|
-
|
|
12379
|
+
globalConfig2 = window._httpClientGlobalConfig;
|
|
12380
12380
|
} else if ((0, env_util_1.isWebWorker)()) {
|
|
12381
12381
|
}
|
|
12382
12382
|
}
|
|
12383
|
-
return
|
|
12383
|
+
return globalConfig2 || defaultConfig;
|
|
12384
12384
|
}
|
|
12385
12385
|
exports.getGlobalConfig = getGlobalConfig;
|
|
12386
12386
|
function isHttpMockServerEnabled() {
|
|
12387
|
-
const
|
|
12388
|
-
return
|
|
12387
|
+
const globalConfig2 = getGlobalConfig();
|
|
12388
|
+
return globalConfig2.httpMockServer.enabled;
|
|
12389
12389
|
}
|
|
12390
12390
|
exports.isHttpMockServerEnabled = isHttpMockServerEnabled;
|
|
12391
12391
|
function shouldAllowUnmocked() {
|
|
12392
|
-
const
|
|
12393
|
-
return
|
|
12392
|
+
const globalConfig2 = getGlobalConfig();
|
|
12393
|
+
return globalConfig2.httpMockServer.allowUnmocked;
|
|
12394
12394
|
}
|
|
12395
12395
|
exports.shouldAllowUnmocked = shouldAllowUnmocked;
|
|
12396
12396
|
function toSearchQueryParams(params) {
|
|
@@ -14719,7 +14719,7 @@ var require_defaults = __commonJS({
|
|
|
14719
14719
|
}
|
|
14720
14720
|
return (encoder || JSON.stringify)(rawValue);
|
|
14721
14721
|
}
|
|
14722
|
-
var
|
|
14722
|
+
var defaults4 = {
|
|
14723
14723
|
transitional: {
|
|
14724
14724
|
silentJSONParsing: true,
|
|
14725
14725
|
forcedJSONParsing: true,
|
|
@@ -14777,18 +14777,18 @@ var require_defaults = __commonJS({
|
|
|
14777
14777
|
return status >= 200 && status < 300;
|
|
14778
14778
|
}
|
|
14779
14779
|
};
|
|
14780
|
-
|
|
14780
|
+
defaults4.headers = {
|
|
14781
14781
|
common: {
|
|
14782
14782
|
"Accept": "application/json, text/plain, */*"
|
|
14783
14783
|
}
|
|
14784
14784
|
};
|
|
14785
14785
|
utils.forEach(["delete", "get", "head"], function forEachMethodNoData(method) {
|
|
14786
|
-
|
|
14786
|
+
defaults4.headers[method] = {};
|
|
14787
14787
|
});
|
|
14788
14788
|
utils.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
|
|
14789
|
-
|
|
14789
|
+
defaults4.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
|
|
14790
14790
|
});
|
|
14791
|
-
module2.exports =
|
|
14791
|
+
module2.exports = defaults4;
|
|
14792
14792
|
}
|
|
14793
14793
|
});
|
|
14794
14794
|
|
|
@@ -14798,9 +14798,9 @@ var require_transformData = __commonJS({
|
|
|
14798
14798
|
"use strict";
|
|
14799
14799
|
init_esm_shims();
|
|
14800
14800
|
var utils = require_utils2();
|
|
14801
|
-
var
|
|
14801
|
+
var defaults4 = require_defaults();
|
|
14802
14802
|
module2.exports = function transformData(data, headers, fns) {
|
|
14803
|
-
var context2 = this ||
|
|
14803
|
+
var context2 = this || defaults4;
|
|
14804
14804
|
utils.forEach(fns, function transform(fn) {
|
|
14805
14805
|
data = fn.call(context2, data, headers);
|
|
14806
14806
|
});
|
|
@@ -14828,7 +14828,7 @@ var require_dispatchRequest = __commonJS({
|
|
|
14828
14828
|
var utils = require_utils2();
|
|
14829
14829
|
var transformData = require_transformData();
|
|
14830
14830
|
var isCancel = require_isCancel();
|
|
14831
|
-
var
|
|
14831
|
+
var defaults4 = require_defaults();
|
|
14832
14832
|
function throwIfCancellationRequested(config) {
|
|
14833
14833
|
if (config.cancelToken) {
|
|
14834
14834
|
config.cancelToken.throwIfRequested();
|
|
@@ -14854,7 +14854,7 @@ var require_dispatchRequest = __commonJS({
|
|
|
14854
14854
|
delete config.headers[method];
|
|
14855
14855
|
}
|
|
14856
14856
|
);
|
|
14857
|
-
var adapter = config.adapter ||
|
|
14857
|
+
var adapter = config.adapter || defaults4.adapter;
|
|
14858
14858
|
return adapter(config).then(function onAdapterResolution(response) {
|
|
14859
14859
|
throwIfCancellationRequested(config);
|
|
14860
14860
|
response.data = transformData.call(
|
|
@@ -15247,7 +15247,7 @@ var require_axios = __commonJS({
|
|
|
15247
15247
|
var bind = require_bind();
|
|
15248
15248
|
var Axios = require_Axios();
|
|
15249
15249
|
var mergeConfig2 = require_mergeConfig();
|
|
15250
|
-
var
|
|
15250
|
+
var defaults4 = require_defaults();
|
|
15251
15251
|
function createInstance4(defaultConfig) {
|
|
15252
15252
|
var context2 = new Axios(defaultConfig);
|
|
15253
15253
|
var instance2 = bind(Axios.prototype.request, context2);
|
|
@@ -15255,7 +15255,7 @@ var require_axios = __commonJS({
|
|
|
15255
15255
|
utils.extend(instance2, context2);
|
|
15256
15256
|
return instance2;
|
|
15257
15257
|
}
|
|
15258
|
-
var axios = createInstance4(
|
|
15258
|
+
var axios = createInstance4(defaults4);
|
|
15259
15259
|
axios.Axios = Axios;
|
|
15260
15260
|
axios.create = function create3(instanceConfig) {
|
|
15261
15261
|
return createInstance4(mergeConfig2(axios.defaults, instanceConfig));
|
|
@@ -15292,7 +15292,7 @@ var require_options = __commonJS({
|
|
|
15292
15292
|
var constants_1 = require_constants2();
|
|
15293
15293
|
var headers_1 = require_headers();
|
|
15294
15294
|
var utils_1 = require_utils();
|
|
15295
|
-
var buildOptions = ({ requestOptions, urlObject, headers, globalConfig = {
|
|
15295
|
+
var buildOptions = ({ requestOptions, urlObject, headers, globalConfig: globalConfig2 = {
|
|
15296
15296
|
httpMockServer: {
|
|
15297
15297
|
enabled: false
|
|
15298
15298
|
}
|
|
@@ -15303,12 +15303,12 @@ var require_options = __commonJS({
|
|
|
15303
15303
|
throw new Error("Search params must be an object");
|
|
15304
15304
|
}
|
|
15305
15305
|
}
|
|
15306
|
-
const localConfigOptions = maybeRedirectToMockServer(url2,
|
|
15306
|
+
const localConfigOptions = maybeRedirectToMockServer(url2, globalConfig2);
|
|
15307
15307
|
const newOptions = Object.assign(Object.assign(Object.assign({}, requestOptions), localConfigOptions), { headers });
|
|
15308
15308
|
return newOptions;
|
|
15309
15309
|
};
|
|
15310
15310
|
exports.buildOptions = buildOptions;
|
|
15311
|
-
var buildAllHeaders = (requestOptions, wixHeadersOpts,
|
|
15311
|
+
var buildAllHeaders = (requestOptions, wixHeadersOpts, globalConfig2 = {
|
|
15312
15312
|
httpMockServer: {
|
|
15313
15313
|
enabled: false
|
|
15314
15314
|
}
|
|
@@ -15319,14 +15319,14 @@ var require_options = __commonJS({
|
|
|
15319
15319
|
disableWixHeaders,
|
|
15320
15320
|
wixHeadersOpts
|
|
15321
15321
|
});
|
|
15322
|
-
const originalUrlHeader = (0, exports.getUrlHeaders)(
|
|
15322
|
+
const originalUrlHeader = (0, exports.getUrlHeaders)(globalConfig2, requestOptions, urlObject);
|
|
15323
15323
|
return Object.assign(Object.assign(Object.assign({}, composedHeaders), lowerAllJsonKeys(headers)), originalUrlHeader);
|
|
15324
15324
|
};
|
|
15325
15325
|
exports.buildAllHeaders = buildAllHeaders;
|
|
15326
|
-
var getUrlHeaders = (
|
|
15326
|
+
var getUrlHeaders = (globalConfig2, requestOptions, urlObject) => {
|
|
15327
15327
|
const { url: url2, params } = requestOptions;
|
|
15328
15328
|
const { host, protocol } = urlObject;
|
|
15329
|
-
const originalUrlHeader =
|
|
15329
|
+
const originalUrlHeader = globalConfig2.httpMockServer.enabled ? {
|
|
15330
15330
|
[constants_1.ORIGINAL_URL_HEADER]: buildUrlFromRequest(url2, params),
|
|
15331
15331
|
[constants_1.ORIGINAL_HOST_HEADER]: (0, utils_1.isAbsoluteUrl)(url2) ? (0, utils_1.extractHost)(url2) : host,
|
|
15332
15332
|
[constants_1.ORIGINAL_PROTOCOL_HEADER]: (0, utils_1.isAbsoluteUrl)(url2) ? (0, utils_1.extractProtocol)(url2) : protocol
|
|
@@ -15334,9 +15334,9 @@ var require_options = __commonJS({
|
|
|
15334
15334
|
return originalUrlHeader;
|
|
15335
15335
|
};
|
|
15336
15336
|
exports.getUrlHeaders = getUrlHeaders;
|
|
15337
|
-
function maybeRedirectToMockServer(url2,
|
|
15338
|
-
if (
|
|
15339
|
-
const mockUrl = new URL(
|
|
15337
|
+
function maybeRedirectToMockServer(url2, globalConfig2) {
|
|
15338
|
+
if (globalConfig2.httpMockServer.enabled) {
|
|
15339
|
+
const mockUrl = new URL(globalConfig2.httpMockServer.mockServerUrl);
|
|
15340
15340
|
return {
|
|
15341
15341
|
url: (0, utils_1.changeHost)(url2, mockUrl.host)
|
|
15342
15342
|
};
|
|
@@ -15389,13 +15389,13 @@ var require_http_client = __commonJS({
|
|
|
15389
15389
|
static isHttpError(payload5) {
|
|
15390
15390
|
return !!(payload5 === null || payload5 === void 0 ? void 0 : payload5.isWixHttpError);
|
|
15391
15391
|
}
|
|
15392
|
-
async request(requestOptionsOrFactory,
|
|
15392
|
+
async request(requestOptionsOrFactory, overrides2) {
|
|
15393
15393
|
var _a3, _b;
|
|
15394
15394
|
const host = (0, utils_1.resolveHost)(this.opts);
|
|
15395
15395
|
const protocol = (0, utils_1.resolveProtocol)(this.opts);
|
|
15396
15396
|
const urlObject = { protocol, host };
|
|
15397
15397
|
const requestOptions = typeof requestOptionsOrFactory === "function" ? requestOptionsOrFactory({ isSSR: this.opts.isSSR, host }) : requestOptionsOrFactory;
|
|
15398
|
-
const signedInstance = (
|
|
15398
|
+
const signedInstance = (overrides2 === null || overrides2 === void 0 ? void 0 : overrides2.signedInstance) || await ((_b = (_a3 = this.opts).getAppToken) === null || _b === void 0 ? void 0 : _b.call(_a3)) || "";
|
|
15399
15399
|
const headers = this.getHeaders(requestOptions, signedInstance, urlObject);
|
|
15400
15400
|
const options = (0, options_1.buildOptions)({
|
|
15401
15401
|
requestOptions,
|
|
@@ -15731,7 +15731,7 @@ var require_main = __commonJS({
|
|
|
15731
15731
|
var fs11 = __require("fs");
|
|
15732
15732
|
var path8 = __require("path");
|
|
15733
15733
|
var os8 = __require("os");
|
|
15734
|
-
var
|
|
15734
|
+
var crypto4 = __require("crypto");
|
|
15735
15735
|
var packageJson2 = require_package2();
|
|
15736
15736
|
var version = packageJson2.version;
|
|
15737
15737
|
var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
|
|
@@ -15927,7 +15927,7 @@ var require_main = __commonJS({
|
|
|
15927
15927
|
const authTag = ciphertext.subarray(-16);
|
|
15928
15928
|
ciphertext = ciphertext.subarray(12, -16);
|
|
15929
15929
|
try {
|
|
15930
|
-
const aesgcm =
|
|
15930
|
+
const aesgcm = crypto4.createDecipheriv("aes-256-gcm", key, nonce);
|
|
15931
15931
|
aesgcm.setAuthTag(authTag);
|
|
15932
15932
|
return `${aesgcm.update(ciphertext)}${aesgcm.final()}`;
|
|
15933
15933
|
} catch (error) {
|
|
@@ -21992,8 +21992,8 @@ var require_require_in_the_middle = __commonJS({
|
|
|
21992
21992
|
var resolve5 = require_resolve();
|
|
21993
21993
|
var debug3 = require_src()("require-in-the-middle");
|
|
21994
21994
|
var moduleDetailsFromPath = require_module_details_from_path();
|
|
21995
|
-
module2.exports =
|
|
21996
|
-
module2.exports.Hook =
|
|
21995
|
+
module2.exports = Hook3;
|
|
21996
|
+
module2.exports.Hook = Hook3;
|
|
21997
21997
|
var isCore;
|
|
21998
21998
|
if (Module.isBuiltin) {
|
|
21999
21999
|
isCore = Module.isBuiltin;
|
|
@@ -22048,8 +22048,8 @@ var require_require_in_the_middle = __commonJS({
|
|
|
22048
22048
|
}
|
|
22049
22049
|
}
|
|
22050
22050
|
};
|
|
22051
|
-
function
|
|
22052
|
-
if (this instanceof
|
|
22051
|
+
function Hook3(modules, options, onrequire) {
|
|
22052
|
+
if (this instanceof Hook3 === false) return new Hook3(modules, options, onrequire);
|
|
22053
22053
|
if (typeof modules === "function") {
|
|
22054
22054
|
onrequire = modules;
|
|
22055
22055
|
modules = null;
|
|
@@ -22190,7 +22190,7 @@ var require_require_in_the_middle = __commonJS({
|
|
|
22190
22190
|
return patchedExports;
|
|
22191
22191
|
}
|
|
22192
22192
|
}
|
|
22193
|
-
|
|
22193
|
+
Hook3.prototype.unhook = function() {
|
|
22194
22194
|
this._unhooked = true;
|
|
22195
22195
|
if (this._require === Module.prototype.require) {
|
|
22196
22196
|
Module.prototype.require = this._origRequire;
|
|
@@ -22500,8 +22500,8 @@ var require_import_in_the_middle = __commonJS({
|
|
|
22500
22500
|
namespace.default = newDefault;
|
|
22501
22501
|
}
|
|
22502
22502
|
}
|
|
22503
|
-
function
|
|
22504
|
-
if (this instanceof
|
|
22503
|
+
function Hook3(modules, options, hookFn) {
|
|
22504
|
+
if (this instanceof Hook3 === false) return new Hook3(modules, options, hookFn);
|
|
22505
22505
|
if (typeof modules === "function") {
|
|
22506
22506
|
hookFn = modules;
|
|
22507
22507
|
modules = null;
|
|
@@ -22549,11 +22549,11 @@ var require_import_in_the_middle = __commonJS({
|
|
|
22549
22549
|
};
|
|
22550
22550
|
addHook(this._iitmHook);
|
|
22551
22551
|
}
|
|
22552
|
-
|
|
22552
|
+
Hook3.prototype.unhook = function() {
|
|
22553
22553
|
removeHook(this._iitmHook);
|
|
22554
22554
|
};
|
|
22555
|
-
module2.exports =
|
|
22556
|
-
module2.exports.Hook =
|
|
22555
|
+
module2.exports = Hook3;
|
|
22556
|
+
module2.exports.Hook = Hook3;
|
|
22557
22557
|
module2.exports.addHook = addHook;
|
|
22558
22558
|
module2.exports.removeHook = removeHook;
|
|
22559
22559
|
}
|
|
@@ -32829,6 +32829,76 @@ var require_extra_typings = __commonJS({
|
|
|
32829
32829
|
}
|
|
32830
32830
|
});
|
|
32831
32831
|
|
|
32832
|
+
// ../../node_modules/@babel/runtime/helpers/typeof.js
|
|
32833
|
+
var require_typeof = __commonJS({
|
|
32834
|
+
"../../node_modules/@babel/runtime/helpers/typeof.js"(exports, module2) {
|
|
32835
|
+
"use strict";
|
|
32836
|
+
init_esm_shims();
|
|
32837
|
+
function _typeof(o) {
|
|
32838
|
+
"@babel/helpers - typeof";
|
|
32839
|
+
return module2.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
|
|
32840
|
+
return typeof o2;
|
|
32841
|
+
} : function(o2) {
|
|
32842
|
+
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
|
32843
|
+
}, module2.exports.__esModule = true, module2.exports["default"] = module2.exports, _typeof(o);
|
|
32844
|
+
}
|
|
32845
|
+
module2.exports = _typeof, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
|
|
32846
|
+
}
|
|
32847
|
+
});
|
|
32848
|
+
|
|
32849
|
+
// ../../node_modules/@babel/runtime/helpers/toPrimitive.js
|
|
32850
|
+
var require_toPrimitive = __commonJS({
|
|
32851
|
+
"../../node_modules/@babel/runtime/helpers/toPrimitive.js"(exports, module2) {
|
|
32852
|
+
"use strict";
|
|
32853
|
+
init_esm_shims();
|
|
32854
|
+
var _typeof = require_typeof()["default"];
|
|
32855
|
+
function toPrimitive(t3, r2) {
|
|
32856
|
+
if ("object" != _typeof(t3) || !t3) return t3;
|
|
32857
|
+
var e2 = t3[Symbol.toPrimitive];
|
|
32858
|
+
if (void 0 !== e2) {
|
|
32859
|
+
var i2 = e2.call(t3, r2 || "default");
|
|
32860
|
+
if ("object" != _typeof(i2)) return i2;
|
|
32861
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
32862
|
+
}
|
|
32863
|
+
return ("string" === r2 ? String : Number)(t3);
|
|
32864
|
+
}
|
|
32865
|
+
module2.exports = toPrimitive, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
|
|
32866
|
+
}
|
|
32867
|
+
});
|
|
32868
|
+
|
|
32869
|
+
// ../../node_modules/@babel/runtime/helpers/toPropertyKey.js
|
|
32870
|
+
var require_toPropertyKey = __commonJS({
|
|
32871
|
+
"../../node_modules/@babel/runtime/helpers/toPropertyKey.js"(exports, module2) {
|
|
32872
|
+
"use strict";
|
|
32873
|
+
init_esm_shims();
|
|
32874
|
+
var _typeof = require_typeof()["default"];
|
|
32875
|
+
var toPrimitive = require_toPrimitive();
|
|
32876
|
+
function toPropertyKey(t3) {
|
|
32877
|
+
var i2 = toPrimitive(t3, "string");
|
|
32878
|
+
return "symbol" == _typeof(i2) ? i2 : i2 + "";
|
|
32879
|
+
}
|
|
32880
|
+
module2.exports = toPropertyKey, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
|
|
32881
|
+
}
|
|
32882
|
+
});
|
|
32883
|
+
|
|
32884
|
+
// ../../node_modules/@babel/runtime/helpers/defineProperty.js
|
|
32885
|
+
var require_defineProperty = __commonJS({
|
|
32886
|
+
"../../node_modules/@babel/runtime/helpers/defineProperty.js"(exports, module2) {
|
|
32887
|
+
"use strict";
|
|
32888
|
+
init_esm_shims();
|
|
32889
|
+
var toPropertyKey = require_toPropertyKey();
|
|
32890
|
+
function _defineProperty8(e2, r2, t3) {
|
|
32891
|
+
return (r2 = toPropertyKey(r2)) in e2 ? Object.defineProperty(e2, r2, {
|
|
32892
|
+
value: t3,
|
|
32893
|
+
enumerable: true,
|
|
32894
|
+
configurable: true,
|
|
32895
|
+
writable: true
|
|
32896
|
+
}) : e2[r2] = t3, e2;
|
|
32897
|
+
}
|
|
32898
|
+
module2.exports = _defineProperty8, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
|
|
32899
|
+
}
|
|
32900
|
+
});
|
|
32901
|
+
|
|
32832
32902
|
// ../../node_modules/@wix/wix-bi-logger-client/dist/assert.js
|
|
32833
32903
|
var require_assert2 = __commonJS({
|
|
32834
32904
|
"../../node_modules/@wix/wix-bi-logger-client/dist/assert.js"(exports, module2) {
|
|
@@ -33372,8 +33442,8 @@ var require_bi_logger = __commonJS({
|
|
|
33372
33442
|
return queue.feed(transformedEvent, fullContext);
|
|
33373
33443
|
};
|
|
33374
33444
|
if (this._globalBatchQueue) {
|
|
33375
|
-
return this._getDefaults(this._defaults).then(function(
|
|
33376
|
-
var fullEvent2 = _extends2({},
|
|
33445
|
+
return this._getDefaults(this._defaults).then(function(defaults4) {
|
|
33446
|
+
var fullEvent2 = _extends2({}, defaults4, _this._getDynamicNonEssentialDefaults(policy), _this._getStaticNonEssentialDefaults(policy), event, _this._getPolicyFields(policy, fullContext.category));
|
|
33377
33447
|
return transformAndQueue(fullEvent2);
|
|
33378
33448
|
});
|
|
33379
33449
|
} else {
|
|
@@ -33381,8 +33451,8 @@ var require_bi_logger = __commonJS({
|
|
|
33381
33451
|
return transformAndQueue(fullEvent);
|
|
33382
33452
|
}
|
|
33383
33453
|
}
|
|
33384
|
-
return this._getDefaults(this._defaults).then(function(
|
|
33385
|
-
var fullEvent2 = Object.assign(
|
|
33454
|
+
return this._getDefaults(this._defaults).then(function(defaults4) {
|
|
33455
|
+
var fullEvent2 = Object.assign(defaults4, _this._getDynamicNonEssentialDefaults(policy), _this._getStaticNonEssentialDefaults(policy), event, _this._getPolicyFields(policy, fullContext.category));
|
|
33386
33456
|
var validatorsResult = _this._validators.length === 0 ? true : _this._validators.some(function(validator) {
|
|
33387
33457
|
return validator.match(fullEvent2) && (validator.execute(fullEvent2) || true);
|
|
33388
33458
|
});
|
|
@@ -33404,10 +33474,10 @@ var require_bi_logger = __commonJS({
|
|
|
33404
33474
|
}
|
|
33405
33475
|
}, {
|
|
33406
33476
|
key: "updateDefaults",
|
|
33407
|
-
value: function updateDefaults(
|
|
33408
|
-
assert.defined(
|
|
33409
|
-
assert.object(
|
|
33410
|
-
Object.assign(this._ownDefaults,
|
|
33477
|
+
value: function updateDefaults(defaults4) {
|
|
33478
|
+
assert.defined(defaults4, "Defaults must be provided");
|
|
33479
|
+
assert.object(defaults4, "Defaults must be an object");
|
|
33480
|
+
Object.assign(this._ownDefaults, defaults4);
|
|
33411
33481
|
return this;
|
|
33412
33482
|
}
|
|
33413
33483
|
}, {
|
|
@@ -33497,14 +33567,14 @@ var require_bi_logger = __commonJS({
|
|
|
33497
33567
|
}
|
|
33498
33568
|
}, {
|
|
33499
33569
|
key: "_withOwnDefaults",
|
|
33500
|
-
value: function _withOwnDefaults(
|
|
33501
|
-
return Object.assign({},
|
|
33570
|
+
value: function _withOwnDefaults(defaults4) {
|
|
33571
|
+
return Object.assign({}, defaults4, this._ownDefaults);
|
|
33502
33572
|
}
|
|
33503
33573
|
}, {
|
|
33504
33574
|
key: "_getDynamicDefaults",
|
|
33505
|
-
value: function _getDynamicDefaults(
|
|
33506
|
-
|
|
33507
|
-
var dynamicDefaults = filterValues(
|
|
33575
|
+
value: function _getDynamicDefaults(defaults4) {
|
|
33576
|
+
defaults4 = this._withOwnDefaults(defaults4);
|
|
33577
|
+
var dynamicDefaults = filterValues(defaults4, function(v) {
|
|
33508
33578
|
return typeof v === "function";
|
|
33509
33579
|
});
|
|
33510
33580
|
return mapValues(dynamicDefaults, function(v) {
|
|
@@ -33513,22 +33583,22 @@ var require_bi_logger = __commonJS({
|
|
|
33513
33583
|
}
|
|
33514
33584
|
}, {
|
|
33515
33585
|
key: "_getStaticDefaults",
|
|
33516
|
-
value: function _getStaticDefaults(
|
|
33517
|
-
|
|
33518
|
-
var staticDefaults = filterValues(
|
|
33586
|
+
value: function _getStaticDefaults(defaults4) {
|
|
33587
|
+
defaults4 = this._withOwnDefaults(defaults4);
|
|
33588
|
+
var staticDefaults = filterValues(defaults4, function(v) {
|
|
33519
33589
|
return typeof v !== "function";
|
|
33520
33590
|
});
|
|
33521
33591
|
return staticDefaults;
|
|
33522
33592
|
}
|
|
33523
33593
|
}, {
|
|
33524
33594
|
key: "_getDefaults",
|
|
33525
|
-
value: function _getDefaults(
|
|
33595
|
+
value: function _getDefaults(defaults4) {
|
|
33526
33596
|
var _this4 = this;
|
|
33527
|
-
|
|
33528
|
-
if (!
|
|
33597
|
+
defaults4 = this._withOwnDefaults(defaults4);
|
|
33598
|
+
if (!defaults4) {
|
|
33529
33599
|
return Promise.resolve({});
|
|
33530
33600
|
}
|
|
33531
|
-
var promises2 = mapValues(
|
|
33601
|
+
var promises2 = mapValues(defaults4, function(value2, key) {
|
|
33532
33602
|
if (typeof value2 === "function") {
|
|
33533
33603
|
try {
|
|
33534
33604
|
value2 = value2();
|
|
@@ -33719,26 +33789,26 @@ var require_bi_logger_factory = __commonJS({
|
|
|
33719
33789
|
}
|
|
33720
33790
|
}, {
|
|
33721
33791
|
key: "setDefaults",
|
|
33722
|
-
value: function setDefaults2(
|
|
33723
|
-
assert.defined(
|
|
33724
|
-
assert.object(
|
|
33725
|
-
this._defaults =
|
|
33792
|
+
value: function setDefaults2(defaults4) {
|
|
33793
|
+
assert.defined(defaults4, "Defaults must be provided");
|
|
33794
|
+
assert.object(defaults4, "Defaults must be an object");
|
|
33795
|
+
this._defaults = defaults4;
|
|
33726
33796
|
return this;
|
|
33727
33797
|
}
|
|
33728
33798
|
}, {
|
|
33729
33799
|
key: "updateDefaults",
|
|
33730
|
-
value: function updateDefaults(
|
|
33731
|
-
assert.defined(
|
|
33732
|
-
assert.object(
|
|
33733
|
-
Object.assign(this._defaults,
|
|
33800
|
+
value: function updateDefaults(defaults4) {
|
|
33801
|
+
assert.defined(defaults4, "Defaults must be provided");
|
|
33802
|
+
assert.object(defaults4, "Defaults must be an object");
|
|
33803
|
+
Object.assign(this._defaults, defaults4);
|
|
33734
33804
|
return this;
|
|
33735
33805
|
}
|
|
33736
33806
|
}, {
|
|
33737
33807
|
key: "updateNonEssentialDefaults",
|
|
33738
|
-
value: function updateNonEssentialDefaults(
|
|
33739
|
-
assert.defined(
|
|
33740
|
-
assert.object(
|
|
33741
|
-
Object.assign(this._nonEssentialDefaults,
|
|
33808
|
+
value: function updateNonEssentialDefaults(defaults4) {
|
|
33809
|
+
assert.defined(defaults4, "Non-essential Defaults must be provided");
|
|
33810
|
+
assert.object(defaults4, "Non-essential Defaults must be an object");
|
|
33811
|
+
Object.assign(this._nonEssentialDefaults, defaults4);
|
|
33742
33812
|
return this;
|
|
33743
33813
|
}
|
|
33744
33814
|
}, {
|
|
@@ -43901,7 +43971,7 @@ var require_lodash2 = __commonJS({
|
|
|
43901
43971
|
function takeWhile(array, predicate) {
|
|
43902
43972
|
return array && array.length ? baseWhile(array, getIteratee(predicate, 3)) : [];
|
|
43903
43973
|
}
|
|
43904
|
-
var
|
|
43974
|
+
var union2 = baseRest(function(arrays) {
|
|
43905
43975
|
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
|
|
43906
43976
|
});
|
|
43907
43977
|
var unionBy = baseRest(function(arrays) {
|
|
@@ -44726,7 +44796,7 @@ var require_lodash2 = __commonJS({
|
|
|
44726
44796
|
var result2 = baseCreate(prototype);
|
|
44727
44797
|
return properties == null ? result2 : baseAssign(result2, properties);
|
|
44728
44798
|
}
|
|
44729
|
-
var
|
|
44799
|
+
var defaults4 = baseRest(function(object, sources) {
|
|
44730
44800
|
object = Object2(object);
|
|
44731
44801
|
var index = -1;
|
|
44732
44802
|
var length = sources.length;
|
|
@@ -45473,7 +45543,7 @@ var require_lodash2 = __commonJS({
|
|
|
45473
45543
|
lodash.curry = curry;
|
|
45474
45544
|
lodash.curryRight = curryRight;
|
|
45475
45545
|
lodash.debounce = debounce;
|
|
45476
|
-
lodash.defaults =
|
|
45546
|
+
lodash.defaults = defaults4;
|
|
45477
45547
|
lodash.defaultsDeep = defaultsDeep;
|
|
45478
45548
|
lodash.defer = defer2;
|
|
45479
45549
|
lodash.delay = delay2;
|
|
@@ -45575,7 +45645,7 @@ var require_lodash2 = __commonJS({
|
|
|
45575
45645
|
lodash.toPlainObject = toPlainObject;
|
|
45576
45646
|
lodash.transform = transform;
|
|
45577
45647
|
lodash.unary = unary;
|
|
45578
|
-
lodash.union =
|
|
45648
|
+
lodash.union = union2;
|
|
45579
45649
|
lodash.unionBy = unionBy;
|
|
45580
45650
|
lodash.unionWith = unionWith;
|
|
45581
45651
|
lodash.uniq = uniq;
|
|
@@ -48235,14 +48305,14 @@ var require_lib2 = __commonJS({
|
|
|
48235
48305
|
if (hasMissingPlugin) {
|
|
48236
48306
|
error.missingPlugin = details.missingPlugin;
|
|
48237
48307
|
}
|
|
48238
|
-
defineHidden(error, "clone", function clone(
|
|
48308
|
+
defineHidden(error, "clone", function clone(overrides2 = {}) {
|
|
48239
48309
|
var _overrides$loc;
|
|
48240
48310
|
const {
|
|
48241
48311
|
line,
|
|
48242
48312
|
column,
|
|
48243
48313
|
index
|
|
48244
|
-
} = (_overrides$loc =
|
|
48245
|
-
return constructor(new Position(line, column, index), Object.assign({}, details,
|
|
48314
|
+
} = (_overrides$loc = overrides2.loc) != null ? _overrides$loc : loc;
|
|
48315
|
+
return constructor(new Position(line, column, index), Object.assign({}, details, overrides2.details));
|
|
48246
48316
|
});
|
|
48247
48317
|
defineHidden(error, "details", details);
|
|
48248
48318
|
Object.defineProperty(error, "message", {
|
|
@@ -49381,7 +49451,7 @@ var require_lib2 = __commonJS({
|
|
|
49381
49451
|
function canBeReservedWord(word) {
|
|
49382
49452
|
return reservedWordLikeSet.has(word);
|
|
49383
49453
|
}
|
|
49384
|
-
var
|
|
49454
|
+
var Scope5 = class {
|
|
49385
49455
|
constructor(flags) {
|
|
49386
49456
|
this.flags = 0;
|
|
49387
49457
|
this.names = /* @__PURE__ */ new Map();
|
|
@@ -49437,7 +49507,7 @@ var require_lib2 = __commonJS({
|
|
|
49437
49507
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
49438
49508
|
}
|
|
49439
49509
|
createScope(flags) {
|
|
49440
|
-
return new
|
|
49510
|
+
return new Scope5(flags);
|
|
49441
49511
|
}
|
|
49442
49512
|
enter(flags) {
|
|
49443
49513
|
this.scopeStack.push(this.createScope(flags));
|
|
@@ -49535,7 +49605,7 @@ var require_lib2 = __commonJS({
|
|
|
49535
49605
|
}
|
|
49536
49606
|
}
|
|
49537
49607
|
};
|
|
49538
|
-
var FlowScope = class extends
|
|
49608
|
+
var FlowScope = class extends Scope5 {
|
|
49539
49609
|
constructor(...args) {
|
|
49540
49610
|
super(...args);
|
|
49541
49611
|
this.declareFunctions = /* @__PURE__ */ new Set();
|
|
@@ -52684,7 +52754,7 @@ var require_lib2 = __commonJS({
|
|
|
52684
52754
|
}
|
|
52685
52755
|
}
|
|
52686
52756
|
};
|
|
52687
|
-
var TypeScriptScope = class extends
|
|
52757
|
+
var TypeScriptScope = class extends Scope5 {
|
|
52688
52758
|
constructor(...args) {
|
|
52689
52759
|
super(...args);
|
|
52690
52760
|
this.tsNames = /* @__PURE__ */ new Map();
|
|
@@ -66415,7 +66485,7 @@ var require_minimist = __commonJS({
|
|
|
66415
66485
|
});
|
|
66416
66486
|
}
|
|
66417
66487
|
});
|
|
66418
|
-
var
|
|
66488
|
+
var defaults4 = opts.default || {};
|
|
66419
66489
|
var argv = { _: [] };
|
|
66420
66490
|
function argDefined(key2, arg2) {
|
|
66421
66491
|
return flags.allBools && /^--[^=]+$/.test(arg2) || flags.strings[key2] || flags.bools[key2] || aliases2[key2];
|
|
@@ -66469,7 +66539,7 @@ var require_minimist = __commonJS({
|
|
|
66469
66539
|
});
|
|
66470
66540
|
}
|
|
66471
66541
|
Object.keys(flags.bools).forEach(function(key2) {
|
|
66472
|
-
setArg(key2,
|
|
66542
|
+
setArg(key2, defaults4[key2] === void 0 ? false : defaults4[key2]);
|
|
66473
66543
|
});
|
|
66474
66544
|
var notFlags = [];
|
|
66475
66545
|
if (args.indexOf("--") !== -1) {
|
|
@@ -66552,11 +66622,11 @@ var require_minimist = __commonJS({
|
|
|
66552
66622
|
}
|
|
66553
66623
|
}
|
|
66554
66624
|
}
|
|
66555
|
-
Object.keys(
|
|
66625
|
+
Object.keys(defaults4).forEach(function(k) {
|
|
66556
66626
|
if (!hasKey(argv, k.split("."))) {
|
|
66557
|
-
setKey(argv, k.split("."),
|
|
66627
|
+
setKey(argv, k.split("."), defaults4[k]);
|
|
66558
66628
|
(aliases2[k] || []).forEach(function(x) {
|
|
66559
|
-
setKey(argv, x.split("."),
|
|
66629
|
+
setKey(argv, x.split("."), defaults4[k]);
|
|
66560
66630
|
});
|
|
66561
66631
|
}
|
|
66562
66632
|
});
|
|
@@ -66583,15 +66653,15 @@ var require_rc = __commonJS({
|
|
|
66583
66653
|
var etc = "/etc";
|
|
66584
66654
|
var win = process.platform === "win32";
|
|
66585
66655
|
var home = win ? process.env.USERPROFILE : process.env.HOME;
|
|
66586
|
-
module2.exports = function(name,
|
|
66656
|
+
module2.exports = function(name, defaults4, argv, parse4) {
|
|
66587
66657
|
if ("string" !== typeof name)
|
|
66588
66658
|
throw new Error("rc(name): name *must* be string");
|
|
66589
66659
|
if (!argv)
|
|
66590
66660
|
argv = require_minimist()(process.argv.slice(2));
|
|
66591
|
-
|
|
66661
|
+
defaults4 = ("string" === typeof defaults4 ? cc.json(defaults4) : defaults4) || {};
|
|
66592
66662
|
parse4 = parse4 || cc.parse;
|
|
66593
66663
|
var env3 = cc.env(name + "_");
|
|
66594
|
-
var configs = [
|
|
66664
|
+
var configs = [defaults4];
|
|
66595
66665
|
var configFiles = [];
|
|
66596
66666
|
function addConfigFile(file) {
|
|
66597
66667
|
if (configFiles.indexOf(file) >= 0) return;
|
|
@@ -68310,11 +68380,11 @@ var require_defaults2 = __commonJS({
|
|
|
68310
68380
|
var cacheExtra = process.platform === "win32" ? "npm-cache" : ".npm";
|
|
68311
68381
|
var cacheRoot = process.platform === "win32" && process.env.APPDATA || home;
|
|
68312
68382
|
var cache3 = path8.resolve(cacheRoot, cacheExtra);
|
|
68313
|
-
var
|
|
68383
|
+
var defaults4;
|
|
68314
68384
|
var globalPrefix;
|
|
68315
68385
|
Object.defineProperty(exports, "defaults", {
|
|
68316
68386
|
get: function() {
|
|
68317
|
-
if (
|
|
68387
|
+
if (defaults4) return defaults4;
|
|
68318
68388
|
if (process.env.PREFIX) {
|
|
68319
68389
|
globalPrefix = process.env.PREFIX;
|
|
68320
68390
|
} else if (process.platform === "win32") {
|
|
@@ -68325,7 +68395,7 @@ var require_defaults2 = __commonJS({
|
|
|
68325
68395
|
globalPrefix = path8.join(process.env.DESTDIR, globalPrefix);
|
|
68326
68396
|
}
|
|
68327
68397
|
}
|
|
68328
|
-
|
|
68398
|
+
defaults4 = {
|
|
68329
68399
|
access: null,
|
|
68330
68400
|
"allow-same-version": false,
|
|
68331
68401
|
"always-auth": false,
|
|
@@ -68446,7 +68516,7 @@ var require_defaults2 = __commonJS({
|
|
|
68446
68516
|
viewer: process.platform === "win32" ? "browser" : "man",
|
|
68447
68517
|
_exit: true
|
|
68448
68518
|
};
|
|
68449
|
-
return
|
|
68519
|
+
return defaults4;
|
|
68450
68520
|
}
|
|
68451
68521
|
});
|
|
68452
68522
|
}
|
|
@@ -68460,8 +68530,8 @@ var require_npm_conf = __commonJS({
|
|
|
68460
68530
|
var path8 = __require("path");
|
|
68461
68531
|
var Conf = require_conf();
|
|
68462
68532
|
var _defaults = require_defaults2();
|
|
68463
|
-
module2.exports = (opts, types,
|
|
68464
|
-
const conf = new Conf(Object.assign({}, _defaults.defaults,
|
|
68533
|
+
module2.exports = (opts, types, defaults4) => {
|
|
68534
|
+
const conf = new Conf(Object.assign({}, _defaults.defaults, defaults4), types);
|
|
68465
68535
|
conf.add(Object.assign({}, opts), "cli");
|
|
68466
68536
|
const warnings = [];
|
|
68467
68537
|
let failedToLoadBuiltInConfig = false;
|
|
@@ -68717,7 +68787,7 @@ var require_lib3 = __commonJS({
|
|
|
68717
68787
|
|
|
68718
68788
|
// src/index.tsx
|
|
68719
68789
|
init_esm_shims();
|
|
68720
|
-
var
|
|
68790
|
+
var import_react117 = __toESM(require_react(), 1);
|
|
68721
68791
|
import { cwd as cwd2 } from "node:process";
|
|
68722
68792
|
|
|
68723
68793
|
// ../cli-telemetry-react/src/index.ts
|
|
@@ -79213,7 +79283,8 @@ var testOverridesSchema = z.object({
|
|
|
79213
79283
|
localTunnel: z.boolean().optional(),
|
|
79214
79284
|
customElementsCreationDelay: z.number().optional(),
|
|
79215
79285
|
sdkAuthServerBaseUrl: z.string().optional(),
|
|
79216
|
-
miniflareRequestsRewrites: z.array(z.object({ from: z.string(), to: z.string() })).optional()
|
|
79286
|
+
miniflareRequestsRewrites: z.array(z.object({ from: z.string(), to: z.string() })).optional(),
|
|
79287
|
+
panoramaReporterUrl: z.string().optional()
|
|
79217
79288
|
});
|
|
79218
79289
|
var TEST_OVERRIDES_ENV_VAR = "WIX_CLI_TEST_OVERRIDES";
|
|
79219
79290
|
function getTestOverrides() {
|
|
@@ -79501,7 +79572,8 @@ var CliUserErrorCode = (0, import_variant11.variant)({
|
|
|
79501
79572
|
ProjectIsNotLinkable: {},
|
|
79502
79573
|
MissingPresetCssForSiteComponent: (0, import_variant11.fields)(),
|
|
79503
79574
|
AppInstallerSiteNotFound: (0, import_variant11.fields)(),
|
|
79504
|
-
EAccessPermissionDenied: {}
|
|
79575
|
+
EAccessPermissionDenied: {},
|
|
79576
|
+
InvalidSiteComponentElementItem: (0, import_variant11.fields)()
|
|
79505
79577
|
});
|
|
79506
79578
|
var CliErrorCode = (0, import_variant11.variant)({
|
|
79507
79579
|
...CliSystemErrorCode,
|
|
@@ -82165,7 +82237,7 @@ function Trans({
|
|
|
82165
82237
|
context: context2,
|
|
82166
82238
|
tOptions = {},
|
|
82167
82239
|
values,
|
|
82168
|
-
defaults:
|
|
82240
|
+
defaults: defaults4,
|
|
82169
82241
|
components,
|
|
82170
82242
|
ns,
|
|
82171
82243
|
i18n: i18nFromProps,
|
|
@@ -82188,7 +82260,7 @@ function Trans({
|
|
|
82188
82260
|
let namespaces = ns || t3.ns || i18n.options?.defaultNS;
|
|
82189
82261
|
namespaces = isString(namespaces) ? [namespaces] : namespaces || ["translation"];
|
|
82190
82262
|
const nodeAsString = nodesToString(children, reactI18nextOptions, i18n, i18nKey);
|
|
82191
|
-
const defaultValue =
|
|
82263
|
+
const defaultValue = defaults4 || nodeAsString || reactI18nextOptions.transEmptyNodeValue || i18nKey;
|
|
82192
82264
|
const {
|
|
82193
82265
|
hashTransKey
|
|
82194
82266
|
} = reactI18nextOptions;
|
|
@@ -82263,7 +82335,7 @@ function Trans2({
|
|
|
82263
82335
|
context: context2,
|
|
82264
82336
|
tOptions = {},
|
|
82265
82337
|
values,
|
|
82266
|
-
defaults:
|
|
82338
|
+
defaults: defaults4,
|
|
82267
82339
|
components,
|
|
82268
82340
|
ns,
|
|
82269
82341
|
i18n: i18nFromProps,
|
|
@@ -82285,7 +82357,7 @@ function Trans2({
|
|
|
82285
82357
|
context: context2,
|
|
82286
82358
|
tOptions,
|
|
82287
82359
|
values,
|
|
82288
|
-
defaults:
|
|
82360
|
+
defaults: defaults4,
|
|
82289
82361
|
components,
|
|
82290
82362
|
ns: ns || t3?.ns || defaultNSFromContext || i18n?.options?.defaultNS,
|
|
82291
82363
|
i18n,
|
|
@@ -90359,11 +90431,15 @@ ${errorMessage}`
|
|
|
90359
90431
|
ProjectIsNotLinkable: () => {
|
|
90360
90432
|
return () => /* @__PURE__ */ import_react78.default.createElement(ErrorMessage, { message: "Only Astro projects can be linked to Wix. The current project is missing an Astro configuration file." });
|
|
90361
90433
|
},
|
|
90362
|
-
MissingPresetCssForSiteComponent: ({
|
|
90434
|
+
MissingPresetCssForSiteComponent: ({
|
|
90435
|
+
componentId,
|
|
90436
|
+
presetName,
|
|
90437
|
+
elementBasePath
|
|
90438
|
+
}) => {
|
|
90363
90439
|
return () => /* @__PURE__ */ import_react78.default.createElement(
|
|
90364
90440
|
ErrorMessage,
|
|
90365
90441
|
{
|
|
90366
|
-
message: `Site component "${componentId}" is missing preset CSS file for the preset key "${presetName}".`
|
|
90442
|
+
message: `Site component "${componentId}" is missing preset CSS file for the preset key "${presetName}"${elementBasePath ? ` in the element base path "${elementBasePath}".` : "."}`
|
|
90367
90443
|
}
|
|
90368
90444
|
);
|
|
90369
90445
|
},
|
|
@@ -90398,6 +90474,15 @@ ${errorMessage}`
|
|
|
90398
90474
|
message: `The version "${version}" produced by the system does not conform to the expected semantic versioning format and could not be parsed.`
|
|
90399
90475
|
}
|
|
90400
90476
|
);
|
|
90477
|
+
},
|
|
90478
|
+
InvalidSiteComponentElementItem: ({ elementPath }) => {
|
|
90479
|
+
return () => /* @__PURE__ */ import_react78.default.createElement(
|
|
90480
|
+
ErrorMessage,
|
|
90481
|
+
{
|
|
90482
|
+
cause,
|
|
90483
|
+
message: `Site component element config is invalid at ${elementPath}`
|
|
90484
|
+
}
|
|
90485
|
+
);
|
|
90401
90486
|
}
|
|
90402
90487
|
});
|
|
90403
90488
|
}
|
|
@@ -93662,6 +93747,1086 @@ function getErrorLogFilePath(cwd3) {
|
|
|
93662
93747
|
return join5(cwd3, ERROR_LOG_FILENAME);
|
|
93663
93748
|
}
|
|
93664
93749
|
|
|
93750
|
+
// ../cli-panorama/src/index.ts
|
|
93751
|
+
init_esm_shims();
|
|
93752
|
+
|
|
93753
|
+
// ../cli-panorama/src/PanoramaContext.tsx
|
|
93754
|
+
init_esm_shims();
|
|
93755
|
+
var import_react93 = __toESM(require_react(), 1);
|
|
93756
|
+
var PanoramaContext = (0, import_react93.createContext)(void 0);
|
|
93757
|
+
var PanoramaProvider = (props) => {
|
|
93758
|
+
const { value: value2, children } = props;
|
|
93759
|
+
return /* @__PURE__ */ import_react93.default.createElement(PanoramaContext.Provider, { value: value2 }, children);
|
|
93760
|
+
};
|
|
93761
|
+
|
|
93762
|
+
// ../cli-panorama/src/usePanoramaMethodLogger.ts
|
|
93763
|
+
init_esm_shims();
|
|
93764
|
+
var import_react94 = __toESM(require_react(), 1);
|
|
93765
|
+
function usePanoramaMethodLogger(target) {
|
|
93766
|
+
const factory = (0, import_react94.useContext)(PanoramaContext);
|
|
93767
|
+
if (factory == null) {
|
|
93768
|
+
throw new Error(
|
|
93769
|
+
"usePanoramaMethodLogger() cannot be used without a <PanoramaProvider />"
|
|
93770
|
+
);
|
|
93771
|
+
}
|
|
93772
|
+
const componentId = target.constructor.name;
|
|
93773
|
+
const clientOptions = (0, import_react94.useMemo)(
|
|
93774
|
+
() => ({ baseParams: { componentId } }),
|
|
93775
|
+
[componentId]
|
|
93776
|
+
);
|
|
93777
|
+
const client2 = (0, import_react94.useMemo)(() => {
|
|
93778
|
+
return factory.client(clientOptions);
|
|
93779
|
+
}, [factory, clientOptions]);
|
|
93780
|
+
return (0, import_react94.useMemo)(() => {
|
|
93781
|
+
const cache3 = /* @__PURE__ */ new Map();
|
|
93782
|
+
return new Proxy(target, {
|
|
93783
|
+
get(target2, prop, receiver) {
|
|
93784
|
+
const value2 = Reflect.get(target2, prop, receiver);
|
|
93785
|
+
const isAsyncMethod = typeof value2 === "function" && typeof prop === "string" && Object.hasOwn(target2, prop) && value2.constructor.name === "AsyncFunction";
|
|
93786
|
+
if (!isAsyncMethod) {
|
|
93787
|
+
return value2;
|
|
93788
|
+
}
|
|
93789
|
+
if (!cache3.has(prop)) {
|
|
93790
|
+
const wrapped = async function(...args) {
|
|
93791
|
+
const transaction = client2.transaction(prop);
|
|
93792
|
+
transaction.start();
|
|
93793
|
+
const result = await value2.apply(target2, args);
|
|
93794
|
+
transaction.finish();
|
|
93795
|
+
return result;
|
|
93796
|
+
};
|
|
93797
|
+
cache3.set(prop, wrapped);
|
|
93798
|
+
}
|
|
93799
|
+
return cache3.get(prop);
|
|
93800
|
+
}
|
|
93801
|
+
});
|
|
93802
|
+
}, [target, client2]);
|
|
93803
|
+
}
|
|
93804
|
+
|
|
93805
|
+
// ../cli-panorama/src/createPanorama.ts
|
|
93806
|
+
init_esm_shims();
|
|
93807
|
+
|
|
93808
|
+
// ../../node_modules/@wix/panorama-client-node/dist/esm/index.js
|
|
93809
|
+
init_esm_shims();
|
|
93810
|
+
|
|
93811
|
+
// ../../node_modules/@wix/panorama-client-node/dist/esm/panorama-client-node.js
|
|
93812
|
+
init_esm_shims();
|
|
93813
|
+
|
|
93814
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-client/dist/esm/index.js
|
|
93815
|
+
init_esm_shims();
|
|
93816
|
+
|
|
93817
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-common-shared/dist/esm/types/index.js
|
|
93818
|
+
init_esm_shims();
|
|
93819
|
+
|
|
93820
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-common-shared/dist/esm/types/enum-types.js
|
|
93821
|
+
init_esm_shims();
|
|
93822
|
+
var AlertType;
|
|
93823
|
+
(function(AlertType2) {
|
|
93824
|
+
AlertType2["SuccessRate"] = "SuccessRate";
|
|
93825
|
+
AlertType2["SuccessRateQuality"] = "SuccessRateQuality";
|
|
93826
|
+
AlertType2["Duration"] = "Duration";
|
|
93827
|
+
AlertType2["ErrorRate"] = "ErrorRate";
|
|
93828
|
+
})(AlertType || (AlertType = {}));
|
|
93829
|
+
var AlertStatus;
|
|
93830
|
+
(function(AlertStatus2) {
|
|
93831
|
+
AlertStatus2["Alerting"] = "alerting";
|
|
93832
|
+
AlertStatus2["Ok"] = "ok";
|
|
93833
|
+
})(AlertStatus || (AlertStatus = {}));
|
|
93834
|
+
var LogLevel;
|
|
93835
|
+
(function(LogLevel2) {
|
|
93836
|
+
LogLevel2["Info"] = "INFO";
|
|
93837
|
+
LogLevel2["Warn"] = "WARN";
|
|
93838
|
+
LogLevel2["Error"] = "ERROR";
|
|
93839
|
+
LogLevel2["Debug"] = "DEBUG";
|
|
93840
|
+
})(LogLevel || (LogLevel = {}));
|
|
93841
|
+
var TransactionAction;
|
|
93842
|
+
(function(TransactionAction2) {
|
|
93843
|
+
TransactionAction2["Start"] = "START";
|
|
93844
|
+
TransactionAction2["Finish"] = "FINISH";
|
|
93845
|
+
})(TransactionAction || (TransactionAction = {}));
|
|
93846
|
+
var InternalTransactions = {
|
|
93847
|
+
ComponentLoad: "PANORAMA_COMPONENT_LOAD",
|
|
93848
|
+
ComponentPhase: "PANORAMA_COMPONENT_PHASE"
|
|
93849
|
+
};
|
|
93850
|
+
var Platform;
|
|
93851
|
+
(function(Platform2) {
|
|
93852
|
+
Platform2["Standalone"] = "standalone";
|
|
93853
|
+
Platform2["BusinessManager"] = "business-manager";
|
|
93854
|
+
Platform2["Viewer"] = "viewer";
|
|
93855
|
+
Platform2["Editor"] = "editor";
|
|
93856
|
+
Platform2["EditorSettings"] = "editor:settings";
|
|
93857
|
+
Platform2["Mobile"] = "mobile";
|
|
93858
|
+
Platform2["Standards"] = "standards";
|
|
93859
|
+
})(Platform || (Platform = {}));
|
|
93860
|
+
var ErrorSeverity;
|
|
93861
|
+
(function(ErrorSeverity2) {
|
|
93862
|
+
ErrorSeverity2["Fatal"] = "fatal";
|
|
93863
|
+
ErrorSeverity2["Error"] = "error";
|
|
93864
|
+
ErrorSeverity2["Warning"] = "warning";
|
|
93865
|
+
ErrorSeverity2["Log"] = "log";
|
|
93866
|
+
ErrorSeverity2["Info"] = "info";
|
|
93867
|
+
ErrorSeverity2["Debug"] = "debug";
|
|
93868
|
+
ErrorSeverity2["Critical"] = "critical";
|
|
93869
|
+
})(ErrorSeverity || (ErrorSeverity = {}));
|
|
93870
|
+
|
|
93871
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-common-shared/dist/esm/types/data-types.js
|
|
93872
|
+
init_esm_shims();
|
|
93873
|
+
|
|
93874
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-common-shared/dist/esm/types/interface-types.js
|
|
93875
|
+
init_esm_shims();
|
|
93876
|
+
|
|
93877
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-common/dist/esm/global-config/index.js
|
|
93878
|
+
init_esm_shims();
|
|
93879
|
+
|
|
93880
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-common/dist/esm/global-config/global-config.js
|
|
93881
|
+
init_esm_shims();
|
|
93882
|
+
|
|
93883
|
+
// ../../node_modules/uuid/dist/esm-node/index.js
|
|
93884
|
+
init_esm_shims();
|
|
93885
|
+
|
|
93886
|
+
// ../../node_modules/uuid/dist/esm-node/rng.js
|
|
93887
|
+
init_esm_shims();
|
|
93888
|
+
import crypto from "crypto";
|
|
93889
|
+
var rnds8Pool = new Uint8Array(256);
|
|
93890
|
+
var poolPtr = rnds8Pool.length;
|
|
93891
|
+
function rng() {
|
|
93892
|
+
if (poolPtr > rnds8Pool.length - 16) {
|
|
93893
|
+
crypto.randomFillSync(rnds8Pool);
|
|
93894
|
+
poolPtr = 0;
|
|
93895
|
+
}
|
|
93896
|
+
return rnds8Pool.slice(poolPtr, poolPtr += 16);
|
|
93897
|
+
}
|
|
93898
|
+
|
|
93899
|
+
// ../../node_modules/uuid/dist/esm-node/stringify.js
|
|
93900
|
+
init_esm_shims();
|
|
93901
|
+
var byteToHex = [];
|
|
93902
|
+
for (let i2 = 0; i2 < 256; ++i2) {
|
|
93903
|
+
byteToHex.push((i2 + 256).toString(16).slice(1));
|
|
93904
|
+
}
|
|
93905
|
+
function unsafeStringify(arr2, offset = 0) {
|
|
93906
|
+
return byteToHex[arr2[offset + 0]] + byteToHex[arr2[offset + 1]] + byteToHex[arr2[offset + 2]] + byteToHex[arr2[offset + 3]] + "-" + byteToHex[arr2[offset + 4]] + byteToHex[arr2[offset + 5]] + "-" + byteToHex[arr2[offset + 6]] + byteToHex[arr2[offset + 7]] + "-" + byteToHex[arr2[offset + 8]] + byteToHex[arr2[offset + 9]] + "-" + byteToHex[arr2[offset + 10]] + byteToHex[arr2[offset + 11]] + byteToHex[arr2[offset + 12]] + byteToHex[arr2[offset + 13]] + byteToHex[arr2[offset + 14]] + byteToHex[arr2[offset + 15]];
|
|
93907
|
+
}
|
|
93908
|
+
|
|
93909
|
+
// ../../node_modules/uuid/dist/esm-node/v4.js
|
|
93910
|
+
init_esm_shims();
|
|
93911
|
+
|
|
93912
|
+
// ../../node_modules/uuid/dist/esm-node/native.js
|
|
93913
|
+
init_esm_shims();
|
|
93914
|
+
import crypto2 from "crypto";
|
|
93915
|
+
var native_default = {
|
|
93916
|
+
randomUUID: crypto2.randomUUID
|
|
93917
|
+
};
|
|
93918
|
+
|
|
93919
|
+
// ../../node_modules/uuid/dist/esm-node/v4.js
|
|
93920
|
+
function v4(options, buf, offset) {
|
|
93921
|
+
if (native_default.randomUUID && !buf && !options) {
|
|
93922
|
+
return native_default.randomUUID();
|
|
93923
|
+
}
|
|
93924
|
+
options = options || {};
|
|
93925
|
+
const rnds = options.random || (options.rng || rng)();
|
|
93926
|
+
rnds[6] = rnds[6] & 15 | 64;
|
|
93927
|
+
rnds[8] = rnds[8] & 63 | 128;
|
|
93928
|
+
if (buf) {
|
|
93929
|
+
offset = offset || 0;
|
|
93930
|
+
for (let i2 = 0; i2 < 16; ++i2) {
|
|
93931
|
+
buf[offset + i2] = rnds[i2];
|
|
93932
|
+
}
|
|
93933
|
+
return buf;
|
|
93934
|
+
}
|
|
93935
|
+
return unsafeStringify(rnds);
|
|
93936
|
+
}
|
|
93937
|
+
var v4_default = v4;
|
|
93938
|
+
|
|
93939
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-common/dist/esm/duration-tracker/index.js
|
|
93940
|
+
init_esm_shims();
|
|
93941
|
+
|
|
93942
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-common/dist/esm/duration-tracker/duration-tracker.js
|
|
93943
|
+
init_esm_shims();
|
|
93944
|
+
var DELIMITER = " | ";
|
|
93945
|
+
var DurationTrackerImpl = class {
|
|
93946
|
+
constructor() {
|
|
93947
|
+
this.transactionStartTimes = {};
|
|
93948
|
+
this.phaseStartTimes = {};
|
|
93949
|
+
}
|
|
93950
|
+
createKey(...args) {
|
|
93951
|
+
return args.filter((x) => !!x).join(DELIMITER);
|
|
93952
|
+
}
|
|
93953
|
+
markTransactionStart(fullArtifactId, componentId, transactionName, transactionId) {
|
|
93954
|
+
const key = this.createKey(fullArtifactId, componentId, transactionName, transactionId);
|
|
93955
|
+
this.transactionStartTimes[key] = Date.now();
|
|
93956
|
+
}
|
|
93957
|
+
markTransactionFinish(fullArtifactId, componentId, transactionName, transactionId) {
|
|
93958
|
+
const key = this.createKey(fullArtifactId, componentId, transactionName, transactionId);
|
|
93959
|
+
const finishTime = Date.now();
|
|
93960
|
+
const startTime = this.transactionStartTimes[key] || finishTime;
|
|
93961
|
+
const duration2 = Math.round(finishTime - startTime);
|
|
93962
|
+
this.transactionStartTimes[key] = 0;
|
|
93963
|
+
return duration2;
|
|
93964
|
+
}
|
|
93965
|
+
markPhaseStart(fullArtifactId, componentId, phaseName) {
|
|
93966
|
+
const key = this.createKey(fullArtifactId, componentId, phaseName);
|
|
93967
|
+
this.phaseStartTimes[key] = Date.now();
|
|
93968
|
+
}
|
|
93969
|
+
markPhaseFinish(fullArtifactId, componentId, phaseName) {
|
|
93970
|
+
const key = this.createKey(fullArtifactId, componentId, phaseName);
|
|
93971
|
+
const finishTime = Date.now();
|
|
93972
|
+
const startTime = this.phaseStartTimes[key] || finishTime;
|
|
93973
|
+
const duration2 = Math.round(finishTime - startTime);
|
|
93974
|
+
this.phaseStartTimes[key] = 0;
|
|
93975
|
+
return duration2;
|
|
93976
|
+
}
|
|
93977
|
+
};
|
|
93978
|
+
var createDurationTracker = () => new DurationTrackerImpl();
|
|
93979
|
+
|
|
93980
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-common/dist/esm/global-config/global-config.js
|
|
93981
|
+
var GlobalConfigImpl = class {
|
|
93982
|
+
constructor() {
|
|
93983
|
+
this.sessionId = "";
|
|
93984
|
+
this.reporter = null;
|
|
93985
|
+
this.batchQueue = null;
|
|
93986
|
+
this.durationTracker = createDurationTracker();
|
|
93987
|
+
this.state = /* @__PURE__ */ new Map();
|
|
93988
|
+
this.sessionStart = Date.now();
|
|
93989
|
+
}
|
|
93990
|
+
getSessionId() {
|
|
93991
|
+
this.sessionId = this.sessionId || v4_default();
|
|
93992
|
+
return this.sessionId;
|
|
93993
|
+
}
|
|
93994
|
+
setSessionId(sessionId) {
|
|
93995
|
+
this.sessionId = sessionId;
|
|
93996
|
+
}
|
|
93997
|
+
getSessionTime() {
|
|
93998
|
+
return Date.now() - this.sessionStart;
|
|
93999
|
+
}
|
|
94000
|
+
getReporter() {
|
|
94001
|
+
return this.reporter;
|
|
94002
|
+
}
|
|
94003
|
+
setReporter(reporter) {
|
|
94004
|
+
this.reporter = reporter;
|
|
94005
|
+
}
|
|
94006
|
+
initBatchQueue(batchQueue) {
|
|
94007
|
+
this.batchQueue = this.batchQueue ?? batchQueue;
|
|
94008
|
+
}
|
|
94009
|
+
getBatchQueue() {
|
|
94010
|
+
return this.batchQueue;
|
|
94011
|
+
}
|
|
94012
|
+
getDurationTracker() {
|
|
94013
|
+
return this.durationTracker;
|
|
94014
|
+
}
|
|
94015
|
+
getStateValue(key) {
|
|
94016
|
+
return this.state.get(key);
|
|
94017
|
+
}
|
|
94018
|
+
setStateValue(key, value2) {
|
|
94019
|
+
this.state.set(key, value2);
|
|
94020
|
+
}
|
|
94021
|
+
clearState() {
|
|
94022
|
+
this.state.clear();
|
|
94023
|
+
this.durationTracker = createDurationTracker();
|
|
94024
|
+
}
|
|
94025
|
+
};
|
|
94026
|
+
var createGlobalConfig = () => new GlobalConfigImpl();
|
|
94027
|
+
|
|
94028
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-client/dist/esm/panorama-client-factory.js
|
|
94029
|
+
init_esm_shims();
|
|
94030
|
+
var import_defineProperty6 = __toESM(require_defineProperty());
|
|
94031
|
+
|
|
94032
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-common/dist/esm/utils/index.js
|
|
94033
|
+
init_esm_shims();
|
|
94034
|
+
|
|
94035
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-common/dist/esm/utils/class-utils.js
|
|
94036
|
+
init_esm_shims();
|
|
94037
|
+
var bindPrototypeMethodsToSelf = (instance2, classFn) => {
|
|
94038
|
+
const prototype = classFn ? classFn.prototype : Object.getPrototypeOf(instance2);
|
|
94039
|
+
const props = Object.getOwnPropertyNames(prototype);
|
|
94040
|
+
for (const prop of props) {
|
|
94041
|
+
if (prop === "constructor" || typeof prototype[prop] !== "function") {
|
|
94042
|
+
continue;
|
|
94043
|
+
}
|
|
94044
|
+
instance2[prop] = prototype[prop].bind(instance2);
|
|
94045
|
+
}
|
|
94046
|
+
};
|
|
94047
|
+
|
|
94048
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-client/dist/esm/utils/general-utils.js
|
|
94049
|
+
init_esm_shims();
|
|
94050
|
+
var union = function() {
|
|
94051
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
94052
|
+
args[_key] = arguments[_key];
|
|
94053
|
+
}
|
|
94054
|
+
return [...new Set(args.flat()).values()];
|
|
94055
|
+
};
|
|
94056
|
+
var defaults2 = function() {
|
|
94057
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
94058
|
+
args[_key2] = arguments[_key2];
|
|
94059
|
+
}
|
|
94060
|
+
return args.reduce((res, obj) => Object.entries(obj ?? {}).reduce((_res, _ref) => {
|
|
94061
|
+
let [key, value2] = _ref;
|
|
94062
|
+
if (typeof _res[key] === "undefined" && typeof value2 !== "undefined") {
|
|
94063
|
+
_res[key] = value2;
|
|
94064
|
+
}
|
|
94065
|
+
return _res;
|
|
94066
|
+
}, res), {});
|
|
94067
|
+
};
|
|
94068
|
+
var deepDefaults = function(dest) {
|
|
94069
|
+
for (var _len3 = arguments.length, rest = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
|
|
94070
|
+
rest[_key3 - 1] = arguments[_key3];
|
|
94071
|
+
}
|
|
94072
|
+
const keys = union(...rest.map((value2) => Object.keys(value2 ?? {})));
|
|
94073
|
+
const all = [dest, ...rest];
|
|
94074
|
+
return keys.reduce((res, key) => {
|
|
94075
|
+
const values = all.map((value2) => value2 == null ? void 0 : value2[key]);
|
|
94076
|
+
const merged = defaults2(...values);
|
|
94077
|
+
const hasValues = Object.values(merged).filter((value2) => typeof value2 !== "undefined").length > 0;
|
|
94078
|
+
if (hasValues) {
|
|
94079
|
+
res = res ?? {};
|
|
94080
|
+
res[key] = merged;
|
|
94081
|
+
} else {
|
|
94082
|
+
var _res2;
|
|
94083
|
+
(_res2 = res) == null || delete _res2[key];
|
|
94084
|
+
}
|
|
94085
|
+
return res;
|
|
94086
|
+
}, dest ? {
|
|
94087
|
+
...dest
|
|
94088
|
+
} : dest);
|
|
94089
|
+
};
|
|
94090
|
+
|
|
94091
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-client/dist/esm/panorama-client.js
|
|
94092
|
+
init_esm_shims();
|
|
94093
|
+
var import_defineProperty3 = __toESM(require_defineProperty());
|
|
94094
|
+
|
|
94095
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-client/dist/esm/panorama-client-component.js
|
|
94096
|
+
init_esm_shims();
|
|
94097
|
+
var import_defineProperty = __toESM(require_defineProperty());
|
|
94098
|
+
|
|
94099
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-client/dist/esm/panorama-error-monitor.js
|
|
94100
|
+
init_esm_shims();
|
|
94101
|
+
var PanoramaErrorMonitorImpl = class {
|
|
94102
|
+
constructor(baseClient, options) {
|
|
94103
|
+
this.baseClient = baseClient;
|
|
94104
|
+
this.options = options;
|
|
94105
|
+
bindPrototypeMethodsToSelf(this);
|
|
94106
|
+
}
|
|
94107
|
+
reportError(error, data) {
|
|
94108
|
+
this.baseClient.reportError(error, data, this.options);
|
|
94109
|
+
}
|
|
94110
|
+
addBreadcrumb(breadcrumb) {
|
|
94111
|
+
this.baseClient.addBreadcrumb(breadcrumb);
|
|
94112
|
+
}
|
|
94113
|
+
};
|
|
94114
|
+
|
|
94115
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-client/dist/esm/panorama-logger.js
|
|
94116
|
+
init_esm_shims();
|
|
94117
|
+
var PanoramaLoggerImpl = class {
|
|
94118
|
+
constructor(baseClient) {
|
|
94119
|
+
this.baseClient = baseClient;
|
|
94120
|
+
bindPrototypeMethodsToSelf(this);
|
|
94121
|
+
}
|
|
94122
|
+
info(message, data) {
|
|
94123
|
+
this.baseClient.log(LogLevel.Info, message, data);
|
|
94124
|
+
}
|
|
94125
|
+
warn(message, data) {
|
|
94126
|
+
this.baseClient.log(LogLevel.Warn, message, data);
|
|
94127
|
+
}
|
|
94128
|
+
error(message, data) {
|
|
94129
|
+
this.baseClient.log(LogLevel.Error, message, data);
|
|
94130
|
+
}
|
|
94131
|
+
debug(message, data) {
|
|
94132
|
+
this.baseClient.log(LogLevel.Debug, message, data);
|
|
94133
|
+
}
|
|
94134
|
+
};
|
|
94135
|
+
|
|
94136
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-client/dist/esm/panorama-transaction.js
|
|
94137
|
+
init_esm_shims();
|
|
94138
|
+
|
|
94139
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-common-shared/dist/esm/utils/index.js
|
|
94140
|
+
init_esm_shims();
|
|
94141
|
+
|
|
94142
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-common-shared/dist/esm/utils/transaction-utils.js
|
|
94143
|
+
init_esm_shims();
|
|
94144
|
+
var isCustomTransactionName = (name) => !Object.values(InternalTransactions).includes(name);
|
|
94145
|
+
|
|
94146
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-common-shared/dist/esm/utils/platform-utils.js
|
|
94147
|
+
init_esm_shims();
|
|
94148
|
+
|
|
94149
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-common-shared/dist/esm/utils/guid.js
|
|
94150
|
+
init_esm_shims();
|
|
94151
|
+
|
|
94152
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-client/dist/esm/panorama-transaction.js
|
|
94153
|
+
var PanoramaTransactionImpl = class {
|
|
94154
|
+
constructor(baseClient, name, options) {
|
|
94155
|
+
this.baseClient = baseClient;
|
|
94156
|
+
this.name = name;
|
|
94157
|
+
this.options = options;
|
|
94158
|
+
if (!isCustomTransactionName(name)) {
|
|
94159
|
+
throw new Error(`"${name}" is an internal transaction and can't be used`);
|
|
94160
|
+
}
|
|
94161
|
+
this.baseClient = baseClient;
|
|
94162
|
+
bindPrototypeMethodsToSelf(this);
|
|
94163
|
+
}
|
|
94164
|
+
start(data, options) {
|
|
94165
|
+
return this.baseClient.reportTransactionStart(this.name, defaults2(options, this.options), data);
|
|
94166
|
+
}
|
|
94167
|
+
finish(data, options) {
|
|
94168
|
+
return this.baseClient.reportTransactionFinish(this.name, defaults2(options, this.options), data);
|
|
94169
|
+
}
|
|
94170
|
+
};
|
|
94171
|
+
|
|
94172
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-client/dist/esm/panorama-client-component.js
|
|
94173
|
+
var PanoramaClientForComponentImpl = class {
|
|
94174
|
+
constructor(_ref) {
|
|
94175
|
+
let {
|
|
94176
|
+
baseClient
|
|
94177
|
+
} = _ref;
|
|
94178
|
+
(0, import_defineProperty.default)(this, "baseClient", void 0);
|
|
94179
|
+
this.baseClient = baseClient;
|
|
94180
|
+
bindPrototypeMethodsToSelf(this);
|
|
94181
|
+
}
|
|
94182
|
+
transaction(name, options) {
|
|
94183
|
+
return new PanoramaTransactionImpl(this.baseClient, name, options);
|
|
94184
|
+
}
|
|
94185
|
+
errorMonitor(options) {
|
|
94186
|
+
return new PanoramaErrorMonitorImpl(this.baseClient, options);
|
|
94187
|
+
}
|
|
94188
|
+
logger() {
|
|
94189
|
+
return new PanoramaLoggerImpl(this.baseClient);
|
|
94190
|
+
}
|
|
94191
|
+
};
|
|
94192
|
+
|
|
94193
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-client/dist/esm/plugins/hooks-manager.js
|
|
94194
|
+
init_esm_shims();
|
|
94195
|
+
var import_defineProperty2 = __toESM(require_defineProperty());
|
|
94196
|
+
var Hook2 = /* @__PURE__ */ function(Hook3) {
|
|
94197
|
+
Hook3[Hook3["afterCreateClientForComponent"] = 0] = "afterCreateClientForComponent";
|
|
94198
|
+
Hook3[Hook3["beforeReport"] = 1] = "beforeReport";
|
|
94199
|
+
Hook3[Hook3["beforeReportTransactionStart"] = 2] = "beforeReportTransactionStart";
|
|
94200
|
+
Hook3[Hook3["afterReportTransactionStart"] = 3] = "afterReportTransactionStart";
|
|
94201
|
+
Hook3[Hook3["beforeReportTransactionFinish"] = 4] = "beforeReportTransactionFinish";
|
|
94202
|
+
Hook3[Hook3["afterReportTransactionFinish"] = 5] = "afterReportTransactionFinish";
|
|
94203
|
+
Hook3[Hook3["beforeReportPhaseStart"] = 6] = "beforeReportPhaseStart";
|
|
94204
|
+
Hook3[Hook3["afterReportPhaseStart"] = 7] = "afterReportPhaseStart";
|
|
94205
|
+
Hook3[Hook3["beforeReportPhaseFinish"] = 8] = "beforeReportPhaseFinish";
|
|
94206
|
+
Hook3[Hook3["afterReportPhaseFinish"] = 9] = "afterReportPhaseFinish";
|
|
94207
|
+
Hook3[Hook3["beforeReportError"] = 10] = "beforeReportError";
|
|
94208
|
+
Hook3[Hook3["afterReportError"] = 11] = "afterReportError";
|
|
94209
|
+
Hook3[Hook3["beforeAddBreadcrumb"] = 12] = "beforeAddBreadcrumb";
|
|
94210
|
+
Hook3[Hook3["afterAddBreadcrumb"] = 13] = "afterAddBreadcrumb";
|
|
94211
|
+
Hook3[Hook3["beforeReportLog"] = 14] = "beforeReportLog";
|
|
94212
|
+
Hook3[Hook3["afterReportLog"] = 15] = "afterReportLog";
|
|
94213
|
+
Hook3[Hook3["beforeUnhandledError"] = 16] = "beforeUnhandledError";
|
|
94214
|
+
return Hook3;
|
|
94215
|
+
}({});
|
|
94216
|
+
var HooksManager = class {
|
|
94217
|
+
constructor() {
|
|
94218
|
+
(0, import_defineProperty2.default)(this, "subscribers", {});
|
|
94219
|
+
}
|
|
94220
|
+
tap(hook, subscriber) {
|
|
94221
|
+
this.subscribers[hook] = this.subscribers[hook] || [];
|
|
94222
|
+
this.subscribers[hook].push(subscriber);
|
|
94223
|
+
}
|
|
94224
|
+
invoke(hook) {
|
|
94225
|
+
const subscribers = this.subscribers[hook];
|
|
94226
|
+
if (!subscribers) {
|
|
94227
|
+
return true;
|
|
94228
|
+
}
|
|
94229
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
94230
|
+
args[_key - 1] = arguments[_key];
|
|
94231
|
+
}
|
|
94232
|
+
for (const subscriber of subscribers) {
|
|
94233
|
+
if (subscriber(...args) === false) {
|
|
94234
|
+
return false;
|
|
94235
|
+
}
|
|
94236
|
+
}
|
|
94237
|
+
return true;
|
|
94238
|
+
}
|
|
94239
|
+
};
|
|
94240
|
+
|
|
94241
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-client/dist/esm/panorama-phase.js
|
|
94242
|
+
init_esm_shims();
|
|
94243
|
+
var PanoramaPhaseImpl = class {
|
|
94244
|
+
constructor(name, baseClient) {
|
|
94245
|
+
this.name = name;
|
|
94246
|
+
this.baseClient = baseClient;
|
|
94247
|
+
this.baseClient = baseClient;
|
|
94248
|
+
bindPrototypeMethodsToSelf(this);
|
|
94249
|
+
}
|
|
94250
|
+
start(data) {
|
|
94251
|
+
return this.baseClient.reportPhaseStart(this.name, data);
|
|
94252
|
+
}
|
|
94253
|
+
finish(data) {
|
|
94254
|
+
return this.baseClient.reportPhaseFinish(this.name, data);
|
|
94255
|
+
}
|
|
94256
|
+
};
|
|
94257
|
+
|
|
94258
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-client/dist/esm/panorama-client.js
|
|
94259
|
+
var PanoramaClientImpl = class {
|
|
94260
|
+
constructor(_ref) {
|
|
94261
|
+
let {
|
|
94262
|
+
hooksManager,
|
|
94263
|
+
baseClient
|
|
94264
|
+
} = _ref;
|
|
94265
|
+
(0, import_defineProperty3.default)(this, "baseClient", void 0);
|
|
94266
|
+
(0, import_defineProperty3.default)(this, "hooksManager", void 0);
|
|
94267
|
+
this.baseClient = baseClient;
|
|
94268
|
+
this.hooksManager = hooksManager;
|
|
94269
|
+
bindPrototypeMethodsToSelf(this);
|
|
94270
|
+
}
|
|
94271
|
+
onUnhandledError(subscriber) {
|
|
94272
|
+
this.hooksManager.tap(Hook2.beforeUnhandledError, subscriber);
|
|
94273
|
+
}
|
|
94274
|
+
reportLoadStart(data, options) {
|
|
94275
|
+
const {
|
|
94276
|
+
ComponentLoad
|
|
94277
|
+
} = InternalTransactions;
|
|
94278
|
+
return this.baseClient.reportTransactionStart(ComponentLoad, options, data);
|
|
94279
|
+
}
|
|
94280
|
+
reportLoadFinish(data, options) {
|
|
94281
|
+
const {
|
|
94282
|
+
ComponentLoad
|
|
94283
|
+
} = InternalTransactions;
|
|
94284
|
+
return this.baseClient.reportTransactionFinish(ComponentLoad, options, data);
|
|
94285
|
+
}
|
|
94286
|
+
phase(name) {
|
|
94287
|
+
return new PanoramaPhaseImpl(name, this.baseClient);
|
|
94288
|
+
}
|
|
94289
|
+
transaction(name, options) {
|
|
94290
|
+
return new PanoramaTransactionImpl(this.baseClient, name, options);
|
|
94291
|
+
}
|
|
94292
|
+
errorMonitor(options) {
|
|
94293
|
+
return new PanoramaErrorMonitorImpl(this.baseClient, options);
|
|
94294
|
+
}
|
|
94295
|
+
logger() {
|
|
94296
|
+
return new PanoramaLoggerImpl(this.baseClient);
|
|
94297
|
+
}
|
|
94298
|
+
createClientForComponent() {
|
|
94299
|
+
const client2 = new PanoramaClientForComponentImpl({
|
|
94300
|
+
baseClient: this.baseClient
|
|
94301
|
+
});
|
|
94302
|
+
this.hooksManager.invoke(Hook2.afterCreateClientForComponent, client2);
|
|
94303
|
+
return client2;
|
|
94304
|
+
}
|
|
94305
|
+
};
|
|
94306
|
+
|
|
94307
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-client/dist/esm/panorama-client-base.js
|
|
94308
|
+
init_esm_shims();
|
|
94309
|
+
var import_defineProperty4 = __toESM(require_defineProperty());
|
|
94310
|
+
|
|
94311
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-client/dist/esm/lib/payload-builder.js
|
|
94312
|
+
init_esm_shims();
|
|
94313
|
+
|
|
94314
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-client/dist/esm/utils/error-utils.js
|
|
94315
|
+
init_esm_shims();
|
|
94316
|
+
var extractWixHttpErrorDetailsRec = (error) => {
|
|
94317
|
+
var _httpClientError$resp;
|
|
94318
|
+
if (!(error instanceof Error)) {
|
|
94319
|
+
return {};
|
|
94320
|
+
}
|
|
94321
|
+
const res = extractWixHttpErrorDetailsRec(error.cause);
|
|
94322
|
+
const httpClientError = error;
|
|
94323
|
+
return defaults2(res, {
|
|
94324
|
+
isWixHttpError: httpClientError.isWixHttpError,
|
|
94325
|
+
requestId: ((_httpClientError$resp = httpClientError.response) == null || (_httpClientError$resp = _httpClientError$resp.headers) == null ? void 0 : _httpClientError$resp["x-wix-request-id"]) ?? httpClientError.requestId
|
|
94326
|
+
});
|
|
94327
|
+
};
|
|
94328
|
+
var extractWixHttpErrorDetails = (error) => defaults2(extractWixHttpErrorDetailsRec(error), {
|
|
94329
|
+
isWixHttpError: false,
|
|
94330
|
+
requestId: ""
|
|
94331
|
+
});
|
|
94332
|
+
|
|
94333
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-client/dist/esm/lib/payload-sanitizer.js
|
|
94334
|
+
init_esm_shims();
|
|
94335
|
+
|
|
94336
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-client/dist/esm/constants.js
|
|
94337
|
+
init_esm_shims();
|
|
94338
|
+
var MAX_STACK_TRACE_SIZE_BYTES = 32 * 1024;
|
|
94339
|
+
var MAX_SESSION_TIME_MS = 24 * 60 * 60 * 1e3;
|
|
94340
|
+
|
|
94341
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-client/dist/esm/lib/payload-sanitizer.js
|
|
94342
|
+
var sanitizePayload = (payload5) => {
|
|
94343
|
+
const {
|
|
94344
|
+
errorStack,
|
|
94345
|
+
sessionTime
|
|
94346
|
+
} = payload5;
|
|
94347
|
+
if (errorStack && errorStack.length > MAX_STACK_TRACE_SIZE_BYTES) {
|
|
94348
|
+
const truncationMessage = `...[truncated by Panorama client to ${MAX_STACK_TRACE_SIZE_BYTES / 1024}kb]`;
|
|
94349
|
+
const truncatedErrorStack = errorStack.substring(0, MAX_STACK_TRACE_SIZE_BYTES - truncationMessage.length);
|
|
94350
|
+
payload5 = {
|
|
94351
|
+
...payload5,
|
|
94352
|
+
errorStack: `${truncatedErrorStack}${truncationMessage}`
|
|
94353
|
+
};
|
|
94354
|
+
}
|
|
94355
|
+
if (sessionTime && sessionTime > MAX_SESSION_TIME_MS) {
|
|
94356
|
+
payload5 = {
|
|
94357
|
+
...payload5,
|
|
94358
|
+
sessionTime: MAX_SESSION_TIME_MS
|
|
94359
|
+
};
|
|
94360
|
+
}
|
|
94361
|
+
return payload5;
|
|
94362
|
+
};
|
|
94363
|
+
|
|
94364
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-client/dist/esm/lib/payload-builder.js
|
|
94365
|
+
var getSessionParams = (globalConfig2) => {
|
|
94366
|
+
const sessionId = globalConfig2.getSessionId();
|
|
94367
|
+
const sessionTime = Math.round(globalConfig2.getSessionTime());
|
|
94368
|
+
return {
|
|
94369
|
+
sessionId,
|
|
94370
|
+
sessionTime
|
|
94371
|
+
};
|
|
94372
|
+
};
|
|
94373
|
+
var buildTransactionPayload = (globalConfig2, baseParams, transactionParams, data) => {
|
|
94374
|
+
const {
|
|
94375
|
+
transactionName,
|
|
94376
|
+
transactionAction
|
|
94377
|
+
} = transactionParams;
|
|
94378
|
+
const {
|
|
94379
|
+
sessionId,
|
|
94380
|
+
sessionTime
|
|
94381
|
+
} = getSessionParams(globalConfig2);
|
|
94382
|
+
const logLevel = LogLevel.Info;
|
|
94383
|
+
const message = `Panorama ${transactionName} ${transactionAction}`;
|
|
94384
|
+
const requestId = "";
|
|
94385
|
+
return sanitizePayload({
|
|
94386
|
+
...baseParams,
|
|
94387
|
+
...transactionParams,
|
|
94388
|
+
sessionId,
|
|
94389
|
+
sessionTime,
|
|
94390
|
+
logLevel,
|
|
94391
|
+
requestId,
|
|
94392
|
+
message,
|
|
94393
|
+
data
|
|
94394
|
+
});
|
|
94395
|
+
};
|
|
94396
|
+
var buildPhasePayload = (globalConfig2, baseParams, phaseParams, data) => {
|
|
94397
|
+
const transactionName = InternalTransactions.ComponentPhase;
|
|
94398
|
+
const {
|
|
94399
|
+
phaseName,
|
|
94400
|
+
transactionAction
|
|
94401
|
+
} = phaseParams;
|
|
94402
|
+
const {
|
|
94403
|
+
sessionId,
|
|
94404
|
+
sessionTime
|
|
94405
|
+
} = getSessionParams(globalConfig2);
|
|
94406
|
+
const logLevel = LogLevel.Info;
|
|
94407
|
+
const message = `Panorama ${phaseName} phase ${transactionAction}`;
|
|
94408
|
+
const requestId = "";
|
|
94409
|
+
return sanitizePayload({
|
|
94410
|
+
...baseParams,
|
|
94411
|
+
...phaseParams,
|
|
94412
|
+
transactionName,
|
|
94413
|
+
sessionId,
|
|
94414
|
+
sessionTime,
|
|
94415
|
+
logLevel,
|
|
94416
|
+
requestId,
|
|
94417
|
+
message,
|
|
94418
|
+
data
|
|
94419
|
+
});
|
|
94420
|
+
};
|
|
94421
|
+
var buildErrorPayload = (globalConfig2, baseParams, error, data) => {
|
|
94422
|
+
const {
|
|
94423
|
+
sessionId,
|
|
94424
|
+
sessionTime
|
|
94425
|
+
} = getSessionParams(globalConfig2);
|
|
94426
|
+
const {
|
|
94427
|
+
constructor,
|
|
94428
|
+
message,
|
|
94429
|
+
stack = ""
|
|
94430
|
+
} = error;
|
|
94431
|
+
const logLevel = LogLevel.Error;
|
|
94432
|
+
const {
|
|
94433
|
+
requestId
|
|
94434
|
+
} = extractWixHttpErrorDetails(error);
|
|
94435
|
+
return sanitizePayload({
|
|
94436
|
+
...baseParams,
|
|
94437
|
+
sessionId,
|
|
94438
|
+
sessionTime,
|
|
94439
|
+
logLevel,
|
|
94440
|
+
requestId,
|
|
94441
|
+
data,
|
|
94442
|
+
errorName: (data == null ? void 0 : data.errorName) ?? constructor.name,
|
|
94443
|
+
errorStack: stack,
|
|
94444
|
+
message
|
|
94445
|
+
});
|
|
94446
|
+
};
|
|
94447
|
+
var buildLoggerPayload = (globalConfig2, baseParams, loggerParams) => {
|
|
94448
|
+
const {
|
|
94449
|
+
sessionId,
|
|
94450
|
+
sessionTime
|
|
94451
|
+
} = getSessionParams(globalConfig2);
|
|
94452
|
+
const requestId = "";
|
|
94453
|
+
return sanitizePayload({
|
|
94454
|
+
...baseParams,
|
|
94455
|
+
...loggerParams,
|
|
94456
|
+
sessionId,
|
|
94457
|
+
sessionTime,
|
|
94458
|
+
requestId
|
|
94459
|
+
});
|
|
94460
|
+
};
|
|
94461
|
+
|
|
94462
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-client/dist/esm/panorama-client-base.js
|
|
94463
|
+
var BasePanoramaClient = class {
|
|
94464
|
+
constructor(_ref) {
|
|
94465
|
+
var _this = this;
|
|
94466
|
+
let {
|
|
94467
|
+
baseParams,
|
|
94468
|
+
globalConfig: globalConfig2,
|
|
94469
|
+
reporter,
|
|
94470
|
+
hooksManager,
|
|
94471
|
+
data,
|
|
94472
|
+
isMuted
|
|
94473
|
+
} = _ref;
|
|
94474
|
+
(0, import_defineProperty4.default)(this, "durationTracker", void 0);
|
|
94475
|
+
(0, import_defineProperty4.default)(this, "baseParams", void 0);
|
|
94476
|
+
(0, import_defineProperty4.default)(this, "globalConfig", void 0);
|
|
94477
|
+
(0, import_defineProperty4.default)(this, "reporter", void 0);
|
|
94478
|
+
(0, import_defineProperty4.default)(this, "hooksManager", void 0);
|
|
94479
|
+
(0, import_defineProperty4.default)(this, "data", void 0);
|
|
94480
|
+
(0, import_defineProperty4.default)(this, "isMuted", void 0);
|
|
94481
|
+
(0, import_defineProperty4.default)(this, "getErrorMonitorDataWithDefaults", function() {
|
|
94482
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
94483
|
+
args[_key] = arguments[_key];
|
|
94484
|
+
}
|
|
94485
|
+
return _this.data.addDataScope(args).getData();
|
|
94486
|
+
});
|
|
94487
|
+
this.baseParams = baseParams;
|
|
94488
|
+
this.globalConfig = globalConfig2;
|
|
94489
|
+
this.reporter = reporter;
|
|
94490
|
+
this.hooksManager = hooksManager;
|
|
94491
|
+
this.data = data;
|
|
94492
|
+
this.isMuted = isMuted;
|
|
94493
|
+
this.durationTracker = typeof globalConfig2.getDurationTracker === "function" ? globalConfig2.getDurationTracker() : createDurationTracker();
|
|
94494
|
+
}
|
|
94495
|
+
report(eventPayload) {
|
|
94496
|
+
if (this.isMuted()) {
|
|
94497
|
+
return;
|
|
94498
|
+
}
|
|
94499
|
+
const reporterOverride = this.globalConfig.getReporter();
|
|
94500
|
+
const beforeReportHookResult = this.hooksManager.invoke(Hook2.beforeReport, eventPayload);
|
|
94501
|
+
if (typeof reporterOverride === "function") {
|
|
94502
|
+
reporterOverride(eventPayload);
|
|
94503
|
+
return;
|
|
94504
|
+
}
|
|
94505
|
+
if (!beforeReportHookResult) {
|
|
94506
|
+
return;
|
|
94507
|
+
}
|
|
94508
|
+
this.reporter(eventPayload);
|
|
94509
|
+
}
|
|
94510
|
+
reportTransactionStart(name, options, data) {
|
|
94511
|
+
if (options === void 0) {
|
|
94512
|
+
options = {};
|
|
94513
|
+
}
|
|
94514
|
+
const {
|
|
94515
|
+
id
|
|
94516
|
+
} = options;
|
|
94517
|
+
const dataWithDefault = this.data.addDataScope(data).getData();
|
|
94518
|
+
if (!this.hooksManager.invoke(Hook2.beforeReportTransactionStart, name, dataWithDefault)) {
|
|
94519
|
+
return;
|
|
94520
|
+
}
|
|
94521
|
+
const {
|
|
94522
|
+
fullArtifactId,
|
|
94523
|
+
componentId
|
|
94524
|
+
} = this.baseParams;
|
|
94525
|
+
this.durationTracker.markTransactionStart(fullArtifactId, componentId, name, id);
|
|
94526
|
+
const payload5 = buildTransactionPayload(this.globalConfig, this.baseParams, {
|
|
94527
|
+
transactionName: name,
|
|
94528
|
+
transactionAction: TransactionAction.Start
|
|
94529
|
+
}, dataWithDefault);
|
|
94530
|
+
this.report(payload5);
|
|
94531
|
+
this.hooksManager.invoke(Hook2.afterReportTransactionStart, name, payload5);
|
|
94532
|
+
}
|
|
94533
|
+
reportTransactionFinish(name, options, data) {
|
|
94534
|
+
if (options === void 0) {
|
|
94535
|
+
options = {};
|
|
94536
|
+
}
|
|
94537
|
+
const {
|
|
94538
|
+
id
|
|
94539
|
+
} = options;
|
|
94540
|
+
const dataWithDefault = this.data.addDataScope(data).getData();
|
|
94541
|
+
if (!this.hooksManager.invoke(Hook2.beforeReportTransactionFinish, name, dataWithDefault)) {
|
|
94542
|
+
return;
|
|
94543
|
+
}
|
|
94544
|
+
const {
|
|
94545
|
+
fullArtifactId,
|
|
94546
|
+
componentId
|
|
94547
|
+
} = this.baseParams;
|
|
94548
|
+
const duration2 = this.durationTracker.markTransactionFinish(fullArtifactId, componentId, name, id);
|
|
94549
|
+
const payload5 = buildTransactionPayload(this.globalConfig, this.baseParams, {
|
|
94550
|
+
transactionName: name,
|
|
94551
|
+
transactionAction: TransactionAction.Finish,
|
|
94552
|
+
transactionDuration: duration2
|
|
94553
|
+
}, dataWithDefault);
|
|
94554
|
+
this.report(payload5);
|
|
94555
|
+
this.hooksManager.invoke(Hook2.afterReportTransactionFinish, name, payload5);
|
|
94556
|
+
}
|
|
94557
|
+
reportPhaseStart(name, data) {
|
|
94558
|
+
const dataWithDefault = this.data.addDataScope(data).getData();
|
|
94559
|
+
if (!this.hooksManager.invoke(Hook2.beforeReportPhaseStart, name, dataWithDefault)) {
|
|
94560
|
+
return;
|
|
94561
|
+
}
|
|
94562
|
+
const {
|
|
94563
|
+
fullArtifactId,
|
|
94564
|
+
componentId
|
|
94565
|
+
} = this.baseParams;
|
|
94566
|
+
this.durationTracker.markPhaseStart(fullArtifactId, componentId, name);
|
|
94567
|
+
const payload5 = buildPhasePayload(this.globalConfig, this.baseParams, {
|
|
94568
|
+
phaseName: name,
|
|
94569
|
+
transactionAction: TransactionAction.Start
|
|
94570
|
+
}, dataWithDefault);
|
|
94571
|
+
this.report(payload5);
|
|
94572
|
+
this.hooksManager.invoke(Hook2.afterReportPhaseStart, name, payload5);
|
|
94573
|
+
}
|
|
94574
|
+
reportPhaseFinish(name, data) {
|
|
94575
|
+
const dataWithDefault = this.data.addDataScope(data).getData();
|
|
94576
|
+
if (!this.hooksManager.invoke(Hook2.beforeReportPhaseFinish, name, dataWithDefault)) {
|
|
94577
|
+
return;
|
|
94578
|
+
}
|
|
94579
|
+
const {
|
|
94580
|
+
fullArtifactId,
|
|
94581
|
+
componentId
|
|
94582
|
+
} = this.baseParams;
|
|
94583
|
+
const duration2 = this.durationTracker.markPhaseFinish(fullArtifactId, componentId, name);
|
|
94584
|
+
const payload5 = buildPhasePayload(this.globalConfig, this.baseParams, {
|
|
94585
|
+
phaseName: name,
|
|
94586
|
+
transactionAction: TransactionAction.Finish,
|
|
94587
|
+
transactionDuration: duration2
|
|
94588
|
+
}, dataWithDefault);
|
|
94589
|
+
this.report(payload5);
|
|
94590
|
+
this.hooksManager.invoke(Hook2.afterReportPhaseFinish, name, payload5);
|
|
94591
|
+
}
|
|
94592
|
+
reportError(error, data, options) {
|
|
94593
|
+
if (!(error instanceof Error)) {
|
|
94594
|
+
return;
|
|
94595
|
+
}
|
|
94596
|
+
data = this.data.addDataScope([data, options == null ? void 0 : options.data]).getData();
|
|
94597
|
+
if (!this.hooksManager.invoke(Hook2.beforeReportError, error, data, options)) {
|
|
94598
|
+
return;
|
|
94599
|
+
}
|
|
94600
|
+
const payload5 = buildErrorPayload(this.globalConfig, this.baseParams, error, data);
|
|
94601
|
+
this.report(payload5);
|
|
94602
|
+
this.hooksManager.invoke(Hook2.afterReportError, error, data, options);
|
|
94603
|
+
}
|
|
94604
|
+
addBreadcrumb(breadcrumb) {
|
|
94605
|
+
if (!this.hooksManager.invoke(Hook2.beforeAddBreadcrumb, breadcrumb)) {
|
|
94606
|
+
return;
|
|
94607
|
+
}
|
|
94608
|
+
this.hooksManager.invoke(Hook2.afterAddBreadcrumb, breadcrumb);
|
|
94609
|
+
}
|
|
94610
|
+
log(logLevel, message, data) {
|
|
94611
|
+
if (!message) {
|
|
94612
|
+
return;
|
|
94613
|
+
}
|
|
94614
|
+
const dataWithDefault = this.data.addDataScope(data).getData();
|
|
94615
|
+
const loggerParams = {
|
|
94616
|
+
message,
|
|
94617
|
+
data: dataWithDefault,
|
|
94618
|
+
logLevel
|
|
94619
|
+
};
|
|
94620
|
+
if (!this.hooksManager.invoke(Hook2.beforeReportLog, logLevel, message, dataWithDefault)) {
|
|
94621
|
+
return;
|
|
94622
|
+
}
|
|
94623
|
+
const payload5 = buildLoggerPayload(this.globalConfig, this.baseParams, loggerParams);
|
|
94624
|
+
this.report(payload5);
|
|
94625
|
+
this.hooksManager.invoke(Hook2.afterReportLog, logLevel, message, dataWithDefault);
|
|
94626
|
+
}
|
|
94627
|
+
};
|
|
94628
|
+
|
|
94629
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-client/dist/esm/lib/scope.js
|
|
94630
|
+
init_esm_shims();
|
|
94631
|
+
var import_defineProperty5 = __toESM(require_defineProperty());
|
|
94632
|
+
var Scope2 = class _Scope {
|
|
94633
|
+
constructor(data) {
|
|
94634
|
+
(0, import_defineProperty5.default)(this, "data", void 0);
|
|
94635
|
+
this.data = data;
|
|
94636
|
+
}
|
|
94637
|
+
getEntriesToDeepDefaults(data) {
|
|
94638
|
+
if (!data) {
|
|
94639
|
+
return void 0;
|
|
94640
|
+
}
|
|
94641
|
+
return Object.fromEntries(Object.entries(data).filter((_ref) => {
|
|
94642
|
+
let [key] = _ref;
|
|
94643
|
+
return _Scope.KEYS_TO_DEEP_DEFAULTS.includes(key);
|
|
94644
|
+
}));
|
|
94645
|
+
}
|
|
94646
|
+
addDataScope(data) {
|
|
94647
|
+
const outerDataArray = Array.isArray(data) ? data : [data];
|
|
94648
|
+
const deepDefaultData = deepDefaults(...outerDataArray.map((_data) => this.getEntriesToDeepDefaults(_data)), this.getEntriesToDeepDefaults(this.data));
|
|
94649
|
+
return new _Scope(defaults2(deepDefaultData, ...outerDataArray, this.data));
|
|
94650
|
+
}
|
|
94651
|
+
getData() {
|
|
94652
|
+
return this.data;
|
|
94653
|
+
}
|
|
94654
|
+
};
|
|
94655
|
+
(0, import_defineProperty5.default)(Scope2, "KEYS_TO_DEEP_DEFAULTS", ["tags", "context"]);
|
|
94656
|
+
|
|
94657
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-client/dist/esm/panorama-client-factory.js
|
|
94658
|
+
var PanoramaClientFactoryImpl = class {
|
|
94659
|
+
constructor(options) {
|
|
94660
|
+
this.options = options;
|
|
94661
|
+
(0, import_defineProperty6.default)(this, "globalConfig", void 0);
|
|
94662
|
+
(0, import_defineProperty6.default)(this, "reporter", () => true);
|
|
94663
|
+
(0, import_defineProperty6.default)(this, "plugins", []);
|
|
94664
|
+
(0, import_defineProperty6.default)(this, "isMuted", false);
|
|
94665
|
+
bindPrototypeMethodsToSelf(this);
|
|
94666
|
+
}
|
|
94667
|
+
withGlobalConfig(globalConfig2) {
|
|
94668
|
+
this.globalConfig = globalConfig2;
|
|
94669
|
+
return this;
|
|
94670
|
+
}
|
|
94671
|
+
withReporter(reporter) {
|
|
94672
|
+
this.reporter = reporter;
|
|
94673
|
+
return this;
|
|
94674
|
+
}
|
|
94675
|
+
setMuted(isMuted) {
|
|
94676
|
+
this.isMuted = isMuted;
|
|
94677
|
+
return this;
|
|
94678
|
+
}
|
|
94679
|
+
use(plugin) {
|
|
94680
|
+
this.plugins.push(plugin);
|
|
94681
|
+
return this;
|
|
94682
|
+
}
|
|
94683
|
+
client(options) {
|
|
94684
|
+
if (options === void 0) {
|
|
94685
|
+
options = {};
|
|
94686
|
+
}
|
|
94687
|
+
const {
|
|
94688
|
+
pluginParams
|
|
94689
|
+
} = options;
|
|
94690
|
+
const globalConfig2 = this.globalConfig ?? createGlobalConfig();
|
|
94691
|
+
const reporter = this.reporter;
|
|
94692
|
+
const hooksManager = new HooksManager();
|
|
94693
|
+
const baseParams = defaults2(options.baseParams, this.options.baseParams);
|
|
94694
|
+
const data = new Scope2(this.options.data).addDataScope(options.data);
|
|
94695
|
+
const pluginClientParams = pluginParams ?? {};
|
|
94696
|
+
const baseClient = new BasePanoramaClient({
|
|
94697
|
+
baseParams,
|
|
94698
|
+
globalConfig: globalConfig2,
|
|
94699
|
+
isMuted: () => this.isMuted,
|
|
94700
|
+
reporter,
|
|
94701
|
+
hooksManager,
|
|
94702
|
+
data
|
|
94703
|
+
});
|
|
94704
|
+
const client2 = new PanoramaClientImpl({
|
|
94705
|
+
baseClient,
|
|
94706
|
+
hooksManager
|
|
94707
|
+
});
|
|
94708
|
+
this.plugins.forEach((plugin) => plugin({
|
|
94709
|
+
hooksManager,
|
|
94710
|
+
globalConfig: globalConfig2,
|
|
94711
|
+
reporter,
|
|
94712
|
+
baseClient,
|
|
94713
|
+
baseParams,
|
|
94714
|
+
pluginParams: pluginClientParams
|
|
94715
|
+
}));
|
|
94716
|
+
return client2;
|
|
94717
|
+
}
|
|
94718
|
+
};
|
|
94719
|
+
var panoramaClient = function(options) {
|
|
94720
|
+
if (options === void 0) {
|
|
94721
|
+
options = {};
|
|
94722
|
+
}
|
|
94723
|
+
return new PanoramaClientFactoryImpl(options);
|
|
94724
|
+
};
|
|
94725
|
+
|
|
94726
|
+
// ../../node_modules/@wix/panorama-client-node/node_modules/@wix/panorama-common-shared/dist/esm/constants.js
|
|
94727
|
+
init_esm_shims();
|
|
94728
|
+
var CLICKHOUSE_REPORT_URL = "https://panorama.wixapps.net/api/v1/log";
|
|
94729
|
+
|
|
94730
|
+
// ../../node_modules/@wix/panorama-client-node/dist/esm/reporter.js
|
|
94731
|
+
init_esm_shims();
|
|
94732
|
+
var nodeReporter = function(url2, _temp) {
|
|
94733
|
+
let {
|
|
94734
|
+
silent = false
|
|
94735
|
+
} = _temp === void 0 ? {
|
|
94736
|
+
silent: false
|
|
94737
|
+
} : _temp;
|
|
94738
|
+
return (eventPayload) => {
|
|
94739
|
+
const body = JSON.stringify({
|
|
94740
|
+
logMessage: eventPayload
|
|
94741
|
+
});
|
|
94742
|
+
fetch(url2, {
|
|
94743
|
+
method: "POST",
|
|
94744
|
+
body
|
|
94745
|
+
}).then((res) => {
|
|
94746
|
+
if (res.ok || silent) {
|
|
94747
|
+
return;
|
|
94748
|
+
}
|
|
94749
|
+
console.error("Panorama report failed", res.statusText);
|
|
94750
|
+
}).catch((e2) => {
|
|
94751
|
+
if (silent) {
|
|
94752
|
+
return;
|
|
94753
|
+
}
|
|
94754
|
+
console.error("Panorama report failed", e2);
|
|
94755
|
+
});
|
|
94756
|
+
return true;
|
|
94757
|
+
};
|
|
94758
|
+
};
|
|
94759
|
+
|
|
94760
|
+
// ../../node_modules/@wix/panorama-client-node/dist/esm/panorama-client-node.js
|
|
94761
|
+
var panoramaClientFactory = (options) => {
|
|
94762
|
+
const {
|
|
94763
|
+
baseParams,
|
|
94764
|
+
reporterOptions,
|
|
94765
|
+
data
|
|
94766
|
+
} = options;
|
|
94767
|
+
const factory = panoramaClient({
|
|
94768
|
+
baseParams,
|
|
94769
|
+
data
|
|
94770
|
+
}).withReporter(nodeReporter(CLICKHOUSE_REPORT_URL, reporterOptions));
|
|
94771
|
+
factory.use = void 0;
|
|
94772
|
+
return factory;
|
|
94773
|
+
};
|
|
94774
|
+
|
|
94775
|
+
// ../cli-user-config/src/user-config.ts
|
|
94776
|
+
init_esm_shims();
|
|
94777
|
+
import { join as join7 } from "node:path";
|
|
94778
|
+
|
|
94779
|
+
// ../cli-core-definitions/src/index.ts
|
|
94780
|
+
init_esm_shims();
|
|
94781
|
+
import { join as join6 } from "node:path";
|
|
94782
|
+
var WIX_CONFIG_FILENAME = "wix.config.json";
|
|
94783
|
+
var USER_CONFIG_FILENAME = "user.config.json";
|
|
94784
|
+
var userConfigSchema = z.object({
|
|
94785
|
+
telemetry: z.boolean().default(true),
|
|
94786
|
+
tunneling: z.boolean().default(false)
|
|
94787
|
+
});
|
|
94788
|
+
function getWixConfigFilePath(projectFolder) {
|
|
94789
|
+
return join6(projectFolder, WIX_CONFIG_FILENAME);
|
|
94790
|
+
}
|
|
94791
|
+
|
|
94792
|
+
// ../cli-user-config/src/user-config.ts
|
|
94793
|
+
function getUserConfigPath() {
|
|
94794
|
+
return join7(getDataDirPath(), USER_CONFIG_FILENAME);
|
|
94795
|
+
}
|
|
94796
|
+
async function readUserConfig() {
|
|
94797
|
+
const configPath = getUserConfigPath();
|
|
94798
|
+
const isConfigExist = await pathExists(configPath);
|
|
94799
|
+
const json = isConfigExist ? await readJson(configPath) : {};
|
|
94800
|
+
return userConfigSchema.parse(json);
|
|
94801
|
+
}
|
|
94802
|
+
|
|
94803
|
+
// ../cli-panorama/src/createPanorama.ts
|
|
94804
|
+
var globalConfig = createGlobalConfig();
|
|
94805
|
+
var overrides = getTestOverrides();
|
|
94806
|
+
if (overrides.panoramaReporterUrl) {
|
|
94807
|
+
globalConfig.setReporter(
|
|
94808
|
+
nodeReporter(overrides.panoramaReporterUrl, { silent: true })
|
|
94809
|
+
);
|
|
94810
|
+
}
|
|
94811
|
+
async function createPanorama(options) {
|
|
94812
|
+
const { version, artifact, userId } = options;
|
|
94813
|
+
const userConfig = await readUserConfig();
|
|
94814
|
+
const factory = panoramaClientFactory({
|
|
94815
|
+
baseParams: {
|
|
94816
|
+
platform: Platform.Standalone,
|
|
94817
|
+
fullArtifactId: `${artifact.groupId}.${artifact.artifactId}`,
|
|
94818
|
+
componentId: "app",
|
|
94819
|
+
// This property is mandatory, there is validation on server side
|
|
94820
|
+
artifactVersion: version,
|
|
94821
|
+
uuid: userId
|
|
94822
|
+
},
|
|
94823
|
+
reporterOptions: {
|
|
94824
|
+
silent: true
|
|
94825
|
+
}
|
|
94826
|
+
}).withGlobalConfig(globalConfig).setMuted(!userConfig.telemetry);
|
|
94827
|
+
return factory;
|
|
94828
|
+
}
|
|
94829
|
+
|
|
93665
94830
|
// src/bi/index.ts
|
|
93666
94831
|
init_esm_shims();
|
|
93667
94832
|
|
|
@@ -93733,34 +94898,6 @@ var StandaloneNodeLogger = (
|
|
|
93733
94898
|
);
|
|
93734
94899
|
var src_default = new StandaloneNodeLogger();
|
|
93735
94900
|
|
|
93736
|
-
// ../cli-user-config/src/user-config.ts
|
|
93737
|
-
init_esm_shims();
|
|
93738
|
-
import { join as join7 } from "node:path";
|
|
93739
|
-
|
|
93740
|
-
// ../cli-core-definitions/src/index.ts
|
|
93741
|
-
init_esm_shims();
|
|
93742
|
-
import { join as join6 } from "node:path";
|
|
93743
|
-
var WIX_CONFIG_FILENAME = "wix.config.json";
|
|
93744
|
-
var USER_CONFIG_FILENAME = "user.config.json";
|
|
93745
|
-
var userConfigSchema = z.object({
|
|
93746
|
-
telemetry: z.boolean().default(true),
|
|
93747
|
-
tunneling: z.boolean().default(false)
|
|
93748
|
-
});
|
|
93749
|
-
function getWixConfigFilePath(projectFolder) {
|
|
93750
|
-
return join6(projectFolder, WIX_CONFIG_FILENAME);
|
|
93751
|
-
}
|
|
93752
|
-
|
|
93753
|
-
// ../cli-user-config/src/user-config.ts
|
|
93754
|
-
function getUserConfigPath() {
|
|
93755
|
-
return join7(getDataDirPath(), USER_CONFIG_FILENAME);
|
|
93756
|
-
}
|
|
93757
|
-
async function readUserConfig() {
|
|
93758
|
-
const configPath = getUserConfigPath();
|
|
93759
|
-
const isConfigExist = await pathExists(configPath);
|
|
93760
|
-
const json = isConfigExist ? await readJson(configPath) : {};
|
|
93761
|
-
return userConfigSchema.parse(json);
|
|
93762
|
-
}
|
|
93763
|
-
|
|
93764
94901
|
// ../cli-telemetry/src/add-user-fields.ts
|
|
93765
94902
|
init_esm_shims();
|
|
93766
94903
|
import { randomUUID } from "node:crypto";
|
|
@@ -93908,14 +95045,14 @@ function wixCliCliError(params) {
|
|
|
93908
95045
|
var package_default = {
|
|
93909
95046
|
name: "@wix/create-headless-site",
|
|
93910
95047
|
description: "Headless site creation wizard",
|
|
93911
|
-
version: "0.0.
|
|
95048
|
+
version: "0.0.17",
|
|
93912
95049
|
bin: "bin/index.cjs",
|
|
93913
95050
|
devDependencies: {
|
|
93914
95051
|
"@commander-js/extra-typings": "^13.0.0",
|
|
93915
95052
|
"@types/react": "^18.3.3",
|
|
93916
95053
|
"@types/semver": "^7.5.8",
|
|
93917
95054
|
"@types/validate-npm-package-name": "^4.0.2",
|
|
93918
|
-
"@wix/ambassador-funnel-projects-v1-project": "^1.0.
|
|
95055
|
+
"@wix/ambassador-funnel-projects-v1-project": "^1.0.11",
|
|
93919
95056
|
"@wix/backend-as-a-service-client": "workspace:*",
|
|
93920
95057
|
"@wix/bi-logger-dev-tools-data": "^1.116.0",
|
|
93921
95058
|
"@wix/cli-astro-definitions": "workspace:*",
|
|
@@ -93926,6 +95063,7 @@ var package_default = {
|
|
|
93926
95063
|
"@wix/cli-fs": "workspace:*",
|
|
93927
95064
|
"@wix/cli-http-client": "workspace:*",
|
|
93928
95065
|
"@wix/cli-http-client-react": "workspace:*",
|
|
95066
|
+
"@wix/cli-panorama": "workspace:*",
|
|
93929
95067
|
"@wix/cli-project-extender": "workspace:*",
|
|
93930
95068
|
"@wix/cli-telemetry": "workspace:*",
|
|
93931
95069
|
"@wix/cli-telemetry-react": "workspace:*",
|
|
@@ -94026,7 +95164,7 @@ var createBiLogger2 = async (errorReporter2, userId) => {
|
|
|
94026
95164
|
|
|
94027
95165
|
// src/components/LinkCommand/LinkCommand.tsx
|
|
94028
95166
|
init_esm_shims();
|
|
94029
|
-
var
|
|
95167
|
+
var import_react109 = __toESM(require_react(), 1);
|
|
94030
95168
|
|
|
94031
95169
|
// ../package-manager/src/index.ts
|
|
94032
95170
|
init_esm_shims();
|
|
@@ -96542,14 +97680,14 @@ var import_variant35 = __toESM(require_lib(), 1);
|
|
|
96542
97680
|
|
|
96543
97681
|
// src/components/WelcomeMessage.tsx
|
|
96544
97682
|
init_esm_shims();
|
|
96545
|
-
var
|
|
97683
|
+
var import_react95 = __toESM(require_react(), 1);
|
|
96546
97684
|
var WelcomeMessage = () => {
|
|
96547
|
-
return /* @__PURE__ */
|
|
97685
|
+
return /* @__PURE__ */ import_react95.default.createElement(Box_default, { flexDirection: "column", marginBottom: 1, paddingTop: 1 }, /* @__PURE__ */ import_react95.default.createElement(Text2, { bold: true }, "Create Headless Site"));
|
|
96548
97686
|
};
|
|
96549
97687
|
|
|
96550
97688
|
// src/components/ChooseBusinessName.tsx
|
|
96551
97689
|
init_esm_shims();
|
|
96552
|
-
var
|
|
97690
|
+
var import_react96 = __toESM(require_react(), 1);
|
|
96553
97691
|
|
|
96554
97692
|
// src/validations/validate-business-name.ts
|
|
96555
97693
|
init_esm_shims();
|
|
@@ -96564,7 +97702,7 @@ var validateBusinessName = (value2) => {
|
|
|
96564
97702
|
|
|
96565
97703
|
// src/components/ChooseBusinessName.tsx
|
|
96566
97704
|
var ChooseBusinessName = ({ onSubmit }) => {
|
|
96567
|
-
const validate3 = (0,
|
|
97705
|
+
const validate3 = (0, import_react96.useCallback)((businessName) => {
|
|
96568
97706
|
try {
|
|
96569
97707
|
validateBusinessName(businessName);
|
|
96570
97708
|
return true;
|
|
@@ -96572,7 +97710,7 @@ var ChooseBusinessName = ({ onSubmit }) => {
|
|
|
96572
97710
|
return e2.message;
|
|
96573
97711
|
}
|
|
96574
97712
|
}, []);
|
|
96575
|
-
return /* @__PURE__ */
|
|
97713
|
+
return /* @__PURE__ */ import_react96.default.createElement(
|
|
96576
97714
|
TextInput2,
|
|
96577
97715
|
{
|
|
96578
97716
|
label: "What's the name of your business?",
|
|
@@ -96585,32 +97723,32 @@ var ChooseBusinessName = ({ onSubmit }) => {
|
|
|
96585
97723
|
|
|
96586
97724
|
// src/components/CreateBusiness.tsx
|
|
96587
97725
|
init_esm_shims();
|
|
96588
|
-
var
|
|
97726
|
+
var import_react100 = __toESM(require_react(), 1);
|
|
96589
97727
|
var import_variant30 = __toESM(require_lib(), 1);
|
|
96590
97728
|
|
|
96591
97729
|
// src/clients/funnel-projects/useFunnelProjectsClient.ts
|
|
96592
97730
|
init_esm_shims();
|
|
96593
|
-
var
|
|
97731
|
+
var import_react99 = __toESM(require_react(), 1);
|
|
96594
97732
|
|
|
96595
97733
|
// ../cli-http-client-react/src/index.ts
|
|
96596
97734
|
init_esm_shims();
|
|
96597
97735
|
|
|
96598
97736
|
// ../cli-http-client-react/src/useHttpClient.ts
|
|
96599
97737
|
init_esm_shims();
|
|
96600
|
-
var
|
|
97738
|
+
var import_react98 = __toESM(require_react(), 1);
|
|
96601
97739
|
|
|
96602
97740
|
// ../cli-http-client-react/src/httpClientProvider.tsx
|
|
96603
97741
|
init_esm_shims();
|
|
96604
|
-
var
|
|
96605
|
-
var HttpClientContext = (0,
|
|
97742
|
+
var import_react97 = __toESM(require_react(), 1);
|
|
97743
|
+
var HttpClientContext = (0, import_react97.createContext)(null);
|
|
96606
97744
|
|
|
96607
97745
|
// ../cli-http-client-react/src/useHttpClient.ts
|
|
96608
97746
|
function useHttpClient({
|
|
96609
97747
|
type
|
|
96610
97748
|
}) {
|
|
96611
|
-
const context2 = (0,
|
|
97749
|
+
const context2 = (0, import_react98.useContext)(HttpClientContext);
|
|
96612
97750
|
const { getAccessToken: getAppToken, getRequestHeaders: createAuthHeaders } = useAuth();
|
|
96613
|
-
return (0,
|
|
97751
|
+
return (0, import_react98.useMemo)(
|
|
96614
97752
|
() => createHttpClient({
|
|
96615
97753
|
type,
|
|
96616
97754
|
getAppToken,
|
|
@@ -96731,7 +97869,11 @@ var FunnelProjectsClient = class {
|
|
|
96731
97869
|
// src/clients/funnel-projects/useFunnelProjectsClient.ts
|
|
96732
97870
|
function useFunnelProjectsClient() {
|
|
96733
97871
|
const httpClient = useHttpClient({ type: "api" });
|
|
96734
|
-
|
|
97872
|
+
const client2 = (0, import_react99.useMemo)(
|
|
97873
|
+
() => new FunnelProjectsClient(httpClient),
|
|
97874
|
+
[httpClient]
|
|
97875
|
+
);
|
|
97876
|
+
return usePanoramaMethodLogger(client2);
|
|
96735
97877
|
}
|
|
96736
97878
|
|
|
96737
97879
|
// src/components/CreateBusiness.tsx
|
|
@@ -96741,17 +97883,17 @@ var CreateBusiness = ({ businessName, businessTemplateId, onDone }) => {
|
|
|
96741
97883
|
const { project } = await createProject2(businessName, businessTemplateId);
|
|
96742
97884
|
onDone({ businessId: project.metaSiteId });
|
|
96743
97885
|
}, []);
|
|
96744
|
-
return /* @__PURE__ */
|
|
97886
|
+
return /* @__PURE__ */ import_react100.default.createElement(import_react100.default.Fragment, null, (0, import_variant30.match)(status, {
|
|
96745
97887
|
Error: () => null,
|
|
96746
|
-
Loading: () => /* @__PURE__ */
|
|
96747
|
-
Success: () => /* @__PURE__ */
|
|
97888
|
+
Loading: () => /* @__PURE__ */ import_react100.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react100.default.createElement(Spinner2, { text: "Creating your business..." })),
|
|
97889
|
+
Success: () => /* @__PURE__ */ import_react100.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react100.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react100.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react100.default.createElement(Text2, null, "Business created successfully"))),
|
|
96748
97890
|
NotRequested: () => null
|
|
96749
97891
|
}));
|
|
96750
97892
|
};
|
|
96751
97893
|
|
|
96752
97894
|
// src/components/CreateProject.tsx
|
|
96753
97895
|
init_esm_shims();
|
|
96754
|
-
var
|
|
97896
|
+
var import_react104 = __toESM(require_react(), 1);
|
|
96755
97897
|
var import_variant31 = __toESM(require_lib(), 1);
|
|
96756
97898
|
|
|
96757
97899
|
// src/validations/validate-project-name.ts
|
|
@@ -97971,6 +99113,12 @@ function resolveComWixpressDevcenterAppmarketlistingMarketListingServiceUrl(opts
|
|
|
97971
99113
|
srcPath: "/v1/marketListings",
|
|
97972
99114
|
destPath: "/v1/marketListings"
|
|
97973
99115
|
}
|
|
99116
|
+
],
|
|
99117
|
+
"vibe._base_domain_": [
|
|
99118
|
+
{
|
|
99119
|
+
srcPath: "/_api/app-market-listing",
|
|
99120
|
+
destPath: ""
|
|
99121
|
+
}
|
|
97974
99122
|
]
|
|
97975
99123
|
};
|
|
97976
99124
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
@@ -98941,6 +100089,8 @@ var ComponentType;
|
|
|
98941
100089
|
ComponentType3["WIX_VIBE_CODING_INSTRUCTIONS"] = "WIX_VIBE_CODING_INSTRUCTIONS";
|
|
98942
100090
|
ComponentType3["TAX_EXEMPT_GROUPS_PROVIDER"] = "TAX_EXEMPT_GROUPS_PROVIDER";
|
|
98943
100091
|
ComponentType3["BOOKING_AUTOMATIONS_CONFIGURATION"] = "BOOKING_AUTOMATIONS_CONFIGURATION";
|
|
100092
|
+
ComponentType3["WIX_VIBE_COMPONENT"] = "WIX_VIBE_COMPONENT";
|
|
100093
|
+
ComponentType3["WIXEL"] = "WIXEL";
|
|
98944
100094
|
})(ComponentType || (ComponentType = {}));
|
|
98945
100095
|
var WidgetVertical;
|
|
98946
100096
|
(function(WidgetVertical3) {
|
|
@@ -99757,6 +100907,13 @@ var PlanFormPricingOption;
|
|
|
99757
100907
|
PlanFormPricingOption3["ONE_TIME"] = "ONE_TIME";
|
|
99758
100908
|
PlanFormPricingOption3["RECURRING"] = "RECURRING";
|
|
99759
100909
|
})(PlanFormPricingOption || (PlanFormPricingOption = {}));
|
|
100910
|
+
var PlanFormPricingType;
|
|
100911
|
+
(function(PlanFormPricingType3) {
|
|
100912
|
+
PlanFormPricingType3["UNKNOWN_OPTION"] = "UNKNOWN_OPTION";
|
|
100913
|
+
PlanFormPricingType3["FREE"] = "FREE";
|
|
100914
|
+
PlanFormPricingType3["ONE_TIME"] = "ONE_TIME";
|
|
100915
|
+
PlanFormPricingType3["RECURRING"] = "RECURRING";
|
|
100916
|
+
})(PlanFormPricingType || (PlanFormPricingType = {}));
|
|
99760
100917
|
var PlanFormDefaultSection;
|
|
99761
100918
|
(function(PlanFormDefaultSection3) {
|
|
99762
100919
|
PlanFormDefaultSection3["UNKNWON_PLAN_FORM_SECTION"] = "UNKNWON_PLAN_FORM_SECTION";
|
|
@@ -99765,6 +100922,8 @@ var PlanFormDefaultSection;
|
|
|
99765
100922
|
PlanFormDefaultSection3["PAGE_PERMISSIONS"] = "PAGE_PERMISSIONS";
|
|
99766
100923
|
PlanFormDefaultSection3["PRICING_AND_DURATION"] = "PRICING_AND_DURATION";
|
|
99767
100924
|
PlanFormDefaultSection3["ADVANCED_SETTINGS"] = "ADVANCED_SETTINGS";
|
|
100925
|
+
PlanFormDefaultSection3["PRICING"] = "PRICING";
|
|
100926
|
+
PlanFormDefaultSection3["DURATION"] = "DURATION";
|
|
99768
100927
|
})(PlanFormDefaultSection || (PlanFormDefaultSection = {}));
|
|
99769
100928
|
var PlanPeriodUnit;
|
|
99770
100929
|
(function(PlanPeriodUnit3) {
|
|
@@ -100330,12 +101489,12 @@ var InterfaceConfigurationType;
|
|
|
100330
101489
|
InterfaceConfigurationType3["WIDGET_COMPONENT"] = "WIDGET_COMPONENT";
|
|
100331
101490
|
InterfaceConfigurationType3["ITEM_SELECTION"] = "ITEM_SELECTION";
|
|
100332
101491
|
})(InterfaceConfigurationType || (InterfaceConfigurationType = {}));
|
|
100333
|
-
var
|
|
100334
|
-
(function(
|
|
100335
|
-
|
|
100336
|
-
|
|
100337
|
-
|
|
100338
|
-
})(
|
|
101492
|
+
var Scope3;
|
|
101493
|
+
(function(Scope5) {
|
|
101494
|
+
Scope5["UNKNOWN_SCOPE"] = "UNKNOWN_SCOPE";
|
|
101495
|
+
Scope5["SPECIFIC_SITE"] = "SPECIFIC_SITE";
|
|
101496
|
+
Scope5["NON_SPECIFIC_SITE"] = "NON_SPECIFIC_SITE";
|
|
101497
|
+
})(Scope3 || (Scope3 = {}));
|
|
100339
101498
|
var CssPropertyType;
|
|
100340
101499
|
(function(CssPropertyType3) {
|
|
100341
101500
|
CssPropertyType3["UNKNOWN_CssPropertyType"] = "UNKNOWN_CssPropertyType";
|
|
@@ -100871,6 +102030,7 @@ var Archetype;
|
|
|
100871
102030
|
Archetype3["Cart"] = "Cart";
|
|
100872
102031
|
Archetype3["ContactForm"] = "ContactForm";
|
|
100873
102032
|
Archetype3["Frame"] = "Frame";
|
|
102033
|
+
Archetype3["Divider"] = "Divider";
|
|
100874
102034
|
})(Archetype || (Archetype = {}));
|
|
100875
102035
|
var NativeStateType;
|
|
100876
102036
|
(function(NativeStateType3) {
|
|
@@ -101131,6 +102291,22 @@ var RegionScopeScope;
|
|
|
101131
102291
|
RegionScopeScope3["SPECIFIC_REGIONS"] = "SPECIFIC_REGIONS";
|
|
101132
102292
|
RegionScopeScope3["WORLDWIDE"] = "WORLDWIDE";
|
|
101133
102293
|
})(RegionScopeScope || (RegionScopeScope = {}));
|
|
102294
|
+
var VibeActionType;
|
|
102295
|
+
(function(VibeActionType3) {
|
|
102296
|
+
VibeActionType3["UNKNOWN_ActionType"] = "UNKNOWN_ActionType";
|
|
102297
|
+
VibeActionType3["OPEN_DASHBOARD"] = "OPEN_DASHBOARD";
|
|
102298
|
+
VibeActionType3["OPEN_CUSTOM_PANEL"] = "OPEN_CUSTOM_PANEL";
|
|
102299
|
+
})(VibeActionType || (VibeActionType = {}));
|
|
102300
|
+
var AssetType;
|
|
102301
|
+
(function(AssetType3) {
|
|
102302
|
+
AssetType3["UNKNOWN"] = "UNKNOWN";
|
|
102303
|
+
AssetType3["IMAGE"] = "IMAGE";
|
|
102304
|
+
AssetType3["VIDEO"] = "VIDEO";
|
|
102305
|
+
AssetType3["LOGO"] = "LOGO";
|
|
102306
|
+
AssetType3["EVENT"] = "EVENT";
|
|
102307
|
+
AssetType3["FORM"] = "FORM";
|
|
102308
|
+
AssetType3["PDF"] = "PDF";
|
|
102309
|
+
})(AssetType || (AssetType = {}));
|
|
101134
102310
|
var SaleType;
|
|
101135
102311
|
(function(SaleType2) {
|
|
101136
102312
|
SaleType2["UNKNOWN_SALE_TYPE"] = "UNKNOWN_SALE_TYPE";
|
|
@@ -101556,6 +102732,8 @@ var ComponentType2;
|
|
|
101556
102732
|
ComponentType3["WIX_VIBE_CODING_INSTRUCTIONS"] = "WIX_VIBE_CODING_INSTRUCTIONS";
|
|
101557
102733
|
ComponentType3["TAX_EXEMPT_GROUPS_PROVIDER"] = "TAX_EXEMPT_GROUPS_PROVIDER";
|
|
101558
102734
|
ComponentType3["BOOKING_AUTOMATIONS_CONFIGURATION"] = "BOOKING_AUTOMATIONS_CONFIGURATION";
|
|
102735
|
+
ComponentType3["WIX_VIBE_COMPONENT"] = "WIX_VIBE_COMPONENT";
|
|
102736
|
+
ComponentType3["WIXEL"] = "WIXEL";
|
|
101559
102737
|
})(ComponentType2 || (ComponentType2 = {}));
|
|
101560
102738
|
var WidgetVertical2;
|
|
101561
102739
|
(function(WidgetVertical3) {
|
|
@@ -102372,6 +103550,13 @@ var PlanFormPricingOption2;
|
|
|
102372
103550
|
PlanFormPricingOption3["ONE_TIME"] = "ONE_TIME";
|
|
102373
103551
|
PlanFormPricingOption3["RECURRING"] = "RECURRING";
|
|
102374
103552
|
})(PlanFormPricingOption2 || (PlanFormPricingOption2 = {}));
|
|
103553
|
+
var PlanFormPricingType2;
|
|
103554
|
+
(function(PlanFormPricingType3) {
|
|
103555
|
+
PlanFormPricingType3["UNKNOWN_OPTION"] = "UNKNOWN_OPTION";
|
|
103556
|
+
PlanFormPricingType3["FREE"] = "FREE";
|
|
103557
|
+
PlanFormPricingType3["ONE_TIME"] = "ONE_TIME";
|
|
103558
|
+
PlanFormPricingType3["RECURRING"] = "RECURRING";
|
|
103559
|
+
})(PlanFormPricingType2 || (PlanFormPricingType2 = {}));
|
|
102375
103560
|
var PlanFormDefaultSection2;
|
|
102376
103561
|
(function(PlanFormDefaultSection3) {
|
|
102377
103562
|
PlanFormDefaultSection3["UNKNWON_PLAN_FORM_SECTION"] = "UNKNWON_PLAN_FORM_SECTION";
|
|
@@ -102380,6 +103565,8 @@ var PlanFormDefaultSection2;
|
|
|
102380
103565
|
PlanFormDefaultSection3["PAGE_PERMISSIONS"] = "PAGE_PERMISSIONS";
|
|
102381
103566
|
PlanFormDefaultSection3["PRICING_AND_DURATION"] = "PRICING_AND_DURATION";
|
|
102382
103567
|
PlanFormDefaultSection3["ADVANCED_SETTINGS"] = "ADVANCED_SETTINGS";
|
|
103568
|
+
PlanFormDefaultSection3["PRICING"] = "PRICING";
|
|
103569
|
+
PlanFormDefaultSection3["DURATION"] = "DURATION";
|
|
102383
103570
|
})(PlanFormDefaultSection2 || (PlanFormDefaultSection2 = {}));
|
|
102384
103571
|
var PlanPeriodUnit2;
|
|
102385
103572
|
(function(PlanPeriodUnit3) {
|
|
@@ -102945,12 +104132,12 @@ var InterfaceConfigurationType2;
|
|
|
102945
104132
|
InterfaceConfigurationType3["WIDGET_COMPONENT"] = "WIDGET_COMPONENT";
|
|
102946
104133
|
InterfaceConfigurationType3["ITEM_SELECTION"] = "ITEM_SELECTION";
|
|
102947
104134
|
})(InterfaceConfigurationType2 || (InterfaceConfigurationType2 = {}));
|
|
102948
|
-
var
|
|
102949
|
-
(function(
|
|
102950
|
-
|
|
102951
|
-
|
|
102952
|
-
|
|
102953
|
-
})(
|
|
104135
|
+
var Scope4;
|
|
104136
|
+
(function(Scope5) {
|
|
104137
|
+
Scope5["UNKNOWN_SCOPE"] = "UNKNOWN_SCOPE";
|
|
104138
|
+
Scope5["SPECIFIC_SITE"] = "SPECIFIC_SITE";
|
|
104139
|
+
Scope5["NON_SPECIFIC_SITE"] = "NON_SPECIFIC_SITE";
|
|
104140
|
+
})(Scope4 || (Scope4 = {}));
|
|
102954
104141
|
var CssPropertyType2;
|
|
102955
104142
|
(function(CssPropertyType3) {
|
|
102956
104143
|
CssPropertyType3["UNKNOWN_CssPropertyType"] = "UNKNOWN_CssPropertyType";
|
|
@@ -103486,6 +104673,7 @@ var Archetype2;
|
|
|
103486
104673
|
Archetype3["Cart"] = "Cart";
|
|
103487
104674
|
Archetype3["ContactForm"] = "ContactForm";
|
|
103488
104675
|
Archetype3["Frame"] = "Frame";
|
|
104676
|
+
Archetype3["Divider"] = "Divider";
|
|
103489
104677
|
})(Archetype2 || (Archetype2 = {}));
|
|
103490
104678
|
var NativeStateType2;
|
|
103491
104679
|
(function(NativeStateType3) {
|
|
@@ -103746,6 +104934,22 @@ var RegionScopeScope2;
|
|
|
103746
104934
|
RegionScopeScope3["SPECIFIC_REGIONS"] = "SPECIFIC_REGIONS";
|
|
103747
104935
|
RegionScopeScope3["WORLDWIDE"] = "WORLDWIDE";
|
|
103748
104936
|
})(RegionScopeScope2 || (RegionScopeScope2 = {}));
|
|
104937
|
+
var VibeActionType2;
|
|
104938
|
+
(function(VibeActionType3) {
|
|
104939
|
+
VibeActionType3["UNKNOWN_ActionType"] = "UNKNOWN_ActionType";
|
|
104940
|
+
VibeActionType3["OPEN_DASHBOARD"] = "OPEN_DASHBOARD";
|
|
104941
|
+
VibeActionType3["OPEN_CUSTOM_PANEL"] = "OPEN_CUSTOM_PANEL";
|
|
104942
|
+
})(VibeActionType2 || (VibeActionType2 = {}));
|
|
104943
|
+
var AssetType2;
|
|
104944
|
+
(function(AssetType3) {
|
|
104945
|
+
AssetType3["UNKNOWN"] = "UNKNOWN";
|
|
104946
|
+
AssetType3["IMAGE"] = "IMAGE";
|
|
104947
|
+
AssetType3["VIDEO"] = "VIDEO";
|
|
104948
|
+
AssetType3["LOGO"] = "LOGO";
|
|
104949
|
+
AssetType3["EVENT"] = "EVENT";
|
|
104950
|
+
AssetType3["FORM"] = "FORM";
|
|
104951
|
+
AssetType3["PDF"] = "PDF";
|
|
104952
|
+
})(AssetType2 || (AssetType2 = {}));
|
|
103749
104953
|
var OpenConsentIn2;
|
|
103750
104954
|
(function(OpenConsentIn3) {
|
|
103751
104955
|
OpenConsentIn3["NONE_VALUE"] = "NONE_VALUE";
|
|
@@ -104426,10 +105630,11 @@ var DevCenterClient = class {
|
|
|
104426
105630
|
|
|
104427
105631
|
// ../dev-center-client/src/useDevCenterClient.ts
|
|
104428
105632
|
init_esm_shims();
|
|
104429
|
-
var
|
|
105633
|
+
var import_react101 = __toESM(require_react(), 1);
|
|
104430
105634
|
function useDevCenterClient() {
|
|
104431
105635
|
const httpClient = useHttpClient({ type: "backoffice" });
|
|
104432
|
-
|
|
105636
|
+
const client2 = (0, import_react101.useMemo)(() => new DevCenterClient(httpClient), [httpClient]);
|
|
105637
|
+
return usePanoramaMethodLogger(client2);
|
|
104433
105638
|
}
|
|
104434
105639
|
|
|
104435
105640
|
// ../metasite-manager-client/src/index.ts
|
|
@@ -104437,7 +105642,7 @@ init_esm_shims();
|
|
|
104437
105642
|
|
|
104438
105643
|
// ../metasite-manager-client/src/useMetasiteManagerClient.ts
|
|
104439
105644
|
init_esm_shims();
|
|
104440
|
-
var
|
|
105645
|
+
var import_react102 = __toESM(require_react(), 1);
|
|
104441
105646
|
|
|
104442
105647
|
// ../metasite-manager-client/src/metasite-manager-client.ts
|
|
104443
105648
|
init_esm_shims();
|
|
@@ -104604,7 +105809,11 @@ var MetasiteManagerClient = class {
|
|
|
104604
105809
|
// ../metasite-manager-client/src/useMetasiteManagerClient.ts
|
|
104605
105810
|
function useMetasiteManagerClient() {
|
|
104606
105811
|
const httpClient = useHttpClient({ type: "general" });
|
|
104607
|
-
|
|
105812
|
+
const client2 = (0, import_react102.useMemo)(
|
|
105813
|
+
() => new MetasiteManagerClient(httpClient),
|
|
105814
|
+
[httpClient]
|
|
105815
|
+
);
|
|
105816
|
+
return usePanoramaMethodLogger(client2);
|
|
104608
105817
|
}
|
|
104609
105818
|
|
|
104610
105819
|
// ../backend-as-a-service-client/src/index.ts
|
|
@@ -104612,7 +105821,7 @@ init_esm_shims();
|
|
|
104612
105821
|
|
|
104613
105822
|
// ../backend-as-a-service-client/src/useBackendAsAServiceClient.ts
|
|
104614
105823
|
init_esm_shims();
|
|
104615
|
-
var
|
|
105824
|
+
var import_react103 = __toESM(require_react(), 1);
|
|
104616
105825
|
|
|
104617
105826
|
// ../backend-as-a-service-client/src/backend-as-a-service-client.ts
|
|
104618
105827
|
init_esm_shims();
|
|
@@ -105069,7 +106278,11 @@ var BackendAsAServiceClient = class {
|
|
|
105069
106278
|
// ../backend-as-a-service-client/src/useBackendAsAServiceClient.ts
|
|
105070
106279
|
function useBackendAsAServiceClient() {
|
|
105071
106280
|
const httpClient = useHttpClient({ type: "backoffice" });
|
|
105072
|
-
|
|
106281
|
+
const client2 = (0, import_react103.useMemo)(
|
|
106282
|
+
() => new BackendAsAServiceClient(httpClient),
|
|
106283
|
+
[httpClient]
|
|
106284
|
+
);
|
|
106285
|
+
return usePanoramaMethodLogger(client2);
|
|
105073
106286
|
}
|
|
105074
106287
|
|
|
105075
106288
|
// src/hooks/create-project.ts
|
|
@@ -105134,17 +106347,17 @@ var useCreateProject = (businessId) => {
|
|
|
105134
106347
|
// src/components/CreateProject.tsx
|
|
105135
106348
|
var CreateProject = ({ onSubmit, projectName: providedProjectName, businessId }) => {
|
|
105136
106349
|
const { status, execute } = useCreateProject(businessId);
|
|
105137
|
-
(0,
|
|
106350
|
+
(0, import_react104.useEffect)(() => {
|
|
105138
106351
|
if ((0, import_variant31.isType)(status, "Success")) {
|
|
105139
106352
|
onSubmit(status.result);
|
|
105140
106353
|
}
|
|
105141
106354
|
}, [status, onSubmit]);
|
|
105142
|
-
(0,
|
|
106355
|
+
(0, import_react104.useEffect)(() => {
|
|
105143
106356
|
if (providedProjectName) {
|
|
105144
106357
|
void execute({ projectName: providedProjectName });
|
|
105145
106358
|
}
|
|
105146
106359
|
}, [providedProjectName, execute]);
|
|
105147
|
-
const validate3 = (0,
|
|
106360
|
+
const validate3 = (0, import_react104.useCallback)(async (projectName) => {
|
|
105148
106361
|
try {
|
|
105149
106362
|
validateProjectName(projectName);
|
|
105150
106363
|
return true;
|
|
@@ -105152,7 +106365,7 @@ var CreateProject = ({ onSubmit, projectName: providedProjectName, businessId })
|
|
|
105152
106365
|
return e2.message;
|
|
105153
106366
|
}
|
|
105154
106367
|
}, []);
|
|
105155
|
-
return /* @__PURE__ */
|
|
106368
|
+
return /* @__PURE__ */ import_react104.default.createElement(import_react104.default.Fragment, null, !providedProjectName && /* @__PURE__ */ import_react104.default.createElement(
|
|
105156
106369
|
TextInput2,
|
|
105157
106370
|
{
|
|
105158
106371
|
label: "What's the name of your Custom Frontend project?",
|
|
@@ -105162,15 +106375,15 @@ var CreateProject = ({ onSubmit, projectName: providedProjectName, businessId })
|
|
|
105162
106375
|
}
|
|
105163
106376
|
), (0, import_variant31.match)(status, {
|
|
105164
106377
|
Error: () => null,
|
|
105165
|
-
Loading: () => /* @__PURE__ */
|
|
105166
|
-
Success: () => /* @__PURE__ */
|
|
106378
|
+
Loading: () => /* @__PURE__ */ import_react104.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react104.default.createElement(Spinner2, { text: "Creating your project..." })),
|
|
106379
|
+
Success: () => /* @__PURE__ */ import_react104.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react104.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react104.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react104.default.createElement(Text2, null, "Project created successfully"))),
|
|
105167
106380
|
NotRequested: () => null
|
|
105168
106381
|
}));
|
|
105169
106382
|
};
|
|
105170
106383
|
|
|
105171
106384
|
// src/components/LinkCommand/GenerateProject.tsx
|
|
105172
106385
|
init_esm_shims();
|
|
105173
|
-
var
|
|
106386
|
+
var import_react107 = __toESM(require_react(), 1);
|
|
105174
106387
|
var import_variant34 = __toESM(require_lib(), 1);
|
|
105175
106388
|
|
|
105176
106389
|
// ../cli-astro-definitions/src/index.ts
|
|
@@ -105257,7 +106470,7 @@ function sharedPlugin(fork2) {
|
|
|
105257
106470
|
isNumber2 + " >= " + than
|
|
105258
106471
|
);
|
|
105259
106472
|
}
|
|
105260
|
-
const
|
|
106473
|
+
const defaults4 = {
|
|
105261
106474
|
// Functions were used because (among other reasons) that's the most
|
|
105262
106475
|
// elegant way to allow for the emptyArray one always to give a new
|
|
105263
106476
|
// array instance.
|
|
@@ -105300,7 +106513,7 @@ function sharedPlugin(fork2) {
|
|
|
105300
106513
|
);
|
|
105301
106514
|
return {
|
|
105302
106515
|
geq,
|
|
105303
|
-
defaults:
|
|
106516
|
+
defaults: defaults4,
|
|
105304
106517
|
isPrimitive: isPrimitive3
|
|
105305
106518
|
};
|
|
105306
106519
|
}
|
|
@@ -106230,7 +107443,7 @@ function scopePlugin(fork2) {
|
|
|
106230
107443
|
var Expression2 = namedTypes2.Expression;
|
|
106231
107444
|
var isArray3 = types.builtInTypes.array;
|
|
106232
107445
|
var b2 = types.builders;
|
|
106233
|
-
const
|
|
107446
|
+
const Scope5 = function Scope22(path8, parentScope) {
|
|
106234
107447
|
if (!(this instanceof Scope22)) {
|
|
106235
107448
|
throw new Error("Scope constructor cannot be invoked without 'new'");
|
|
106236
107449
|
}
|
|
@@ -106280,10 +107493,10 @@ function scopePlugin(fork2) {
|
|
|
106280
107493
|
namedTypes2.TypeParameter,
|
|
106281
107494
|
namedTypes2.TSTypeParameter
|
|
106282
107495
|
);
|
|
106283
|
-
|
|
107496
|
+
Scope5.isEstablishedBy = function(node) {
|
|
106284
107497
|
return ScopeType.check(node) || TypeParameterScopeType.check(node);
|
|
106285
107498
|
};
|
|
106286
|
-
var Sp =
|
|
107499
|
+
var Sp = Scope5.prototype;
|
|
106287
107500
|
Sp.didScan = false;
|
|
106288
107501
|
Sp.declares = function(name) {
|
|
106289
107502
|
this.scan();
|
|
@@ -106510,7 +107723,7 @@ function scopePlugin(fork2) {
|
|
|
106510
107723
|
scope = scope.parent;
|
|
106511
107724
|
return scope;
|
|
106512
107725
|
};
|
|
106513
|
-
return
|
|
107726
|
+
return Scope5;
|
|
106514
107727
|
}
|
|
106515
107728
|
maybeSetModuleExports(() => module);
|
|
106516
107729
|
function nodePathPlugin(fork2) {
|
|
@@ -107416,7 +108629,7 @@ function coreDef(fork2) {
|
|
|
107416
108629
|
var def = Type5.def;
|
|
107417
108630
|
var or = Type5.or;
|
|
107418
108631
|
var shared = fork2.use(sharedPlugin);
|
|
107419
|
-
var
|
|
108632
|
+
var defaults4 = shared.defaults;
|
|
107420
108633
|
var geq = shared.geq;
|
|
107421
108634
|
const {
|
|
107422
108635
|
BinaryOperators,
|
|
@@ -107426,34 +108639,34 @@ function coreDef(fork2) {
|
|
|
107426
108639
|
def("Printable").field("loc", or(
|
|
107427
108640
|
def("SourceLocation"),
|
|
107428
108641
|
null
|
|
107429
|
-
),
|
|
108642
|
+
), defaults4["null"], true);
|
|
107430
108643
|
def("Node").bases("Printable").field("type", String).field("comments", or(
|
|
107431
108644
|
[def("Comment")],
|
|
107432
108645
|
null
|
|
107433
|
-
),
|
|
107434
|
-
def("SourceLocation").field("start", def("Position")).field("end", def("Position")).field("source", or(String, null),
|
|
108646
|
+
), defaults4["null"], true);
|
|
108647
|
+
def("SourceLocation").field("start", def("Position")).field("end", def("Position")).field("source", or(String, null), defaults4["null"]);
|
|
107435
108648
|
def("Position").field("line", geq(1)).field("column", geq(0));
|
|
107436
|
-
def("File").bases("Node").build("program", "name").field("program", def("Program")).field("name", or(String, null),
|
|
108649
|
+
def("File").bases("Node").build("program", "name").field("program", def("Program")).field("name", or(String, null), defaults4["null"]);
|
|
107437
108650
|
def("Program").bases("Node").build("body").field("body", [def("Statement")]);
|
|
107438
|
-
def("Function").bases("Node").field("id", or(def("Identifier"), null),
|
|
108651
|
+
def("Function").bases("Node").field("id", or(def("Identifier"), null), defaults4["null"]).field("params", [def("Pattern")]).field("body", def("BlockStatement")).field("generator", Boolean, defaults4["false"]).field("async", Boolean, defaults4["false"]);
|
|
107439
108652
|
def("Statement").bases("Node");
|
|
107440
108653
|
def("EmptyStatement").bases("Statement").build();
|
|
107441
108654
|
def("BlockStatement").bases("Statement").build("body").field("body", [def("Statement")]);
|
|
107442
108655
|
def("ExpressionStatement").bases("Statement").build("expression").field("expression", def("Expression"));
|
|
107443
|
-
def("IfStatement").bases("Statement").build("test", "consequent", "alternate").field("test", def("Expression")).field("consequent", def("Statement")).field("alternate", or(def("Statement"), null),
|
|
108656
|
+
def("IfStatement").bases("Statement").build("test", "consequent", "alternate").field("test", def("Expression")).field("consequent", def("Statement")).field("alternate", or(def("Statement"), null), defaults4["null"]);
|
|
107444
108657
|
def("LabeledStatement").bases("Statement").build("label", "body").field("label", def("Identifier")).field("body", def("Statement"));
|
|
107445
|
-
def("BreakStatement").bases("Statement").build("label").field("label", or(def("Identifier"), null),
|
|
107446
|
-
def("ContinueStatement").bases("Statement").build("label").field("label", or(def("Identifier"), null),
|
|
108658
|
+
def("BreakStatement").bases("Statement").build("label").field("label", or(def("Identifier"), null), defaults4["null"]);
|
|
108659
|
+
def("ContinueStatement").bases("Statement").build("label").field("label", or(def("Identifier"), null), defaults4["null"]);
|
|
107447
108660
|
def("WithStatement").bases("Statement").build("object", "body").field("object", def("Expression")).field("body", def("Statement"));
|
|
107448
|
-
def("SwitchStatement").bases("Statement").build("discriminant", "cases", "lexical").field("discriminant", def("Expression")).field("cases", [def("SwitchCase")]).field("lexical", Boolean,
|
|
108661
|
+
def("SwitchStatement").bases("Statement").build("discriminant", "cases", "lexical").field("discriminant", def("Expression")).field("cases", [def("SwitchCase")]).field("lexical", Boolean, defaults4["false"]);
|
|
107449
108662
|
def("ReturnStatement").bases("Statement").build("argument").field("argument", or(def("Expression"), null));
|
|
107450
108663
|
def("ThrowStatement").bases("Statement").build("argument").field("argument", def("Expression"));
|
|
107451
108664
|
def("TryStatement").bases("Statement").build("block", "handler", "finalizer").field("block", def("BlockStatement")).field("handler", or(def("CatchClause"), null), function() {
|
|
107452
108665
|
return this.handlers && this.handlers[0] || null;
|
|
107453
108666
|
}).field("handlers", [def("CatchClause")], function() {
|
|
107454
108667
|
return this.handler ? [this.handler] : [];
|
|
107455
|
-
}, true).field("guardedHandlers", [def("CatchClause")],
|
|
107456
|
-
def("CatchClause").bases("Node").build("param", "guard", "body").field("param", def("Pattern")).field("guard", or(def("Expression"), null),
|
|
108668
|
+
}, true).field("guardedHandlers", [def("CatchClause")], defaults4.emptyArray).field("finalizer", or(def("BlockStatement"), null), defaults4["null"]);
|
|
108669
|
+
def("CatchClause").bases("Node").build("param", "guard", "body").field("param", def("Pattern")).field("guard", or(def("Expression"), null), defaults4["null"]).field("body", def("BlockStatement"));
|
|
107457
108670
|
def("WhileStatement").bases("Statement").build("test", "body").field("test", def("Expression")).field("body", def("Statement"));
|
|
107458
108671
|
def("DoWhileStatement").bases("Statement").build("body", "test").field("body", def("Statement")).field("test", def("Expression"));
|
|
107459
108672
|
def("ForStatement").bases("Statement").build("init", "test", "update", "body").field("init", or(
|
|
@@ -107470,7 +108683,7 @@ function coreDef(fork2) {
|
|
|
107470
108683
|
def("FunctionDeclaration").bases("Function", "Declaration").build("id", "params", "body").field("id", def("Identifier"));
|
|
107471
108684
|
def("FunctionExpression").bases("Function", "Expression").build("id", "params", "body");
|
|
107472
108685
|
def("VariableDeclaration").bases("Declaration").build("kind", "declarations").field("kind", or("var", "let", "const")).field("declarations", [def("VariableDeclarator")]);
|
|
107473
|
-
def("VariableDeclarator").bases("Node").build("id", "init").field("id", def("Pattern")).field("init", or(def("Expression"), null),
|
|
108686
|
+
def("VariableDeclarator").bases("Node").build("id", "init").field("id", def("Pattern")).field("init", or(def("Expression"), null), defaults4["null"]);
|
|
107474
108687
|
def("Expression").bases("Node");
|
|
107475
108688
|
def("ThisExpression").bases("Expression").build();
|
|
107476
108689
|
def("ArrayExpression").bases("Expression").build("elements").field("elements", [or(def("Expression"), null)]);
|
|
@@ -107486,7 +108699,7 @@ function coreDef(fork2) {
|
|
|
107486
108699
|
"void",
|
|
107487
108700
|
"delete"
|
|
107488
108701
|
);
|
|
107489
|
-
def("UnaryExpression").bases("Expression").build("operator", "argument", "prefix").field("operator", UnaryOperator).field("argument", def("Expression")).field("prefix", Boolean,
|
|
108702
|
+
def("UnaryExpression").bases("Expression").build("operator", "argument", "prefix").field("operator", UnaryOperator).field("argument", def("Expression")).field("prefix", Boolean, defaults4["true"]);
|
|
107490
108703
|
const BinaryOperator = or(...BinaryOperators);
|
|
107491
108704
|
def("BinaryExpression").bases("Expression").build("operator", "left", "right").field("operator", BinaryOperator).field("left", def("Expression")).field("right", def("Expression"));
|
|
107492
108705
|
const AssignmentOperator = or(...AssignmentOperators);
|
|
@@ -107507,9 +108720,9 @@ function coreDef(fork2) {
|
|
|
107507
108720
|
});
|
|
107508
108721
|
def("Pattern").bases("Node");
|
|
107509
108722
|
def("SwitchCase").bases("Node").build("test", "consequent").field("test", or(def("Expression"), null)).field("consequent", [def("Statement")]);
|
|
107510
|
-
def("Identifier").bases("Expression", "Pattern").build("name").field("name", String).field("optional", Boolean,
|
|
108723
|
+
def("Identifier").bases("Expression", "Pattern").build("name").field("name", String).field("optional", Boolean, defaults4["false"]);
|
|
107511
108724
|
def("Literal").bases("Expression").build("value").field("value", or(String, Boolean, null, Number, RegExp, BigInt));
|
|
107512
|
-
def("Comment").bases("Printable").field("value", String).field("leading", Boolean,
|
|
108725
|
+
def("Comment").bases("Printable").field("value", String).field("leading", Boolean, defaults4["true"]).field("trailing", Boolean, defaults4["false"]);
|
|
107513
108726
|
}
|
|
107514
108727
|
maybeSetModuleExports(() => module);
|
|
107515
108728
|
function es6Def(fork2) {
|
|
@@ -107517,29 +108730,29 @@ function es6Def(fork2) {
|
|
|
107517
108730
|
const types = fork2.use(typesPlugin);
|
|
107518
108731
|
const def = types.Type.def;
|
|
107519
108732
|
const or = types.Type.or;
|
|
107520
|
-
const
|
|
107521
|
-
def("Function").field("generator", Boolean,
|
|
108733
|
+
const defaults4 = fork2.use(sharedPlugin).defaults;
|
|
108734
|
+
def("Function").field("generator", Boolean, defaults4["false"]).field("expression", Boolean, defaults4["false"]).field("defaults", [or(def("Expression"), null)], defaults4.emptyArray).field("rest", or(def("Identifier"), null), defaults4["null"]);
|
|
107522
108735
|
def("RestElement").bases("Pattern").build("argument").field("argument", def("Pattern")).field(
|
|
107523
108736
|
"typeAnnotation",
|
|
107524
108737
|
// for Babylon. Flow parser puts it on the identifier
|
|
107525
108738
|
or(def("TypeAnnotation"), def("TSTypeAnnotation"), null),
|
|
107526
|
-
|
|
108739
|
+
defaults4["null"]
|
|
107527
108740
|
);
|
|
107528
108741
|
def("SpreadElementPattern").bases("Pattern").build("argument").field("argument", def("Pattern"));
|
|
107529
108742
|
def("FunctionDeclaration").build("id", "params", "body", "generator", "expression").field("id", or(def("Identifier"), null));
|
|
107530
108743
|
def("FunctionExpression").build("id", "params", "body", "generator", "expression");
|
|
107531
|
-
def("ArrowFunctionExpression").bases("Function", "Expression").build("params", "body", "expression").field("id", null,
|
|
108744
|
+
def("ArrowFunctionExpression").bases("Function", "Expression").build("params", "body", "expression").field("id", null, defaults4["null"]).field("body", or(def("BlockStatement"), def("Expression"))).field("generator", false, defaults4["false"]);
|
|
107532
108745
|
def("ForOfStatement").bases("Statement").build("left", "right", "body").field("left", or(
|
|
107533
108746
|
def("VariableDeclaration"),
|
|
107534
108747
|
def("Pattern")
|
|
107535
108748
|
)).field("right", def("Expression")).field("body", def("Statement"));
|
|
107536
|
-
def("YieldExpression").bases("Expression").build("argument", "delegate").field("argument", or(def("Expression"), null)).field("delegate", Boolean,
|
|
108749
|
+
def("YieldExpression").bases("Expression").build("argument", "delegate").field("argument", or(def("Expression"), null)).field("delegate", Boolean, defaults4["false"]);
|
|
107537
108750
|
def("GeneratorExpression").bases("Expression").build("body", "blocks", "filter").field("body", def("Expression")).field("blocks", [def("ComprehensionBlock")]).field("filter", or(def("Expression"), null));
|
|
107538
108751
|
def("ComprehensionExpression").bases("Expression").build("body", "blocks", "filter").field("body", def("Expression")).field("blocks", [def("ComprehensionBlock")]).field("filter", or(def("Expression"), null));
|
|
107539
108752
|
def("ComprehensionBlock").bases("Node").build("left", "right", "each").field("left", def("Pattern")).field("right", def("Expression")).field("each", Boolean);
|
|
107540
|
-
def("Property").field("key", or(def("Literal"), def("Identifier"), def("Expression"))).field("value", or(def("Expression"), def("Pattern"))).field("method", Boolean,
|
|
107541
|
-
def("ObjectProperty").field("shorthand", Boolean,
|
|
107542
|
-
def("PropertyPattern").bases("Pattern").build("key", "pattern").field("key", or(def("Literal"), def("Identifier"), def("Expression"))).field("pattern", def("Pattern")).field("computed", Boolean,
|
|
108753
|
+
def("Property").field("key", or(def("Literal"), def("Identifier"), def("Expression"))).field("value", or(def("Expression"), def("Pattern"))).field("method", Boolean, defaults4["false"]).field("shorthand", Boolean, defaults4["false"]).field("computed", Boolean, defaults4["false"]);
|
|
108754
|
+
def("ObjectProperty").field("shorthand", Boolean, defaults4["false"]);
|
|
108755
|
+
def("PropertyPattern").bases("Pattern").build("key", "pattern").field("key", or(def("Literal"), def("Identifier"), def("Expression"))).field("pattern", def("Pattern")).field("computed", Boolean, defaults4["false"]);
|
|
107543
108756
|
def("ObjectPattern").bases("Pattern").build("properties").field("properties", [or(def("PropertyPattern"), def("Property"))]);
|
|
107544
108757
|
def("ArrayPattern").bases("Pattern").build("elements").field("elements", [or(def("Pattern"), null)]);
|
|
107545
108758
|
def("SpreadElement").bases("Node").build("argument").field("argument", def("Expression"));
|
|
@@ -107552,7 +108765,7 @@ function es6Def(fork2) {
|
|
|
107552
108765
|
def("NewExpression").field("arguments", [or(def("Expression"), def("SpreadElement"))]);
|
|
107553
108766
|
def("CallExpression").field("arguments", [or(def("Expression"), def("SpreadElement"))]);
|
|
107554
108767
|
def("AssignmentPattern").bases("Pattern").build("left", "right").field("left", def("Pattern")).field("right", def("Expression"));
|
|
107555
|
-
def("MethodDefinition").bases("Declaration").build("kind", "key", "value", "static").field("kind", or("constructor", "method", "get", "set")).field("key", def("Expression")).field("value", def("Function")).field("computed", Boolean,
|
|
108768
|
+
def("MethodDefinition").bases("Declaration").build("kind", "key", "value", "static").field("kind", or("constructor", "method", "get", "set")).field("key", def("Expression")).field("value", def("Function")).field("computed", Boolean, defaults4["false"]).field("static", Boolean, defaults4["false"]);
|
|
107556
108769
|
const ClassBodyElement = or(
|
|
107557
108770
|
def("MethodDefinition"),
|
|
107558
108771
|
def("VariableDeclarator"),
|
|
@@ -107560,14 +108773,14 @@ function es6Def(fork2) {
|
|
|
107560
108773
|
def("ClassProperty"),
|
|
107561
108774
|
def("StaticBlock")
|
|
107562
108775
|
);
|
|
107563
|
-
def("ClassProperty").bases("Declaration").build("key").field("key", or(def("Literal"), def("Identifier"), def("Expression"))).field("computed", Boolean,
|
|
108776
|
+
def("ClassProperty").bases("Declaration").build("key").field("key", or(def("Literal"), def("Identifier"), def("Expression"))).field("computed", Boolean, defaults4["false"]);
|
|
107564
108777
|
def("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition", ClassBodyElement);
|
|
107565
108778
|
def("ClassBody").bases("Declaration").build("body").field("body", [ClassBodyElement]);
|
|
107566
|
-
def("ClassDeclaration").bases("Declaration").build("id", "body", "superClass").field("id", or(def("Identifier"), null)).field("body", def("ClassBody")).field("superClass", or(def("Expression"), null),
|
|
107567
|
-
def("ClassExpression").bases("Expression").build("id", "body", "superClass").field("id", or(def("Identifier"), null),
|
|
108779
|
+
def("ClassDeclaration").bases("Declaration").build("id", "body", "superClass").field("id", or(def("Identifier"), null)).field("body", def("ClassBody")).field("superClass", or(def("Expression"), null), defaults4["null"]);
|
|
108780
|
+
def("ClassExpression").bases("Expression").build("id", "body", "superClass").field("id", or(def("Identifier"), null), defaults4["null"]).field("body", def("ClassBody")).field("superClass", or(def("Expression"), null), defaults4["null"]);
|
|
107568
108781
|
def("Super").bases("Expression").build();
|
|
107569
108782
|
def("Specifier").bases("Node");
|
|
107570
|
-
def("ModuleSpecifier").bases("Specifier").field("local", or(def("Identifier"), null),
|
|
108783
|
+
def("ModuleSpecifier").bases("Specifier").field("local", or(def("Identifier"), null), defaults4["null"]).field("id", or(def("Identifier"), null), defaults4["null"]).field("name", or(def("Identifier"), null), defaults4["null"]);
|
|
107571
108784
|
def("ImportSpecifier").bases("ModuleSpecifier").build("imported", "local").field("imported", def("Identifier"));
|
|
107572
108785
|
def("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local");
|
|
107573
108786
|
def("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local");
|
|
@@ -107575,13 +108788,13 @@ function es6Def(fork2) {
|
|
|
107575
108788
|
def("ImportSpecifier"),
|
|
107576
108789
|
def("ImportNamespaceSpecifier"),
|
|
107577
108790
|
def("ImportDefaultSpecifier")
|
|
107578
|
-
)],
|
|
108791
|
+
)], defaults4.emptyArray).field("source", def("Literal")).field("importKind", or(
|
|
107579
108792
|
"value",
|
|
107580
108793
|
"type"
|
|
107581
108794
|
), function() {
|
|
107582
108795
|
return "value";
|
|
107583
108796
|
});
|
|
107584
|
-
def("ExportNamedDeclaration").bases("Declaration").build("declaration", "specifiers", "source").field("declaration", or(def("Declaration"), null)).field("specifiers", [def("ExportSpecifier")],
|
|
108797
|
+
def("ExportNamedDeclaration").bases("Declaration").build("declaration", "specifiers", "source").field("declaration", or(def("Declaration"), null)).field("specifiers", [def("ExportSpecifier")], defaults4.emptyArray).field("source", or(def("Literal"), null), defaults4["null"]);
|
|
107585
108798
|
def("ExportSpecifier").bases("ModuleSpecifier").build("local", "exported").field("exported", def("Identifier"));
|
|
107586
108799
|
def("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration", or(def("Declaration"), def("Expression")));
|
|
107587
108800
|
def("ExportAllDeclaration").bases("Declaration").build("source").field("source", def("Literal"));
|
|
@@ -107600,8 +108813,8 @@ function es2017Def(fork2) {
|
|
|
107600
108813
|
fork2.use(es2016Def);
|
|
107601
108814
|
const types = fork2.use(typesPlugin);
|
|
107602
108815
|
const def = types.Type.def;
|
|
107603
|
-
const
|
|
107604
|
-
def("Function").field("async", Boolean,
|
|
108816
|
+
const defaults4 = fork2.use(sharedPlugin).defaults;
|
|
108817
|
+
def("Function").field("async", Boolean, defaults4["false"]);
|
|
107605
108818
|
def("AwaitExpression").bases("Expression").build("argument").field("argument", def("Expression"));
|
|
107606
108819
|
}
|
|
107607
108820
|
maybeSetModuleExports(() => module);
|
|
@@ -107610,8 +108823,8 @@ function es2018Def(fork2) {
|
|
|
107610
108823
|
const types = fork2.use(typesPlugin);
|
|
107611
108824
|
const def = types.Type.def;
|
|
107612
108825
|
const or = types.Type.or;
|
|
107613
|
-
const
|
|
107614
|
-
def("ForOfStatement").field("await", Boolean,
|
|
108826
|
+
const defaults4 = fork2.use(sharedPlugin).defaults;
|
|
108827
|
+
def("ForOfStatement").field("await", Boolean, defaults4["false"]);
|
|
107615
108828
|
def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
|
|
107616
108829
|
def("ObjectExpression").field("properties", [or(
|
|
107617
108830
|
def("Property"),
|
|
@@ -107629,8 +108842,8 @@ function es2019Def(fork2) {
|
|
|
107629
108842
|
const types = fork2.use(typesPlugin);
|
|
107630
108843
|
const def = types.Type.def;
|
|
107631
108844
|
const or = types.Type.or;
|
|
107632
|
-
const
|
|
107633
|
-
def("CatchClause").field("param", or(def("Pattern"), null),
|
|
108845
|
+
const defaults4 = fork2.use(sharedPlugin).defaults;
|
|
108846
|
+
def("CatchClause").field("param", or(def("Pattern"), null), defaults4["null"]);
|
|
107634
108847
|
}
|
|
107635
108848
|
maybeSetModuleExports(() => module);
|
|
107636
108849
|
function es2020Def(fork2) {
|
|
@@ -107640,19 +108853,19 @@ function es2020Def(fork2) {
|
|
|
107640
108853
|
const def = types.Type.def;
|
|
107641
108854
|
const or = types.Type.or;
|
|
107642
108855
|
const shared = fork2.use(sharedPlugin);
|
|
107643
|
-
const
|
|
108856
|
+
const defaults4 = shared.defaults;
|
|
107644
108857
|
def("ImportExpression").bases("Expression").build("source").field("source", def("Expression"));
|
|
107645
108858
|
def("ExportAllDeclaration").bases("Declaration").build("source", "exported").field("source", def("Literal")).field("exported", or(
|
|
107646
108859
|
def("Identifier"),
|
|
107647
108860
|
null,
|
|
107648
108861
|
void 0
|
|
107649
|
-
),
|
|
107650
|
-
def("ChainElement").bases("Node").field("optional", Boolean,
|
|
108862
|
+
), defaults4["null"]);
|
|
108863
|
+
def("ChainElement").bases("Node").field("optional", Boolean, defaults4["false"]);
|
|
107651
108864
|
def("CallExpression").bases("Expression", "ChainElement");
|
|
107652
108865
|
def("MemberExpression").bases("Expression", "ChainElement");
|
|
107653
108866
|
def("ChainExpression").bases("Expression").build("expression").field("expression", def("ChainElement"));
|
|
107654
|
-
def("OptionalCallExpression").bases("CallExpression").build("callee", "arguments", "optional").field("optional", Boolean,
|
|
107655
|
-
def("OptionalMemberExpression").bases("MemberExpression").build("object", "property", "computed", "optional").field("optional", Boolean,
|
|
108867
|
+
def("OptionalCallExpression").bases("CallExpression").build("callee", "arguments", "optional").field("optional", Boolean, defaults4["true"]);
|
|
108868
|
+
def("OptionalMemberExpression").bases("MemberExpression").build("object", "property", "computed", "optional").field("optional", Boolean, defaults4["true"]);
|
|
107656
108869
|
}
|
|
107657
108870
|
maybeSetModuleExports(() => module);
|
|
107658
108871
|
function es2021Def(fork2) {
|
|
@@ -107674,21 +108887,21 @@ function esProposalsDef(fork2) {
|
|
|
107674
108887
|
const def = types.Type.def;
|
|
107675
108888
|
const or = Type5.or;
|
|
107676
108889
|
const shared = fork2.use(sharedPlugin);
|
|
107677
|
-
const
|
|
107678
|
-
def("AwaitExpression").build("argument", "all").field("argument", or(def("Expression"), null)).field("all", Boolean,
|
|
108890
|
+
const defaults4 = shared.defaults;
|
|
108891
|
+
def("AwaitExpression").build("argument", "all").field("argument", or(def("Expression"), null)).field("all", Boolean, defaults4["false"]);
|
|
107679
108892
|
def("Decorator").bases("Node").build("expression").field("expression", def("Expression"));
|
|
107680
108893
|
def("Property").field(
|
|
107681
108894
|
"decorators",
|
|
107682
108895
|
or([def("Decorator")], null),
|
|
107683
|
-
|
|
108896
|
+
defaults4["null"]
|
|
107684
108897
|
);
|
|
107685
108898
|
def("MethodDefinition").field(
|
|
107686
108899
|
"decorators",
|
|
107687
108900
|
or([def("Decorator")], null),
|
|
107688
|
-
|
|
108901
|
+
defaults4["null"]
|
|
107689
108902
|
);
|
|
107690
108903
|
def("PrivateName").bases("Expression", "Pattern").build("id").field("id", def("Identifier"));
|
|
107691
|
-
def("ClassPrivateProperty").bases("ClassProperty").build("key", "value").field("key", def("PrivateName")).field("value", or(def("Expression"), null),
|
|
108904
|
+
def("ClassPrivateProperty").bases("ClassProperty").build("key", "value").field("key", def("PrivateName")).field("value", or(def("Expression"), null), defaults4["null"]);
|
|
107692
108905
|
def("ImportAttribute").bases("Node").build("key", "value").field("key", or(def("Identifier"), def("Literal"))).field("value", def("Expression"));
|
|
107693
108906
|
[
|
|
107694
108907
|
"ImportDeclaration",
|
|
@@ -107698,7 +108911,7 @@ function esProposalsDef(fork2) {
|
|
|
107698
108911
|
def(decl).field(
|
|
107699
108912
|
"assertions",
|
|
107700
108913
|
[def("ImportAttribute")],
|
|
107701
|
-
|
|
108914
|
+
defaults4.emptyArray
|
|
107702
108915
|
);
|
|
107703
108916
|
});
|
|
107704
108917
|
def("RecordExpression").bases("Expression").build("properties").field("properties", [or(
|
|
@@ -107719,7 +108932,7 @@ function jsxDef(fork2) {
|
|
|
107719
108932
|
const types = fork2.use(typesPlugin);
|
|
107720
108933
|
const def = types.Type.def;
|
|
107721
108934
|
const or = types.Type.or;
|
|
107722
|
-
const
|
|
108935
|
+
const defaults4 = fork2.use(sharedPlugin).defaults;
|
|
107723
108936
|
def("JSXAttribute").bases("Node").build("name", "value").field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))).field("value", or(
|
|
107724
108937
|
def("Literal"),
|
|
107725
108938
|
// attr="value"
|
|
@@ -107731,10 +108944,10 @@ function jsxDef(fork2) {
|
|
|
107731
108944
|
// attr=<></>
|
|
107732
108945
|
null
|
|
107733
108946
|
// attr= or just attr
|
|
107734
|
-
),
|
|
108947
|
+
), defaults4["null"]);
|
|
107735
108948
|
def("JSXIdentifier").bases("Identifier").build("name").field("name", String);
|
|
107736
108949
|
def("JSXNamespacedName").bases("Node").build("namespace", "name").field("namespace", def("JSXIdentifier")).field("name", def("JSXIdentifier"));
|
|
107737
|
-
def("JSXMemberExpression").bases("MemberExpression").build("object", "property").field("object", or(def("JSXIdentifier"), def("JSXMemberExpression"))).field("property", def("JSXIdentifier")).field("computed", Boolean,
|
|
108950
|
+
def("JSXMemberExpression").bases("MemberExpression").build("object", "property").field("object", or(def("JSXIdentifier"), def("JSXMemberExpression"))).field("property", def("JSXIdentifier")).field("computed", Boolean, defaults4.false);
|
|
107738
108951
|
const JSXElementName = or(
|
|
107739
108952
|
def("JSXIdentifier"),
|
|
107740
108953
|
def("JSXNamespacedName"),
|
|
@@ -107755,16 +108968,16 @@ function jsxDef(fork2) {
|
|
|
107755
108968
|
def("Literal")
|
|
107756
108969
|
// Legacy: Esprima should return JSXText instead.
|
|
107757
108970
|
)];
|
|
107758
|
-
def("JSXElement").bases("Expression").build("openingElement", "closingElement", "children").field("openingElement", def("JSXOpeningElement")).field("closingElement", or(def("JSXClosingElement"), null),
|
|
108971
|
+
def("JSXElement").bases("Expression").build("openingElement", "closingElement", "children").field("openingElement", def("JSXOpeningElement")).field("closingElement", or(def("JSXClosingElement"), null), defaults4["null"]).field("children", JSXChildren, defaults4.emptyArray).field("name", JSXElementName, function() {
|
|
107759
108972
|
return this.openingElement.name;
|
|
107760
108973
|
}, true).field("selfClosing", Boolean, function() {
|
|
107761
108974
|
return this.openingElement.selfClosing;
|
|
107762
108975
|
}, true).field("attributes", JSXAttributes, function() {
|
|
107763
108976
|
return this.openingElement.attributes;
|
|
107764
108977
|
}, true);
|
|
107765
|
-
def("JSXOpeningElement").bases("Node").build("name", "attributes", "selfClosing").field("name", JSXElementName).field("attributes", JSXAttributes,
|
|
108978
|
+
def("JSXOpeningElement").bases("Node").build("name", "attributes", "selfClosing").field("name", JSXElementName).field("attributes", JSXAttributes, defaults4.emptyArray).field("selfClosing", Boolean, defaults4["false"]);
|
|
107766
108979
|
def("JSXClosingElement").bases("Node").build("name").field("name", JSXElementName);
|
|
107767
|
-
def("JSXFragment").bases("Expression").build("openingFragment", "closingFragment", "children").field("openingFragment", def("JSXOpeningFragment")).field("closingFragment", def("JSXClosingFragment")).field("children", JSXChildren,
|
|
108980
|
+
def("JSXFragment").bases("Expression").build("openingFragment", "closingFragment", "children").field("openingFragment", def("JSXOpeningFragment")).field("closingFragment", def("JSXClosingFragment")).field("children", JSXChildren, defaults4.emptyArray);
|
|
107768
108981
|
def("JSXOpeningFragment").bases("Node").build();
|
|
107769
108982
|
def("JSXClosingFragment").bases("Node").build();
|
|
107770
108983
|
def("JSXText").bases("Literal").build("value", "raw").field("value", String).field("raw", String, function() {
|
|
@@ -107778,7 +108991,7 @@ function typeAnnotationsDef(fork2) {
|
|
|
107778
108991
|
var types = fork2.use(typesPlugin);
|
|
107779
108992
|
var def = types.Type.def;
|
|
107780
108993
|
var or = types.Type.or;
|
|
107781
|
-
var
|
|
108994
|
+
var defaults4 = fork2.use(sharedPlugin).defaults;
|
|
107782
108995
|
var TypeAnnotation = or(
|
|
107783
108996
|
def("TypeAnnotation"),
|
|
107784
108997
|
def("TSTypeAnnotation"),
|
|
@@ -107789,29 +109002,29 @@ function typeAnnotationsDef(fork2) {
|
|
|
107789
109002
|
def("TSTypeParameterDeclaration"),
|
|
107790
109003
|
null
|
|
107791
109004
|
);
|
|
107792
|
-
def("Identifier").field("typeAnnotation", TypeAnnotation,
|
|
107793
|
-
def("ObjectPattern").field("typeAnnotation", TypeAnnotation,
|
|
107794
|
-
def("Function").field("returnType", TypeAnnotation,
|
|
107795
|
-
def("ClassProperty").build("key", "value", "typeAnnotation", "static").field("value", or(def("Expression"), null)).field("static", Boolean,
|
|
109005
|
+
def("Identifier").field("typeAnnotation", TypeAnnotation, defaults4["null"]);
|
|
109006
|
+
def("ObjectPattern").field("typeAnnotation", TypeAnnotation, defaults4["null"]);
|
|
109007
|
+
def("Function").field("returnType", TypeAnnotation, defaults4["null"]).field("typeParameters", TypeParamDecl, defaults4["null"]);
|
|
109008
|
+
def("ClassProperty").build("key", "value", "typeAnnotation", "static").field("value", or(def("Expression"), null)).field("static", Boolean, defaults4["false"]).field("typeAnnotation", TypeAnnotation, defaults4["null"]);
|
|
107796
109009
|
[
|
|
107797
109010
|
"ClassDeclaration",
|
|
107798
109011
|
"ClassExpression"
|
|
107799
109012
|
].forEach((typeName) => {
|
|
107800
|
-
def(typeName).field("typeParameters", TypeParamDecl,
|
|
109013
|
+
def(typeName).field("typeParameters", TypeParamDecl, defaults4["null"]).field(
|
|
107801
109014
|
"superTypeParameters",
|
|
107802
109015
|
or(
|
|
107803
109016
|
def("TypeParameterInstantiation"),
|
|
107804
109017
|
def("TSTypeParameterInstantiation"),
|
|
107805
109018
|
null
|
|
107806
109019
|
),
|
|
107807
|
-
|
|
109020
|
+
defaults4["null"]
|
|
107808
109021
|
).field(
|
|
107809
109022
|
"implements",
|
|
107810
109023
|
or(
|
|
107811
109024
|
[def("ClassImplements")],
|
|
107812
109025
|
[def("TSExpressionWithTypeArguments")]
|
|
107813
109026
|
),
|
|
107814
|
-
|
|
109027
|
+
defaults4.emptyArray
|
|
107815
109028
|
);
|
|
107816
109029
|
});
|
|
107817
109030
|
}
|
|
@@ -107822,7 +109035,7 @@ function flowDef(fork2) {
|
|
|
107822
109035
|
const types = fork2.use(typesPlugin);
|
|
107823
109036
|
const def = types.Type.def;
|
|
107824
109037
|
const or = types.Type.or;
|
|
107825
|
-
const
|
|
109038
|
+
const defaults4 = fork2.use(sharedPlugin).defaults;
|
|
107826
109039
|
def("Flow").bases("Node");
|
|
107827
109040
|
def("FlowType").bases("Flow");
|
|
107828
109041
|
def("AnyTypeAnnotation").bases("FlowType").build();
|
|
@@ -107854,11 +109067,11 @@ function flowDef(fork2) {
|
|
|
107854
109067
|
def("ObjectTypeProperty"),
|
|
107855
109068
|
def("ObjectTypeSpreadProperty")
|
|
107856
109069
|
)
|
|
107857
|
-
]).field("indexers", [def("ObjectTypeIndexer")],
|
|
109070
|
+
]).field("indexers", [def("ObjectTypeIndexer")], defaults4.emptyArray).field(
|
|
107858
109071
|
"callProperties",
|
|
107859
109072
|
[def("ObjectTypeCallProperty")],
|
|
107860
|
-
|
|
107861
|
-
).field("inexact", or(Boolean, void 0),
|
|
109073
|
+
defaults4.emptyArray
|
|
109074
|
+
).field("inexact", or(Boolean, void 0), defaults4["undefined"]).field("exact", Boolean, defaults4["false"]).field("internalSlots", [def("ObjectTypeInternalSlot")], defaults4.emptyArray);
|
|
107862
109075
|
def("Variance").bases("Node").build("kind").field("kind", or("plus", "minus"));
|
|
107863
109076
|
const LegacyVariance = or(
|
|
107864
109077
|
def("Variance"),
|
|
@@ -107866,9 +109079,9 @@ function flowDef(fork2) {
|
|
|
107866
109079
|
"minus",
|
|
107867
109080
|
null
|
|
107868
109081
|
);
|
|
107869
|
-
def("ObjectTypeProperty").bases("Node").build("key", "value", "optional").field("key", or(def("Literal"), def("Identifier"))).field("value", def("FlowType")).field("optional", Boolean).field("variance", LegacyVariance,
|
|
107870
|
-
def("ObjectTypeIndexer").bases("Node").build("id", "key", "value").field("id", def("Identifier")).field("key", def("FlowType")).field("value", def("FlowType")).field("variance", LegacyVariance,
|
|
107871
|
-
def("ObjectTypeCallProperty").bases("Node").build("value").field("value", def("FunctionTypeAnnotation")).field("static", Boolean,
|
|
109082
|
+
def("ObjectTypeProperty").bases("Node").build("key", "value", "optional").field("key", or(def("Literal"), def("Identifier"))).field("value", def("FlowType")).field("optional", Boolean).field("variance", LegacyVariance, defaults4["null"]);
|
|
109083
|
+
def("ObjectTypeIndexer").bases("Node").build("id", "key", "value").field("id", def("Identifier")).field("key", def("FlowType")).field("value", def("FlowType")).field("variance", LegacyVariance, defaults4["null"]).field("static", Boolean, defaults4["false"]);
|
|
109084
|
+
def("ObjectTypeCallProperty").bases("Node").build("value").field("value", def("FunctionTypeAnnotation")).field("static", Boolean, defaults4["false"]);
|
|
107872
109085
|
def("QualifiedTypeIdentifier").bases("Node").build("qualification", "id").field(
|
|
107873
109086
|
"qualification",
|
|
107874
109087
|
or(
|
|
@@ -107893,24 +109106,24 @@ function flowDef(fork2) {
|
|
|
107893
109106
|
def("ObjectTypeInternalSlot").bases("Node").build("id", "value", "optional", "static", "method").field("id", def("Identifier")).field("value", def("FlowType")).field("optional", Boolean).field("static", Boolean).field("method", Boolean);
|
|
107894
109107
|
def("TypeParameterDeclaration").bases("Node").build("params").field("params", [def("TypeParameter")]);
|
|
107895
109108
|
def("TypeParameterInstantiation").bases("Node").build("params").field("params", [def("FlowType")]);
|
|
107896
|
-
def("TypeParameter").bases("FlowType").build("name", "variance", "bound", "default").field("name", String).field("variance", LegacyVariance,
|
|
107897
|
-
def("ClassProperty").field("variance", LegacyVariance,
|
|
107898
|
-
def("ClassImplements").bases("Node").build("id").field("id", def("Identifier")).field("superClass", or(def("Expression"), null),
|
|
109109
|
+
def("TypeParameter").bases("FlowType").build("name", "variance", "bound", "default").field("name", String).field("variance", LegacyVariance, defaults4["null"]).field("bound", or(def("TypeAnnotation"), null), defaults4["null"]).field("default", or(def("FlowType"), null), defaults4["null"]);
|
|
109110
|
+
def("ClassProperty").field("variance", LegacyVariance, defaults4["null"]);
|
|
109111
|
+
def("ClassImplements").bases("Node").build("id").field("id", def("Identifier")).field("superClass", or(def("Expression"), null), defaults4["null"]).field(
|
|
107899
109112
|
"typeParameters",
|
|
107900
109113
|
or(def("TypeParameterInstantiation"), null),
|
|
107901
|
-
|
|
109114
|
+
defaults4["null"]
|
|
107902
109115
|
);
|
|
107903
|
-
def("InterfaceTypeAnnotation").bases("FlowType").build("body", "extends").field("body", def("ObjectTypeAnnotation")).field("extends", or([def("InterfaceExtends")], null),
|
|
109116
|
+
def("InterfaceTypeAnnotation").bases("FlowType").build("body", "extends").field("body", def("ObjectTypeAnnotation")).field("extends", or([def("InterfaceExtends")], null), defaults4["null"]);
|
|
107904
109117
|
def("InterfaceDeclaration").bases("Declaration").build("id", "body", "extends").field("id", def("Identifier")).field(
|
|
107905
109118
|
"typeParameters",
|
|
107906
109119
|
or(def("TypeParameterDeclaration"), null),
|
|
107907
|
-
|
|
109120
|
+
defaults4["null"]
|
|
107908
109121
|
).field("body", def("ObjectTypeAnnotation")).field("extends", [def("InterfaceExtends")]);
|
|
107909
109122
|
def("DeclareInterface").bases("InterfaceDeclaration").build("id", "body", "extends");
|
|
107910
109123
|
def("InterfaceExtends").bases("Node").build("id").field("id", def("Identifier")).field(
|
|
107911
109124
|
"typeParameters",
|
|
107912
109125
|
or(def("TypeParameterInstantiation"), null),
|
|
107913
|
-
|
|
109126
|
+
defaults4["null"]
|
|
107914
109127
|
);
|
|
107915
109128
|
def("TypeAlias").bases("Declaration").build("id", "typeParameters", "right").field("id", def("Identifier")).field("typeParameters", or(def("TypeParameterDeclaration"), null)).field("right", def("FlowType"));
|
|
107916
109129
|
def("DeclareTypeAlias").bases("TypeAlias").build("id", "typeParameters", "right");
|
|
@@ -107919,7 +109132,7 @@ function flowDef(fork2) {
|
|
|
107919
109132
|
def("TypeCastExpression").bases("Expression").build("expression", "typeAnnotation").field("expression", def("Expression")).field("typeAnnotation", def("TypeAnnotation"));
|
|
107920
109133
|
def("TupleTypeAnnotation").bases("FlowType").build("types").field("types", [def("FlowType")]);
|
|
107921
109134
|
def("DeclareVariable").bases("Statement").build("id").field("id", def("Identifier"));
|
|
107922
|
-
def("DeclareFunction").bases("Statement").build("id").field("id", def("Identifier")).field("predicate", or(def("FlowPredicate"), null),
|
|
109135
|
+
def("DeclareFunction").bases("Statement").build("id").field("id", def("Identifier")).field("predicate", or(def("FlowPredicate"), null), defaults4["null"]);
|
|
107923
109136
|
def("DeclareClass").bases("InterfaceDeclaration").build("id");
|
|
107924
109137
|
def("DeclareModule").bases("Statement").build("id", "body").field("id", or(def("Identifier"), def("Literal"))).field("body", def("BlockStatement"));
|
|
107925
109138
|
def("DeclareModuleExports").bases("Statement").build("typeAnnotation").field("typeAnnotation", def("TypeAnnotation"));
|
|
@@ -107938,27 +109151,27 @@ function flowDef(fork2) {
|
|
|
107938
109151
|
)).field("specifiers", [or(
|
|
107939
109152
|
def("ExportSpecifier"),
|
|
107940
109153
|
def("ExportBatchSpecifier")
|
|
107941
|
-
)],
|
|
109154
|
+
)], defaults4.emptyArray).field("source", or(
|
|
107942
109155
|
def("Literal"),
|
|
107943
109156
|
null
|
|
107944
|
-
),
|
|
109157
|
+
), defaults4["null"]);
|
|
107945
109158
|
def("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source", or(
|
|
107946
109159
|
def("Literal"),
|
|
107947
109160
|
null
|
|
107948
|
-
),
|
|
109161
|
+
), defaults4["null"]);
|
|
107949
109162
|
def("ImportDeclaration").field("importKind", or("value", "type", "typeof"), () => "value");
|
|
107950
109163
|
def("FlowPredicate").bases("Flow");
|
|
107951
109164
|
def("InferredPredicate").bases("FlowPredicate").build();
|
|
107952
109165
|
def("DeclaredPredicate").bases("FlowPredicate").build("value").field("value", def("Expression"));
|
|
107953
|
-
def("Function").field("predicate", or(def("FlowPredicate"), null),
|
|
109166
|
+
def("Function").field("predicate", or(def("FlowPredicate"), null), defaults4["null"]);
|
|
107954
109167
|
def("CallExpression").field("typeArguments", or(
|
|
107955
109168
|
null,
|
|
107956
109169
|
def("TypeParameterInstantiation")
|
|
107957
|
-
),
|
|
109170
|
+
), defaults4["null"]);
|
|
107958
109171
|
def("NewExpression").field("typeArguments", or(
|
|
107959
109172
|
null,
|
|
107960
109173
|
def("TypeParameterInstantiation")
|
|
107961
|
-
),
|
|
109174
|
+
), defaults4["null"]);
|
|
107962
109175
|
def("EnumDeclaration").bases("Declaration").build("id", "body").field("id", def("Identifier")).field("body", or(
|
|
107963
109176
|
def("EnumBooleanBody"),
|
|
107964
109177
|
def("EnumNumberBody"),
|
|
@@ -107978,7 +109191,7 @@ maybeSetModuleExports(() => module);
|
|
|
107978
109191
|
function esprimaDef(fork2) {
|
|
107979
109192
|
fork2.use(esProposalsDef);
|
|
107980
109193
|
var types = fork2.use(typesPlugin);
|
|
107981
|
-
var
|
|
109194
|
+
var defaults4 = fork2.use(sharedPlugin).defaults;
|
|
107982
109195
|
var def = types.Type.def;
|
|
107983
109196
|
var or = types.Type.or;
|
|
107984
109197
|
def("VariableDeclaration").field("declarations", [or(
|
|
@@ -108013,10 +109226,10 @@ function esprimaDef(fork2) {
|
|
|
108013
109226
|
)).field("specifiers", [or(
|
|
108014
109227
|
def("ExportSpecifier"),
|
|
108015
109228
|
def("ExportBatchSpecifier")
|
|
108016
|
-
)],
|
|
109229
|
+
)], defaults4.emptyArray).field("source", or(
|
|
108017
109230
|
def("Literal"),
|
|
108018
109231
|
null
|
|
108019
|
-
),
|
|
109232
|
+
), defaults4["null"]);
|
|
108020
109233
|
def("Block").bases("Comment").build(
|
|
108021
109234
|
"value",
|
|
108022
109235
|
/*optional:*/
|
|
@@ -108034,7 +109247,7 @@ maybeSetModuleExports(() => module);
|
|
|
108034
109247
|
function babelCoreDef(fork2) {
|
|
108035
109248
|
fork2.use(esProposalsDef);
|
|
108036
109249
|
const types = fork2.use(typesPlugin);
|
|
108037
|
-
const
|
|
109250
|
+
const defaults4 = fork2.use(sharedPlugin).defaults;
|
|
108038
109251
|
const def = types.Type.def;
|
|
108039
109252
|
const or = types.Type.or;
|
|
108040
109253
|
const {
|
|
@@ -108059,10 +109272,10 @@ function babelCoreDef(fork2) {
|
|
|
108059
109272
|
"trailing"
|
|
108060
109273
|
);
|
|
108061
109274
|
def("Directive").bases("Node").build("value").field("value", def("DirectiveLiteral"));
|
|
108062
|
-
def("DirectiveLiteral").bases("Node", "Expression").build("value").field("value", String,
|
|
109275
|
+
def("DirectiveLiteral").bases("Node", "Expression").build("value").field("value", String, defaults4["use strict"]);
|
|
108063
109276
|
def("InterpreterDirective").bases("Node").build("value").field("value", String);
|
|
108064
|
-
def("BlockStatement").bases("Statement").build("body").field("body", [def("Statement")]).field("directives", [def("Directive")],
|
|
108065
|
-
def("Program").bases("Node").build("body").field("body", [def("Statement")]).field("directives", [def("Directive")],
|
|
109277
|
+
def("BlockStatement").bases("Statement").build("body").field("body", [def("Statement")]).field("directives", [def("Directive")], defaults4.emptyArray);
|
|
109278
|
+
def("Program").bases("Node").build("body").field("body", [def("Statement")]).field("directives", [def("Directive")], defaults4.emptyArray).field("interpreter", or(def("InterpreterDirective"), null), defaults4["null"]);
|
|
108066
109279
|
function makeLiteralExtra(rawValueType = String, toRaw) {
|
|
108067
109280
|
return [
|
|
108068
109281
|
"extra",
|
|
@@ -108080,10 +109293,10 @@ function babelCoreDef(fork2) {
|
|
|
108080
109293
|
];
|
|
108081
109294
|
}
|
|
108082
109295
|
def("StringLiteral").bases("Literal").build("value").field("value", String).field(...makeLiteralExtra(String, (val) => JSON.stringify(val)));
|
|
108083
|
-
def("NumericLiteral").bases("Literal").build("value").field("value", Number).field("raw", or(String, null),
|
|
109296
|
+
def("NumericLiteral").bases("Literal").build("value").field("value", Number).field("raw", or(String, null), defaults4["null"]).field(...makeLiteralExtra(Number));
|
|
108084
109297
|
def("BigIntLiteral").bases("Literal").build("value").field("value", or(String, Number)).field(...makeLiteralExtra(String, (val) => val + "n"));
|
|
108085
109298
|
def("DecimalLiteral").bases("Literal").build("value").field("value", String).field(...makeLiteralExtra(String, (val) => val + "m"));
|
|
108086
|
-
def("NullLiteral").bases("Literal").build().field("value", null,
|
|
109299
|
+
def("NullLiteral").bases("Literal").build().field("value", null, defaults4["null"]);
|
|
108087
109300
|
def("BooleanLiteral").bases("Literal").build("value").field("value", Boolean);
|
|
108088
109301
|
def("RegExpLiteral").bases("Literal").build("pattern", "flags").field("pattern", String).field("flags", String).field("value", RegExp, function() {
|
|
108089
109302
|
return new RegExp(this.pattern, this.flags);
|
|
@@ -108107,22 +109320,22 @@ function babelCoreDef(fork2) {
|
|
|
108107
109320
|
def("SpreadElement")
|
|
108108
109321
|
);
|
|
108109
109322
|
def("ObjectExpression").bases("Expression").build("properties").field("properties", [ObjectExpressionProperty]);
|
|
108110
|
-
def("ObjectMethod").bases("Node", "Function").build("kind", "key", "params", "body", "computed").field("kind", or("method", "get", "set")).field("key", or(def("Literal"), def("Identifier"), def("Expression"))).field("params", [def("Pattern")]).field("body", def("BlockStatement")).field("computed", Boolean,
|
|
109323
|
+
def("ObjectMethod").bases("Node", "Function").build("kind", "key", "params", "body", "computed").field("kind", or("method", "get", "set")).field("key", or(def("Literal"), def("Identifier"), def("Expression"))).field("params", [def("Pattern")]).field("body", def("BlockStatement")).field("computed", Boolean, defaults4["false"]).field("generator", Boolean, defaults4["false"]).field("async", Boolean, defaults4["false"]).field(
|
|
108111
109324
|
"accessibility",
|
|
108112
109325
|
// TypeScript
|
|
108113
109326
|
or(def("Literal"), null),
|
|
108114
|
-
|
|
109327
|
+
defaults4["null"]
|
|
108115
109328
|
).field(
|
|
108116
109329
|
"decorators",
|
|
108117
109330
|
or([def("Decorator")], null),
|
|
108118
|
-
|
|
109331
|
+
defaults4["null"]
|
|
108119
109332
|
);
|
|
108120
109333
|
def("ObjectProperty").bases("Node").build("key", "value").field("key", or(def("Literal"), def("Identifier"), def("Expression"))).field("value", or(def("Expression"), def("Pattern"))).field(
|
|
108121
109334
|
"accessibility",
|
|
108122
109335
|
// TypeScript
|
|
108123
109336
|
or(def("Literal"), null),
|
|
108124
|
-
|
|
108125
|
-
).field("computed", Boolean,
|
|
109337
|
+
defaults4["null"]
|
|
109338
|
+
).field("computed", Boolean, defaults4["false"]);
|
|
108126
109339
|
var ClassBodyElement = or(
|
|
108127
109340
|
def("MethodDefinition"),
|
|
108128
109341
|
def("VariableDeclarator"),
|
|
@@ -108143,19 +109356,19 @@ function babelCoreDef(fork2) {
|
|
|
108143
109356
|
def("PrivateName"),
|
|
108144
109357
|
// Only when .computed is true (TODO enforce this)
|
|
108145
109358
|
def("Expression")
|
|
108146
|
-
)).field("value", or(def("Expression"), null),
|
|
109359
|
+
)).field("value", or(def("Expression"), null), defaults4["null"]);
|
|
108147
109360
|
[
|
|
108148
109361
|
"ClassMethod",
|
|
108149
109362
|
"ClassPrivateMethod"
|
|
108150
109363
|
].forEach((typeName) => {
|
|
108151
|
-
def(typeName).field("kind", or("get", "set", "method", "constructor"), () => "method").field("body", def("BlockStatement")).field("access", or("public", "private", "protected", null),
|
|
109364
|
+
def(typeName).field("kind", or("get", "set", "method", "constructor"), () => "method").field("body", def("BlockStatement")).field("access", or("public", "private", "protected", null), defaults4["null"]);
|
|
108152
109365
|
});
|
|
108153
109366
|
[
|
|
108154
109367
|
"ClassMethod",
|
|
108155
109368
|
"ClassPrivateMethod",
|
|
108156
109369
|
"ClassAccessorProperty"
|
|
108157
109370
|
].forEach((typeName) => {
|
|
108158
|
-
def(typeName).field("computed", Boolean,
|
|
109371
|
+
def(typeName).field("computed", Boolean, defaults4["false"]).field("static", Boolean, defaults4["false"]).field("abstract", Boolean, defaults4["false"]).field("accessibility", or("public", "private", "protected", null), defaults4["null"]).field("decorators", or([def("Decorator")], null), defaults4["null"]).field("definite", Boolean, defaults4["false"]).field("optional", Boolean, defaults4["false"]).field("override", Boolean, defaults4["false"]).field("readonly", Boolean, defaults4["false"]);
|
|
108159
109372
|
});
|
|
108160
109373
|
var ObjectPatternProperty = or(
|
|
108161
109374
|
def("Property"),
|
|
@@ -108173,7 +109386,7 @@ function babelCoreDef(fork2) {
|
|
|
108173
109386
|
def("ObjectPattern").bases("Pattern").build("properties").field("properties", [ObjectPatternProperty]).field(
|
|
108174
109387
|
"decorators",
|
|
108175
109388
|
or([def("Decorator")], null),
|
|
108176
|
-
|
|
109389
|
+
defaults4["null"]
|
|
108177
109390
|
);
|
|
108178
109391
|
def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
|
|
108179
109392
|
def("RestProperty").bases("Node").build("argument").field("argument", def("Expression"));
|
|
@@ -108200,7 +109413,7 @@ function typescriptDef(fork2) {
|
|
|
108200
109413
|
var n3 = types.namedTypes;
|
|
108201
109414
|
var def = types.Type.def;
|
|
108202
109415
|
var or = types.Type.or;
|
|
108203
|
-
var
|
|
109416
|
+
var defaults4 = fork2.use(sharedPlugin).defaults;
|
|
108204
109417
|
var StringLiteral = types.Type.from(function(value2, deep) {
|
|
108205
109418
|
if (n3.StringLiteral && n3.StringLiteral.check(value2, deep)) {
|
|
108206
109419
|
return true;
|
|
@@ -108219,23 +109432,23 @@ function typescriptDef(fork2) {
|
|
|
108219
109432
|
def("TSHasOptionalTypeParameterInstantiation").field(
|
|
108220
109433
|
"typeParameters",
|
|
108221
109434
|
or(def("TSTypeParameterInstantiation"), null),
|
|
108222
|
-
|
|
109435
|
+
defaults4["null"]
|
|
108223
109436
|
);
|
|
108224
109437
|
def("TSHasOptionalTypeParameters").field(
|
|
108225
109438
|
"typeParameters",
|
|
108226
109439
|
or(def("TSTypeParameterDeclaration"), null, void 0),
|
|
108227
|
-
|
|
109440
|
+
defaults4["null"]
|
|
108228
109441
|
);
|
|
108229
109442
|
def("TSHasOptionalTypeAnnotation").field(
|
|
108230
109443
|
"typeAnnotation",
|
|
108231
109444
|
or(def("TSTypeAnnotation"), null),
|
|
108232
|
-
|
|
109445
|
+
defaults4["null"]
|
|
108233
109446
|
);
|
|
108234
109447
|
def("TSQualifiedName").bases("Node").build("left", "right").field("left", TSEntityName).field("right", TSEntityName);
|
|
108235
109448
|
def("TSAsExpression").bases("Expression", "Pattern").build("expression", "typeAnnotation").field("expression", def("Expression")).field("typeAnnotation", def("TSType")).field(
|
|
108236
109449
|
"extra",
|
|
108237
109450
|
or({ parenthesized: Boolean }, null),
|
|
108238
|
-
|
|
109451
|
+
defaults4["null"]
|
|
108239
109452
|
);
|
|
108240
109453
|
def("TSTypeCastExpression").bases("Expression").build("expression", "typeAnnotation").field("expression", def("Expression")).field("typeAnnotation", def("TSType"));
|
|
108241
109454
|
def("TSSatisfiesExpression").bases("Expression", "Pattern").build("expression", "typeAnnotation").field("expression", def("Expression")).field("typeAnnotation", def("TSType"));
|
|
@@ -108297,7 +109510,7 @@ function typescriptDef(fork2) {
|
|
|
108297
109510
|
"TSHasOptionalTypeAnnotation"
|
|
108298
109511
|
).build("parameters").field("parameters", ParametersType);
|
|
108299
109512
|
});
|
|
108300
|
-
def("TSDeclareFunction").bases("Declaration", "TSHasOptionalTypeParameters").build("id", "params", "returnType").field("declare", Boolean,
|
|
109513
|
+
def("TSDeclareFunction").bases("Declaration", "TSHasOptionalTypeParameters").build("id", "params", "returnType").field("declare", Boolean, defaults4["false"]).field("async", Boolean, defaults4["false"]).field("generator", Boolean, defaults4["false"]).field("id", or(def("Identifier"), null), defaults4["null"]).field("params", [def("Pattern")]).field(
|
|
108301
109514
|
"returnType",
|
|
108302
109515
|
or(
|
|
108303
109516
|
def("TSTypeAnnotation"),
|
|
@@ -108305,13 +109518,13 @@ function typescriptDef(fork2) {
|
|
|
108305
109518
|
// Still used?
|
|
108306
109519
|
null
|
|
108307
109520
|
),
|
|
108308
|
-
|
|
109521
|
+
defaults4["null"]
|
|
108309
109522
|
);
|
|
108310
|
-
def("TSDeclareMethod").bases("Declaration", "TSHasOptionalTypeParameters").build("key", "params", "returnType").field("async", Boolean,
|
|
109523
|
+
def("TSDeclareMethod").bases("Declaration", "TSHasOptionalTypeParameters").build("key", "params", "returnType").field("async", Boolean, defaults4["false"]).field("generator", Boolean, defaults4["false"]).field("params", [def("Pattern")]).field("abstract", Boolean, defaults4["false"]).field(
|
|
108311
109524
|
"accessibility",
|
|
108312
109525
|
or("public", "private", "protected", void 0),
|
|
108313
|
-
|
|
108314
|
-
).field("static", Boolean,
|
|
109526
|
+
defaults4["undefined"]
|
|
109527
|
+
).field("static", Boolean, defaults4["false"]).field("computed", Boolean, defaults4["false"]).field("optional", Boolean, defaults4["false"]).field("key", or(
|
|
108315
109528
|
def("Identifier"),
|
|
108316
109529
|
def("StringLiteral"),
|
|
108317
109530
|
def("NumericLiteral"),
|
|
@@ -108327,11 +109540,11 @@ function typescriptDef(fork2) {
|
|
|
108327
109540
|
"access",
|
|
108328
109541
|
// Not "accessibility"?
|
|
108329
109542
|
or("public", "private", "protected", void 0),
|
|
108330
|
-
|
|
109543
|
+
defaults4["undefined"]
|
|
108331
109544
|
).field(
|
|
108332
109545
|
"decorators",
|
|
108333
109546
|
or([def("Decorator")], null),
|
|
108334
|
-
|
|
109547
|
+
defaults4["null"]
|
|
108335
109548
|
).field(
|
|
108336
109549
|
"returnType",
|
|
108337
109550
|
or(
|
|
@@ -108340,18 +109553,18 @@ function typescriptDef(fork2) {
|
|
|
108340
109553
|
// Still used?
|
|
108341
109554
|
null
|
|
108342
109555
|
),
|
|
108343
|
-
|
|
109556
|
+
defaults4["null"]
|
|
108344
109557
|
);
|
|
108345
|
-
def("TSMappedType").bases("TSType").build("typeParameter", "typeAnnotation").field("readonly", or(Boolean, "+", "-"),
|
|
109558
|
+
def("TSMappedType").bases("TSType").build("typeParameter", "typeAnnotation").field("readonly", or(Boolean, "+", "-"), defaults4["false"]).field("typeParameter", def("TSTypeParameter")).field("optional", or(Boolean, "+", "-"), defaults4["false"]).field(
|
|
108346
109559
|
"typeAnnotation",
|
|
108347
109560
|
or(def("TSType"), null),
|
|
108348
|
-
|
|
109561
|
+
defaults4["null"]
|
|
108349
109562
|
);
|
|
108350
109563
|
def("TSTupleType").bases("TSType").build("elementTypes").field("elementTypes", [or(
|
|
108351
109564
|
def("TSType"),
|
|
108352
109565
|
def("TSNamedTupleMember")
|
|
108353
109566
|
)]);
|
|
108354
|
-
def("TSNamedTupleMember").bases("TSType").build("label", "elementType", "optional").field("label", def("Identifier")).field("optional", Boolean,
|
|
109567
|
+
def("TSNamedTupleMember").bases("TSType").build("label", "elementType", "optional").field("label", def("Identifier")).field("optional", Boolean, defaults4["false"]).field("elementType", def("TSType"));
|
|
108355
109568
|
def("TSRestType").bases("TSType").build("typeAnnotation").field("typeAnnotation", def("TSType"));
|
|
108356
109569
|
def("TSOptionalType").bases("TSType").build("typeAnnotation").field("typeAnnotation", def("TSType"));
|
|
108357
109570
|
def("TSIndexedAccessType").bases("TSType").build("objectType", "indexType").field("objectType", def("TSType")).field("indexType", def("TSType"));
|
|
@@ -108363,17 +109576,17 @@ function typescriptDef(fork2) {
|
|
|
108363
109576
|
def("TSTypeAnnotation")
|
|
108364
109577
|
)
|
|
108365
109578
|
);
|
|
108366
|
-
def("TSIndexSignature").bases("Declaration", "TSHasOptionalTypeAnnotation").build("parameters", "typeAnnotation").field("parameters", [def("Identifier")]).field("readonly", Boolean,
|
|
108367
|
-
def("TSPropertySignature").bases("Declaration", "TSHasOptionalTypeAnnotation").build("key", "typeAnnotation", "optional").field("key", def("Expression")).field("computed", Boolean,
|
|
109579
|
+
def("TSIndexSignature").bases("Declaration", "TSHasOptionalTypeAnnotation").build("parameters", "typeAnnotation").field("parameters", [def("Identifier")]).field("readonly", Boolean, defaults4["false"]);
|
|
109580
|
+
def("TSPropertySignature").bases("Declaration", "TSHasOptionalTypeAnnotation").build("key", "typeAnnotation", "optional").field("key", def("Expression")).field("computed", Boolean, defaults4["false"]).field("readonly", Boolean, defaults4["false"]).field("optional", Boolean, defaults4["false"]).field(
|
|
108368
109581
|
"initializer",
|
|
108369
109582
|
or(def("Expression"), null),
|
|
108370
|
-
|
|
109583
|
+
defaults4["null"]
|
|
108371
109584
|
);
|
|
108372
109585
|
def("TSMethodSignature").bases(
|
|
108373
109586
|
"Declaration",
|
|
108374
109587
|
"TSHasOptionalTypeParameters",
|
|
108375
109588
|
"TSHasOptionalTypeAnnotation"
|
|
108376
|
-
).build("key", "parameters", "typeAnnotation").field("key", def("Expression")).field("computed", Boolean,
|
|
109589
|
+
).build("key", "parameters", "typeAnnotation").field("key", def("Expression")).field("computed", Boolean, defaults4["false"]).field("optional", Boolean, defaults4["false"]).field("parameters", ParametersType);
|
|
108377
109590
|
def("TSTypePredicate").bases("TSTypeAnnotation", "TSType").build("parameterName", "typeAnnotation", "asserts").field(
|
|
108378
109591
|
"parameterName",
|
|
108379
109592
|
or(
|
|
@@ -108383,8 +109596,8 @@ function typescriptDef(fork2) {
|
|
|
108383
109596
|
).field(
|
|
108384
109597
|
"typeAnnotation",
|
|
108385
109598
|
or(def("TSTypeAnnotation"), null),
|
|
108386
|
-
|
|
108387
|
-
).field("asserts", Boolean,
|
|
109599
|
+
defaults4["null"]
|
|
109600
|
+
).field("asserts", Boolean, defaults4["false"]);
|
|
108388
109601
|
[
|
|
108389
109602
|
"TSCallSignatureDeclaration",
|
|
108390
109603
|
"TSConstructSignatureDeclaration"
|
|
@@ -108398,7 +109611,7 @@ function typescriptDef(fork2) {
|
|
|
108398
109611
|
def("TSEnumMember").bases("Node").build("id", "initializer").field("id", or(def("Identifier"), StringLiteral)).field(
|
|
108399
109612
|
"initializer",
|
|
108400
109613
|
or(def("Expression"), null),
|
|
108401
|
-
|
|
109614
|
+
defaults4["null"]
|
|
108402
109615
|
);
|
|
108403
109616
|
def("TSTypeQuery").bases("TSType").build("exprName").field("exprName", or(TSEntityName, def("TSImportType")));
|
|
108404
109617
|
var TSTypeMember = or(
|
|
@@ -108409,33 +109622,33 @@ function typescriptDef(fork2) {
|
|
|
108409
109622
|
def("TSPropertySignature")
|
|
108410
109623
|
);
|
|
108411
109624
|
def("TSTypeLiteral").bases("TSType").build("members").field("members", [TSTypeMember]);
|
|
108412
|
-
def("TSTypeParameter").bases("Identifier").build("name", "constraint", "default").field("name", or(def("Identifier"), String)).field("constraint", or(def("TSType"), void 0),
|
|
109625
|
+
def("TSTypeParameter").bases("Identifier").build("name", "constraint", "default").field("name", or(def("Identifier"), String)).field("constraint", or(def("TSType"), void 0), defaults4["undefined"]).field("default", or(def("TSType"), void 0), defaults4["undefined"]);
|
|
108413
109626
|
def("TSTypeAssertion").bases("Expression", "Pattern").build("typeAnnotation", "expression").field("typeAnnotation", def("TSType")).field("expression", def("Expression")).field(
|
|
108414
109627
|
"extra",
|
|
108415
109628
|
or({ parenthesized: Boolean }, null),
|
|
108416
|
-
|
|
109629
|
+
defaults4["null"]
|
|
108417
109630
|
);
|
|
108418
109631
|
def("TSTypeParameterDeclaration").bases("Declaration").build("params").field("params", [def("TSTypeParameter")]);
|
|
108419
109632
|
def("TSInstantiationExpression").bases("Expression", "TSHasOptionalTypeParameterInstantiation").build("expression", "typeParameters").field("expression", def("Expression"));
|
|
108420
109633
|
def("TSTypeParameterInstantiation").bases("Node").build("params").field("params", [def("TSType")]);
|
|
108421
|
-
def("TSEnumDeclaration").bases("Declaration").build("id", "members").field("id", def("Identifier")).field("const", Boolean,
|
|
109634
|
+
def("TSEnumDeclaration").bases("Declaration").build("id", "members").field("id", def("Identifier")).field("const", Boolean, defaults4["false"]).field("declare", Boolean, defaults4["false"]).field("members", [def("TSEnumMember")]).field(
|
|
108422
109635
|
"initializer",
|
|
108423
109636
|
or(def("Expression"), null),
|
|
108424
|
-
|
|
109637
|
+
defaults4["null"]
|
|
108425
109638
|
);
|
|
108426
|
-
def("TSTypeAliasDeclaration").bases("Declaration", "TSHasOptionalTypeParameters").build("id", "typeAnnotation").field("id", def("Identifier")).field("declare", Boolean,
|
|
109639
|
+
def("TSTypeAliasDeclaration").bases("Declaration", "TSHasOptionalTypeParameters").build("id", "typeAnnotation").field("id", def("Identifier")).field("declare", Boolean, defaults4["false"]).field("typeAnnotation", def("TSType"));
|
|
108427
109640
|
def("TSModuleBlock").bases("Node").build("body").field("body", [def("Statement")]);
|
|
108428
|
-
def("TSModuleDeclaration").bases("Declaration").build("id", "body").field("id", or(StringLiteral, TSEntityName)).field("declare", Boolean,
|
|
109641
|
+
def("TSModuleDeclaration").bases("Declaration").build("id", "body").field("id", or(StringLiteral, TSEntityName)).field("declare", Boolean, defaults4["false"]).field("global", Boolean, defaults4["false"]).field(
|
|
108429
109642
|
"body",
|
|
108430
109643
|
or(
|
|
108431
109644
|
def("TSModuleBlock"),
|
|
108432
109645
|
def("TSModuleDeclaration"),
|
|
108433
109646
|
null
|
|
108434
109647
|
),
|
|
108435
|
-
|
|
109648
|
+
defaults4["null"]
|
|
108436
109649
|
);
|
|
108437
|
-
def("TSImportType").bases("TSType", "TSHasOptionalTypeParameterInstantiation").build("argument", "qualifier", "typeParameters").field("argument", StringLiteral).field("qualifier", or(TSEntityName, void 0),
|
|
108438
|
-
def("TSImportEqualsDeclaration").bases("Declaration").build("id", "moduleReference").field("id", def("Identifier")).field("isExport", Boolean,
|
|
109650
|
+
def("TSImportType").bases("TSType", "TSHasOptionalTypeParameterInstantiation").build("argument", "qualifier", "typeParameters").field("argument", StringLiteral).field("qualifier", or(TSEntityName, void 0), defaults4["undefined"]);
|
|
109651
|
+
def("TSImportEqualsDeclaration").bases("Declaration").build("id", "moduleReference").field("id", def("Identifier")).field("isExport", Boolean, defaults4["false"]).field(
|
|
108439
109652
|
"moduleReference",
|
|
108440
109653
|
or(
|
|
108441
109654
|
TSEntityName,
|
|
@@ -108447,16 +109660,16 @@ function typescriptDef(fork2) {
|
|
|
108447
109660
|
def("TSNamespaceExportDeclaration").bases("Declaration").build("id").field("id", def("Identifier"));
|
|
108448
109661
|
def("TSInterfaceBody").bases("Node").build("body").field("body", [TSTypeMember]);
|
|
108449
109662
|
def("TSExpressionWithTypeArguments").bases("TSType", "TSHasOptionalTypeParameterInstantiation").build("expression", "typeParameters").field("expression", TSEntityName);
|
|
108450
|
-
def("TSInterfaceDeclaration").bases("Declaration", "TSHasOptionalTypeParameters").build("id", "body").field("id", TSEntityName).field("declare", Boolean,
|
|
109663
|
+
def("TSInterfaceDeclaration").bases("Declaration", "TSHasOptionalTypeParameters").build("id", "body").field("id", TSEntityName).field("declare", Boolean, defaults4["false"]).field(
|
|
108451
109664
|
"extends",
|
|
108452
109665
|
or([def("TSExpressionWithTypeArguments")], null),
|
|
108453
|
-
|
|
109666
|
+
defaults4["null"]
|
|
108454
109667
|
).field("body", def("TSInterfaceBody"));
|
|
108455
109668
|
def("TSParameterProperty").bases("Pattern").build("parameter").field(
|
|
108456
109669
|
"accessibility",
|
|
108457
109670
|
or("public", "private", "protected", void 0),
|
|
108458
|
-
|
|
108459
|
-
).field("readonly", Boolean,
|
|
109671
|
+
defaults4["undefined"]
|
|
109672
|
+
).field("readonly", Boolean, defaults4["false"]).field("parameter", or(
|
|
108460
109673
|
def("Identifier"),
|
|
108461
109674
|
def("AssignmentPattern")
|
|
108462
109675
|
));
|
|
@@ -108464,7 +109677,7 @@ function typescriptDef(fork2) {
|
|
|
108464
109677
|
"access",
|
|
108465
109678
|
// Not "accessibility"?
|
|
108466
109679
|
or("public", "private", "protected", void 0),
|
|
108467
|
-
|
|
109680
|
+
defaults4["undefined"]
|
|
108468
109681
|
);
|
|
108469
109682
|
def("ClassAccessorProperty").bases("Declaration", "TSHasOptionalTypeAnnotation");
|
|
108470
109683
|
def("ClassBody").field("body", [or(
|
|
@@ -108759,7 +109972,7 @@ function isTrailingCommaEnabled(options, context2) {
|
|
|
108759
109972
|
}
|
|
108760
109973
|
return !!trailingComma;
|
|
108761
109974
|
}
|
|
108762
|
-
var
|
|
109975
|
+
var defaults3 = {
|
|
108763
109976
|
tabWidth: 4,
|
|
108764
109977
|
useTabs: false,
|
|
108765
109978
|
reuseWhitespace: true,
|
|
@@ -108780,11 +109993,11 @@ var defaults2 = {
|
|
|
108780
109993
|
flowObjectCommas: true,
|
|
108781
109994
|
tokens: true
|
|
108782
109995
|
};
|
|
108783
|
-
var hasOwn$1 =
|
|
109996
|
+
var hasOwn$1 = defaults3.hasOwnProperty;
|
|
108784
109997
|
function normalize3(opts) {
|
|
108785
|
-
const options = opts ||
|
|
109998
|
+
const options = opts || defaults3;
|
|
108786
109999
|
function get2(key) {
|
|
108787
|
-
return hasOwn$1.call(options, key) ? options[key] :
|
|
110000
|
+
return hasOwn$1.call(options, key) ? options[key] : defaults3[key];
|
|
108788
110001
|
}
|
|
108789
110002
|
return {
|
|
108790
110003
|
tabWidth: +get2("tabWidth"),
|
|
@@ -110683,8 +111896,8 @@ var Printer = function Printer2(config) {
|
|
|
110683
111896
|
const explicitTabWidth = config && config.tabWidth;
|
|
110684
111897
|
config = normalize3(config);
|
|
110685
111898
|
config.sourceFileName = null;
|
|
110686
|
-
function makePrintFunctionWith(options,
|
|
110687
|
-
options = Object.assign({}, options,
|
|
111899
|
+
function makePrintFunctionWith(options, overrides2) {
|
|
111900
|
+
options = Object.assign({}, options, overrides2);
|
|
110688
111901
|
return (path8) => print2(path8, options);
|
|
110689
111902
|
}
|
|
110690
111903
|
function print2(path8, options) {
|
|
@@ -114404,8 +115617,8 @@ init_esm_shims();
|
|
|
114404
115617
|
// ../../node_modules/crypto-random-string/index.js
|
|
114405
115618
|
init_esm_shims();
|
|
114406
115619
|
import { promisify as promisify7 } from "util";
|
|
114407
|
-
import
|
|
114408
|
-
var randomBytesAsync = promisify7(
|
|
115620
|
+
import crypto3 from "crypto";
|
|
115621
|
+
var randomBytesAsync = promisify7(crypto3.randomBytes);
|
|
114409
115622
|
var urlSafeCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~".split("");
|
|
114410
115623
|
var numericCharacters = "0123456789".split("");
|
|
114411
115624
|
var distinguishableCharacters = "CDEHKMPRTUWXY012458".split("");
|
|
@@ -114418,7 +115631,7 @@ var generateForCustomCharacters = (length, characters) => {
|
|
|
114418
115631
|
let string = "";
|
|
114419
115632
|
let stringLength = 0;
|
|
114420
115633
|
while (stringLength < length) {
|
|
114421
|
-
const entropy =
|
|
115634
|
+
const entropy = crypto3.randomBytes(entropyLength);
|
|
114422
115635
|
let entropyPosition = 0;
|
|
114423
115636
|
while (entropyPosition < entropyLength && stringLength < length) {
|
|
114424
115637
|
const entropyValue = entropy.readUInt16LE(entropyPosition);
|
|
@@ -114453,7 +115666,7 @@ var generateForCustomCharactersAsync = async (length, characters) => {
|
|
|
114453
115666
|
}
|
|
114454
115667
|
return string;
|
|
114455
115668
|
};
|
|
114456
|
-
var generateRandomBytes = (byteLength, type, length) =>
|
|
115669
|
+
var generateRandomBytes = (byteLength, type, length) => crypto3.randomBytes(byteLength).toString(type).slice(0, length);
|
|
114457
115670
|
var generateRandomBytesAsync = async (byteLength, type, length) => {
|
|
114458
115671
|
const buffer = await randomBytesAsync(byteLength);
|
|
114459
115672
|
return buffer.toString(type).slice(0, length);
|
|
@@ -114603,7 +115816,7 @@ async function getUniqueExtensionPath(projectFolder, extensionPath, suffix) {
|
|
|
114603
115816
|
|
|
114604
115817
|
// src/task-runner.ts
|
|
114605
115818
|
init_esm_shims();
|
|
114606
|
-
var
|
|
115819
|
+
var import_react105 = __toESM(require_react(), 1);
|
|
114607
115820
|
var import_variant33 = __toESM(require_lib(), 1);
|
|
114608
115821
|
var TaskRunnerStatus = (0, import_variant33.variant)({
|
|
114609
115822
|
Idle: {},
|
|
@@ -114629,7 +115842,7 @@ var TaskRunnerStatus = (0, import_variant33.variant)({
|
|
|
114629
115842
|
}
|
|
114630
115843
|
});
|
|
114631
115844
|
function useTaskRunner() {
|
|
114632
|
-
const [status, setStatus] = (0,
|
|
115845
|
+
const [status, setStatus] = (0, import_react105.useState)(
|
|
114633
115846
|
TaskRunnerStatus.Idle()
|
|
114634
115847
|
);
|
|
114635
115848
|
const { execute } = useAsyncCallback3(async (_2, tasks) => {
|
|
@@ -114649,25 +115862,25 @@ function useTaskRunner() {
|
|
|
114649
115862
|
|
|
114650
115863
|
// src/components/TaskList.tsx
|
|
114651
115864
|
init_esm_shims();
|
|
114652
|
-
var
|
|
115865
|
+
var import_react106 = __toESM(require_react(), 1);
|
|
114653
115866
|
var TaskList = ({ tasks, totalTaskCount }) => {
|
|
114654
|
-
return /* @__PURE__ */
|
|
115867
|
+
return /* @__PURE__ */ import_react106.default.createElement(import_react106.default.Fragment, null, tasks.map((task, index) => {
|
|
114655
115868
|
const stepper = `[${index + 1}/${totalTaskCount}]`;
|
|
114656
115869
|
const fullText = `${stepper} ${task.text}`;
|
|
114657
115870
|
if (task.status === "running") {
|
|
114658
|
-
return /* @__PURE__ */
|
|
115871
|
+
return /* @__PURE__ */ import_react106.default.createElement(Spinner2, { key: index, text: fullText });
|
|
114659
115872
|
}
|
|
114660
|
-
return /* @__PURE__ */
|
|
115873
|
+
return /* @__PURE__ */ import_react106.default.createElement(Alert, { key: index, type: "success" }, fullText);
|
|
114661
115874
|
}));
|
|
114662
115875
|
};
|
|
114663
115876
|
|
|
114664
115877
|
// src/components/LinkCommand/GenerateProject.tsx
|
|
114665
115878
|
var GenerationProgress = ({ tasks, totalTaskCount }) => {
|
|
114666
|
-
return /* @__PURE__ */
|
|
115879
|
+
return /* @__PURE__ */ import_react107.default.createElement(import_react107.default.Fragment, null, /* @__PURE__ */ import_react107.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react107.default.createElement(Text2, null, "Generating your headless site...")), /* @__PURE__ */ import_react107.default.createElement(TaskList, { tasks, totalTaskCount }));
|
|
114667
115880
|
};
|
|
114668
115881
|
var GenerateProject = ({ projectFolder, businessId, projectData, onDone, packageManager }) => {
|
|
114669
115882
|
const { execute: executeTaskRunner, status: taskRunnerStatus } = useTaskRunner();
|
|
114670
|
-
const generateProject = (0,
|
|
115883
|
+
const generateProject = (0, import_react107.useCallback)(async () => {
|
|
114671
115884
|
const wixConfigFilePath = getWixConfigFilePath(projectFolder);
|
|
114672
115885
|
const envFilePath = getEnvFilePath(projectFolder);
|
|
114673
115886
|
await writeJson(
|
|
@@ -114680,10 +115893,10 @@ var GenerateProject = ({ projectFolder, businessId, projectData, onDone, package
|
|
|
114680
115893
|
);
|
|
114681
115894
|
await updateEnvFile(envFilePath, projectData.environmentVariables);
|
|
114682
115895
|
}, [businessId, projectFolder, projectData]);
|
|
114683
|
-
const extendProject = (0,
|
|
115896
|
+
const extendProject = (0, import_react107.useCallback)(async () => {
|
|
114684
115897
|
await extend2(projectFolder);
|
|
114685
115898
|
}, [projectFolder]);
|
|
114686
|
-
const installDependencies = (0,
|
|
115899
|
+
const installDependencies = (0, import_react107.useCallback)(async () => {
|
|
114687
115900
|
try {
|
|
114688
115901
|
await packageManager.runInstall(projectFolder);
|
|
114689
115902
|
} catch (e2) {
|
|
@@ -114693,7 +115906,7 @@ var GenerateProject = ({ projectFolder, businessId, projectData, onDone, package
|
|
|
114693
115906
|
});
|
|
114694
115907
|
}
|
|
114695
115908
|
}, [projectFolder, packageManager]);
|
|
114696
|
-
const tasks = (0,
|
|
115909
|
+
const tasks = (0, import_react107.useMemo)(() => {
|
|
114697
115910
|
const result = [
|
|
114698
115911
|
{
|
|
114699
115912
|
action: generateProject,
|
|
@@ -114719,16 +115932,16 @@ var GenerateProject = ({ projectFolder, businessId, projectData, onDone, package
|
|
|
114719
115932
|
}, []);
|
|
114720
115933
|
return (0, import_variant34.match)(taskRunnerStatus, {
|
|
114721
115934
|
Idle: () => null,
|
|
114722
|
-
Running: (status) => /* @__PURE__ */
|
|
114723
|
-
Done: (status) => /* @__PURE__ */
|
|
115935
|
+
Running: (status) => /* @__PURE__ */ import_react107.default.createElement(GenerationProgress, { ...status }),
|
|
115936
|
+
Done: (status) => /* @__PURE__ */ import_react107.default.createElement(Box_default, { flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ import_react107.default.createElement(GenerationProgress, { ...status }), /* @__PURE__ */ import_react107.default.createElement(Box_default, { marginLeft: -2, marginTop: 1 }, /* @__PURE__ */ import_react107.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react107.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react107.default.createElement(Text2, null, "Project set up successfully"))))
|
|
114724
115937
|
});
|
|
114725
115938
|
};
|
|
114726
115939
|
|
|
114727
115940
|
// src/components/LinkCommand/FinishedSuccessfullyMessage.tsx
|
|
114728
115941
|
init_esm_shims();
|
|
114729
|
-
var
|
|
115942
|
+
var import_react108 = __toESM(require_react(), 1);
|
|
114730
115943
|
var FinishedSuccessfullyMessage = ({ packageManager }) => {
|
|
114731
|
-
return /* @__PURE__ */
|
|
115944
|
+
return /* @__PURE__ */ import_react108.default.createElement(
|
|
114732
115945
|
Box_default,
|
|
114733
115946
|
{
|
|
114734
115947
|
borderColor: "blue",
|
|
@@ -114740,8 +115953,8 @@ var FinishedSuccessfullyMessage = ({ packageManager }) => {
|
|
|
114740
115953
|
marginLeft: -2,
|
|
114741
115954
|
marginTop: 1
|
|
114742
115955
|
},
|
|
114743
|
-
/* @__PURE__ */
|
|
114744
|
-
/* @__PURE__ */
|
|
115956
|
+
/* @__PURE__ */ import_react108.default.createElement(Text2, { bold: true }, "Next Steps:"),
|
|
115957
|
+
/* @__PURE__ */ import_react108.default.createElement(UnorderedList, { gap: 1 }, /* @__PURE__ */ import_react108.default.createElement(UnorderedList.Item, { marker: "\u{1F45F}" }, /* @__PURE__ */ import_react108.default.createElement(Text2, null, "Start developing"), /* @__PURE__ */ import_react108.default.createElement(Text2, { skin: "info" }, `${packageManager.getRunCmd()} dev`)), /* @__PURE__ */ import_react108.default.createElement(UnorderedList.Item, { marker: /* @__PURE__ */ import_react108.default.createElement(Learn, null) }, /* @__PURE__ */ import_react108.default.createElement(Text2, null, "For guides and API references visit our"), /* @__PURE__ */ import_react108.default.createElement(Link, { skin: "info", url: "https://dev.wix.com/docs/go-headless" }, "documentation")), /* @__PURE__ */ import_react108.default.createElement(UnorderedList.Item, { marker: "\u{1F4AC}" }, /* @__PURE__ */ import_react108.default.createElement(Text2, null, "Join our"), /* @__PURE__ */ import_react108.default.createElement(Link, { skin: "info", url: "https://discord.gg/wixstudio" }, "Discord community")))
|
|
114745
115958
|
);
|
|
114746
115959
|
};
|
|
114747
115960
|
|
|
@@ -114762,10 +115975,10 @@ var LinkCommand = ({
|
|
|
114762
115975
|
projectName: preEnteredProjectName,
|
|
114763
115976
|
businessName: preEnteredBusinessName
|
|
114764
115977
|
}) => {
|
|
114765
|
-
const [businessName, setBusinessName] = (0,
|
|
114766
|
-
const [businessId, setBusinessId] = (0,
|
|
114767
|
-
const [projectData, setProjectData] = (0,
|
|
114768
|
-
const [isDone, setIsDone] = (0,
|
|
115978
|
+
const [businessName, setBusinessName] = (0, import_react109.useState)(preEnteredBusinessName);
|
|
115979
|
+
const [businessId, setBusinessId] = (0, import_react109.useState)();
|
|
115980
|
+
const [projectData, setProjectData] = (0, import_react109.useState)();
|
|
115981
|
+
const [isDone, setIsDone] = (0, import_react109.useState)(false);
|
|
114769
115982
|
const { status } = useAsync2(async () => {
|
|
114770
115983
|
const alreadyLinked = await isWixConfigExists(projectFolder);
|
|
114771
115984
|
if (alreadyLinked) {
|
|
@@ -114787,9 +116000,9 @@ var LinkCommand = ({
|
|
|
114787
116000
|
}, []);
|
|
114788
116001
|
return (0, import_variant35.match)(status, {
|
|
114789
116002
|
Error: () => null,
|
|
114790
|
-
Loading: () => /* @__PURE__ */
|
|
116003
|
+
Loading: () => /* @__PURE__ */ import_react109.default.createElement(Spinner2, { text: "Loading..." }),
|
|
114791
116004
|
Success: ({ result: { packageManager } }) => {
|
|
114792
|
-
return /* @__PURE__ */
|
|
116005
|
+
return /* @__PURE__ */ import_react109.default.createElement(
|
|
114793
116006
|
Box_default,
|
|
114794
116007
|
{
|
|
114795
116008
|
flexDirection: "column",
|
|
@@ -114800,14 +116013,14 @@ var LinkCommand = ({
|
|
|
114800
116013
|
borderTop: false,
|
|
114801
116014
|
paddingLeft: 1
|
|
114802
116015
|
},
|
|
114803
|
-
/* @__PURE__ */
|
|
114804
|
-
!preEnteredBusinessName && /* @__PURE__ */
|
|
116016
|
+
/* @__PURE__ */ import_react109.default.createElement(WelcomeMessage, null),
|
|
116017
|
+
!preEnteredBusinessName && /* @__PURE__ */ import_react109.default.createElement(
|
|
114805
116018
|
ChooseBusinessName,
|
|
114806
116019
|
{
|
|
114807
116020
|
onSubmit: ({ businessName: businessName2 }) => setBusinessName(businessName2)
|
|
114808
116021
|
}
|
|
114809
116022
|
),
|
|
114810
|
-
businessName && /* @__PURE__ */
|
|
116023
|
+
businessName && /* @__PURE__ */ import_react109.default.createElement(AccountAuthProvider, null, /* @__PURE__ */ import_react109.default.createElement(
|
|
114811
116024
|
CreateBusiness,
|
|
114812
116025
|
{
|
|
114813
116026
|
businessName,
|
|
@@ -114815,7 +116028,7 @@ var LinkCommand = ({
|
|
|
114815
116028
|
onDone: ({ businessId: businessId2 }) => setBusinessId(businessId2)
|
|
114816
116029
|
}
|
|
114817
116030
|
)),
|
|
114818
|
-
businessName && businessId && /* @__PURE__ */
|
|
116031
|
+
businessName && businessId && /* @__PURE__ */ import_react109.default.createElement(SiteAuthProvider, { siteId: businessId }, /* @__PURE__ */ import_react109.default.createElement(
|
|
114819
116032
|
CreateProject,
|
|
114820
116033
|
{
|
|
114821
116034
|
businessId,
|
|
@@ -114823,7 +116036,7 @@ var LinkCommand = ({
|
|
|
114823
116036
|
onSubmit: (data) => setProjectData(data)
|
|
114824
116037
|
}
|
|
114825
116038
|
)),
|
|
114826
|
-
businessName && businessId && projectData && /* @__PURE__ */
|
|
116039
|
+
businessName && businessId && projectData && /* @__PURE__ */ import_react109.default.createElement(
|
|
114827
116040
|
GenerateProject,
|
|
114828
116041
|
{
|
|
114829
116042
|
packageManager,
|
|
@@ -114833,7 +116046,7 @@ var LinkCommand = ({
|
|
|
114833
116046
|
onDone: () => setIsDone(true)
|
|
114834
116047
|
}
|
|
114835
116048
|
),
|
|
114836
|
-
businessName && businessId && projectData && isDone && /* @__PURE__ */
|
|
116049
|
+
businessName && businessId && projectData && isDone && /* @__PURE__ */ import_react109.default.createElement(FinishedSuccessfullyMessage, { packageManager })
|
|
114837
116050
|
);
|
|
114838
116051
|
}
|
|
114839
116052
|
});
|
|
@@ -114872,7 +116085,7 @@ function validateTemplateParams(value2) {
|
|
|
114872
116085
|
|
|
114873
116086
|
// src/components/ProcessCommand.tsx
|
|
114874
116087
|
init_esm_shims();
|
|
114875
|
-
var
|
|
116088
|
+
var import_react116 = __toESM(require_react(), 1);
|
|
114876
116089
|
var import_variant43 = __toESM(require_lib(), 1);
|
|
114877
116090
|
|
|
114878
116091
|
// src/parse-command-options.ts
|
|
@@ -115406,17 +116619,17 @@ var Ky = class _Ky {
|
|
|
115406
116619
|
};
|
|
115407
116620
|
|
|
115408
116621
|
// ../../node_modules/ky/distribution/index.js
|
|
115409
|
-
var createInstance3 = (
|
|
115410
|
-
const ky2 = (input, options) => Ky.create(input, validateAndMerge(
|
|
116622
|
+
var createInstance3 = (defaults4) => {
|
|
116623
|
+
const ky2 = (input, options) => Ky.create(input, validateAndMerge(defaults4, options));
|
|
115411
116624
|
for (const method of requestMethods) {
|
|
115412
|
-
ky2[method] = (input, options) => Ky.create(input, validateAndMerge(
|
|
116625
|
+
ky2[method] = (input, options) => Ky.create(input, validateAndMerge(defaults4, options, { method }));
|
|
115413
116626
|
}
|
|
115414
116627
|
ky2.create = (newDefaults) => createInstance3(validateAndMerge(newDefaults));
|
|
115415
116628
|
ky2.extend = (newDefaults) => {
|
|
115416
116629
|
if (typeof newDefaults === "function") {
|
|
115417
|
-
newDefaults = newDefaults(
|
|
116630
|
+
newDefaults = newDefaults(defaults4 ?? {});
|
|
115418
116631
|
}
|
|
115419
|
-
return createInstance3(validateAndMerge(
|
|
116632
|
+
return createInstance3(validateAndMerge(defaults4, newDefaults));
|
|
115420
116633
|
};
|
|
115421
116634
|
ky2.stop = stop;
|
|
115422
116635
|
return ky2;
|
|
@@ -115681,12 +116894,12 @@ async function parseCommandOptions(targetParentFolder2, options) {
|
|
|
115681
116894
|
|
|
115682
116895
|
// src/components/CreateHeadlessSiteCommand.tsx
|
|
115683
116896
|
init_esm_shims();
|
|
115684
|
-
var
|
|
116897
|
+
var import_react115 = __toESM(require_react(), 1);
|
|
115685
116898
|
var import_variant42 = __toESM(require_lib(), 1);
|
|
115686
116899
|
|
|
115687
116900
|
// src/components/ChooseFolder.tsx
|
|
115688
116901
|
init_esm_shims();
|
|
115689
|
-
var
|
|
116902
|
+
var import_react110 = __toESM(require_react(), 1);
|
|
115690
116903
|
var import_variant38 = __toESM(require_lib(), 1);
|
|
115691
116904
|
import { join as join18 } from "node:path";
|
|
115692
116905
|
var validateAppDirectory = async (targetParentFolder2, packageName) => {
|
|
@@ -115700,11 +116913,11 @@ var validateAppDirectory = async (targetParentFolder2, packageName) => {
|
|
|
115700
116913
|
});
|
|
115701
116914
|
};
|
|
115702
116915
|
var ChooseFolder = ({ initialFolderName, targetParentFolder: targetParentFolder2, onSubmit }) => {
|
|
115703
|
-
const validate3 = (0,
|
|
116916
|
+
const validate3 = (0, import_react110.useCallback)(
|
|
115704
116917
|
async (packageName) => validateAppDirectory(targetParentFolder2, packageName),
|
|
115705
116918
|
[targetParentFolder2]
|
|
115706
116919
|
);
|
|
115707
|
-
return /* @__PURE__ */
|
|
116920
|
+
return /* @__PURE__ */ import_react110.default.createElement(
|
|
115708
116921
|
TextInput2,
|
|
115709
116922
|
{
|
|
115710
116923
|
label: "In which directory do you want to create your application?",
|
|
@@ -115719,7 +116932,7 @@ var ChooseFolder = ({ initialFolderName, targetParentFolder: targetParentFolder2
|
|
|
115719
116932
|
// src/components/GenerateProject.tsx
|
|
115720
116933
|
init_esm_shims();
|
|
115721
116934
|
import { mkdir as mkdir3 } from "node:fs/promises";
|
|
115722
|
-
var
|
|
116935
|
+
var import_react111 = __toESM(require_react(), 1);
|
|
115723
116936
|
var import_variant39 = __toESM(require_lib(), 1);
|
|
115724
116937
|
import { join as join20 } from "node:path";
|
|
115725
116938
|
|
|
@@ -115764,7 +116977,7 @@ async function fetchTemplate(url2, path8 = ".") {
|
|
|
115764
116977
|
// src/components/GenerateProject.tsx
|
|
115765
116978
|
var headlessTemplatesGitUrl = "https://github.com/wix/headless-templates.git";
|
|
115766
116979
|
var GenerationProgress2 = ({ tasks, totalTaskCount }) => {
|
|
115767
|
-
return /* @__PURE__ */
|
|
116980
|
+
return /* @__PURE__ */ import_react111.default.createElement(import_react111.default.Fragment, null, /* @__PURE__ */ import_react111.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react111.default.createElement(Text2, null, "Generating your headless site...")), /* @__PURE__ */ import_react111.default.createElement(TaskList, { tasks, totalTaskCount }));
|
|
115768
116981
|
};
|
|
115769
116982
|
var GenerateProject2 = ({
|
|
115770
116983
|
repoType,
|
|
@@ -115779,11 +116992,11 @@ var GenerateProject2 = ({
|
|
|
115779
116992
|
}) => {
|
|
115780
116993
|
const { reportError: reportError2 } = useErrorReporter();
|
|
115781
116994
|
const { execute: executeTaskRunner, status: taskRunnerStatus } = useTaskRunner();
|
|
115782
|
-
const packageFolder = (0,
|
|
116995
|
+
const packageFolder = (0, import_react111.useMemo)(
|
|
115783
116996
|
() => join20(targetParentFolder2, folderName),
|
|
115784
116997
|
[folderName, targetParentFolder2]
|
|
115785
116998
|
);
|
|
115786
|
-
const generateProject = (0,
|
|
116999
|
+
const generateProject = (0, import_react111.useCallback)(async () => {
|
|
115787
117000
|
try {
|
|
115788
117001
|
await mkdir3(packageFolder, { recursive: true });
|
|
115789
117002
|
} catch (e2) {
|
|
@@ -115824,7 +117037,7 @@ var GenerateProject2 = ({
|
|
|
115824
117037
|
selectedTemplate,
|
|
115825
117038
|
commandOptions.templateParams
|
|
115826
117039
|
]);
|
|
115827
|
-
const extendProject = (0,
|
|
117040
|
+
const extendProject = (0, import_react111.useCallback)(async () => {
|
|
115828
117041
|
await extend2(packageFolder);
|
|
115829
117042
|
try {
|
|
115830
117043
|
await addFilesFromTemplate(
|
|
@@ -115843,7 +117056,7 @@ var GenerateProject2 = ({
|
|
|
115843
117056
|
packageManager,
|
|
115844
117057
|
repoType
|
|
115845
117058
|
]);
|
|
115846
|
-
const initializeGit = (0,
|
|
117059
|
+
const initializeGit = (0, import_react111.useCallback)(async () => {
|
|
115847
117060
|
try {
|
|
115848
117061
|
await gitInit(packageFolder);
|
|
115849
117062
|
} catch (e2) {
|
|
@@ -115853,7 +117066,7 @@ var GenerateProject2 = ({
|
|
|
115853
117066
|
});
|
|
115854
117067
|
}
|
|
115855
117068
|
}, [packageFolder]);
|
|
115856
|
-
const installDependencies = (0,
|
|
117069
|
+
const installDependencies = (0, import_react111.useCallback)(async () => {
|
|
115857
117070
|
try {
|
|
115858
117071
|
await packageManager.runInstall(packageFolder);
|
|
115859
117072
|
} catch (e2) {
|
|
@@ -115863,7 +117076,7 @@ var GenerateProject2 = ({
|
|
|
115863
117076
|
});
|
|
115864
117077
|
}
|
|
115865
117078
|
}, [packageFolder, packageManager]);
|
|
115866
|
-
const commitToGit = (0,
|
|
117079
|
+
const commitToGit = (0, import_react111.useCallback)(async () => {
|
|
115867
117080
|
try {
|
|
115868
117081
|
await gitCommit(packageFolder);
|
|
115869
117082
|
} catch (e2) {
|
|
@@ -115873,7 +117086,7 @@ var GenerateProject2 = ({
|
|
|
115873
117086
|
});
|
|
115874
117087
|
}
|
|
115875
117088
|
}, [packageFolder]);
|
|
115876
|
-
const tasks = (0,
|
|
117089
|
+
const tasks = (0, import_react111.useMemo)(() => {
|
|
115877
117090
|
const result = [
|
|
115878
117091
|
{
|
|
115879
117092
|
action: generateProject,
|
|
@@ -115923,16 +117136,16 @@ var GenerateProject2 = ({
|
|
|
115923
117136
|
}, []);
|
|
115924
117137
|
return (0, import_variant39.match)(taskRunnerStatus, {
|
|
115925
117138
|
Idle: () => null,
|
|
115926
|
-
Running: (status) => /* @__PURE__ */
|
|
115927
|
-
Done: (status) => /* @__PURE__ */
|
|
117139
|
+
Running: (status) => /* @__PURE__ */ import_react111.default.createElement(GenerationProgress2, { ...status }),
|
|
117140
|
+
Done: (status) => /* @__PURE__ */ import_react111.default.createElement(Box_default, { flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ import_react111.default.createElement(GenerationProgress2, { ...status }), /* @__PURE__ */ import_react111.default.createElement(Box_default, { marginLeft: -2, marginTop: 1 }, /* @__PURE__ */ import_react111.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react111.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react111.default.createElement(Text2, null, "Project set up successfully"))))
|
|
115928
117141
|
});
|
|
115929
117142
|
};
|
|
115930
117143
|
|
|
115931
117144
|
// src/components/ChooseTemplate.tsx
|
|
115932
117145
|
init_esm_shims();
|
|
115933
|
-
var
|
|
117146
|
+
var import_react112 = __toESM(require_react(), 1);
|
|
115934
117147
|
var ChooseTemplate = ({ onSubmit }) => {
|
|
115935
|
-
const options = (0,
|
|
117148
|
+
const options = (0, import_react112.useMemo)(() => {
|
|
115936
117149
|
return headlessTemplates.map((template) => ({
|
|
115937
117150
|
key: template.siteTemplateId,
|
|
115938
117151
|
title: template.title,
|
|
@@ -115940,7 +117153,7 @@ var ChooseTemplate = ({ onSubmit }) => {
|
|
|
115940
117153
|
value: template
|
|
115941
117154
|
}));
|
|
115942
117155
|
}, []);
|
|
115943
|
-
return /* @__PURE__ */
|
|
117156
|
+
return /* @__PURE__ */ import_react112.default.createElement(
|
|
115944
117157
|
SelectInput2,
|
|
115945
117158
|
{
|
|
115946
117159
|
label: "Choose an initial template for your business",
|
|
@@ -115952,14 +117165,14 @@ var ChooseTemplate = ({ onSubmit }) => {
|
|
|
115952
117165
|
|
|
115953
117166
|
// src/components/ReleaseProject.tsx
|
|
115954
117167
|
init_esm_shims();
|
|
115955
|
-
var
|
|
117168
|
+
var import_react114 = __toESM(require_react(), 1);
|
|
115956
117169
|
var import_variant41 = __toESM(require_lib(), 1);
|
|
115957
117170
|
|
|
115958
117171
|
// src/components/FinishedSuccessfullyMessage.tsx
|
|
115959
117172
|
init_esm_shims();
|
|
115960
|
-
var
|
|
117173
|
+
var import_react113 = __toESM(require_react(), 1);
|
|
115961
117174
|
var FinishedSuccessfullyMessage2 = ({ packageManager, folderName, projectData, isReleased }) => {
|
|
115962
|
-
return /* @__PURE__ */
|
|
117175
|
+
return /* @__PURE__ */ import_react113.default.createElement(
|
|
115963
117176
|
Box_default,
|
|
115964
117177
|
{
|
|
115965
117178
|
borderColor: "blue",
|
|
@@ -115971,9 +117184,9 @@ var FinishedSuccessfullyMessage2 = ({ packageManager, folderName, projectData, i
|
|
|
115971
117184
|
marginLeft: -2,
|
|
115972
117185
|
marginTop: 1
|
|
115973
117186
|
},
|
|
115974
|
-
isReleased && /* @__PURE__ */
|
|
115975
|
-
/* @__PURE__ */
|
|
115976
|
-
/* @__PURE__ */
|
|
117187
|
+
isReleased && /* @__PURE__ */ import_react113.default.createElement(Text2, { bold: true }, /* @__PURE__ */ import_react113.default.createElement(Rocket, null), " Visit your site at: ", projectData.baseUrl),
|
|
117188
|
+
/* @__PURE__ */ import_react113.default.createElement(Text2, { bold: true }, "Next Steps:"),
|
|
117189
|
+
/* @__PURE__ */ import_react113.default.createElement(UnorderedList, { gap: 1 }, /* @__PURE__ */ import_react113.default.createElement(UnorderedList.Item, { marker: "\u{1F45F}" }, /* @__PURE__ */ import_react113.default.createElement(Text2, null, "Start developing"), /* @__PURE__ */ import_react113.default.createElement(Text2, { skin: "info" }, `cd ${folderName}`), /* @__PURE__ */ import_react113.default.createElement(Text2, { skin: "info" }, `${packageManager.getRunCmd()} dev`)), /* @__PURE__ */ import_react113.default.createElement(UnorderedList.Item, { marker: /* @__PURE__ */ import_react113.default.createElement(Learn, null) }, /* @__PURE__ */ import_react113.default.createElement(Text2, null, "For guides and API references visit our"), /* @__PURE__ */ import_react113.default.createElement(Link, { skin: "info", url: "https://dev.wix.com/docs/go-headless" }, "documentation")), /* @__PURE__ */ import_react113.default.createElement(UnorderedList.Item, { marker: "\u{1F4AC}" }, /* @__PURE__ */ import_react113.default.createElement(Text2, null, "Join our"), /* @__PURE__ */ import_react113.default.createElement(Link, { skin: "info", url: "https://discord.gg/wixstudio" }, "Discord community")))
|
|
115977
117190
|
);
|
|
115978
117191
|
};
|
|
115979
117192
|
|
|
@@ -116029,7 +117242,7 @@ var ReleaseProject = ({
|
|
|
116029
117242
|
releaseNonInteractive
|
|
116030
117243
|
}) => {
|
|
116031
117244
|
const { status, execute } = useReleaseProject();
|
|
116032
|
-
(0,
|
|
117245
|
+
(0, import_react114.useEffect)(() => {
|
|
116033
117246
|
if (releaseNonInteractive != null) {
|
|
116034
117247
|
void execute({
|
|
116035
117248
|
confirmed: releaseNonInteractive,
|
|
@@ -116039,7 +117252,7 @@ var ReleaseProject = ({
|
|
|
116039
117252
|
});
|
|
116040
117253
|
}
|
|
116041
117254
|
}, []);
|
|
116042
|
-
return /* @__PURE__ */
|
|
117255
|
+
return /* @__PURE__ */ import_react114.default.createElement(import_react114.default.Fragment, null, releaseNonInteractive == null && /* @__PURE__ */ import_react114.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react114.default.createElement(
|
|
116043
117256
|
ConfirmInput,
|
|
116044
117257
|
{
|
|
116045
117258
|
label: "Would you like to publish your site now?",
|
|
@@ -116056,11 +117269,11 @@ var ReleaseProject = ({
|
|
|
116056
117269
|
)), (0, import_variant41.match)(status, {
|
|
116057
117270
|
NotRequested: () => null,
|
|
116058
117271
|
Success: ({ result }) => {
|
|
116059
|
-
return /* @__PURE__ */
|
|
116060
|
-
Success: () => /* @__PURE__ */
|
|
116061
|
-
Skipped: () => /* @__PURE__ */
|
|
116062
|
-
Error: () => /* @__PURE__ */
|
|
116063
|
-
}), /* @__PURE__ */
|
|
117272
|
+
return /* @__PURE__ */ import_react114.default.createElement(import_react114.default.Fragment, null, (0, import_variant41.match)(result, {
|
|
117273
|
+
Success: () => /* @__PURE__ */ import_react114.default.createElement(Box_default, { marginLeft: -2 }, /* @__PURE__ */ import_react114.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react114.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react114.default.createElement(Text2, null, "Site published successfully"))),
|
|
117274
|
+
Skipped: () => /* @__PURE__ */ import_react114.default.createElement(Text2, null, `No worries, you can publish your site later by running ${packageManager.getRunCmd()} release`),
|
|
117275
|
+
Error: () => /* @__PURE__ */ import_react114.default.createElement(Box_default, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ import_react114.default.createElement(Alert, { type: "error" }, "Failed to publish your site"), /* @__PURE__ */ import_react114.default.createElement(Text2, null, `No worries, you can publish your site later by running ${packageManager.getRunCmd()} release`))
|
|
117276
|
+
}), /* @__PURE__ */ import_react114.default.createElement(
|
|
116064
117277
|
FinishedSuccessfullyMessage2,
|
|
116065
117278
|
{
|
|
116066
117279
|
packageManager,
|
|
@@ -116071,7 +117284,7 @@ var ReleaseProject = ({
|
|
|
116071
117284
|
));
|
|
116072
117285
|
},
|
|
116073
117286
|
Error: () => null,
|
|
116074
|
-
Loading: () => /* @__PURE__ */
|
|
117287
|
+
Loading: () => /* @__PURE__ */ import_react114.default.createElement(Spinner2, { text: "Publishing your site..." })
|
|
116075
117288
|
}));
|
|
116076
117289
|
};
|
|
116077
117290
|
|
|
@@ -116084,16 +117297,16 @@ var CreateHeadlessSiteCommand = ({
|
|
|
116084
117297
|
projectName: defaultProjectName,
|
|
116085
117298
|
businessName: defaultBusinessName
|
|
116086
117299
|
}) => {
|
|
116087
|
-
const [businessName, setBusinessName] = (0,
|
|
117300
|
+
const [businessName, setBusinessName] = (0, import_react115.useState)(
|
|
116088
117301
|
defaultBusinessName
|
|
116089
117302
|
);
|
|
116090
|
-
const [selectedTemplate, setSelectedTemplate] = (0,
|
|
116091
|
-
const [folderName, setFolderName] = (0,
|
|
117303
|
+
const [selectedTemplate, setSelectedTemplate] = (0, import_react115.useState)(defaultTemplate);
|
|
117304
|
+
const [folderName, setFolderName] = (0, import_react115.useState)(
|
|
116092
117305
|
defaultProjectName
|
|
116093
117306
|
);
|
|
116094
|
-
const [businessId, setBusinessId] = (0,
|
|
116095
|
-
const [projectData, setProjectData] = (0,
|
|
116096
|
-
const [generationDone, setGenerationDone] = (0,
|
|
117307
|
+
const [businessId, setBusinessId] = (0, import_react115.useState)();
|
|
117308
|
+
const [projectData, setProjectData] = (0, import_react115.useState)();
|
|
117309
|
+
const [generationDone, setGenerationDone] = (0, import_react115.useState)(false);
|
|
116097
117310
|
const { status } = useAsync2(async () => {
|
|
116098
117311
|
const repoType = await getRepoType(targetParentFolder2);
|
|
116099
117312
|
const packageManager = await createPackageManager(repoType);
|
|
@@ -116102,9 +117315,9 @@ var CreateHeadlessSiteCommand = ({
|
|
|
116102
117315
|
}, []);
|
|
116103
117316
|
return (0, import_variant42.match)(status, {
|
|
116104
117317
|
Error: () => null,
|
|
116105
|
-
Loading: () => /* @__PURE__ */
|
|
117318
|
+
Loading: () => /* @__PURE__ */ import_react115.default.createElement(Spinner2, { text: "Loading..." }),
|
|
116106
117319
|
Success: ({ result: { packageManager, repoType } }) => {
|
|
116107
|
-
return /* @__PURE__ */
|
|
117320
|
+
return /* @__PURE__ */ import_react115.default.createElement(
|
|
116108
117321
|
Box_default,
|
|
116109
117322
|
{
|
|
116110
117323
|
flexDirection: "column",
|
|
@@ -116115,14 +117328,14 @@ var CreateHeadlessSiteCommand = ({
|
|
|
116115
117328
|
borderTop: false,
|
|
116116
117329
|
paddingLeft: 1
|
|
116117
117330
|
},
|
|
116118
|
-
/* @__PURE__ */
|
|
116119
|
-
!defaultBusinessName && /* @__PURE__ */
|
|
117331
|
+
/* @__PURE__ */ import_react115.default.createElement(WelcomeMessage, null),
|
|
117332
|
+
!defaultBusinessName && /* @__PURE__ */ import_react115.default.createElement(
|
|
116120
117333
|
ChooseBusinessName,
|
|
116121
117334
|
{
|
|
116122
117335
|
onSubmit: ({ businessName: businessName2 }) => setBusinessName(businessName2)
|
|
116123
117336
|
}
|
|
116124
117337
|
),
|
|
116125
|
-
!defaultTemplate && businessName && /* @__PURE__ */
|
|
117338
|
+
!defaultTemplate && businessName && /* @__PURE__ */ import_react115.default.createElement(
|
|
116126
117339
|
ChooseTemplate,
|
|
116127
117340
|
{
|
|
116128
117341
|
onSubmit: ({ template }) => {
|
|
@@ -116130,7 +117343,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
116130
117343
|
}
|
|
116131
117344
|
}
|
|
116132
117345
|
),
|
|
116133
|
-
businessName && selectedTemplate && /* @__PURE__ */
|
|
117346
|
+
businessName && selectedTemplate && /* @__PURE__ */ import_react115.default.createElement(AccountAuthProvider, null, /* @__PURE__ */ import_react115.default.createElement(
|
|
116134
117347
|
CreateBusiness,
|
|
116135
117348
|
{
|
|
116136
117349
|
businessName,
|
|
@@ -116138,7 +117351,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
116138
117351
|
onDone: ({ businessId: businessId2 }) => setBusinessId(businessId2)
|
|
116139
117352
|
}
|
|
116140
117353
|
)),
|
|
116141
|
-
businessName && selectedTemplate && businessId && /* @__PURE__ */
|
|
117354
|
+
businessName && selectedTemplate && businessId && /* @__PURE__ */ import_react115.default.createElement(SiteAuthProvider, { siteId: businessId }, /* @__PURE__ */ import_react115.default.createElement(
|
|
116142
117355
|
CreateProject,
|
|
116143
117356
|
{
|
|
116144
117357
|
businessId,
|
|
@@ -116146,7 +117359,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
116146
117359
|
onSubmit: (data) => setProjectData(data)
|
|
116147
117360
|
}
|
|
116148
117361
|
)),
|
|
116149
|
-
!defaultProjectName && businessName && selectedTemplate && businessId && projectData && /* @__PURE__ */
|
|
117362
|
+
!defaultProjectName && businessName && selectedTemplate && businessId && projectData && /* @__PURE__ */ import_react115.default.createElement(
|
|
116150
117363
|
ChooseFolder,
|
|
116151
117364
|
{
|
|
116152
117365
|
initialFolderName: projectData.projectName,
|
|
@@ -116154,7 +117367,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
116154
117367
|
onSubmit: ({ folderName: folderName2 }) => setFolderName(folderName2)
|
|
116155
117368
|
}
|
|
116156
117369
|
),
|
|
116157
|
-
businessName && selectedTemplate && businessId && projectData && folderName && /* @__PURE__ */
|
|
117370
|
+
businessName && selectedTemplate && businessId && projectData && folderName && /* @__PURE__ */ import_react115.default.createElement(
|
|
116158
117371
|
GenerateProject2,
|
|
116159
117372
|
{
|
|
116160
117373
|
folderName,
|
|
@@ -116168,7 +117381,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
116168
117381
|
onDone: (isDone) => setGenerationDone(isDone)
|
|
116169
117382
|
}
|
|
116170
117383
|
),
|
|
116171
|
-
businessName && selectedTemplate && businessId && projectData && folderName && generationDone && /* @__PURE__ */
|
|
117384
|
+
businessName && selectedTemplate && businessId && projectData && folderName && generationDone && /* @__PURE__ */ import_react115.default.createElement(
|
|
116172
117385
|
ReleaseProject,
|
|
116173
117386
|
{
|
|
116174
117387
|
folderName,
|
|
@@ -116208,9 +117421,9 @@ var ProcessCommand = ({ targetParentFolder: targetParentFolder2, commandOptions
|
|
|
116208
117421
|
}, []);
|
|
116209
117422
|
return (0, import_variant43.match)(status, {
|
|
116210
117423
|
Error: () => null,
|
|
116211
|
-
Loading: () => /* @__PURE__ */
|
|
117424
|
+
Loading: () => /* @__PURE__ */ import_react116.default.createElement(Spinner2, { text: "Loading..." }),
|
|
116212
117425
|
Success: ({ result: { template, projectName, businessName, publish } }) => {
|
|
116213
|
-
return /* @__PURE__ */
|
|
117426
|
+
return /* @__PURE__ */ import_react116.default.createElement(
|
|
116214
117427
|
CreateHeadlessSiteCommand,
|
|
116215
117428
|
{
|
|
116216
117429
|
targetParentFolder: targetParentFolder2,
|
|
@@ -116262,17 +117475,22 @@ program2.command("link").description("Link current project to use Wix as deploym
|
|
|
116262
117475
|
errorReporter,
|
|
116263
117476
|
userInfo?.userId
|
|
116264
117477
|
);
|
|
117478
|
+
const panorama = await createPanorama({
|
|
117479
|
+
artifact: package_default.wix.artifact,
|
|
117480
|
+
version: package_default.version,
|
|
117481
|
+
userId: userInfo?.userId
|
|
117482
|
+
});
|
|
116265
117483
|
const commandStatus = reportCommandStartEvent2(command);
|
|
116266
117484
|
try {
|
|
116267
117485
|
await render2(
|
|
116268
|
-
/* @__PURE__ */
|
|
117486
|
+
/* @__PURE__ */ import_react117.default.createElement(BiProvider, { value: biLogger }, /* @__PURE__ */ import_react117.default.createElement(ErrorReporterProvider, { value: errorReporter }, /* @__PURE__ */ import_react117.default.createElement(PanoramaProvider, { value: panorama }, /* @__PURE__ */ import_react117.default.createElement(
|
|
116269
117487
|
LinkCommand,
|
|
116270
117488
|
{
|
|
116271
117489
|
projectName: options.projectName,
|
|
116272
117490
|
businessName: options.businessName,
|
|
116273
117491
|
projectFolder: targetParentFolder
|
|
116274
117492
|
}
|
|
116275
|
-
)))
|
|
117493
|
+
))))
|
|
116276
117494
|
);
|
|
116277
117495
|
commandStatus.succeed();
|
|
116278
117496
|
} catch (e2) {
|
|
@@ -116336,16 +117554,21 @@ program2.command("init", { isDefault: true }).description("Create headless site"
|
|
|
116336
117554
|
errorReporter,
|
|
116337
117555
|
userInfo?.userId
|
|
116338
117556
|
);
|
|
117557
|
+
const panorama = await createPanorama({
|
|
117558
|
+
artifact: package_default.wix.artifact,
|
|
117559
|
+
version: package_default.version,
|
|
117560
|
+
userId: userInfo?.userId
|
|
117561
|
+
});
|
|
116339
117562
|
const commandStatus = reportCommandStartEvent2(command);
|
|
116340
117563
|
try {
|
|
116341
117564
|
await render2(
|
|
116342
|
-
/* @__PURE__ */
|
|
117565
|
+
/* @__PURE__ */ import_react117.default.createElement(BiProvider, { value: biLogger }, /* @__PURE__ */ import_react117.default.createElement(ErrorReporterProvider, { value: errorReporter }, /* @__PURE__ */ import_react117.default.createElement(PanoramaProvider, { value: panorama }, /* @__PURE__ */ import_react117.default.createElement(
|
|
116343
117566
|
ProcessCommand,
|
|
116344
117567
|
{
|
|
116345
117568
|
targetParentFolder,
|
|
116346
117569
|
commandOptions: options
|
|
116347
117570
|
}
|
|
116348
|
-
)))
|
|
117571
|
+
))))
|
|
116349
117572
|
);
|
|
116350
117573
|
commandStatus.succeed();
|
|
116351
117574
|
} catch (e2) {
|