@wix/create-new 0.0.34 → 0.0.35
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/{chunk-2HGCGDHC.js → chunk-A4KF6LJN.js} +4 -2
- package/build/chunk-A4KF6LJN.js.map +1 -0
- package/build/{generator-2M4JKPFM.js → generator-44WTFHH3.js} +2 -2
- package/build/index.js +1300 -896
- package/build/index.js.map +1 -1
- package/package.json +2 -2
- package/build/chunk-2HGCGDHC.js.map +0 -1
- /package/build/{generator-2M4JKPFM.js.map → generator-44WTFHH3.js.map} +0 -0
package/build/index.js
CHANGED
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
writeJson,
|
|
113
113
|
writePackageJson,
|
|
114
114
|
zod_default
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-A4KF6LJN.js";
|
|
116
116
|
import {
|
|
117
117
|
__commonJS,
|
|
118
118
|
__dirname,
|
|
@@ -3374,20 +3374,20 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
3374
3374
|
let debugOption;
|
|
3375
3375
|
let debugHost = "127.0.0.1";
|
|
3376
3376
|
let debugPort = "9229";
|
|
3377
|
-
let
|
|
3378
|
-
if ((
|
|
3379
|
-
debugOption =
|
|
3380
|
-
} else if ((
|
|
3381
|
-
debugOption =
|
|
3382
|
-
if (/^\d+$/.test(
|
|
3383
|
-
debugPort =
|
|
3377
|
+
let match35;
|
|
3378
|
+
if ((match35 = arg.match(/^(--inspect(-brk)?)$/)) !== null) {
|
|
3379
|
+
debugOption = match35[1];
|
|
3380
|
+
} else if ((match35 = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null) {
|
|
3381
|
+
debugOption = match35[1];
|
|
3382
|
+
if (/^\d+$/.test(match35[3])) {
|
|
3383
|
+
debugPort = match35[3];
|
|
3384
3384
|
} else {
|
|
3385
|
-
debugHost =
|
|
3385
|
+
debugHost = match35[3];
|
|
3386
3386
|
}
|
|
3387
|
-
} else if ((
|
|
3388
|
-
debugOption =
|
|
3389
|
-
debugHost =
|
|
3390
|
-
debugPort =
|
|
3387
|
+
} else if ((match35 = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/)) !== null) {
|
|
3388
|
+
debugOption = match35[1];
|
|
3389
|
+
debugHost = match35[3];
|
|
3390
|
+
debugPort = match35[4];
|
|
3391
3391
|
}
|
|
3392
3392
|
if (debugOption && debugPort !== "0") {
|
|
3393
3393
|
return `${debugOption}=${debugHost}:${parseInt(debugPort) + 1}`;
|
|
@@ -5254,14 +5254,14 @@ var require_ms = __commonJS({
|
|
|
5254
5254
|
if (str.length > 100) {
|
|
5255
5255
|
return;
|
|
5256
5256
|
}
|
|
5257
|
-
var
|
|
5257
|
+
var match35 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
|
5258
5258
|
str
|
|
5259
5259
|
);
|
|
5260
|
-
if (!
|
|
5260
|
+
if (!match35) {
|
|
5261
5261
|
return;
|
|
5262
5262
|
}
|
|
5263
|
-
var n3 = parseFloat(
|
|
5264
|
-
var type = (
|
|
5263
|
+
var n3 = parseFloat(match35[1]);
|
|
5264
|
+
var type = (match35[2] || "ms").toLowerCase();
|
|
5265
5265
|
switch (type) {
|
|
5266
5266
|
case "years":
|
|
5267
5267
|
case "year":
|
|
@@ -5394,19 +5394,19 @@ var require_common = __commonJS({
|
|
|
5394
5394
|
args.unshift("%O");
|
|
5395
5395
|
}
|
|
5396
5396
|
let index = 0;
|
|
5397
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, (
|
|
5398
|
-
if (
|
|
5397
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match35, format2) => {
|
|
5398
|
+
if (match35 === "%%") {
|
|
5399
5399
|
return "%";
|
|
5400
5400
|
}
|
|
5401
5401
|
index++;
|
|
5402
5402
|
const formatter = createDebug.formatters[format2];
|
|
5403
5403
|
if (typeof formatter === "function") {
|
|
5404
5404
|
const val = args[index];
|
|
5405
|
-
|
|
5405
|
+
match35 = formatter.call(self2, val);
|
|
5406
5406
|
args.splice(index, 1);
|
|
5407
5407
|
index--;
|
|
5408
5408
|
}
|
|
5409
|
-
return
|
|
5409
|
+
return match35;
|
|
5410
5410
|
});
|
|
5411
5411
|
createDebug.formatArgs.call(self2, args);
|
|
5412
5412
|
const logFn = self2.log || createDebug.log;
|
|
@@ -5643,12 +5643,12 @@ var require_browser = __commonJS({
|
|
|
5643
5643
|
args.splice(1, 0, c2, "color: inherit");
|
|
5644
5644
|
let index = 0;
|
|
5645
5645
|
let lastC = 0;
|
|
5646
|
-
args[0].replace(/%[a-zA-Z%]/g, (
|
|
5647
|
-
if (
|
|
5646
|
+
args[0].replace(/%[a-zA-Z%]/g, (match35) => {
|
|
5647
|
+
if (match35 === "%%") {
|
|
5648
5648
|
return;
|
|
5649
5649
|
}
|
|
5650
5650
|
index++;
|
|
5651
|
-
if (
|
|
5651
|
+
if (match35 === "%c") {
|
|
5652
5652
|
lastC = index;
|
|
5653
5653
|
}
|
|
5654
5654
|
});
|
|
@@ -6951,8 +6951,8 @@ var require_cookies = __commonJS({
|
|
|
6951
6951
|
document.cookie = cookie.join("; ");
|
|
6952
6952
|
},
|
|
6953
6953
|
read: function read(name) {
|
|
6954
|
-
var
|
|
6955
|
-
return
|
|
6954
|
+
var match35 = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
|
|
6955
|
+
return match35 ? decodeURIComponent(match35[3]) : null;
|
|
6956
6956
|
},
|
|
6957
6957
|
remove: function remove(name) {
|
|
6958
6958
|
this.write(name, "", Date.now() - 864e5);
|
|
@@ -14911,21 +14911,21 @@ var require_stack_utils = __commonJS({
|
|
|
14911
14911
|
return res;
|
|
14912
14912
|
}
|
|
14913
14913
|
parseLine(line) {
|
|
14914
|
-
const
|
|
14915
|
-
if (!
|
|
14914
|
+
const match35 = line && line.match(re);
|
|
14915
|
+
if (!match35) {
|
|
14916
14916
|
return null;
|
|
14917
14917
|
}
|
|
14918
|
-
const ctor =
|
|
14919
|
-
let fname =
|
|
14920
|
-
const evalOrigin =
|
|
14921
|
-
const evalFile =
|
|
14922
|
-
const evalLine = Number(
|
|
14923
|
-
const evalCol = Number(
|
|
14924
|
-
let file =
|
|
14925
|
-
const lnum =
|
|
14926
|
-
const col =
|
|
14927
|
-
const native =
|
|
14928
|
-
const closeParen =
|
|
14918
|
+
const ctor = match35[1] === "new";
|
|
14919
|
+
let fname = match35[2];
|
|
14920
|
+
const evalOrigin = match35[3];
|
|
14921
|
+
const evalFile = match35[4];
|
|
14922
|
+
const evalLine = Number(match35[5]);
|
|
14923
|
+
const evalCol = Number(match35[6]);
|
|
14924
|
+
let file = match35[7];
|
|
14925
|
+
const lnum = match35[8];
|
|
14926
|
+
const col = match35[9];
|
|
14927
|
+
const native = match35[10] === "native";
|
|
14928
|
+
const closeParen = match35[11] === ")";
|
|
14929
14929
|
let method;
|
|
14930
14930
|
const res = {};
|
|
14931
14931
|
if (lnum) {
|
|
@@ -15349,12 +15349,12 @@ var require_lodash = __commonJS({
|
|
|
15349
15349
|
Stack.prototype.has = stackHas;
|
|
15350
15350
|
Stack.prototype.set = stackSet;
|
|
15351
15351
|
function arrayLikeKeys(value2, inherited) {
|
|
15352
|
-
var isArr = isArray3(value2), isArg = !isArr && isArguments(value2), isBuff = !isArr && !isArg && isBuffer(value2),
|
|
15352
|
+
var isArr = isArray3(value2), isArg = !isArr && isArguments(value2), isBuff = !isArr && !isArg && isBuffer(value2), isType21 = !isArr && !isArg && !isBuff && isTypedArray(value2), skipIndexes = isArr || isArg || isBuff || isType21, result = skipIndexes ? baseTimes(value2.length, String) : [], length = result.length;
|
|
15353
15353
|
for (var key in value2) {
|
|
15354
15354
|
if ((inherited || hasOwnProperty3.call(value2, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
15355
15355
|
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
15356
15356
|
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
15357
|
-
|
|
15357
|
+
isType21 && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
|
|
15358
15358
|
isIndex(key, length)))) {
|
|
15359
15359
|
result.push(key);
|
|
15360
15360
|
}
|
|
@@ -18973,15 +18973,15 @@ var init_TraceState = __esm({
|
|
|
18973
18973
|
|
|
18974
18974
|
// ../../node_modules/@opentelemetry/core/build/esm/trace/W3CTraceContextPropagator.js
|
|
18975
18975
|
function parseTraceParent(traceParent) {
|
|
18976
|
-
var
|
|
18977
|
-
if (!
|
|
18976
|
+
var match35 = TRACE_PARENT_REGEX.exec(traceParent);
|
|
18977
|
+
if (!match35)
|
|
18978
18978
|
return null;
|
|
18979
|
-
if (
|
|
18979
|
+
if (match35[1] === "00" && match35[5])
|
|
18980
18980
|
return null;
|
|
18981
18981
|
return {
|
|
18982
|
-
traceId:
|
|
18983
|
-
spanId:
|
|
18984
|
-
traceFlags: parseInt(
|
|
18982
|
+
traceId: match35[2],
|
|
18983
|
+
spanId: match35[3],
|
|
18984
|
+
traceFlags: parseInt(match35[4], 16)
|
|
18985
18985
|
};
|
|
18986
18986
|
}
|
|
18987
18987
|
var TRACE_PARENT_HEADER, TRACE_STATE_HEADER, VERSION2, VERSION_PART, TRACE_ID_PART, PARENT_ID_PART, FLAGS_PART, TRACE_PARENT_REGEX, W3CTraceContextPropagator;
|
|
@@ -20083,8 +20083,8 @@ var require_semver = __commonJS({
|
|
|
20083
20083
|
}
|
|
20084
20084
|
if (identifier) {
|
|
20085
20085
|
const r2 = new RegExp(`^${this.options.loose ? src[t3.PRERELEASELOOSE] : src[t3.PRERELEASE]}$`);
|
|
20086
|
-
const
|
|
20087
|
-
if (!
|
|
20086
|
+
const match35 = `-${identifier}`.match(r2);
|
|
20087
|
+
if (!match35 || match35[1] !== identifier) {
|
|
20088
20088
|
throw new Error(`invalid identifier: ${identifier}`);
|
|
20089
20089
|
}
|
|
20090
20090
|
}
|
|
@@ -20567,28 +20567,28 @@ var require_coerce = __commonJS({
|
|
|
20567
20567
|
return null;
|
|
20568
20568
|
}
|
|
20569
20569
|
options = options || {};
|
|
20570
|
-
let
|
|
20570
|
+
let match35 = null;
|
|
20571
20571
|
if (!options.rtl) {
|
|
20572
|
-
|
|
20572
|
+
match35 = version.match(options.includePrerelease ? re[t3.COERCEFULL] : re[t3.COERCE]);
|
|
20573
20573
|
} else {
|
|
20574
20574
|
const coerceRtlRegex = options.includePrerelease ? re[t3.COERCERTLFULL] : re[t3.COERCERTL];
|
|
20575
20575
|
let next;
|
|
20576
|
-
while ((next = coerceRtlRegex.exec(version)) && (!
|
|
20577
|
-
if (!
|
|
20578
|
-
|
|
20576
|
+
while ((next = coerceRtlRegex.exec(version)) && (!match35 || match35.index + match35[0].length !== version.length)) {
|
|
20577
|
+
if (!match35 || next.index + next[0].length !== match35.index + match35[0].length) {
|
|
20578
|
+
match35 = next;
|
|
20579
20579
|
}
|
|
20580
20580
|
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
20581
20581
|
}
|
|
20582
20582
|
coerceRtlRegex.lastIndex = -1;
|
|
20583
20583
|
}
|
|
20584
|
-
if (
|
|
20584
|
+
if (match35 === null) {
|
|
20585
20585
|
return null;
|
|
20586
20586
|
}
|
|
20587
|
-
const major =
|
|
20588
|
-
const minor =
|
|
20589
|
-
const patch =
|
|
20590
|
-
const prerelease = options.includePrerelease &&
|
|
20591
|
-
const build = options.includePrerelease &&
|
|
20587
|
+
const major = match35[2];
|
|
20588
|
+
const minor = match35[3] || "0";
|
|
20589
|
+
const patch = match35[4] || "0";
|
|
20590
|
+
const prerelease = options.includePrerelease && match35[5] ? `-${match35[5]}` : "";
|
|
20591
|
+
const build = options.includePrerelease && match35[6] ? `+${match35[6]}` : "";
|
|
20592
20592
|
return parse4(`${major}.${minor}.${patch}${prerelease}${build}`, options);
|
|
20593
20593
|
};
|
|
20594
20594
|
module2.exports = coerce;
|
|
@@ -32759,16 +32759,16 @@ var require_util = __commonJS({
|
|
|
32759
32759
|
var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
|
|
32760
32760
|
var dataUrlRegexp = /^data:.+\,.+$/;
|
|
32761
32761
|
function urlParse(aUrl) {
|
|
32762
|
-
var
|
|
32763
|
-
if (!
|
|
32762
|
+
var match35 = aUrl.match(urlRegexp);
|
|
32763
|
+
if (!match35) {
|
|
32764
32764
|
return null;
|
|
32765
32765
|
}
|
|
32766
32766
|
return {
|
|
32767
|
-
scheme:
|
|
32768
|
-
auth:
|
|
32769
|
-
host:
|
|
32770
|
-
port:
|
|
32771
|
-
path:
|
|
32767
|
+
scheme: match35[1],
|
|
32768
|
+
auth: match35[2],
|
|
32769
|
+
host: match35[3],
|
|
32770
|
+
port: match35[4],
|
|
32771
|
+
path: match35[5]
|
|
32772
32772
|
};
|
|
32773
32773
|
}
|
|
32774
32774
|
exports.urlParse = urlParse;
|
|
@@ -39769,7 +39769,7 @@ var require_lib3 = __commonJS({
|
|
|
39769
39769
|
}
|
|
39770
39770
|
}
|
|
39771
39771
|
};
|
|
39772
|
-
var
|
|
39772
|
+
var State4 = class _State {
|
|
39773
39773
|
constructor() {
|
|
39774
39774
|
this.flags = 1024;
|
|
39775
39775
|
this.startIndex = void 0;
|
|
@@ -40083,8 +40083,8 @@ var require_lib3 = __commonJS({
|
|
|
40083
40083
|
default:
|
|
40084
40084
|
if (ch >= 48 && ch <= 55) {
|
|
40085
40085
|
const startPos = pos - 1;
|
|
40086
|
-
const
|
|
40087
|
-
let octalStr =
|
|
40086
|
+
const match35 = /^[0-7]+/.exec(input.slice(startPos, pos + 2));
|
|
40087
|
+
let octalStr = match35[0];
|
|
40088
40088
|
let octal = parseInt(octalStr, 8);
|
|
40089
40089
|
if (octal > 255) {
|
|
40090
40090
|
octalStr = octalStr.slice(0, -1);
|
|
@@ -40268,7 +40268,7 @@ var require_lib3 = __commonJS({
|
|
|
40268
40268
|
throw this.raise(Errors.UnterminatedTemplate, buildPosition(pos, lineStart, curLine));
|
|
40269
40269
|
}
|
|
40270
40270
|
});
|
|
40271
|
-
this.state = new
|
|
40271
|
+
this.state = new State4();
|
|
40272
40272
|
this.state.init(options);
|
|
40273
40273
|
this.input = input;
|
|
40274
40274
|
this.length = input.length;
|
|
@@ -50666,13 +50666,14 @@ function createApiKeyAuthState({
|
|
|
50666
50666
|
siteId
|
|
50667
50667
|
}) {
|
|
50668
50668
|
return {
|
|
50669
|
-
getAccessToken: async () => token2,
|
|
50669
|
+
getAccessToken: async (_options) => token2,
|
|
50670
50670
|
getRefreshToken: () => {
|
|
50671
50671
|
throw new Error("API key auth does not support refresh tokens");
|
|
50672
50672
|
},
|
|
50673
|
-
getRequestHeaders: () => {
|
|
50674
|
-
|
|
50675
|
-
|
|
50673
|
+
getRequestHeaders: (options) => {
|
|
50674
|
+
const siteIdToUse = siteId ?? options?.siteId;
|
|
50675
|
+
if (siteIdToUse) {
|
|
50676
|
+
return { "wix-site-id": siteIdToUse };
|
|
50676
50677
|
}
|
|
50677
50678
|
return { "wix-account-id": accountId };
|
|
50678
50679
|
},
|
|
@@ -50709,7 +50710,7 @@ var apiKeyAuthStrategy = {
|
|
|
50709
50710
|
}
|
|
50710
50711
|
};
|
|
50711
50712
|
|
|
50712
|
-
// ../cli-auth/src/auth-strategies/
|
|
50713
|
+
// ../cli-auth/src/auth-strategies/unified-auth-strategy.ts
|
|
50713
50714
|
init_esm_shims();
|
|
50714
50715
|
|
|
50715
50716
|
// ../../node_modules/p-limit/index.js
|
|
@@ -50847,7 +50848,11 @@ function validateConcurrency(concurrency) {
|
|
|
50847
50848
|
}
|
|
50848
50849
|
}
|
|
50849
50850
|
|
|
50851
|
+
// ../cli-auth/src/auth-strategies/unified-auth-strategy.ts
|
|
50852
|
+
var import_variant6 = __toESM(require_lib(), 1);
|
|
50853
|
+
|
|
50850
50854
|
// ../cli-auth/src/auth-strategies/account-auth-strategy.ts
|
|
50855
|
+
init_esm_shims();
|
|
50851
50856
|
var import_variant4 = __toESM(require_lib(), 1);
|
|
50852
50857
|
|
|
50853
50858
|
// ../../node_modules/p-wait-for/index.js
|
|
@@ -50990,7 +50995,16 @@ pWaitFor.resolveWith = (value2) => ({ [resolveValue]: value2 });
|
|
|
50990
50995
|
|
|
50991
50996
|
// ../cli-auth/src/auth-strategies/account-auth-strategy.ts
|
|
50992
50997
|
var seconds = (n3) => 1e3 * n3;
|
|
50993
|
-
async function
|
|
50998
|
+
async function finalizeLogin(tokenData) {
|
|
50999
|
+
const userInfo2 = await client.userInfo({
|
|
51000
|
+
accessToken: tokenData.accessToken
|
|
51001
|
+
});
|
|
51002
|
+
const result = { ...tokenData, userInfo: userInfo2 };
|
|
51003
|
+
await deleteAuthData();
|
|
51004
|
+
await saveAuthData(result);
|
|
51005
|
+
return result;
|
|
51006
|
+
}
|
|
51007
|
+
async function loginWithDeviceCode({ deviceCode: deviceCode2, expiresIn }, { signal }) {
|
|
50994
51008
|
try {
|
|
50995
51009
|
const authData = await pWaitFor(
|
|
50996
51010
|
async () => {
|
|
@@ -51007,17 +51021,11 @@ async function waitForLogin({ deviceCode: deviceCode2, expiresIn }, { signal })
|
|
|
51007
51021
|
}
|
|
51008
51022
|
},
|
|
51009
51023
|
{
|
|
51010
|
-
interval: getTestOverrides().
|
|
51024
|
+
interval: getTestOverrides().loginWithDeviceCodeInterval ?? seconds(3),
|
|
51011
51025
|
timeout: { milliseconds: seconds(expiresIn), signal }
|
|
51012
51026
|
}
|
|
51013
51027
|
);
|
|
51014
|
-
|
|
51015
|
-
accessToken: authData.accessToken
|
|
51016
|
-
});
|
|
51017
|
-
const result = { ...authData, userInfo: userInfo2 };
|
|
51018
|
-
await deleteAuthData();
|
|
51019
|
-
await saveAuthData(result);
|
|
51020
|
-
return result;
|
|
51028
|
+
return await finalizeLogin(authData);
|
|
51021
51029
|
} catch (error) {
|
|
51022
51030
|
if (error instanceof TimeoutError) {
|
|
51023
51031
|
throw new CliError({
|
|
@@ -51028,7 +51036,22 @@ async function waitForLogin({ deviceCode: deviceCode2, expiresIn }, { signal })
|
|
|
51028
51036
|
throw error;
|
|
51029
51037
|
}
|
|
51030
51038
|
}
|
|
51031
|
-
async function
|
|
51039
|
+
async function loginWithRefreshToken({
|
|
51040
|
+
refreshToken
|
|
51041
|
+
}) {
|
|
51042
|
+
const renewTokenResult = await client.renewToken({ refreshToken });
|
|
51043
|
+
if ((0, import_variant4.isType)(renewTokenResult, RenewTokenData.TokenRenewed)) {
|
|
51044
|
+
return await finalizeLogin(renewTokenResult.payload);
|
|
51045
|
+
}
|
|
51046
|
+
throw new CliError({
|
|
51047
|
+
code: CliErrorCode.FailedToLoginWithRefreshToken(),
|
|
51048
|
+
cause: null
|
|
51049
|
+
});
|
|
51050
|
+
}
|
|
51051
|
+
async function renewAccountAuth({
|
|
51052
|
+
refreshToken,
|
|
51053
|
+
userInfo: userInfo2
|
|
51054
|
+
}) {
|
|
51032
51055
|
const renewTokenResult = await client.renewToken({ refreshToken });
|
|
51033
51056
|
if ((0, import_variant4.isType)(renewTokenResult, RenewTokenData.TokenRenewed)) {
|
|
51034
51057
|
await saveAuthData({ ...renewTokenResult.payload, userInfo: userInfo2 });
|
|
@@ -51052,74 +51075,6 @@ async function getNonExpiredAccountAuth() {
|
|
|
51052
51075
|
}
|
|
51053
51076
|
});
|
|
51054
51077
|
}
|
|
51055
|
-
function createAccountAuthState({
|
|
51056
|
-
userInfo: userInfo2,
|
|
51057
|
-
...initialTokenData
|
|
51058
|
-
}) {
|
|
51059
|
-
const limiter = pLimit(1);
|
|
51060
|
-
let tokenData = { ...initialTokenData };
|
|
51061
|
-
return {
|
|
51062
|
-
getAccessToken: () => {
|
|
51063
|
-
return limiter(async () => {
|
|
51064
|
-
if (isValidToken(tokenData)) {
|
|
51065
|
-
return tokenData.accessToken;
|
|
51066
|
-
}
|
|
51067
|
-
const renewTokenResult = await renewAccountAuth({
|
|
51068
|
-
...tokenData,
|
|
51069
|
-
userInfo: userInfo2
|
|
51070
|
-
});
|
|
51071
|
-
return (0, import_variant4.match)(renewTokenResult, {
|
|
51072
|
-
TokenRenewed: ({ payload: newTokenData }) => {
|
|
51073
|
-
tokenData = newTokenData;
|
|
51074
|
-
return tokenData.accessToken;
|
|
51075
|
-
},
|
|
51076
|
-
RefreshTokenRevoked: ({ cause }) => {
|
|
51077
|
-
throw new CliError({
|
|
51078
|
-
code: CliErrorCode.FailedToRenewAuthTokenRefreshTokenRevoked(),
|
|
51079
|
-
cause
|
|
51080
|
-
});
|
|
51081
|
-
}
|
|
51082
|
-
});
|
|
51083
|
-
});
|
|
51084
|
-
},
|
|
51085
|
-
getRefreshToken: () => tokenData.refreshToken,
|
|
51086
|
-
userInfo: userInfo2
|
|
51087
|
-
};
|
|
51088
|
-
}
|
|
51089
|
-
var accountAuthStrategy = {
|
|
51090
|
-
async isLoggedIn() {
|
|
51091
|
-
const apiKeyAuth = await apiKeyAuthStrategy.isLoggedIn();
|
|
51092
|
-
if (apiKeyAuth) {
|
|
51093
|
-
return apiKeyAuth;
|
|
51094
|
-
}
|
|
51095
|
-
const accountAuth = await getNonExpiredAccountAuth();
|
|
51096
|
-
if (accountAuth) {
|
|
51097
|
-
return createAccountAuthState(accountAuth);
|
|
51098
|
-
}
|
|
51099
|
-
return null;
|
|
51100
|
-
},
|
|
51101
|
-
async login({ deviceCode: deviceCode2, signal }) {
|
|
51102
|
-
const accountAuth = await waitForLogin(deviceCode2, { signal });
|
|
51103
|
-
return createAccountAuthState(accountAuth);
|
|
51104
|
-
},
|
|
51105
|
-
async loginWithRefreshToken({ refreshToken }) {
|
|
51106
|
-
const renewTokenResult = await client.renewToken({ refreshToken });
|
|
51107
|
-
if ((0, import_variant4.isType)(renewTokenResult, RenewTokenData.TokenRenewed)) {
|
|
51108
|
-
const newTokenData = renewTokenResult.payload;
|
|
51109
|
-
const userInfo2 = await client.userInfo({
|
|
51110
|
-
accessToken: newTokenData.accessToken
|
|
51111
|
-
});
|
|
51112
|
-
const result = { ...newTokenData, userInfo: userInfo2 };
|
|
51113
|
-
await deleteAuthData();
|
|
51114
|
-
await saveAuthData(result);
|
|
51115
|
-
return createAccountAuthState(result);
|
|
51116
|
-
}
|
|
51117
|
-
throw new CliError({
|
|
51118
|
-
code: CliErrorCode.FailedToLoginWithRefreshToken(),
|
|
51119
|
-
cause: null
|
|
51120
|
-
});
|
|
51121
|
-
}
|
|
51122
|
-
};
|
|
51123
51078
|
|
|
51124
51079
|
// ../cli-auth/src/auth-strategies/site-auth-strategy.ts
|
|
51125
51080
|
init_esm_shims();
|
|
@@ -51159,28 +51114,51 @@ async function ensureAuthenticatedToSite({
|
|
|
51159
51114
|
});
|
|
51160
51115
|
}).complete();
|
|
51161
51116
|
}
|
|
51162
|
-
|
|
51163
|
-
|
|
51164
|
-
|
|
51165
|
-
|
|
51166
|
-
|
|
51117
|
+
|
|
51118
|
+
// ../cli-auth/src/auth-strategies/unified-auth-strategy.ts
|
|
51119
|
+
async function createAuthState({
|
|
51120
|
+
userInfo: userInfo2,
|
|
51121
|
+
...initialTokenData
|
|
51167
51122
|
}) {
|
|
51168
51123
|
const limiter = pLimit(1);
|
|
51169
|
-
let
|
|
51124
|
+
let accountTokenData = { ...initialTokenData };
|
|
51125
|
+
const siteTokensDataCache = /* @__PURE__ */ new Map();
|
|
51126
|
+
async function getOrEnsureSiteAuth(siteId) {
|
|
51127
|
+
const cached = siteTokensDataCache.get(siteId);
|
|
51128
|
+
if (cached && isValidToken(cached)) {
|
|
51129
|
+
return cached;
|
|
51130
|
+
}
|
|
51131
|
+
const siteAuthResult = await ensureAuthenticatedToSite({
|
|
51132
|
+
siteId,
|
|
51133
|
+
accountRefreshToken: accountTokenData.refreshToken
|
|
51134
|
+
});
|
|
51135
|
+
if (!(0, import_variant6.isType)(siteAuthResult, AuthenticationResult.Ok)) {
|
|
51136
|
+
throw new CliError({
|
|
51137
|
+
code: CliErrorCode.FailedToRenewAuthTokenRefreshTokenRevoked(),
|
|
51138
|
+
cause: siteAuthResult.cause
|
|
51139
|
+
});
|
|
51140
|
+
}
|
|
51141
|
+
const siteTokenData = siteAuthResult.payload;
|
|
51142
|
+
siteTokensDataCache.set(siteId, siteTokenData);
|
|
51143
|
+
return siteTokenData;
|
|
51144
|
+
}
|
|
51170
51145
|
return {
|
|
51171
|
-
getAccessToken: () => {
|
|
51146
|
+
getAccessToken: ({ siteId } = {}) => {
|
|
51172
51147
|
return limiter(async () => {
|
|
51173
|
-
if (
|
|
51174
|
-
return
|
|
51148
|
+
if (siteId) {
|
|
51149
|
+
return (await getOrEnsureSiteAuth(siteId)).accessToken;
|
|
51175
51150
|
}
|
|
51176
|
-
|
|
51177
|
-
|
|
51178
|
-
|
|
51151
|
+
if (isValidToken(accountTokenData)) {
|
|
51152
|
+
return accountTokenData.accessToken;
|
|
51153
|
+
}
|
|
51154
|
+
const renewTokenResult = await renewAccountAuth({
|
|
51155
|
+
...accountTokenData,
|
|
51156
|
+
userInfo: userInfo2
|
|
51179
51157
|
});
|
|
51180
|
-
return (0,
|
|
51158
|
+
return (0, import_variant6.match)(renewTokenResult, {
|
|
51181
51159
|
TokenRenewed: ({ payload: newTokenData }) => {
|
|
51182
|
-
|
|
51183
|
-
return
|
|
51160
|
+
accountTokenData = newTokenData;
|
|
51161
|
+
return accountTokenData.accessToken;
|
|
51184
51162
|
},
|
|
51185
51163
|
RefreshTokenRevoked: ({ cause }) => {
|
|
51186
51164
|
throw new CliError({
|
|
@@ -51191,59 +51169,33 @@ function createSiteAuthState({
|
|
|
51191
51169
|
});
|
|
51192
51170
|
});
|
|
51193
51171
|
},
|
|
51194
|
-
getRefreshToken: () =>
|
|
51172
|
+
getRefreshToken: () => accountTokenData.refreshToken,
|
|
51195
51173
|
userInfo: userInfo2
|
|
51196
51174
|
};
|
|
51197
51175
|
}
|
|
51198
|
-
var
|
|
51176
|
+
var unifiedAuthStrategy = {
|
|
51199
51177
|
async isLoggedIn() {
|
|
51200
|
-
const apiKeyAuth = await apiKeyAuthStrategy.isLoggedIn(
|
|
51178
|
+
const apiKeyAuth = await apiKeyAuthStrategy.isLoggedIn();
|
|
51201
51179
|
if (apiKeyAuth) {
|
|
51202
51180
|
return apiKeyAuth;
|
|
51203
51181
|
}
|
|
51204
|
-
const accountAuth = await
|
|
51205
|
-
if (accountAuth) {
|
|
51206
|
-
|
|
51207
|
-
const siteAuthResult = await ensureAuthenticatedToSite({
|
|
51208
|
-
siteId,
|
|
51209
|
-
accountRefreshToken
|
|
51210
|
-
});
|
|
51211
|
-
if ((0, import_variant5.isType)(siteAuthResult, AuthenticationResult.Ok)) {
|
|
51212
|
-
return createSiteAuthState({
|
|
51213
|
-
siteId,
|
|
51214
|
-
siteAuth: siteAuthResult.payload,
|
|
51215
|
-
accountRefreshToken,
|
|
51216
|
-
userInfo: accountAuth.userInfo
|
|
51217
|
-
});
|
|
51218
|
-
}
|
|
51182
|
+
const accountAuth = await getNonExpiredAccountAuth();
|
|
51183
|
+
if (!accountAuth) {
|
|
51184
|
+
return null;
|
|
51219
51185
|
}
|
|
51220
|
-
return
|
|
51186
|
+
return await createAuthState(accountAuth);
|
|
51221
51187
|
},
|
|
51222
51188
|
async login({ deviceCode: deviceCode2, signal }) {
|
|
51223
|
-
const accountAuth = await
|
|
51224
|
-
|
|
51225
|
-
const siteAuthResult = await ensureAuthenticatedToSite({
|
|
51226
|
-
siteId,
|
|
51227
|
-
accountRefreshToken
|
|
51228
|
-
});
|
|
51229
|
-
return (0, import_variant5.match)(siteAuthResult, {
|
|
51230
|
-
Ok: ({ payload: siteAuth }) => {
|
|
51231
|
-
return createSiteAuthState({
|
|
51232
|
-
siteId,
|
|
51233
|
-
siteAuth,
|
|
51234
|
-
accountRefreshToken,
|
|
51235
|
-
userInfo: accountAuth.userInfo
|
|
51236
|
-
});
|
|
51237
|
-
},
|
|
51238
|
-
RefreshTokenRevoked: ({ cause }) => {
|
|
51239
|
-
throw new CliError({
|
|
51240
|
-
code: CliErrorCode.FailedToRenewAuthTokenRefreshTokenRevoked(),
|
|
51241
|
-
cause
|
|
51242
|
-
});
|
|
51243
|
-
}
|
|
51189
|
+
const accountAuth = await loginWithDeviceCode(deviceCode2, {
|
|
51190
|
+
signal
|
|
51244
51191
|
});
|
|
51192
|
+
return await createAuthState(accountAuth);
|
|
51193
|
+
},
|
|
51194
|
+
async loginWithRefreshToken({ refreshToken }) {
|
|
51195
|
+
const authData = await loginWithRefreshToken({ refreshToken });
|
|
51196
|
+
return await createAuthState(authData);
|
|
51245
51197
|
}
|
|
51246
|
-
}
|
|
51198
|
+
};
|
|
51247
51199
|
|
|
51248
51200
|
// ../cli-auth/src/useAuth.ts
|
|
51249
51201
|
init_esm_shims();
|
|
@@ -51419,12 +51371,12 @@ var getAllProperties = (object) => {
|
|
|
51419
51371
|
};
|
|
51420
51372
|
function autoBind(self2, { include, exclude } = {}) {
|
|
51421
51373
|
const filter = (key) => {
|
|
51422
|
-
const
|
|
51374
|
+
const match35 = (pattern) => typeof pattern === "string" ? key === pattern : pattern.test(key);
|
|
51423
51375
|
if (include) {
|
|
51424
|
-
return include.some(
|
|
51376
|
+
return include.some(match35);
|
|
51425
51377
|
}
|
|
51426
51378
|
if (exclude) {
|
|
51427
|
-
return !exclude.some(
|
|
51379
|
+
return !exclude.some(match35);
|
|
51428
51380
|
}
|
|
51429
51381
|
return true;
|
|
51430
51382
|
};
|
|
@@ -56168,7 +56120,7 @@ init_esm_shims();
|
|
|
56168
56120
|
// ../cli-ui-kit/src/components/ConfirmInput/ConfirmInput.tsx
|
|
56169
56121
|
init_esm_shims();
|
|
56170
56122
|
var import_react42 = __toESM(require_react(), 1);
|
|
56171
|
-
var
|
|
56123
|
+
var import_variant9 = __toESM(require_lib(), 1);
|
|
56172
56124
|
|
|
56173
56125
|
// ../cli-ui-kit/src/components/Text.tsx
|
|
56174
56126
|
init_esm_shims();
|
|
@@ -56203,9 +56155,9 @@ var Text2 = ({
|
|
|
56203
56155
|
|
|
56204
56156
|
// ../cli-ui-kit/src/input-state.ts
|
|
56205
56157
|
init_esm_shims();
|
|
56206
|
-
var
|
|
56207
|
-
var InputState = (0,
|
|
56208
|
-
(0,
|
|
56158
|
+
var import_variant7 = __toESM(require_lib(), 1);
|
|
56159
|
+
var InputState = (0, import_variant7.variant)(
|
|
56160
|
+
(0, import_variant7.onTerms)(({ T: _T }) => ({
|
|
56209
56161
|
NotSubmitted: (value2) => ({ value: value2 }),
|
|
56210
56162
|
Submitted: (value2) => ({ value: value2 })
|
|
56211
56163
|
}))
|
|
@@ -56300,9 +56252,9 @@ var InputLabel = ({ children, icon }) => {
|
|
|
56300
56252
|
// ../cli-ui-kit/src/components/ConfirmInput/Placeholder.tsx
|
|
56301
56253
|
init_esm_shims();
|
|
56302
56254
|
var import_react39 = __toESM(require_react(), 1);
|
|
56303
|
-
var
|
|
56255
|
+
var import_variant8 = __toESM(require_lib(), 1);
|
|
56304
56256
|
var Placeholder = ({ inputState }) => {
|
|
56305
|
-
return (0,
|
|
56257
|
+
return (0, import_variant8.match)(inputState, {
|
|
56306
56258
|
NotSubmitted: ({ value: value2 }) => /* @__PURE__ */ import_react39.default.createElement(Text2, { skin: "secondary" }, "(", value2 ? "Y/n" : "y/N", ")"),
|
|
56307
56259
|
Submitted: ({ value: value2 }) => /* @__PURE__ */ import_react39.default.createElement(Text2, null, value2 ? "Yes" : "No")
|
|
56308
56260
|
});
|
|
@@ -56448,7 +56400,7 @@ var ConfirmInput = ({
|
|
|
56448
56400
|
setInputState(InputState.NotSubmitted(inputState.value));
|
|
56449
56401
|
}
|
|
56450
56402
|
}, [isActive]);
|
|
56451
|
-
return /* @__PURE__ */ import_react42.default.createElement(Text2, null, /* @__PURE__ */ import_react42.default.createElement(InputLabel, null, label), " ", info && (0,
|
|
56403
|
+
return /* @__PURE__ */ import_react42.default.createElement(Text2, null, /* @__PURE__ */ import_react42.default.createElement(InputLabel, null, label), " ", info && (0, import_variant9.isType)(inputState, InputState.NotSubmitted) && /* @__PURE__ */ import_react42.default.createElement(Text2, { skin: "secondary" }, info, " "), /* @__PURE__ */ import_react42.default.createElement(Placeholder, { inputState }), (0, import_variant9.isType)(inputState, InputState.NotSubmitted) && /* @__PURE__ */ import_react42.default.createElement(Input, { initialValue, onSubmit: handleSubmit }));
|
|
56452
56404
|
};
|
|
56453
56405
|
|
|
56454
56406
|
// ../cli-ui-kit/src/components/SelectInput/index.ts
|
|
@@ -56457,7 +56409,7 @@ init_esm_shims();
|
|
|
56457
56409
|
// ../cli-ui-kit/src/components/SelectInput/SelectInput.tsx
|
|
56458
56410
|
init_esm_shims();
|
|
56459
56411
|
var import_react49 = __toESM(require_react(), 1);
|
|
56460
|
-
var
|
|
56412
|
+
var import_variant13 = __toESM(require_lib(), 1);
|
|
56461
56413
|
|
|
56462
56414
|
// ../../node_modules/ink-select-input/build/index.js
|
|
56463
56415
|
init_esm_shims();
|
|
@@ -56868,14 +56820,14 @@ var Indicator2 = ({ isSelected }) => {
|
|
|
56868
56820
|
// ../cli-ui-kit/src/components/SelectInput/Item.tsx
|
|
56869
56821
|
init_esm_shims();
|
|
56870
56822
|
var import_react47 = __toESM(require_react(), 1);
|
|
56871
|
-
var
|
|
56823
|
+
var import_variant11 = __toESM(require_lib(), 1);
|
|
56872
56824
|
|
|
56873
56825
|
// ../cli-ui-kit/src/components/SelectInput/types.ts
|
|
56874
56826
|
init_esm_shims();
|
|
56875
|
-
var
|
|
56876
|
-
var SelectOptionAvailability = (0,
|
|
56827
|
+
var import_variant10 = __toESM(require_lib(), 1);
|
|
56828
|
+
var SelectOptionAvailability = (0, import_variant10.variant)({
|
|
56877
56829
|
Enabled: {},
|
|
56878
|
-
Disabled: (0,
|
|
56830
|
+
Disabled: (0, import_variant10.fields)()
|
|
56879
56831
|
});
|
|
56880
56832
|
|
|
56881
56833
|
// ../cli-ui-kit/src/components/SelectInput/Item.tsx
|
|
@@ -56884,7 +56836,7 @@ function Item2({
|
|
|
56884
56836
|
label,
|
|
56885
56837
|
value: { description, availability = SelectOptionAvailability.Enabled() }
|
|
56886
56838
|
}) {
|
|
56887
|
-
const isDisabled = (0,
|
|
56839
|
+
const isDisabled = (0, import_variant11.isType)(availability, SelectOptionAvailability.Disabled);
|
|
56888
56840
|
return /* @__PURE__ */ import_react47.default.createElement(Box_default, null, /* @__PURE__ */ import_react47.default.createElement(
|
|
56889
56841
|
Text2,
|
|
56890
56842
|
{
|
|
@@ -56892,7 +56844,7 @@ function Item2({
|
|
|
56892
56844
|
strikethrough: !isSelected && isDisabled
|
|
56893
56845
|
},
|
|
56894
56846
|
label
|
|
56895
|
-
), isSelected && (0,
|
|
56847
|
+
), isSelected && (0, import_variant11.match)(availability, {
|
|
56896
56848
|
Disabled: ({ reason }) => /* @__PURE__ */ import_react47.default.createElement(Box_default, { marginLeft: 1 }, reason ? /* @__PURE__ */ import_react47.default.createElement(Text2, { skin: "warning" }, "- disabled (", reason, ")") : /* @__PURE__ */ import_react47.default.createElement(Text2, { skin: "warning" }, "- disabled")),
|
|
56897
56849
|
Enabled: () => description && /* @__PURE__ */ import_react47.default.createElement(Box_default, { marginLeft: 1 }, /* @__PURE__ */ import_react47.default.createElement(Text2, { skin: "secondary" }, "- ", description))
|
|
56898
56850
|
}));
|
|
@@ -56901,9 +56853,9 @@ function Item2({
|
|
|
56901
56853
|
// ../cli-ui-kit/src/components/SelectInput/Placeholder.tsx
|
|
56902
56854
|
init_esm_shims();
|
|
56903
56855
|
var import_react48 = __toESM(require_react(), 1);
|
|
56904
|
-
var
|
|
56856
|
+
var import_variant12 = __toESM(require_lib(), 1);
|
|
56905
56857
|
function Placeholder2({ inputState }) {
|
|
56906
|
-
return (0,
|
|
56858
|
+
return (0, import_variant12.match)(inputState, {
|
|
56907
56859
|
NotSubmitted: () => null,
|
|
56908
56860
|
Submitted: ({ value: value2 }) => /* @__PURE__ */ import_react48.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react48.default.createElement(Text2, { skin: "secondary" }, /* @__PURE__ */ import_react48.default.createElement(SuccessIcon, null), " ", value2.title))
|
|
56909
56861
|
});
|
|
@@ -56934,7 +56886,7 @@ function SelectInput2({
|
|
|
56934
56886
|
);
|
|
56935
56887
|
const handleSelect = (0, import_react49.useCallback)(
|
|
56936
56888
|
({ value: value3 }) => {
|
|
56937
|
-
if (!(0,
|
|
56889
|
+
if (!(0, import_variant13.isType)(value3.availability, SelectOptionAvailability.Disabled)) {
|
|
56938
56890
|
setInputState(InputState.Submitted(value3));
|
|
56939
56891
|
onSubmit(value3);
|
|
56940
56892
|
}
|
|
@@ -56959,7 +56911,7 @@ function SelectInput2({
|
|
|
56959
56911
|
setInputState(value2);
|
|
56960
56912
|
}
|
|
56961
56913
|
}, [value2, setInputState]);
|
|
56962
|
-
return /* @__PURE__ */ import_react49.default.createElement(import_react49.default.Fragment, null, /* @__PURE__ */ import_react49.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react49.default.createElement(Text2, null, /* @__PURE__ */ import_react49.default.createElement(InputLabel, null, label), " ", info && (0,
|
|
56914
|
+
return /* @__PURE__ */ import_react49.default.createElement(import_react49.default.Fragment, null, /* @__PURE__ */ import_react49.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react49.default.createElement(Text2, null, /* @__PURE__ */ import_react49.default.createElement(InputLabel, null, label), " ", info && (0, import_variant13.isType)(inputState, InputState.NotSubmitted) && /* @__PURE__ */ import_react49.default.createElement(Text2, { skin: "secondary" }, info))), /* @__PURE__ */ import_react49.default.createElement(Placeholder2, { inputState }), (0, import_variant13.isType)(inputState, InputState.NotSubmitted) && /* @__PURE__ */ import_react49.default.createElement(Box_default, null, /* @__PURE__ */ import_react49.default.createElement(
|
|
56963
56915
|
SelectInput_default,
|
|
56964
56916
|
{
|
|
56965
56917
|
items,
|
|
@@ -56976,7 +56928,7 @@ function SelectInput2({
|
|
|
56976
56928
|
// ../cli-ui-kit/src/components/SelectInput/SelectGroupsInput.tsx
|
|
56977
56929
|
init_esm_shims();
|
|
56978
56930
|
var import_react54 = __toESM(require_react(), 1);
|
|
56979
|
-
var
|
|
56931
|
+
var import_variant14 = __toESM(require_lib(), 1);
|
|
56980
56932
|
|
|
56981
56933
|
// ../cli-ui-kit/src/components/TextInput/Input.tsx
|
|
56982
56934
|
init_esm_shims();
|
|
@@ -57174,9 +57126,9 @@ var Highlighter = ({ pattern, text }) => {
|
|
|
57174
57126
|
}
|
|
57175
57127
|
const matches = text.matchAll(pattern);
|
|
57176
57128
|
const hightlightMap = new Array(text.length).fill(0);
|
|
57177
|
-
for (const
|
|
57178
|
-
const start =
|
|
57179
|
-
const end =
|
|
57129
|
+
for (const match35 of matches) {
|
|
57130
|
+
const start = match35.index;
|
|
57131
|
+
const end = match35.index + match35[0].length;
|
|
57180
57132
|
for (let i2 = start; i2 < end; i2++) {
|
|
57181
57133
|
hightlightMap[i2] = 1;
|
|
57182
57134
|
}
|
|
@@ -57430,7 +57382,7 @@ function SelectGroupsInput({
|
|
|
57430
57382
|
);
|
|
57431
57383
|
const handleItemSelection = (0, import_react54.useCallback)(
|
|
57432
57384
|
(selectedItem) => {
|
|
57433
|
-
if (!(0,
|
|
57385
|
+
if (!(0, import_variant14.isType)(selectedItem.availability, SelectOptionAvailability.Disabled)) {
|
|
57434
57386
|
setInputState(InputState.Submitted(selectedItem));
|
|
57435
57387
|
onSubmit(selectedItem);
|
|
57436
57388
|
}
|
|
@@ -57453,14 +57405,14 @@ function SelectGroupsInput({
|
|
|
57453
57405
|
}, []);
|
|
57454
57406
|
const lastItem = listItems.at(-1);
|
|
57455
57407
|
const shouldShowSearchInput = searchRegExp ? true : lastItem && lastItem.rowIndex > maxHeight;
|
|
57456
|
-
return /* @__PURE__ */ import_react54.default.createElement(import_react54.default.Fragment, null, /* @__PURE__ */ import_react54.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react54.default.createElement(Text2, null, /* @__PURE__ */ import_react54.default.createElement(InputLabel, null, label), " ", info && (0,
|
|
57408
|
+
return /* @__PURE__ */ import_react54.default.createElement(import_react54.default.Fragment, null, /* @__PURE__ */ import_react54.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react54.default.createElement(Text2, null, /* @__PURE__ */ import_react54.default.createElement(InputLabel, null, label), " ", info && (0, import_variant14.isType)(inputState, InputState.NotSubmitted) && /* @__PURE__ */ import_react54.default.createElement(Text2, { skin: "secondary" }, info)), (0, import_variant14.isType)(inputState, InputState.NotSubmitted) && shouldShowSearchInput && /* @__PURE__ */ import_react54.default.createElement(Text2, { skin: "secondary" }, /* @__PURE__ */ import_react54.default.createElement(
|
|
57457
57409
|
Input2,
|
|
57458
57410
|
{
|
|
57459
57411
|
onChange: handleSearchPhraseChange,
|
|
57460
57412
|
showCursor: true,
|
|
57461
57413
|
placeholder: "Type to search..."
|
|
57462
57414
|
}
|
|
57463
|
-
))), /* @__PURE__ */ import_react54.default.createElement(Placeholder2, { inputState }), (0,
|
|
57415
|
+
))), /* @__PURE__ */ import_react54.default.createElement(Placeholder2, { inputState }), (0, import_variant14.isType)(inputState, InputState.NotSubmitted) && (listItems.length ? /* @__PURE__ */ import_react54.default.createElement(
|
|
57464
57416
|
GroupsList,
|
|
57465
57417
|
{
|
|
57466
57418
|
listItems,
|
|
@@ -57479,7 +57431,7 @@ init_esm_shims();
|
|
|
57479
57431
|
// ../cli-ui-kit/src/components/TextInput/TextInput.tsx
|
|
57480
57432
|
init_esm_shims();
|
|
57481
57433
|
var import_react55 = __toESM(require_react(), 1);
|
|
57482
|
-
var
|
|
57434
|
+
var import_variant15 = __toESM(require_lib(), 1);
|
|
57483
57435
|
var TextInput2 = ({
|
|
57484
57436
|
label,
|
|
57485
57437
|
isActive,
|
|
@@ -57519,7 +57471,7 @@ var TextInput2 = ({
|
|
|
57519
57471
|
icon: /* @__PURE__ */ import_react55.default.createElement(Text2, { skin: "question" }, /* @__PURE__ */ import_react55.default.createElement(PointerIcon, { appearance: "triangle" }))
|
|
57520
57472
|
},
|
|
57521
57473
|
label
|
|
57522
|
-
), (0,
|
|
57474
|
+
), (0, import_variant15.isType)(inputState, InputState.NotSubmitted) && /* @__PURE__ */ import_react55.default.createElement(import_react55.default.Fragment, null, " ", /* @__PURE__ */ import_react55.default.createElement(Text2, { skin: afterValidationError ? "error" : "standard" }, /* @__PURE__ */ import_react55.default.createElement(
|
|
57523
57475
|
Input2,
|
|
57524
57476
|
{
|
|
57525
57477
|
placeholder: inputState.value,
|
|
@@ -57527,25 +57479,25 @@ var TextInput2 = ({
|
|
|
57527
57479
|
onChange: () => setIsDirty(true),
|
|
57528
57480
|
showCursor: afterValidationError
|
|
57529
57481
|
}
|
|
57530
|
-
))))), (0,
|
|
57482
|
+
))))), (0, import_variant15.isType)(inputState, InputState.Submitted) && /* @__PURE__ */ import_react55.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react55.default.createElement(Text2, { skin: "secondary" }, /* @__PURE__ */ import_react55.default.createElement(SuccessIcon, null), " ", inputState.value)), validationError && /* @__PURE__ */ import_react55.default.createElement(Box_default, { columnGap: 1 }, /* @__PURE__ */ import_react55.default.createElement(Text2, { skin: "error" }, /* @__PURE__ */ import_react55.default.createElement(PointerIcon, { appearance: "exclamation" })), /* @__PURE__ */ import_react55.default.createElement(Text2, { skin: "error" }, validationError)));
|
|
57531
57483
|
};
|
|
57532
57484
|
|
|
57533
57485
|
// ../cli-ui-kit/src/components/Alert.tsx
|
|
57534
57486
|
init_esm_shims();
|
|
57535
57487
|
var import_react56 = __toESM(require_react(), 1);
|
|
57536
|
-
var
|
|
57488
|
+
var import_variant16 = __toESM(require_lib(), 1);
|
|
57537
57489
|
var Alert = ({ type, children }) => {
|
|
57538
|
-
const icon = (0,
|
|
57539
|
-
error: (0,
|
|
57490
|
+
const icon = (0, import_variant16.match)(type, {
|
|
57491
|
+
error: (0, import_variant16.constant)(
|
|
57540
57492
|
/* @__PURE__ */ import_react56.default.createElement(Text2, { skin: "error" }, /* @__PURE__ */ import_react56.default.createElement(ErrorIcon, null))
|
|
57541
57493
|
),
|
|
57542
|
-
warning: (0,
|
|
57494
|
+
warning: (0, import_variant16.constant)(
|
|
57543
57495
|
/* @__PURE__ */ import_react56.default.createElement(Text2, { skin: "warning" }, /* @__PURE__ */ import_react56.default.createElement(WarningIcon, null))
|
|
57544
57496
|
),
|
|
57545
|
-
success: (0,
|
|
57497
|
+
success: (0, import_variant16.constant)(
|
|
57546
57498
|
/* @__PURE__ */ import_react56.default.createElement(Text2, { skin: "success" }, /* @__PURE__ */ import_react56.default.createElement(SuccessIcon, null))
|
|
57547
57499
|
),
|
|
57548
|
-
insight: (0,
|
|
57500
|
+
insight: (0, import_variant16.constant)(/* @__PURE__ */ import_react56.default.createElement(InsightIcon, null))
|
|
57549
57501
|
});
|
|
57550
57502
|
return /* @__PURE__ */ import_react56.default.createElement(Text2, null, icon, " ", children);
|
|
57551
57503
|
};
|
|
@@ -57814,7 +57766,7 @@ function useExit() {
|
|
|
57814
57766
|
|
|
57815
57767
|
// ../cli-ui-kit/src/hooks/use-async.ts
|
|
57816
57768
|
init_esm_shims();
|
|
57817
|
-
var
|
|
57769
|
+
var import_variant17 = __toESM(require_lib(), 1);
|
|
57818
57770
|
|
|
57819
57771
|
// ../../node_modules/react-async-hook/dist/react-async-hook.esm.js
|
|
57820
57772
|
init_esm_shims();
|
|
@@ -58032,15 +57984,15 @@ var useAsyncCallback = function useAsyncCallback2(asyncFunction, options) {
|
|
|
58032
57984
|
|
|
58033
57985
|
// ../cli-ui-kit/src/hooks/use-async.ts
|
|
58034
57986
|
var import_react66 = __toESM(require_react(), 1);
|
|
58035
|
-
var AsyncStatus = (0,
|
|
58036
|
-
(0,
|
|
57987
|
+
var AsyncStatus = (0, import_variant17.variant)(
|
|
57988
|
+
(0, import_variant17.onTerms)(({ T: _T }) => ({
|
|
58037
57989
|
Error: (error) => ({ error }),
|
|
58038
57990
|
Success: (result) => ({ result }),
|
|
58039
57991
|
Loading: () => ({})
|
|
58040
57992
|
}))
|
|
58041
57993
|
);
|
|
58042
|
-
var AsyncCallbackStatus = (0,
|
|
58043
|
-
(0,
|
|
57994
|
+
var AsyncCallbackStatus = (0, import_variant17.variant)(
|
|
57995
|
+
(0, import_variant17.onTerms)(({ T: _T }) => ({
|
|
58044
57996
|
Error: (error) => ({ error }),
|
|
58045
57997
|
Success: (result) => ({ result }),
|
|
58046
57998
|
Loading: () => ({}),
|
|
@@ -58063,7 +58015,7 @@ var useAsync2 = (fn, args, options) => {
|
|
|
58063
58015
|
abortController.abort();
|
|
58064
58016
|
};
|
|
58065
58017
|
}, [abortController]);
|
|
58066
|
-
return (0,
|
|
58018
|
+
return (0, import_variant17.match)(status, {
|
|
58067
58019
|
error: () => ({
|
|
58068
58020
|
status: AsyncStatus.Error(
|
|
58069
58021
|
error ?? new Error("Unexpected error state in useAsync")
|
|
@@ -58091,7 +58043,7 @@ var useAsyncCallback3 = (fn, options) => {
|
|
|
58091
58043
|
abortController.abort();
|
|
58092
58044
|
};
|
|
58093
58045
|
}, [abortController]);
|
|
58094
|
-
return (0,
|
|
58046
|
+
return (0, import_variant17.match)(status, {
|
|
58095
58047
|
error: () => ({
|
|
58096
58048
|
status: AsyncCallbackStatus.Error(
|
|
58097
58049
|
error ?? new Error("Unexpected error state in useAsyncCallback")
|
|
@@ -59188,9 +59140,9 @@ init_esm_shims();
|
|
|
59188
59140
|
var DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
|
|
59189
59141
|
function parseDateTimeSkeleton(skeleton) {
|
|
59190
59142
|
var result = {};
|
|
59191
|
-
skeleton.replace(DATE_TIME_REGEX, function(
|
|
59192
|
-
var len =
|
|
59193
|
-
switch (
|
|
59143
|
+
skeleton.replace(DATE_TIME_REGEX, function(match35) {
|
|
59144
|
+
var len = match35.length;
|
|
59145
|
+
switch (match35[0]) {
|
|
59194
59146
|
// Era
|
|
59195
59147
|
case "G":
|
|
59196
59148
|
result.era = len === 4 ? "long" : len === 5 ? "narrow" : "short";
|
|
@@ -61200,21 +61152,21 @@ if (REGEX_SUPPORTS_U_AND_Y) {
|
|
|
61200
61152
|
matchIdentifierAtIndex = function matchIdentifierAtIndex2(s2, index) {
|
|
61201
61153
|
var _a3;
|
|
61202
61154
|
IDENTIFIER_PREFIX_RE_1.lastIndex = index;
|
|
61203
|
-
var
|
|
61204
|
-
return (_a3 =
|
|
61155
|
+
var match35 = IDENTIFIER_PREFIX_RE_1.exec(s2);
|
|
61156
|
+
return (_a3 = match35[1]) !== null && _a3 !== void 0 ? _a3 : "";
|
|
61205
61157
|
};
|
|
61206
61158
|
} else {
|
|
61207
61159
|
matchIdentifierAtIndex = function matchIdentifierAtIndex2(s2, index) {
|
|
61208
|
-
var
|
|
61160
|
+
var match35 = [];
|
|
61209
61161
|
while (true) {
|
|
61210
61162
|
var c2 = codePointAt(s2, index);
|
|
61211
61163
|
if (c2 === void 0 || _isWhiteSpace(c2) || _isPatternSyntax(c2)) {
|
|
61212
61164
|
break;
|
|
61213
61165
|
}
|
|
61214
|
-
|
|
61166
|
+
match35.push(c2);
|
|
61215
61167
|
index += c2 >= 65536 ? 2 : 1;
|
|
61216
61168
|
}
|
|
61217
|
-
return fromCodePoint.apply(void 0,
|
|
61169
|
+
return fromCodePoint.apply(void 0, match35);
|
|
61218
61170
|
};
|
|
61219
61171
|
}
|
|
61220
61172
|
var IDENTIFIER_PREFIX_RE_1;
|
|
@@ -63637,7 +63589,7 @@ var Interpolator = class {
|
|
|
63637
63589
|
this.nestingRegexp = getOrResetRegExp(this.nestingRegexp, `${this.nestingPrefix}(.+?)${this.nestingSuffix}`);
|
|
63638
63590
|
}
|
|
63639
63591
|
interpolate(str, data, lng, options) {
|
|
63640
|
-
let
|
|
63592
|
+
let match35;
|
|
63641
63593
|
let value2;
|
|
63642
63594
|
let replaces;
|
|
63643
63595
|
const defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
|
|
@@ -63671,17 +63623,17 @@ var Interpolator = class {
|
|
|
63671
63623
|
}];
|
|
63672
63624
|
todos.forEach((todo) => {
|
|
63673
63625
|
replaces = 0;
|
|
63674
|
-
while (
|
|
63675
|
-
const matchedVar =
|
|
63626
|
+
while (match35 = todo.regex.exec(str)) {
|
|
63627
|
+
const matchedVar = match35[1].trim();
|
|
63676
63628
|
value2 = handleFormat(matchedVar);
|
|
63677
63629
|
if (value2 === void 0) {
|
|
63678
63630
|
if (typeof missingInterpolationHandler === "function") {
|
|
63679
|
-
const temp = missingInterpolationHandler(str,
|
|
63631
|
+
const temp = missingInterpolationHandler(str, match35, options);
|
|
63680
63632
|
value2 = isString2(temp) ? temp : "";
|
|
63681
63633
|
} else if (options && Object.prototype.hasOwnProperty.call(options, matchedVar)) {
|
|
63682
63634
|
value2 = "";
|
|
63683
63635
|
} else if (skipOnVariables) {
|
|
63684
|
-
value2 =
|
|
63636
|
+
value2 = match35[0];
|
|
63685
63637
|
continue;
|
|
63686
63638
|
} else {
|
|
63687
63639
|
this.logger.warn(`missed to pass in variable ${matchedVar} for interpolating ${str}`);
|
|
@@ -63691,10 +63643,10 @@ var Interpolator = class {
|
|
|
63691
63643
|
value2 = makeString(value2);
|
|
63692
63644
|
}
|
|
63693
63645
|
const safeValue = todo.safeValue(value2);
|
|
63694
|
-
str = str.replace(
|
|
63646
|
+
str = str.replace(match35[0], safeValue);
|
|
63695
63647
|
if (skipOnVariables) {
|
|
63696
63648
|
todo.regex.lastIndex += value2.length;
|
|
63697
|
-
todo.regex.lastIndex -=
|
|
63649
|
+
todo.regex.lastIndex -= match35[0].length;
|
|
63698
63650
|
} else {
|
|
63699
63651
|
todo.regex.lastIndex = 0;
|
|
63700
63652
|
}
|
|
@@ -63708,7 +63660,7 @@ var Interpolator = class {
|
|
|
63708
63660
|
}
|
|
63709
63661
|
nest(str, fc) {
|
|
63710
63662
|
let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
63711
|
-
let
|
|
63663
|
+
let match35;
|
|
63712
63664
|
let value2;
|
|
63713
63665
|
let clonedOptions;
|
|
63714
63666
|
const handleHasOptions = (key, inheritedOptions) => {
|
|
@@ -63736,7 +63688,7 @@ var Interpolator = class {
|
|
|
63736
63688
|
if (clonedOptions.defaultValue && clonedOptions.defaultValue.indexOf(this.prefix) > -1) delete clonedOptions.defaultValue;
|
|
63737
63689
|
return key;
|
|
63738
63690
|
};
|
|
63739
|
-
while (
|
|
63691
|
+
while (match35 = this.nestingRegexp.exec(str)) {
|
|
63740
63692
|
let formatters = [];
|
|
63741
63693
|
clonedOptions = {
|
|
63742
63694
|
...options
|
|
@@ -63745,26 +63697,26 @@ var Interpolator = class {
|
|
|
63745
63697
|
clonedOptions.applyPostProcessor = false;
|
|
63746
63698
|
delete clonedOptions.defaultValue;
|
|
63747
63699
|
let doReduce = false;
|
|
63748
|
-
if (
|
|
63749
|
-
const r2 =
|
|
63750
|
-
|
|
63700
|
+
if (match35[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(match35[1])) {
|
|
63701
|
+
const r2 = match35[1].split(this.formatSeparator).map((elem) => elem.trim());
|
|
63702
|
+
match35[1] = r2.shift();
|
|
63751
63703
|
formatters = r2;
|
|
63752
63704
|
doReduce = true;
|
|
63753
63705
|
}
|
|
63754
|
-
value2 = fc(handleHasOptions.call(this,
|
|
63755
|
-
if (value2 &&
|
|
63706
|
+
value2 = fc(handleHasOptions.call(this, match35[1].trim(), clonedOptions), clonedOptions);
|
|
63707
|
+
if (value2 && match35[0] === str && !isString2(value2)) return value2;
|
|
63756
63708
|
if (!isString2(value2)) value2 = makeString(value2);
|
|
63757
63709
|
if (!value2) {
|
|
63758
|
-
this.logger.warn(`missed to resolve ${
|
|
63710
|
+
this.logger.warn(`missed to resolve ${match35[1]} for nesting ${str}`);
|
|
63759
63711
|
value2 = "";
|
|
63760
63712
|
}
|
|
63761
63713
|
if (doReduce) {
|
|
63762
63714
|
value2 = formatters.reduce((v, f) => this.format(v, f, options.lng, {
|
|
63763
63715
|
...options,
|
|
63764
|
-
interpolationkey:
|
|
63716
|
+
interpolationkey: match35[1].trim()
|
|
63765
63717
|
}), value2.trim());
|
|
63766
63718
|
}
|
|
63767
|
-
str = str.replace(
|
|
63719
|
+
str = str.replace(match35[0], value2);
|
|
63768
63720
|
this.regexp.lastIndex = 0;
|
|
63769
63721
|
}
|
|
63770
63722
|
return str;
|
|
@@ -64751,7 +64703,7 @@ var I18nProvider = ({
|
|
|
64751
64703
|
};
|
|
64752
64704
|
|
|
64753
64705
|
// ../cli-auth/src/components/Login.tsx
|
|
64754
|
-
var
|
|
64706
|
+
var import_variant22 = __toESM(require_lib(), 1);
|
|
64755
64707
|
|
|
64756
64708
|
// ../cli-auth/src/messages.json
|
|
64757
64709
|
var messages_default = {
|
|
@@ -64887,8 +64839,8 @@ async function defaultBrowserId() {
|
|
|
64887
64839
|
throw new Error("macOS only");
|
|
64888
64840
|
}
|
|
64889
64841
|
const { stdout } = await execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]);
|
|
64890
|
-
const
|
|
64891
|
-
return
|
|
64842
|
+
const match35 = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
|
|
64843
|
+
return match35?.groups.id ?? "com.apple.Safari";
|
|
64892
64844
|
}
|
|
64893
64845
|
|
|
64894
64846
|
// ../../node_modules/bundle-name/index.js
|
|
@@ -64942,11 +64894,11 @@ async function defaultBrowser(_execFileAsync = execFileAsync3) {
|
|
|
64942
64894
|
"/v",
|
|
64943
64895
|
"ProgId"
|
|
64944
64896
|
]);
|
|
64945
|
-
const
|
|
64946
|
-
if (!
|
|
64897
|
+
const match35 = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
|
|
64898
|
+
if (!match35) {
|
|
64947
64899
|
throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
|
|
64948
64900
|
}
|
|
64949
|
-
const { id } =
|
|
64901
|
+
const { id } = match35.groups;
|
|
64950
64902
|
const browser = windowsBrowserProgIds[id];
|
|
64951
64903
|
if (!browser) {
|
|
64952
64904
|
throw new UnknownBrowserError(`Unknown browser ID: ${id}`);
|
|
@@ -65302,6 +65254,19 @@ var DebugLogContext = (0, import_react78.createContext)(null);
|
|
|
65302
65254
|
// ../cli-env/src/index.ts
|
|
65303
65255
|
init_esm_shims();
|
|
65304
65256
|
var import_ci_info = __toESM(require_ci_info2(), 1);
|
|
65257
|
+
var remoteLogContextSchema = zod_default.record(zod_default.string(), zod_default.unknown());
|
|
65258
|
+
function getRemoteLogContext() {
|
|
65259
|
+
const remoteContext = process.env.REMOTE_MACHINE_LOG_CONTEXT;
|
|
65260
|
+
if (!remoteContext) {
|
|
65261
|
+
return {};
|
|
65262
|
+
}
|
|
65263
|
+
try {
|
|
65264
|
+
const parsed = JSON.parse(remoteContext);
|
|
65265
|
+
return remoteLogContextSchema.parse(parsed);
|
|
65266
|
+
} catch {
|
|
65267
|
+
return {};
|
|
65268
|
+
}
|
|
65269
|
+
}
|
|
65305
65270
|
var createEnv = () => {
|
|
65306
65271
|
const overrides2 = getTestOverrides();
|
|
65307
65272
|
return {
|
|
@@ -65309,7 +65274,8 @@ var createEnv = () => {
|
|
|
65309
65274
|
isPR: overrides2.isPR ?? import_ci_info.default.isPR,
|
|
65310
65275
|
ciName: overrides2.ciName ?? import_ci_info.default.name ?? process.env.CI_NAME ?? null,
|
|
65311
65276
|
cliEnvName: overrides2.cliEnvName ?? process.env.WIX_RUNTIME_ENVIRONMENT ?? null,
|
|
65312
|
-
cliTrackingId: overrides2.cliTrackingId ?? process.env.TRACKING_ID ?? null
|
|
65277
|
+
cliTrackingId: overrides2.cliTrackingId ?? process.env.TRACKING_ID ?? null,
|
|
65278
|
+
remoteLogContext: getRemoteLogContext()
|
|
65313
65279
|
};
|
|
65314
65280
|
};
|
|
65315
65281
|
|
|
@@ -65320,7 +65286,7 @@ var import_react83 = __toESM(require_react(), 1);
|
|
|
65320
65286
|
// ../cli-error-reporting/src/get-error-component.tsx
|
|
65321
65287
|
init_esm_shims();
|
|
65322
65288
|
var import_react82 = __toESM(require_react(), 1);
|
|
65323
|
-
var
|
|
65289
|
+
var import_variant18 = __toESM(require_lib(), 1);
|
|
65324
65290
|
|
|
65325
65291
|
// ../../node_modules/outdent/lib-module/index.js
|
|
65326
65292
|
init_esm_shims();
|
|
@@ -65367,9 +65333,9 @@ var reDetectIndentation = /(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/;
|
|
|
65367
65333
|
var reOnlyWhitespaceWithAtLeastOneNewline = /^[ \t]*[\r\n][ \t\r\n]*$/;
|
|
65368
65334
|
function _outdentArray(strings, firstInterpolatedValueSetsIndentationLevel, options) {
|
|
65369
65335
|
var indentationLevel = 0;
|
|
65370
|
-
var
|
|
65371
|
-
if (
|
|
65372
|
-
indentationLevel =
|
|
65336
|
+
var match35 = strings[0].match(reDetectIndentation);
|
|
65337
|
+
if (match35) {
|
|
65338
|
+
indentationLevel = match35[1].length;
|
|
65373
65339
|
}
|
|
65374
65340
|
var reSource = "(\\r\\n|\\r|\\n).{0," + indentationLevel + "}";
|
|
65375
65341
|
var reMatchIndent = new RegExp(reSource, "g");
|
|
@@ -65552,7 +65518,7 @@ var ServeDeprecationMessage = ({
|
|
|
65552
65518
|
|
|
65553
65519
|
// ../cli-error-reporting/src/get-error-component.tsx
|
|
65554
65520
|
function getErrorComponent(code, cause) {
|
|
65555
|
-
return (0,
|
|
65521
|
+
return (0, import_variant18.match)(code, {
|
|
65556
65522
|
UnknownFailure: ({ error }) => {
|
|
65557
65523
|
return () => /* @__PURE__ */ import_react82.default.createElement(import_react82.default.Fragment, null, /* @__PURE__ */ import_react82.default.createElement(Text2, { skin: "error" }, "Oh no, seems like the CLI encountered an unexpected error:"), error instanceof Error ? /* @__PURE__ */ import_react82.default.createElement(Text2, { skin: "error" }, error.message) : /* @__PURE__ */ import_react82.default.createElement(Text2, null, JSON.stringify(error)));
|
|
65558
65524
|
},
|
|
@@ -66094,7 +66060,7 @@ function getErrorComponent(code, cause) {
|
|
|
66094
66060
|
},
|
|
66095
66061
|
DuplicateComponentIdsError: ({ issues }) => {
|
|
66096
66062
|
const Issue = ({ issue }) => {
|
|
66097
|
-
const typeToName = (type) => (0,
|
|
66063
|
+
const typeToName = (type) => (0, import_variant18.match)(type, {
|
|
66098
66064
|
page: () => "page",
|
|
66099
66065
|
plugin: () => "plugin",
|
|
66100
66066
|
"menu-plugin": () => "menu plugin",
|
|
@@ -66224,6 +66190,15 @@ function getErrorComponent(code, cause) {
|
|
|
66224
66190
|
}
|
|
66225
66191
|
);
|
|
66226
66192
|
},
|
|
66193
|
+
FailedToBuildAstroApp: () => {
|
|
66194
|
+
return () => /* @__PURE__ */ import_react82.default.createElement(
|
|
66195
|
+
ErrorMessage,
|
|
66196
|
+
{
|
|
66197
|
+
message: "Failed to build the application.",
|
|
66198
|
+
hint: "Please check the build output for more information"
|
|
66199
|
+
}
|
|
66200
|
+
);
|
|
66201
|
+
},
|
|
66227
66202
|
FailedToGetAppInstallationDetails: ({ appId }) => {
|
|
66228
66203
|
return () => /* @__PURE__ */ import_react82.default.createElement(
|
|
66229
66204
|
SystemErrorMessage,
|
|
@@ -67064,6 +67039,9 @@ ${errorMessage2}`
|
|
|
67064
67039
|
FailedToCreateRoutesWithMetaSiteUrl: () => {
|
|
67065
67040
|
return () => /* @__PURE__ */ import_react82.default.createElement(SystemErrorMessage, { message: "Failed to create routes with meta site URL." });
|
|
67066
67041
|
},
|
|
67042
|
+
FailedToGetUrl: () => {
|
|
67043
|
+
return () => /* @__PURE__ */ import_react82.default.createElement(SystemErrorMessage, { message: "Failed to get meta site URL." });
|
|
67044
|
+
},
|
|
67067
67045
|
FailedToUpdateExternalSiteUrl: () => {
|
|
67068
67046
|
return () => /* @__PURE__ */ import_react82.default.createElement(SystemErrorMessage, { message: "Failed to update external site URL." });
|
|
67069
67047
|
},
|
|
@@ -67145,7 +67123,7 @@ var ErrorViewer = ({
|
|
|
67145
67123
|
|
|
67146
67124
|
// ../cli-error-reporting/src/error-reporter.ts
|
|
67147
67125
|
init_esm_shims();
|
|
67148
|
-
var
|
|
67126
|
+
var import_variant19 = __toESM(require_lib(), 1);
|
|
67149
67127
|
|
|
67150
67128
|
// ../../node_modules/@sentry/node/build/esm/index.js
|
|
67151
67129
|
init_esm_shims();
|
|
@@ -67767,8 +67745,8 @@ var LINUX_VERSIONS = {
|
|
|
67767
67745
|
ubuntu: (content) => matchFirst(/distrib_release=(.*)/, content)
|
|
67768
67746
|
};
|
|
67769
67747
|
function matchFirst(regex2, text) {
|
|
67770
|
-
const
|
|
67771
|
-
return
|
|
67748
|
+
const match35 = regex2.exec(text);
|
|
67749
|
+
return match35 ? match35[1] : void 0;
|
|
67772
67750
|
}
|
|
67773
67751
|
async function getDarwinInfo() {
|
|
67774
67752
|
const darwinInfo = {
|
|
@@ -69824,15 +69802,15 @@ function normalizeRequestId(requestId) {
|
|
|
69824
69802
|
}
|
|
69825
69803
|
|
|
69826
69804
|
// ../cli-error-reporting/src/error-reporter.ts
|
|
69827
|
-
var ReportErrorResult = (0,
|
|
69828
|
-
Reported: (0,
|
|
69805
|
+
var ReportErrorResult = (0, import_variant19.variant)({
|
|
69806
|
+
Reported: (0, import_variant19.fields)(),
|
|
69829
69807
|
Ignored: {}
|
|
69830
69808
|
});
|
|
69831
69809
|
var reportError = (scope, originalError, { data } = {}) => {
|
|
69832
69810
|
if (!isCliSystemError(originalError)) {
|
|
69833
69811
|
return ReportErrorResult.Ignored();
|
|
69834
69812
|
}
|
|
69835
|
-
const error = (0,
|
|
69813
|
+
const error = (0, import_variant19.isType)(originalError.cliCode, CliSystemErrorCode.UnknownFailure) ? originalError.cliCode.error : originalError;
|
|
69836
69814
|
const eventId = scope.captureException(error, {
|
|
69837
69815
|
data,
|
|
69838
69816
|
captureContext: (localScope) => {
|
|
@@ -69945,14 +69923,14 @@ function yesOrNo(value2) {
|
|
|
69945
69923
|
// ../cli-error-reporting/src/user-feedback.tsx
|
|
69946
69924
|
init_esm_shims();
|
|
69947
69925
|
var import_react87 = __toESM(require_react(), 1);
|
|
69948
|
-
var
|
|
69926
|
+
var import_variant21 = __toESM(require_lib(), 1);
|
|
69949
69927
|
import { stdin } from "node:process";
|
|
69950
69928
|
|
|
69951
69929
|
// ../cli-fs-cache/src/index.ts
|
|
69952
69930
|
init_esm_shims();
|
|
69953
|
-
var
|
|
69954
|
-
var CacheState = (0,
|
|
69955
|
-
Exists: (0,
|
|
69931
|
+
var import_variant20 = __toESM(require_lib(), 1);
|
|
69932
|
+
var CacheState = (0, import_variant20.variant)({
|
|
69933
|
+
Exists: (0, import_variant20.fields)(),
|
|
69956
69934
|
NotExists: {}
|
|
69957
69935
|
});
|
|
69958
69936
|
var CacheData = external_exports.object({
|
|
@@ -70065,7 +70043,7 @@ async function collectUserFeedback({
|
|
|
70065
70043
|
reportResult,
|
|
70066
70044
|
errorReporter: errorReporter2
|
|
70067
70045
|
}) {
|
|
70068
|
-
if (!stdin.isTTY || !cachePath || !(0,
|
|
70046
|
+
if (!stdin.isTTY || !cachePath || !(0, import_variant21.isType)(reportResult, ReportErrorResult.Reported)) {
|
|
70069
70047
|
return;
|
|
70070
70048
|
}
|
|
70071
70049
|
const fsCache = createFsCache({
|
|
@@ -70073,7 +70051,7 @@ async function collectUserFeedback({
|
|
|
70073
70051
|
ttlInHours: 1
|
|
70074
70052
|
});
|
|
70075
70053
|
const cacheState = await fsCache.get();
|
|
70076
|
-
if ((0,
|
|
70054
|
+
if ((0, import_variant21.isType)(cacheState, CacheState.Exists)) {
|
|
70077
70055
|
return;
|
|
70078
70056
|
}
|
|
70079
70057
|
const user = errorReporter2.getUser();
|
|
@@ -70327,7 +70305,7 @@ var Login = ({ loginFn, onLogin, onError }) => {
|
|
|
70327
70305
|
onError: handleError
|
|
70328
70306
|
}
|
|
70329
70307
|
);
|
|
70330
|
-
return (0,
|
|
70308
|
+
return (0, import_variant22.match)(status, {
|
|
70331
70309
|
Error: () => null,
|
|
70332
70310
|
Loading: () => /* @__PURE__ */ import_react93.default.createElement(Spinner2, null),
|
|
70333
70311
|
Success: ({ result: { userCode, verificationUri } }) => /* @__PURE__ */ import_react93.default.createElement(
|
|
@@ -70340,23 +70318,23 @@ var Login = ({ loginFn, onLogin, onError }) => {
|
|
|
70340
70318
|
});
|
|
70341
70319
|
};
|
|
70342
70320
|
|
|
70343
|
-
// ../cli-auth/src/providers/
|
|
70321
|
+
// ../cli-auth/src/providers/UnifiedAuthProvider.tsx
|
|
70344
70322
|
init_esm_shims();
|
|
70345
70323
|
var import_react96 = __toESM(require_react(), 1);
|
|
70346
70324
|
|
|
70347
70325
|
// ../cli-auth/src/components/EnsureLoggedIn.tsx
|
|
70348
70326
|
init_esm_shims();
|
|
70349
70327
|
var import_react95 = __toESM(require_react(), 1);
|
|
70350
|
-
var
|
|
70328
|
+
var import_variant24 = __toESM(require_lib(), 1);
|
|
70351
70329
|
|
|
70352
70330
|
// ../cli-auth/src/components/WarnLegacyAuthData.tsx
|
|
70353
70331
|
init_esm_shims();
|
|
70354
70332
|
var import_react94 = __toESM(require_react(), 1);
|
|
70355
|
-
var
|
|
70333
|
+
var import_variant23 = __toESM(require_lib(), 1);
|
|
70356
70334
|
var WarnLegacyAuthData = ({ children }) => {
|
|
70357
70335
|
const { status } = useAsync2(hasLegacyAuthData, [], { onError: () => {
|
|
70358
70336
|
} });
|
|
70359
|
-
return (0,
|
|
70337
|
+
return (0, import_variant23.match)(status, {
|
|
70360
70338
|
Error: () => null,
|
|
70361
70339
|
Loading: () => null,
|
|
70362
70340
|
Success: ({ result }) => /* @__PURE__ */ import_react94.default.createElement(import_react94.default.Fragment, null, result && /* @__PURE__ */ import_react94.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react94.default.createElement(Trans2, { i18nKey: "login.legacy_auth_notice" })), children)
|
|
@@ -70378,7 +70356,7 @@ var EnsureLoggedIn = ({
|
|
|
70378
70356
|
},
|
|
70379
70357
|
onError
|
|
70380
70358
|
});
|
|
70381
|
-
return (0,
|
|
70359
|
+
return (0, import_variant24.match)(status, {
|
|
70382
70360
|
Loading: () => /* @__PURE__ */ import_react95.default.createElement(Spinner2, null),
|
|
70383
70361
|
Error: () => null,
|
|
70384
70362
|
Success: ({ result: accountAuth }) => {
|
|
@@ -70400,17 +70378,13 @@ var EnsureLoggedIn = ({
|
|
|
70400
70378
|
});
|
|
70401
70379
|
};
|
|
70402
70380
|
|
|
70403
|
-
// ../cli-auth/src/providers/
|
|
70404
|
-
var
|
|
70405
|
-
children,
|
|
70406
|
-
onError,
|
|
70407
|
-
onLogin
|
|
70408
|
-
}) => {
|
|
70381
|
+
// ../cli-auth/src/providers/UnifiedAuthProvider.tsx
|
|
70382
|
+
var AuthProvider = ({ children, onError, onLogin }) => {
|
|
70409
70383
|
const exit = useExit();
|
|
70410
70384
|
return /* @__PURE__ */ import_react96.default.createElement(
|
|
70411
70385
|
EnsureLoggedIn,
|
|
70412
70386
|
{
|
|
70413
|
-
authStrategy:
|
|
70387
|
+
authStrategy: unifiedAuthStrategy,
|
|
70414
70388
|
onLogin: ({ userInfo: userInfo2 }) => onLogin?.(userInfo2),
|
|
70415
70389
|
onError: onError ?? exit
|
|
70416
70390
|
},
|
|
@@ -70424,40 +70398,8 @@ var AccountAuthProvider = ({
|
|
|
70424
70398
|
);
|
|
70425
70399
|
};
|
|
70426
70400
|
|
|
70427
|
-
// ../cli-auth/src/providers/SiteAuthProvider.tsx
|
|
70428
|
-
init_esm_shims();
|
|
70429
|
-
var import_react97 = __toESM(require_react(), 1);
|
|
70430
|
-
var SiteAuthProvider = ({
|
|
70431
|
-
children,
|
|
70432
|
-
siteId,
|
|
70433
|
-
onError,
|
|
70434
|
-
onLogin
|
|
70435
|
-
}) => {
|
|
70436
|
-
const exit = useExit();
|
|
70437
|
-
const authStrategy = (0, import_react97.useMemo)(() => createSiteAuthStrategy(siteId), [siteId]);
|
|
70438
|
-
return /* @__PURE__ */ import_react97.default.createElement(
|
|
70439
|
-
EnsureLoggedIn,
|
|
70440
|
-
{
|
|
70441
|
-
authStrategy,
|
|
70442
|
-
onLogin: ({ userInfo: userInfo2 }) => onLogin?.(userInfo2),
|
|
70443
|
-
onError: onError ?? exit
|
|
70444
|
-
},
|
|
70445
|
-
({ getAccessToken, getRequestHeaders, userInfo: userInfo2 }) => /* @__PURE__ */ import_react97.default.createElement(
|
|
70446
|
-
AuthContext.Provider,
|
|
70447
|
-
{
|
|
70448
|
-
value: {
|
|
70449
|
-
getAccessToken,
|
|
70450
|
-
getRequestHeaders,
|
|
70451
|
-
userInfo: userInfo2
|
|
70452
|
-
}
|
|
70453
|
-
},
|
|
70454
|
-
children
|
|
70455
|
-
)
|
|
70456
|
-
);
|
|
70457
|
-
};
|
|
70458
|
-
|
|
70459
70401
|
// ../cli-auth/src/index.ts
|
|
70460
|
-
var { isLoggedIn: isLoggedInToAccount } =
|
|
70402
|
+
var { isLoggedIn: isLoggedInToAccount } = unifiedAuthStrategy;
|
|
70461
70403
|
|
|
70462
70404
|
// ../create-app-definitions/src/index.ts
|
|
70463
70405
|
init_esm_shims();
|
|
@@ -70470,42 +70412,43 @@ function getErrorLogFilePath(cwd3) {
|
|
|
70470
70412
|
|
|
70471
70413
|
// ../create-new-packages/app-command/src/index.tsx
|
|
70472
70414
|
init_esm_shims();
|
|
70473
|
-
var
|
|
70415
|
+
var import_react127 = __toESM(require_react(), 1);
|
|
70474
70416
|
|
|
70475
70417
|
// ../cli-http-client-react/src/index.ts
|
|
70476
70418
|
init_esm_shims();
|
|
70477
70419
|
|
|
70478
70420
|
// ../cli-http-client-react/src/useHttpClient.ts
|
|
70479
70421
|
init_esm_shims();
|
|
70480
|
-
var
|
|
70422
|
+
var import_react98 = __toESM(require_react(), 1);
|
|
70481
70423
|
|
|
70482
70424
|
// ../cli-http-client-react/src/httpClientProvider.tsx
|
|
70483
70425
|
init_esm_shims();
|
|
70484
|
-
var
|
|
70485
|
-
var HttpClientContext = (0,
|
|
70426
|
+
var import_react97 = __toESM(require_react(), 1);
|
|
70427
|
+
var HttpClientContext = (0, import_react97.createContext)(null);
|
|
70486
70428
|
var HttpClientProvider = ({
|
|
70487
70429
|
children,
|
|
70488
70430
|
headers
|
|
70489
70431
|
}) => {
|
|
70490
|
-
return /* @__PURE__ */
|
|
70432
|
+
return /* @__PURE__ */ import_react97.default.createElement(HttpClientContext.Provider, { value: { headers } }, children);
|
|
70491
70433
|
};
|
|
70492
70434
|
|
|
70493
70435
|
// ../cli-http-client-react/src/useHttpClient.ts
|
|
70494
70436
|
function useHttpClient({
|
|
70495
|
-
type
|
|
70437
|
+
type,
|
|
70438
|
+
siteId
|
|
70496
70439
|
}) {
|
|
70497
|
-
const context2 = (0,
|
|
70440
|
+
const context2 = (0, import_react98.useContext)(HttpClientContext);
|
|
70498
70441
|
const { getAccessToken: getAppToken, getRequestHeaders: createAuthHeaders } = useAuth();
|
|
70499
|
-
return (0,
|
|
70442
|
+
return (0, import_react98.useMemo)(
|
|
70500
70443
|
() => createHttpClient({
|
|
70501
70444
|
type,
|
|
70502
|
-
getAppToken,
|
|
70445
|
+
getAppToken: () => getAppToken({ siteId }),
|
|
70503
70446
|
createHeaders: () => ({
|
|
70504
|
-
...createAuthHeaders?.(),
|
|
70447
|
+
...createAuthHeaders?.({ siteId }),
|
|
70505
70448
|
...context2?.headers
|
|
70506
70449
|
})
|
|
70507
70450
|
}),
|
|
70508
|
-
[type, getAppToken, createAuthHeaders, context2]
|
|
70451
|
+
[type, getAppToken, createAuthHeaders, context2, siteId]
|
|
70509
70452
|
);
|
|
70510
70453
|
}
|
|
70511
70454
|
|
|
@@ -70531,32 +70474,32 @@ init_esm_shims();
|
|
|
70531
70474
|
|
|
70532
70475
|
// ../cli-panorama/src/PanoramaContext.tsx
|
|
70533
70476
|
init_esm_shims();
|
|
70534
|
-
var
|
|
70535
|
-
var PanoramaContext = (0,
|
|
70477
|
+
var import_react99 = __toESM(require_react(), 1);
|
|
70478
|
+
var PanoramaContext = (0, import_react99.createContext)(void 0);
|
|
70536
70479
|
var PanoramaProvider = (props) => {
|
|
70537
70480
|
const { value: value2, children } = props;
|
|
70538
|
-
return /* @__PURE__ */
|
|
70481
|
+
return /* @__PURE__ */ import_react99.default.createElement(PanoramaContext.Provider, { value: value2 }, children);
|
|
70539
70482
|
};
|
|
70540
70483
|
|
|
70541
70484
|
// ../cli-panorama/src/usePanoramaMethodLogger.ts
|
|
70542
70485
|
init_esm_shims();
|
|
70543
|
-
var
|
|
70486
|
+
var import_react100 = __toESM(require_react(), 1);
|
|
70544
70487
|
function usePanoramaMethodLogger(target) {
|
|
70545
|
-
const factory = (0,
|
|
70488
|
+
const factory = (0, import_react100.useContext)(PanoramaContext);
|
|
70546
70489
|
if (factory == null) {
|
|
70547
70490
|
throw new Error(
|
|
70548
70491
|
"usePanoramaMethodLogger() cannot be used without a <PanoramaProvider />"
|
|
70549
70492
|
);
|
|
70550
70493
|
}
|
|
70551
70494
|
const componentId = target.constructor.name;
|
|
70552
|
-
const clientOptions = (0,
|
|
70495
|
+
const clientOptions = (0, import_react100.useMemo)(
|
|
70553
70496
|
() => ({ baseParams: { componentId } }),
|
|
70554
70497
|
[componentId]
|
|
70555
70498
|
);
|
|
70556
|
-
const client2 = (0,
|
|
70499
|
+
const client2 = (0, import_react100.useMemo)(() => {
|
|
70557
70500
|
return factory.client(clientOptions);
|
|
70558
70501
|
}, [factory, clientOptions]);
|
|
70559
|
-
return (0,
|
|
70502
|
+
return (0, import_react100.useMemo)(() => {
|
|
70560
70503
|
const cache3 = /* @__PURE__ */ new Map();
|
|
70561
70504
|
return new Proxy(target, {
|
|
70562
70505
|
get(target2, prop, receiver) {
|
|
@@ -71600,23 +71543,27 @@ if (overrides.panoramaReporterUrl) {
|
|
|
71600
71543
|
nodeReporter(overrides.panoramaReporterUrl, { silent: true })
|
|
71601
71544
|
);
|
|
71602
71545
|
}
|
|
71603
|
-
|
|
71604
|
-
|
|
71605
|
-
|
|
71606
|
-
|
|
71607
|
-
|
|
71608
|
-
|
|
71609
|
-
|
|
71610
|
-
|
|
71611
|
-
|
|
71612
|
-
|
|
71613
|
-
|
|
71614
|
-
|
|
71546
|
+
function createPanoramaWrapper(factory) {
|
|
71547
|
+
let defaultData = {};
|
|
71548
|
+
return {
|
|
71549
|
+
withGlobalConfig: (...args) => factory.withGlobalConfig(...args),
|
|
71550
|
+
withReporter: (...args) => factory.withReporter(...args),
|
|
71551
|
+
setMuted: (...args) => factory.setMuted(...args),
|
|
71552
|
+
setDefaultClientData(data) {
|
|
71553
|
+
defaultData = { ...defaultData, ...data };
|
|
71554
|
+
},
|
|
71555
|
+
client(options) {
|
|
71556
|
+
return factory.client({
|
|
71557
|
+
...options,
|
|
71558
|
+
data: { ...defaultData, ...options?.data }
|
|
71559
|
+
});
|
|
71560
|
+
}
|
|
71561
|
+
};
|
|
71615
71562
|
}
|
|
71616
71563
|
async function createPanorama(options) {
|
|
71617
|
-
const { version, artifact, userId, errorReporter: errorReporter2 } = options;
|
|
71564
|
+
const { version, artifact, userId, errorReporter: errorReporter2, cliSessionId: cliSessionId2 } = options;
|
|
71618
71565
|
const userConfig = await readUserConfig();
|
|
71619
|
-
const
|
|
71566
|
+
const env2 = createEnv();
|
|
71620
71567
|
const factory = panoramaClientFactory({
|
|
71621
71568
|
baseParams: {
|
|
71622
71569
|
platform: Platform.Standalone,
|
|
@@ -71630,21 +71577,25 @@ async function createPanorama(options) {
|
|
|
71630
71577
|
silent: true
|
|
71631
71578
|
},
|
|
71632
71579
|
data: {
|
|
71633
|
-
|
|
71634
|
-
|
|
71580
|
+
cliTrackingId: env2.cliTrackingId,
|
|
71581
|
+
cliEnvName: env2.cliEnvName,
|
|
71582
|
+
cliSessionId: cliSessionId2,
|
|
71583
|
+
...env2.remoteLogContext
|
|
71635
71584
|
}
|
|
71636
71585
|
}).withGlobalConfig(globalConfig).setMuted(!userConfig.telemetry);
|
|
71637
|
-
const
|
|
71638
|
-
if (errorReporter2
|
|
71639
|
-
|
|
71640
|
-
|
|
71641
|
-
|
|
71642
|
-
|
|
71586
|
+
const panorama2 = createPanoramaWrapper(factory);
|
|
71587
|
+
if (errorReporter2) {
|
|
71588
|
+
errorReporter2.on("errorReported", (error) => {
|
|
71589
|
+
const panoramaClient2 = panorama2.client({
|
|
71590
|
+
baseParams: {
|
|
71591
|
+
componentId: "error-reporter"
|
|
71592
|
+
}
|
|
71593
|
+
});
|
|
71594
|
+
const errorMonitor = panoramaClient2.errorMonitor();
|
|
71595
|
+
errorMonitor.reportError(error);
|
|
71643
71596
|
});
|
|
71644
|
-
const errorMonitor = panoramaClient2.errorMonitor();
|
|
71645
|
-
errorReporter2.on("errorReported", errorMonitor.reportError);
|
|
71646
71597
|
}
|
|
71647
|
-
return
|
|
71598
|
+
return panorama2;
|
|
71648
71599
|
}
|
|
71649
71600
|
|
|
71650
71601
|
// ../cli-panorama/src/createCommandTransaction.ts
|
|
@@ -71675,7 +71626,7 @@ init_esm_shims();
|
|
|
71675
71626
|
|
|
71676
71627
|
// ../create-new-packages/app-command/src/bi/useCreateAppBi.ts
|
|
71677
71628
|
init_esm_shims();
|
|
71678
|
-
var
|
|
71629
|
+
var import_react101 = __toESM(require_react(), 1);
|
|
71679
71630
|
|
|
71680
71631
|
// ../create-new-packages/app-command/src/bi/events.ts
|
|
71681
71632
|
init_esm_shims();
|
|
@@ -71717,12 +71668,11 @@ var createAppBiEvents = (biLogger) => ({
|
|
|
71717
71668
|
// ../create-new-packages/app-command/src/bi/useCreateAppBi.ts
|
|
71718
71669
|
function useCreateAppBi() {
|
|
71719
71670
|
const biLogger = useBiLogger();
|
|
71720
|
-
return (0,
|
|
71671
|
+
return (0, import_react101.useMemo)(() => createAppBiEvents(biLogger), [biLogger]);
|
|
71721
71672
|
}
|
|
71722
71673
|
|
|
71723
71674
|
// ../create-new-packages/app-command/src/bi/createBiLogger.ts
|
|
71724
71675
|
init_esm_shims();
|
|
71725
|
-
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
71726
71676
|
|
|
71727
71677
|
// ../cli-telemetry/src/index.ts
|
|
71728
71678
|
init_esm_shims();
|
|
@@ -71929,11 +71879,16 @@ function reportCommandStartEvent({
|
|
|
71929
71879
|
}
|
|
71930
71880
|
|
|
71931
71881
|
// ../create-new-packages/app-command/src/bi/createBiLogger.ts
|
|
71932
|
-
var createBiLogger2 = async (
|
|
71882
|
+
var createBiLogger2 = async ({
|
|
71883
|
+
errorReporter: errorReporter2,
|
|
71884
|
+
cliVersion,
|
|
71885
|
+
cliSessionId: cliSessionId2,
|
|
71886
|
+
userId
|
|
71887
|
+
}) => {
|
|
71933
71888
|
const biLogger = await createBiLogger(
|
|
71934
71889
|
{
|
|
71935
71890
|
command: "create-app",
|
|
71936
|
-
cliSessionId:
|
|
71891
|
+
cliSessionId: cliSessionId2,
|
|
71937
71892
|
cliVersion
|
|
71938
71893
|
},
|
|
71939
71894
|
userId
|
|
@@ -71968,47 +71923,47 @@ var createBiLogger2 = async (errorReporter2, cliVersion, userId) => {
|
|
|
71968
71923
|
|
|
71969
71924
|
// ../create-new-packages/app-command/src/components/CreateAppCommand.tsx
|
|
71970
71925
|
init_esm_shims();
|
|
71971
|
-
var
|
|
71972
|
-
var
|
|
71926
|
+
var import_react126 = __toESM(require_react(), 1);
|
|
71927
|
+
var import_variant39 = __toESM(require_lib(), 1);
|
|
71973
71928
|
|
|
71974
71929
|
// ../create-new-packages/app-command/src/components/WelcomeMessage.tsx
|
|
71975
71930
|
init_esm_shims();
|
|
71976
|
-
var
|
|
71931
|
+
var import_react102 = __toESM(require_react(), 1);
|
|
71977
71932
|
var WelcomeMessage = () => {
|
|
71978
71933
|
const { t: t3 } = useTranslation();
|
|
71979
|
-
return /* @__PURE__ */
|
|
71934
|
+
return /* @__PURE__ */ import_react102.default.createElement(Box_default, { flexDirection: "column", marginBottom: 1, paddingTop: 1 }, /* @__PURE__ */ import_react102.default.createElement(Text2, { bold: true }, t3("create_app.create_wix_app")));
|
|
71980
71935
|
};
|
|
71981
71936
|
|
|
71982
71937
|
// ../create-new-packages/app-command/src/components/AuthProvider.tsx
|
|
71983
71938
|
init_esm_shims();
|
|
71984
|
-
var
|
|
71939
|
+
var import_react104 = __toESM(require_react(), 1);
|
|
71985
71940
|
|
|
71986
71941
|
// ../create-new-packages/app-command/src/components/LoginRequiredWarning.tsx
|
|
71987
71942
|
init_esm_shims();
|
|
71988
|
-
var
|
|
71943
|
+
var import_react103 = __toESM(require_react(), 1);
|
|
71989
71944
|
var LoginRequiredWarning = () => {
|
|
71990
71945
|
const { t: t3 } = useTranslation();
|
|
71991
|
-
return /* @__PURE__ */
|
|
71946
|
+
return /* @__PURE__ */ import_react103.default.createElement(Box_default, { flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ import_react103.default.createElement(Text2, null, t3("create_app.login_required_warning")));
|
|
71992
71947
|
};
|
|
71993
71948
|
|
|
71994
71949
|
// ../create-new-packages/app-command/src/components/AuthProvider.tsx
|
|
71995
|
-
var
|
|
71950
|
+
var AuthProvider2 = ({ userInfo: userInfo2, children }) => {
|
|
71996
71951
|
const biLogger = useBiLogger();
|
|
71997
71952
|
const errorReporter2 = useErrorReporter();
|
|
71998
|
-
const handleLogin = (0,
|
|
71953
|
+
const handleLogin = (0, import_react104.useCallback)(
|
|
71999
71954
|
(userInfo3) => {
|
|
72000
71955
|
errorReporter2.setUser({ id: userInfo3.userId });
|
|
72001
71956
|
addUserFields(biLogger, userInfo3.userId);
|
|
72002
71957
|
},
|
|
72003
71958
|
[biLogger, errorReporter2]
|
|
72004
71959
|
);
|
|
72005
|
-
return /* @__PURE__ */
|
|
71960
|
+
return /* @__PURE__ */ import_react104.default.createElement(import_react104.default.Fragment, null, userInfo2 == null && /* @__PURE__ */ import_react104.default.createElement(LoginRequiredWarning, null), /* @__PURE__ */ import_react104.default.createElement(AuthProvider, { onLogin: handleLogin, children }));
|
|
72006
71961
|
};
|
|
72007
71962
|
|
|
72008
71963
|
// ../create-new-packages/app-command/src/components/Questions/Questions.tsx
|
|
72009
71964
|
init_esm_shims();
|
|
72010
|
-
var
|
|
72011
|
-
var
|
|
71965
|
+
var import_react121 = __toESM(require_react(), 1);
|
|
71966
|
+
var import_variant36 = __toESM(require_lib(), 1);
|
|
72012
71967
|
|
|
72013
71968
|
// ../dev-center-client/src/index.ts
|
|
72014
71969
|
init_esm_shims();
|
|
@@ -73156,12 +73111,12 @@ var JoinedConditionOperator;
|
|
|
73156
73111
|
JoinedConditionOperator2["AND"] = "AND";
|
|
73157
73112
|
})(JoinedConditionOperator || (JoinedConditionOperator = {}));
|
|
73158
73113
|
var WebhookIdentityType;
|
|
73159
|
-
(function(
|
|
73160
|
-
|
|
73161
|
-
|
|
73162
|
-
|
|
73163
|
-
|
|
73164
|
-
|
|
73114
|
+
(function(WebhookIdentityType11) {
|
|
73115
|
+
WebhookIdentityType11["UNKNOWN"] = "UNKNOWN";
|
|
73116
|
+
WebhookIdentityType11["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
73117
|
+
WebhookIdentityType11["MEMBER"] = "MEMBER";
|
|
73118
|
+
WebhookIdentityType11["WIX_USER"] = "WIX_USER";
|
|
73119
|
+
WebhookIdentityType11["APP"] = "APP";
|
|
73165
73120
|
})(WebhookIdentityType || (WebhookIdentityType = {}));
|
|
73166
73121
|
|
|
73167
73122
|
// ../../node_modules/@wix/ambassador-devcenter-dsm-v1-development-site/build/es/http.impl.js
|
|
@@ -75320,11 +75275,11 @@ var NavigationType;
|
|
|
75320
75275
|
NavigationType3["MODAL"] = "MODAL";
|
|
75321
75276
|
})(NavigationType || (NavigationType = {}));
|
|
75322
75277
|
var State;
|
|
75323
|
-
(function(
|
|
75324
|
-
|
|
75325
|
-
|
|
75326
|
-
|
|
75327
|
-
|
|
75278
|
+
(function(State4) {
|
|
75279
|
+
State4["UNKNOWN_STATE"] = "UNKNOWN_STATE";
|
|
75280
|
+
State4["DEFAULT_ON"] = "DEFAULT_ON";
|
|
75281
|
+
State4["DEFAULT_OFF"] = "DEFAULT_OFF";
|
|
75282
|
+
State4["ALWAYS_ON"] = "ALWAYS_ON";
|
|
75328
75283
|
})(State || (State = {}));
|
|
75329
75284
|
var NotificationTopicState;
|
|
75330
75285
|
(function(NotificationTopicState3) {
|
|
@@ -76992,12 +76947,12 @@ var VersionType;
|
|
|
76992
76947
|
VersionType2["DEV_VERSION"] = "DEV_VERSION";
|
|
76993
76948
|
})(VersionType || (VersionType = {}));
|
|
76994
76949
|
var WebhookIdentityType2;
|
|
76995
|
-
(function(
|
|
76996
|
-
|
|
76997
|
-
|
|
76998
|
-
|
|
76999
|
-
|
|
77000
|
-
|
|
76950
|
+
(function(WebhookIdentityType11) {
|
|
76951
|
+
WebhookIdentityType11["UNKNOWN"] = "UNKNOWN";
|
|
76952
|
+
WebhookIdentityType11["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
76953
|
+
WebhookIdentityType11["MEMBER"] = "MEMBER";
|
|
76954
|
+
WebhookIdentityType11["WIX_USER"] = "WIX_USER";
|
|
76955
|
+
WebhookIdentityType11["APP"] = "APP";
|
|
77001
76956
|
})(WebhookIdentityType2 || (WebhookIdentityType2 = {}));
|
|
77002
76957
|
|
|
77003
76958
|
// ../dev-center-client/src/schemas.ts
|
|
@@ -79747,12 +79702,12 @@ var TranslationType;
|
|
|
79747
79702
|
TranslationType2["COMPONENT"] = "COMPONENT";
|
|
79748
79703
|
})(TranslationType || (TranslationType = {}));
|
|
79749
79704
|
var WebhookIdentityType3;
|
|
79750
|
-
(function(
|
|
79751
|
-
|
|
79752
|
-
|
|
79753
|
-
|
|
79754
|
-
|
|
79755
|
-
|
|
79705
|
+
(function(WebhookIdentityType11) {
|
|
79706
|
+
WebhookIdentityType11["UNKNOWN"] = "UNKNOWN";
|
|
79707
|
+
WebhookIdentityType11["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
79708
|
+
WebhookIdentityType11["MEMBER"] = "MEMBER";
|
|
79709
|
+
WebhookIdentityType11["WIX_USER"] = "WIX_USER";
|
|
79710
|
+
WebhookIdentityType11["APP"] = "APP";
|
|
79756
79711
|
})(WebhookIdentityType3 || (WebhookIdentityType3 = {}));
|
|
79757
79712
|
|
|
79758
79713
|
// ../../node_modules/@wix/ambassador-devcenter-apps-v1-app-template/build/es/types.impl.js
|
|
@@ -80034,7 +79989,11 @@ var DevCenterClient = class {
|
|
|
80034
79989
|
const { data } = await this.httpClient.request(
|
|
80035
79990
|
updateOAuthApp({
|
|
80036
79991
|
oAuthApp,
|
|
80037
|
-
mask: [
|
|
79992
|
+
mask: [
|
|
79993
|
+
"allowedDomains",
|
|
79994
|
+
"allowedRedirectUris",
|
|
79995
|
+
"redirectUrlWixPages"
|
|
79996
|
+
]
|
|
80038
79997
|
})
|
|
80039
79998
|
);
|
|
80040
79999
|
return createOAuthAppSchema.parse(data).oAuthApp;
|
|
@@ -80395,16 +80354,18 @@ var DevCenterClient = class {
|
|
|
80395
80354
|
|
|
80396
80355
|
// ../dev-center-client/src/useDevCenterClient.ts
|
|
80397
80356
|
init_esm_shims();
|
|
80398
|
-
var
|
|
80399
|
-
function useDevCenterClient(
|
|
80400
|
-
|
|
80401
|
-
|
|
80357
|
+
var import_react105 = __toESM(require_react(), 1);
|
|
80358
|
+
function useDevCenterClient({
|
|
80359
|
+
siteId
|
|
80360
|
+
} = {}) {
|
|
80361
|
+
const httpClient = useHttpClient({ type: "backoffice", siteId });
|
|
80362
|
+
const client2 = (0, import_react105.useMemo)(() => new DevCenterClient(httpClient), [httpClient]);
|
|
80402
80363
|
return usePanoramaMethodLogger(client2);
|
|
80403
80364
|
}
|
|
80404
80365
|
|
|
80405
80366
|
// ../create-new-packages/app-command/src/parse-command-options.ts
|
|
80406
80367
|
init_esm_shims();
|
|
80407
|
-
var
|
|
80368
|
+
var import_variant26 = __toESM(require_lib(), 1);
|
|
80408
80369
|
var import_kebabCase2 = __toESM(require_kebabCase(), 1);
|
|
80409
80370
|
import { join as join8, resolve as resolve3 } from "node:path";
|
|
80410
80371
|
|
|
@@ -80437,11 +80398,11 @@ var import_validate_npm_package_name = __toESM(require_lib2(), 1);
|
|
|
80437
80398
|
|
|
80438
80399
|
// ../create-new-packages/app-command/src/validations/result.ts
|
|
80439
80400
|
init_esm_shims();
|
|
80440
|
-
var
|
|
80441
|
-
var Result = (0,
|
|
80442
|
-
(0,
|
|
80443
|
-
Error: (0,
|
|
80444
|
-
Ok:
|
|
80401
|
+
var import_variant25 = __toESM(require_lib(), 1);
|
|
80402
|
+
var Result = (0, import_variant25.variant)(
|
|
80403
|
+
(0, import_variant25.onTerms)(({ T }) => ({
|
|
80404
|
+
Error: (0, import_variant25.payload)(T),
|
|
80405
|
+
Ok: import_variant25.nil
|
|
80445
80406
|
}))
|
|
80446
80407
|
);
|
|
80447
80408
|
|
|
@@ -80503,11 +80464,11 @@ function validateAppName(value2) {
|
|
|
80503
80464
|
}
|
|
80504
80465
|
|
|
80505
80466
|
// ../create-new-packages/app-command/src/parse-command-options.ts
|
|
80506
|
-
var TemplateSource = (0,
|
|
80507
|
-
App: (0,
|
|
80508
|
-
GitRepo: (0,
|
|
80509
|
-
Local: (0,
|
|
80510
|
-
Default: (0,
|
|
80467
|
+
var TemplateSource = (0, import_variant26.variant)({
|
|
80468
|
+
App: (0, import_variant26.payload)(),
|
|
80469
|
+
GitRepo: (0, import_variant26.fields)(),
|
|
80470
|
+
Local: (0, import_variant26.fields)(),
|
|
80471
|
+
Default: (0, import_variant26.constant)({ path: resolve3(__dirname, "../templates/app/blank") })
|
|
80511
80472
|
});
|
|
80512
80473
|
async function parseTemplateOptions(options, { devCenterClient }) {
|
|
80513
80474
|
if (options.template) {
|
|
@@ -80540,8 +80501,8 @@ async function parseTemplateOptions(options, { devCenterClient }) {
|
|
|
80540
80501
|
return TemplateSource.Local({ path: options.templatePath });
|
|
80541
80502
|
}
|
|
80542
80503
|
}
|
|
80543
|
-
var AppNameOptions = (0,
|
|
80544
|
-
Provided: (0,
|
|
80504
|
+
var AppNameOptions = (0, import_variant26.variant)({
|
|
80505
|
+
Provided: (0, import_variant26.fields)(),
|
|
80545
80506
|
Missing: {}
|
|
80546
80507
|
});
|
|
80547
80508
|
async function parseAppNameOptions(targetParentFolder2, options) {
|
|
@@ -80557,7 +80518,7 @@ async function parseAppNameOptions(targetParentFolder2, options) {
|
|
|
80557
80518
|
});
|
|
80558
80519
|
}
|
|
80559
80520
|
const npmValidationErrors = await validatePackageName(packageName);
|
|
80560
|
-
if ((0,
|
|
80521
|
+
if ((0, import_variant26.isType)(npmValidationErrors, "Error")) {
|
|
80561
80522
|
throw new CliError({
|
|
80562
80523
|
code: CliErrorCode.AppNameArgumentIsInvalid({
|
|
80563
80524
|
errorMessage: `Invalid package name "${packageName}". Please fix the following issues: ${npmValidationErrors.payload.join(", ")}`
|
|
@@ -80572,7 +80533,7 @@ async function parseAppNameOptions(targetParentFolder2, options) {
|
|
|
80572
80533
|
async function parseCommandOptions(targetParentFolder2, options, clients) {
|
|
80573
80534
|
const template = await parseTemplateOptions(options, clients);
|
|
80574
80535
|
const appNameOptions = await parseAppNameOptions(targetParentFolder2, options);
|
|
80575
|
-
if ((0,
|
|
80536
|
+
if ((0, import_variant26.isType)(appNameOptions, "Provided") && !template) {
|
|
80576
80537
|
throw new CliError({
|
|
80577
80538
|
code: CliErrorCode.AppNameArgumentIsInvalid({
|
|
80578
80539
|
errorMessage: "An application name was provided, but no template was specified. Please specify a template when defining the application name."
|
|
@@ -80585,8 +80546,8 @@ async function parseCommandOptions(targetParentFolder2, options, clients) {
|
|
|
80585
80546
|
|
|
80586
80547
|
// ../create-new-packages/app-command/src/types.ts
|
|
80587
80548
|
init_esm_shims();
|
|
80588
|
-
var
|
|
80589
|
-
var DeveloperAppsStatus = (0,
|
|
80549
|
+
var import_variant27 = __toESM(require_lib(), 1);
|
|
80550
|
+
var DeveloperAppsStatus = (0, import_variant27.variant)({
|
|
80590
80551
|
NoApps: {},
|
|
80591
80552
|
FailedLoadingApps: {},
|
|
80592
80553
|
Available: {}
|
|
@@ -80594,24 +80555,24 @@ var DeveloperAppsStatus = (0, import_variant26.variant)({
|
|
|
80594
80555
|
|
|
80595
80556
|
// ../create-new-packages/app-command/src/components/CreateAppOrExtendExisting.tsx
|
|
80596
80557
|
init_esm_shims();
|
|
80597
|
-
var
|
|
80598
|
-
var
|
|
80558
|
+
var import_react106 = __toESM(require_react(), 1);
|
|
80559
|
+
var import_variant28 = __toESM(require_lib(), 1);
|
|
80599
80560
|
var CreateAppOrExtendExisting = ({
|
|
80600
80561
|
developerAppsStatus,
|
|
80601
80562
|
onStartCreationFlow
|
|
80602
80563
|
}) => {
|
|
80603
80564
|
const { t: t3 } = useTranslation();
|
|
80604
80565
|
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
80605
|
-
const exisitingAvailabilty = (0,
|
|
80566
|
+
const exisitingAvailabilty = (0, import_variant28.match)(
|
|
80606
80567
|
developerAppsStatus,
|
|
80607
|
-
(0,
|
|
80568
|
+
(0, import_variant28.lookup)({
|
|
80608
80569
|
FailedLoadingApps: SelectOptionAvailability.Disabled({
|
|
80609
80570
|
reason: t3("create_app.create_new_or_extend.failed_fetching_apps")
|
|
80610
80571
|
}),
|
|
80611
80572
|
Available: SelectOptionAvailability.Enabled()
|
|
80612
80573
|
})
|
|
80613
80574
|
);
|
|
80614
|
-
return /* @__PURE__ */
|
|
80575
|
+
return /* @__PURE__ */ import_react106.default.createElement(import_react106.default.Fragment, null, /* @__PURE__ */ import_react106.default.createElement(
|
|
80615
80576
|
SelectInput2,
|
|
80616
80577
|
{
|
|
80617
80578
|
label: t3("create_app.create_new_or_extend.label"),
|
|
@@ -80644,15 +80605,15 @@ var CreateAppOrExtendExisting = ({
|
|
|
80644
80605
|
|
|
80645
80606
|
// ../create-new-packages/app-command/src/components/Questions/NewAppFlow.tsx
|
|
80646
80607
|
init_esm_shims();
|
|
80647
|
-
var
|
|
80648
|
-
var
|
|
80608
|
+
var import_react117 = __toESM(require_react(), 1);
|
|
80609
|
+
var import_variant33 = __toESM(require_lib(), 1);
|
|
80649
80610
|
|
|
80650
80611
|
// ../backend-as-a-service-client/src/index.ts
|
|
80651
80612
|
init_esm_shims();
|
|
80652
80613
|
|
|
80653
80614
|
// ../backend-as-a-service-client/src/useBackendAsAServiceClient.ts
|
|
80654
80615
|
init_esm_shims();
|
|
80655
|
-
var
|
|
80616
|
+
var import_react107 = __toESM(require_react(), 1);
|
|
80656
80617
|
|
|
80657
80618
|
// ../backend-as-a-service-client/src/backend-as-a-service-client.ts
|
|
80658
80619
|
init_esm_shims();
|
|
@@ -80850,12 +80811,12 @@ var CloudProvider;
|
|
|
80850
80811
|
CloudProvider3["KUBERNETES"] = "KUBERNETES";
|
|
80851
80812
|
})(CloudProvider || (CloudProvider = {}));
|
|
80852
80813
|
var WebhookIdentityType4;
|
|
80853
|
-
(function(
|
|
80854
|
-
|
|
80855
|
-
|
|
80856
|
-
|
|
80857
|
-
|
|
80858
|
-
|
|
80814
|
+
(function(WebhookIdentityType11) {
|
|
80815
|
+
WebhookIdentityType11["UNKNOWN"] = "UNKNOWN";
|
|
80816
|
+
WebhookIdentityType11["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
80817
|
+
WebhookIdentityType11["MEMBER"] = "MEMBER";
|
|
80818
|
+
WebhookIdentityType11["WIX_USER"] = "WIX_USER";
|
|
80819
|
+
WebhookIdentityType11["APP"] = "APP";
|
|
80859
80820
|
})(WebhookIdentityType4 || (WebhookIdentityType4 = {}));
|
|
80860
80821
|
var SortOrder2;
|
|
80861
80822
|
(function(SortOrder5) {
|
|
@@ -81001,12 +80962,12 @@ var SortOrder3;
|
|
|
81001
80962
|
SortOrder5["DESC"] = "DESC";
|
|
81002
80963
|
})(SortOrder3 || (SortOrder3 = {}));
|
|
81003
80964
|
var WebhookIdentityType5;
|
|
81004
|
-
(function(
|
|
81005
|
-
|
|
81006
|
-
|
|
81007
|
-
|
|
81008
|
-
|
|
81009
|
-
|
|
80965
|
+
(function(WebhookIdentityType11) {
|
|
80966
|
+
WebhookIdentityType11["UNKNOWN"] = "UNKNOWN";
|
|
80967
|
+
WebhookIdentityType11["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
80968
|
+
WebhookIdentityType11["MEMBER"] = "MEMBER";
|
|
80969
|
+
WebhookIdentityType11["WIX_USER"] = "WIX_USER";
|
|
80970
|
+
WebhookIdentityType11["APP"] = "APP";
|
|
81010
80971
|
})(WebhookIdentityType5 || (WebhookIdentityType5 = {}));
|
|
81011
80972
|
|
|
81012
80973
|
// ../backend-as-a-service-client/src/schemas.ts
|
|
@@ -81279,7 +81240,7 @@ var BackendAsAServiceClient = class {
|
|
|
81279
81240
|
// ../backend-as-a-service-client/src/useBackendAsAServiceClient.ts
|
|
81280
81241
|
function useBackendAsAServiceClient() {
|
|
81281
81242
|
const httpClient = useHttpClient({ type: "backoffice" });
|
|
81282
|
-
const client2 = (0,
|
|
81243
|
+
const client2 = (0, import_react107.useMemo)(
|
|
81283
81244
|
() => new BackendAsAServiceClient(httpClient),
|
|
81284
81245
|
[httpClient]
|
|
81285
81246
|
);
|
|
@@ -81288,11 +81249,11 @@ function useBackendAsAServiceClient() {
|
|
|
81288
81249
|
|
|
81289
81250
|
// ../create-new-packages/app-command/src/components/ChooseAppName.tsx
|
|
81290
81251
|
init_esm_shims();
|
|
81291
|
-
var
|
|
81252
|
+
var import_react108 = __toESM(require_react(), 1);
|
|
81292
81253
|
var ChooseAppName = ({ onSubmit }) => {
|
|
81293
81254
|
const { t: t3 } = useTranslation();
|
|
81294
81255
|
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81295
|
-
return /* @__PURE__ */
|
|
81256
|
+
return /* @__PURE__ */ import_react108.default.createElement(
|
|
81296
81257
|
TextInput2,
|
|
81297
81258
|
{
|
|
81298
81259
|
label: t3("create_app.create_new.name_of_app.label"),
|
|
@@ -81313,22 +81274,22 @@ var ChooseAppName = ({ onSubmit }) => {
|
|
|
81313
81274
|
|
|
81314
81275
|
// ../create-new-packages/app-command/src/components/ChoosePackageName.tsx
|
|
81315
81276
|
init_esm_shims();
|
|
81316
|
-
var
|
|
81317
|
-
var
|
|
81277
|
+
var import_react110 = __toESM(require_react(), 1);
|
|
81278
|
+
var import_variant29 = __toESM(require_lib(), 1);
|
|
81318
81279
|
import { join as join9, relative } from "node:path";
|
|
81319
81280
|
var import_kebabCase3 = __toESM(require_kebabCase(), 1);
|
|
81320
81281
|
|
|
81321
81282
|
// ../create-new-packages/app-command/src/components/ConfirmPackagePath.tsx
|
|
81322
81283
|
init_esm_shims();
|
|
81323
|
-
var
|
|
81284
|
+
var import_react109 = __toESM(require_react(), 1);
|
|
81324
81285
|
var ConfirmPackagePath = ({
|
|
81325
81286
|
path: path4,
|
|
81326
81287
|
onSubmit
|
|
81327
81288
|
}) => {
|
|
81328
81289
|
const { t: t3 } = useTranslation();
|
|
81329
81290
|
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81330
|
-
const [cancelled, setCancelled] = (0,
|
|
81331
|
-
return /* @__PURE__ */
|
|
81291
|
+
const [cancelled, setCancelled] = (0, import_react109.useState)(false);
|
|
81292
|
+
return /* @__PURE__ */ import_react109.default.createElement(import_react109.default.Fragment, null, /* @__PURE__ */ import_react109.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react109.default.createElement(
|
|
81332
81293
|
ConfirmInput,
|
|
81333
81294
|
{
|
|
81334
81295
|
label: t3("create_app.confirm_path_message", {
|
|
@@ -81347,7 +81308,7 @@ var ConfirmPackagePath = ({
|
|
|
81347
81308
|
}
|
|
81348
81309
|
}
|
|
81349
81310
|
}
|
|
81350
|
-
)), cancelled && /* @__PURE__ */
|
|
81311
|
+
)), cancelled && /* @__PURE__ */ import_react109.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react109.default.createElement(Text2, null, t3("create_app.confirm_path_exit_message"))));
|
|
81351
81312
|
};
|
|
81352
81313
|
|
|
81353
81314
|
// ../create-new-packages/app-command/src/components/ChoosePackageName.tsx
|
|
@@ -81359,24 +81320,24 @@ var ChoosePackageName = ({
|
|
|
81359
81320
|
}) => {
|
|
81360
81321
|
const { t: t3 } = useTranslation();
|
|
81361
81322
|
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81362
|
-
const [packageName, setPackageName] = (0,
|
|
81363
|
-
const defaultPackageName = (0,
|
|
81323
|
+
const [packageName, setPackageName] = (0, import_react110.useState)();
|
|
81324
|
+
const defaultPackageName = (0, import_react110.useMemo)(() => {
|
|
81364
81325
|
return (0, import_kebabCase3.default)(appName);
|
|
81365
81326
|
}, [appName]);
|
|
81366
|
-
const isMonorepo = (0,
|
|
81327
|
+
const isMonorepo = (0, import_variant29.isType)(repoType2, RepoType.Monorepo);
|
|
81367
81328
|
async function validate3(packageName2) {
|
|
81368
81329
|
if (!await validateDirectory(join9(targetParentFolder2, packageName2))) {
|
|
81369
81330
|
return t3("validation_errors.invalid_directory");
|
|
81370
81331
|
}
|
|
81371
81332
|
const npmValidationErrors = await validatePackageName(packageName2);
|
|
81372
|
-
return (0,
|
|
81333
|
+
return (0, import_variant29.match)(npmValidationErrors, {
|
|
81373
81334
|
Ok: () => true,
|
|
81374
81335
|
Error: ({ payload: payload7 }) => t3("validation_errors.invalid_package_name", {
|
|
81375
81336
|
errors: payload7.join(", ")
|
|
81376
81337
|
})
|
|
81377
81338
|
});
|
|
81378
81339
|
}
|
|
81379
|
-
const handlePackageNameSet = (0,
|
|
81340
|
+
const handlePackageNameSet = (0, import_react110.useCallback)(
|
|
81380
81341
|
(packageName2) => {
|
|
81381
81342
|
cliFlowStepAnswered({
|
|
81382
81343
|
question: t3("create_app.choose_package_name.label"),
|
|
@@ -81391,7 +81352,7 @@ var ChoosePackageName = ({
|
|
|
81391
81352
|
},
|
|
81392
81353
|
[cliFlowStepAnswered, setPackageName, onSelected, isMonorepo, t3]
|
|
81393
81354
|
);
|
|
81394
|
-
const handlePackagePathConfirm = (0,
|
|
81355
|
+
const handlePackagePathConfirm = (0, import_react110.useCallback)(
|
|
81395
81356
|
(packageName2, isConfirmed) => {
|
|
81396
81357
|
if (isConfirmed) {
|
|
81397
81358
|
onSelected(packageName2);
|
|
@@ -81399,7 +81360,7 @@ var ChoosePackageName = ({
|
|
|
81399
81360
|
},
|
|
81400
81361
|
[onSelected]
|
|
81401
81362
|
);
|
|
81402
|
-
return /* @__PURE__ */
|
|
81363
|
+
return /* @__PURE__ */ import_react110.default.createElement(import_react110.default.Fragment, null, /* @__PURE__ */ import_react110.default.createElement(
|
|
81403
81364
|
TextInput2,
|
|
81404
81365
|
{
|
|
81405
81366
|
label: t3("create_app.choose_package_name.label"),
|
|
@@ -81408,7 +81369,7 @@ var ChoosePackageName = ({
|
|
|
81408
81369
|
validate: validate3,
|
|
81409
81370
|
inCreateFlow: true
|
|
81410
81371
|
}
|
|
81411
|
-
), packageName && isMonorepo && /* @__PURE__ */
|
|
81372
|
+
), packageName && isMonorepo && /* @__PURE__ */ import_react110.default.createElement(
|
|
81412
81373
|
ConfirmPackagePath,
|
|
81413
81374
|
{
|
|
81414
81375
|
path: relative(
|
|
@@ -81422,17 +81383,17 @@ var ChoosePackageName = ({
|
|
|
81422
81383
|
|
|
81423
81384
|
// ../create-new-packages/app-command/src/components/Questions/ChooseTemplateFlow.tsx
|
|
81424
81385
|
init_esm_shims();
|
|
81425
|
-
var
|
|
81386
|
+
var import_react113 = __toESM(require_react(), 1);
|
|
81426
81387
|
|
|
81427
81388
|
// ../create-new-packages/app-command/src/components/ChooseAppCreationSource.tsx
|
|
81428
81389
|
init_esm_shims();
|
|
81429
|
-
var
|
|
81390
|
+
var import_react111 = __toESM(require_react(), 1);
|
|
81430
81391
|
var ChooseAppCreationSource = ({
|
|
81431
81392
|
onSelected
|
|
81432
81393
|
}) => {
|
|
81433
81394
|
const { t: t3 } = useTranslation();
|
|
81434
81395
|
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81435
|
-
return /* @__PURE__ */
|
|
81396
|
+
return /* @__PURE__ */ import_react111.default.createElement(
|
|
81436
81397
|
SelectInput2,
|
|
81437
81398
|
{
|
|
81438
81399
|
label: t3("create_app.choose_app_creation_source.label"),
|
|
@@ -81466,13 +81427,13 @@ var ChooseAppCreationSource = ({
|
|
|
81466
81427
|
|
|
81467
81428
|
// ../create-new-packages/app-command/src/components/ChooseTemplate.tsx
|
|
81468
81429
|
init_esm_shims();
|
|
81469
|
-
var
|
|
81470
|
-
var
|
|
81430
|
+
var import_react112 = __toESM(require_react(), 1);
|
|
81431
|
+
var import_variant30 = __toESM(require_lib(), 1);
|
|
81471
81432
|
var ChooseTemplate = ({ onSelected }) => {
|
|
81472
81433
|
const { t: t3 } = useTranslation();
|
|
81473
81434
|
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81474
81435
|
const { queryCliAppTemplates } = useDevCenterClient();
|
|
81475
|
-
const [isTemplateSelected, setIsTemplateSelected] = (0,
|
|
81436
|
+
const [isTemplateSelected, setIsTemplateSelected] = (0, import_react112.useState)(false);
|
|
81476
81437
|
const { status } = useAsync2(async () => {
|
|
81477
81438
|
const appTemplates = await queryCliAppTemplates();
|
|
81478
81439
|
const filteredAppTemplates = appTemplates.filter(
|
|
@@ -81489,10 +81450,10 @@ var ChooseTemplate = ({ onSelected }) => {
|
|
|
81489
81450
|
})
|
|
81490
81451
|
};
|
|
81491
81452
|
}, []);
|
|
81492
|
-
return /* @__PURE__ */
|
|
81453
|
+
return /* @__PURE__ */ import_react112.default.createElement(import_react112.default.Fragment, null, (0, import_variant30.match)(status, {
|
|
81493
81454
|
Error: () => null,
|
|
81494
|
-
Loading: () => /* @__PURE__ */
|
|
81495
|
-
Success: ({ result: { appTemplatesOptions } }) => /* @__PURE__ */
|
|
81455
|
+
Loading: () => /* @__PURE__ */ import_react112.default.createElement(Spinner2, null),
|
|
81456
|
+
Success: ({ result: { appTemplatesOptions } }) => /* @__PURE__ */ import_react112.default.createElement(import_react112.default.Fragment, null, /* @__PURE__ */ import_react112.default.createElement(
|
|
81496
81457
|
SelectInput2,
|
|
81497
81458
|
{
|
|
81498
81459
|
label: t3("create_app.choose_template.title"),
|
|
@@ -81507,12 +81468,12 @@ var ChooseTemplate = ({ onSelected }) => {
|
|
|
81507
81468
|
onSelected(value2);
|
|
81508
81469
|
}
|
|
81509
81470
|
}
|
|
81510
|
-
), !isTemplateSelected && /* @__PURE__ */
|
|
81471
|
+
), !isTemplateSelected && /* @__PURE__ */ import_react112.default.createElement(Box_default, { marginTop: 1 }, /* @__PURE__ */ import_react112.default.createElement(
|
|
81511
81472
|
Trans2,
|
|
81512
81473
|
{
|
|
81513
81474
|
i18nKey: "create_app.choose_template.see_templates",
|
|
81514
81475
|
components: [
|
|
81515
|
-
/* @__PURE__ */
|
|
81476
|
+
/* @__PURE__ */ import_react112.default.createElement(Link, { url: "https://dev.wix.com/apps-templates?filter=cli" })
|
|
81516
81477
|
]
|
|
81517
81478
|
}
|
|
81518
81479
|
)))
|
|
@@ -81523,8 +81484,8 @@ var ChooseTemplate = ({ onSelected }) => {
|
|
|
81523
81484
|
var ChooseTemplateFlow = ({
|
|
81524
81485
|
onTemplateChoose
|
|
81525
81486
|
}) => {
|
|
81526
|
-
const [shouldSelectTemplate, setShouldSelectTemplate] = (0,
|
|
81527
|
-
return /* @__PURE__ */
|
|
81487
|
+
const [shouldSelectTemplate, setShouldSelectTemplate] = (0, import_react113.useState)(false);
|
|
81488
|
+
return /* @__PURE__ */ import_react113.default.createElement(import_react113.default.Fragment, null, /* @__PURE__ */ import_react113.default.createElement(
|
|
81528
81489
|
ChooseAppCreationSource,
|
|
81529
81490
|
{
|
|
81530
81491
|
onSelected: (source) => {
|
|
@@ -81535,7 +81496,7 @@ var ChooseTemplateFlow = ({
|
|
|
81535
81496
|
}
|
|
81536
81497
|
}
|
|
81537
81498
|
}
|
|
81538
|
-
), shouldSelectTemplate && /* @__PURE__ */
|
|
81499
|
+
), shouldSelectTemplate && /* @__PURE__ */ import_react113.default.createElement(
|
|
81539
81500
|
ChooseTemplate,
|
|
81540
81501
|
{
|
|
81541
81502
|
onSelected: (template) => {
|
|
@@ -81547,21 +81508,21 @@ var ChooseTemplateFlow = ({
|
|
|
81547
81508
|
|
|
81548
81509
|
// ../create-new-packages/app-command/src/components/RegisteringApp.tsx
|
|
81549
81510
|
init_esm_shims();
|
|
81550
|
-
var
|
|
81511
|
+
var import_react114 = __toESM(require_react(), 1);
|
|
81551
81512
|
var RegisteringApp = () => {
|
|
81552
81513
|
const { t: t3 } = useTranslation();
|
|
81553
|
-
return /* @__PURE__ */
|
|
81514
|
+
return /* @__PURE__ */ import_react114.default.createElement(Box_default, { marginTop: 1 }, /* @__PURE__ */ import_react114.default.createElement(Spinner2, { text: t3("create_app.create_new.registering_your_app") }));
|
|
81554
81515
|
};
|
|
81555
81516
|
|
|
81556
81517
|
// ../create-new-packages/app-command/src/components/AppRegistered.tsx
|
|
81557
81518
|
init_esm_shims();
|
|
81558
|
-
var
|
|
81519
|
+
var import_react115 = __toESM(require_react(), 1);
|
|
81559
81520
|
var AppRegistered = ({ appName }) => {
|
|
81560
|
-
return /* @__PURE__ */
|
|
81521
|
+
return /* @__PURE__ */ import_react115.default.createElement(Box_default, { marginLeft: -2 }, /* @__PURE__ */ import_react115.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react115.default.createElement(Badge, { skin: "success" }, /* @__PURE__ */ import_react115.default.createElement(Trans2, { i18nKey: "create_app.success" })), " ", /* @__PURE__ */ import_react115.default.createElement(
|
|
81561
81522
|
Trans2,
|
|
81562
81523
|
{
|
|
81563
81524
|
i18nKey: "create_app.create_new.app_registered_successfully",
|
|
81564
|
-
components: [/* @__PURE__ */
|
|
81525
|
+
components: [/* @__PURE__ */ import_react115.default.createElement(Text2, { bold: true })],
|
|
81565
81526
|
values: { appName }
|
|
81566
81527
|
}
|
|
81567
81528
|
)));
|
|
@@ -81569,9 +81530,9 @@ var AppRegistered = ({ appName }) => {
|
|
|
81569
81530
|
|
|
81570
81531
|
// ../create-new-packages/app-command/src/components/mcp/ConfigMcp.tsx
|
|
81571
81532
|
init_esm_shims();
|
|
81572
|
-
var
|
|
81573
|
-
var
|
|
81574
|
-
var IdeForMcp = (0,
|
|
81533
|
+
var import_react116 = __toESM(require_react(), 1);
|
|
81534
|
+
var import_variant31 = __toESM(require_lib(), 1);
|
|
81535
|
+
var IdeForMcp = (0, import_variant31.variant)({
|
|
81575
81536
|
VsCode: {},
|
|
81576
81537
|
Cursor: {},
|
|
81577
81538
|
ClaudeCode: {}
|
|
@@ -81579,16 +81540,16 @@ var IdeForMcp = (0, import_variant30.variant)({
|
|
|
81579
81540
|
var ConfigMcp = ({ onSelected }) => {
|
|
81580
81541
|
const { t: t3 } = useTranslation();
|
|
81581
81542
|
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81582
|
-
return /* @__PURE__ */
|
|
81543
|
+
return /* @__PURE__ */ import_react116.default.createElement(
|
|
81583
81544
|
SelectInput2,
|
|
81584
81545
|
{
|
|
81585
81546
|
label: t3("create_app.choose_ide_for_mcp.question"),
|
|
81586
|
-
info: /* @__PURE__ */
|
|
81547
|
+
info: /* @__PURE__ */ import_react116.default.createElement(
|
|
81587
81548
|
Trans2,
|
|
81588
81549
|
{
|
|
81589
81550
|
i18nKey: "create_app.choose_ide_for_mcp.description",
|
|
81590
81551
|
components: [
|
|
81591
|
-
/* @__PURE__ */
|
|
81552
|
+
/* @__PURE__ */ import_react116.default.createElement(Link, { url: "https://www.wix.com/studio/developers/mcp-server" })
|
|
81592
81553
|
]
|
|
81593
81554
|
}
|
|
81594
81555
|
),
|
|
@@ -81628,17 +81589,17 @@ var ConfigMcp = ({ onSelected }) => {
|
|
|
81628
81589
|
|
|
81629
81590
|
// ../create-new-packages/app-command/src/components/mcp/getMcpResult.ts
|
|
81630
81591
|
init_esm_shims();
|
|
81631
|
-
var
|
|
81592
|
+
var import_variant32 = __toESM(require_lib(), 1);
|
|
81632
81593
|
import { join as join10 } from "node:path";
|
|
81633
|
-
var McpConfigResult = (0,
|
|
81634
|
-
Created: (0,
|
|
81594
|
+
var McpConfigResult = (0, import_variant32.variant)({
|
|
81595
|
+
Created: (0, import_variant32.fields)(),
|
|
81635
81596
|
Canceled: {}
|
|
81636
81597
|
});
|
|
81637
81598
|
var getMcpData = ({
|
|
81638
81599
|
ideForMcp,
|
|
81639
81600
|
packageFolder
|
|
81640
81601
|
}) => {
|
|
81641
|
-
const mcpPath = (0,
|
|
81602
|
+
const mcpPath = (0, import_variant32.match)(ideForMcp, {
|
|
81642
81603
|
Cursor: () => join10(packageFolder, ".cursor", "mcp.json"),
|
|
81643
81604
|
VsCode: () => join10(packageFolder, ".vscode", "mcp.json"),
|
|
81644
81605
|
ClaudeCode: () => join10(packageFolder, ".mcp.json")
|
|
@@ -81646,9 +81607,9 @@ var getMcpData = ({
|
|
|
81646
81607
|
return McpConfigResult.Created({
|
|
81647
81608
|
mcpPath,
|
|
81648
81609
|
ideForMcp,
|
|
81649
|
-
docsUrl: (0,
|
|
81610
|
+
docsUrl: (0, import_variant32.match)(
|
|
81650
81611
|
ideForMcp,
|
|
81651
|
-
(0,
|
|
81612
|
+
(0, import_variant32.lookup)({
|
|
81652
81613
|
Cursor: "https://cursor.com/docs/context/mcp",
|
|
81653
81614
|
VsCode: "https://code.visualstudio.com/docs/copilot/chat/mcp-servers",
|
|
81654
81615
|
ClaudeCode: "https://docs.anthropic.com/en/docs/claude-code/mcp"
|
|
@@ -81723,16 +81684,16 @@ var NewAppFlow = ({
|
|
|
81723
81684
|
const devCenterClient = useDevCenterClient();
|
|
81724
81685
|
const backendAsAServiceClient = useBackendAsAServiceClient();
|
|
81725
81686
|
const biLogger = useBiLogger();
|
|
81726
|
-
const [templateData, setTemplateData] = (0,
|
|
81687
|
+
const [templateData, setTemplateData] = (0, import_react117.useState)(
|
|
81727
81688
|
templateFromOptions
|
|
81728
81689
|
);
|
|
81729
|
-
const [appName, setAppName] = (0,
|
|
81730
|
-
const [packageName, setPackageName] = (0,
|
|
81690
|
+
const [appName, setAppName] = (0, import_react117.useState)();
|
|
81691
|
+
const [packageName, setPackageName] = (0, import_react117.useState)();
|
|
81731
81692
|
const createAppCallback = useAsyncCallback3(
|
|
81732
81693
|
async (_2, { appName: appName2, packageName: packageName2, template, mcpConfigResult }) => {
|
|
81733
|
-
const { id: appId } = await (0,
|
|
81694
|
+
const { id: appId } = await (0, import_variant33.match)(
|
|
81734
81695
|
template,
|
|
81735
|
-
(0,
|
|
81696
|
+
(0, import_variant33.partial)({
|
|
81736
81697
|
App: ({ payload: payload7 }) => devCenterClient.createAppFromTemplate(
|
|
81737
81698
|
{
|
|
81738
81699
|
name: appName2,
|
|
@@ -81770,7 +81731,7 @@ var NewAppFlow = ({
|
|
|
81770
81731
|
};
|
|
81771
81732
|
}
|
|
81772
81733
|
);
|
|
81773
|
-
const autoCreateApp = (0,
|
|
81734
|
+
const autoCreateApp = (0, import_variant33.isType)(appNameFromOptions, "Provided") && !!templateFromOptions;
|
|
81774
81735
|
useAsync2(async () => {
|
|
81775
81736
|
if (autoCreateApp) {
|
|
81776
81737
|
return createAppCallback.execute({
|
|
@@ -81781,14 +81742,14 @@ var NewAppFlow = ({
|
|
|
81781
81742
|
});
|
|
81782
81743
|
}
|
|
81783
81744
|
}, []);
|
|
81784
|
-
return /* @__PURE__ */
|
|
81745
|
+
return /* @__PURE__ */ import_react117.default.createElement(import_react117.default.Fragment, null, !templateFromOptions && /* @__PURE__ */ import_react117.default.createElement(ChooseTemplateFlow, { onTemplateChoose: setTemplateData }), templateData && !autoCreateApp && /* @__PURE__ */ import_react117.default.createElement(ChooseAppName, { onSubmit: setAppName }), appName && templateData && !autoCreateApp && /* @__PURE__ */ import_react117.default.createElement(
|
|
81785
81746
|
ChoosePackageName,
|
|
81786
81747
|
{
|
|
81787
81748
|
appName,
|
|
81788
81749
|
targetParentFolder: targetParentFolder2,
|
|
81789
81750
|
repoType: repoType2,
|
|
81790
81751
|
onSelected: (userPackageName) => {
|
|
81791
|
-
if ((0,
|
|
81752
|
+
if ((0, import_variant33.isType)(repoType2, RepoType.Monorepo)) {
|
|
81792
81753
|
void createAppCallback.execute({
|
|
81793
81754
|
appName,
|
|
81794
81755
|
packageName: userPackageName,
|
|
@@ -81800,7 +81761,7 @@ var NewAppFlow = ({
|
|
|
81800
81761
|
}
|
|
81801
81762
|
}
|
|
81802
81763
|
}
|
|
81803
|
-
), appName && packageName && templateData && !autoCreateApp && /* @__PURE__ */
|
|
81764
|
+
), appName && packageName && templateData && !autoCreateApp && /* @__PURE__ */ import_react117.default.createElement(import_react117.default.Fragment, null, /* @__PURE__ */ import_react117.default.createElement(
|
|
81804
81765
|
ConfigMcp,
|
|
81805
81766
|
{
|
|
81806
81767
|
onSelected: (ideForMcp) => {
|
|
@@ -81816,29 +81777,29 @@ var NewAppFlow = ({
|
|
|
81816
81777
|
});
|
|
81817
81778
|
}
|
|
81818
81779
|
}
|
|
81819
|
-
)), (0,
|
|
81780
|
+
)), (0, import_variant33.match)(createAppCallback.status, {
|
|
81820
81781
|
Error: () => null,
|
|
81821
|
-
Loading: () => /* @__PURE__ */
|
|
81822
|
-
Success: ({ result }) => /* @__PURE__ */
|
|
81782
|
+
Loading: () => /* @__PURE__ */ import_react117.default.createElement(RegisteringApp, null),
|
|
81783
|
+
Success: ({ result }) => /* @__PURE__ */ import_react117.default.createElement(AppRegistered, { ...result }),
|
|
81823
81784
|
NotRequested: () => null
|
|
81824
81785
|
}));
|
|
81825
81786
|
};
|
|
81826
81787
|
|
|
81827
81788
|
// ../create-new-packages/app-command/src/components/Questions/ExistingAppFlow.tsx
|
|
81828
81789
|
init_esm_shims();
|
|
81829
|
-
var
|
|
81830
|
-
var
|
|
81790
|
+
var import_react119 = __toESM(require_react(), 1);
|
|
81791
|
+
var import_variant34 = __toESM(require_lib(), 1);
|
|
81831
81792
|
|
|
81832
81793
|
// ../create-new-packages/app-command/src/components/ExtendExistingApp.tsx
|
|
81833
81794
|
init_esm_shims();
|
|
81834
|
-
var
|
|
81795
|
+
var import_react118 = __toESM(require_react(), 1);
|
|
81835
81796
|
var ExtendExistingApp = ({
|
|
81836
81797
|
developerApps,
|
|
81837
81798
|
onSelected
|
|
81838
81799
|
}) => {
|
|
81839
81800
|
const { t: t3 } = useTranslation();
|
|
81840
81801
|
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81841
|
-
return /* @__PURE__ */
|
|
81802
|
+
return /* @__PURE__ */ import_react118.default.createElement(
|
|
81842
81803
|
SelectInput2,
|
|
81843
81804
|
{
|
|
81844
81805
|
label: t3("create_app.extend_existing.select_app.label"),
|
|
@@ -81876,7 +81837,7 @@ var ExistingAppFlow = ({
|
|
|
81876
81837
|
const backendAsAServiceClient = useBackendAsAServiceClient();
|
|
81877
81838
|
const biLogger = useBiLogger();
|
|
81878
81839
|
const { t: t3 } = useTranslation();
|
|
81879
|
-
const [appData, setAppData] = (0,
|
|
81840
|
+
const [appData, setAppData] = (0, import_react119.useState)();
|
|
81880
81841
|
const registerAppCallback = useAsyncCallback3(
|
|
81881
81842
|
async (_2, { appData: appData2, packageName }) => {
|
|
81882
81843
|
const { variables } = await createAppProjectAndEnvironment({
|
|
@@ -81894,7 +81855,7 @@ var ExistingAppFlow = ({
|
|
|
81894
81855
|
});
|
|
81895
81856
|
}
|
|
81896
81857
|
);
|
|
81897
|
-
return /* @__PURE__ */
|
|
81858
|
+
return /* @__PURE__ */ import_react119.default.createElement(import_react119.default.Fragment, null, /* @__PURE__ */ import_react119.default.createElement(
|
|
81898
81859
|
ExtendExistingApp,
|
|
81899
81860
|
{
|
|
81900
81861
|
developerApps,
|
|
@@ -81905,7 +81866,7 @@ var ExistingAppFlow = ({
|
|
|
81905
81866
|
setAppData(appData2);
|
|
81906
81867
|
}
|
|
81907
81868
|
}
|
|
81908
|
-
), appData && /* @__PURE__ */
|
|
81869
|
+
), appData && /* @__PURE__ */ import_react119.default.createElement(
|
|
81909
81870
|
ChoosePackageName,
|
|
81910
81871
|
{
|
|
81911
81872
|
appName: appData.appName,
|
|
@@ -81918,9 +81879,9 @@ var ExistingAppFlow = ({
|
|
|
81918
81879
|
});
|
|
81919
81880
|
}
|
|
81920
81881
|
}
|
|
81921
|
-
), (0,
|
|
81882
|
+
), (0, import_variant34.match)(registerAppCallback.status, {
|
|
81922
81883
|
Error: () => null,
|
|
81923
|
-
Loading: () => /* @__PURE__ */
|
|
81884
|
+
Loading: () => /* @__PURE__ */ import_react119.default.createElement(Box_default, { marginTop: 1 }, /* @__PURE__ */ import_react119.default.createElement(Spinner2, { text: t3("create_app.extend_existing.get_project") })),
|
|
81924
81885
|
Success: () => null,
|
|
81925
81886
|
NotRequested: () => null
|
|
81926
81887
|
}));
|
|
@@ -81928,45 +81889,45 @@ var ExistingAppFlow = ({
|
|
|
81928
81889
|
|
|
81929
81890
|
// ../create-new-packages/app-command/src/components/StartFromTemplateMessage.tsx
|
|
81930
81891
|
init_esm_shims();
|
|
81931
|
-
var
|
|
81932
|
-
var
|
|
81892
|
+
var import_react120 = __toESM(require_react(), 1);
|
|
81893
|
+
var import_variant35 = __toESM(require_lib(), 1);
|
|
81933
81894
|
var StartFromTemplateMessage = ({
|
|
81934
81895
|
template
|
|
81935
81896
|
}) => {
|
|
81936
|
-
const messageComponent = (0,
|
|
81937
|
-
App: ({ payload: payload7 }) => /* @__PURE__ */
|
|
81897
|
+
const messageComponent = (0, import_variant35.match)(template, {
|
|
81898
|
+
App: ({ payload: payload7 }) => /* @__PURE__ */ import_react120.default.createElement(
|
|
81938
81899
|
Trans2,
|
|
81939
81900
|
{
|
|
81940
81901
|
i18nKey: "create_app.template_is_set_from_options.template_id",
|
|
81941
81902
|
values: {
|
|
81942
81903
|
templateName: payload7.title
|
|
81943
81904
|
},
|
|
81944
|
-
components: [/* @__PURE__ */
|
|
81905
|
+
components: [/* @__PURE__ */ import_react120.default.createElement(Text2, { bold: true })]
|
|
81945
81906
|
}
|
|
81946
81907
|
),
|
|
81947
|
-
GitRepo: ({ url }) => /* @__PURE__ */
|
|
81908
|
+
GitRepo: ({ url }) => /* @__PURE__ */ import_react120.default.createElement(
|
|
81948
81909
|
Trans2,
|
|
81949
81910
|
{
|
|
81950
81911
|
i18nKey: "create_app.template_is_set_from_options.git_repository",
|
|
81951
81912
|
values: {
|
|
81952
81913
|
templateRepoUrl: url
|
|
81953
81914
|
},
|
|
81954
|
-
components: [/* @__PURE__ */
|
|
81915
|
+
components: [/* @__PURE__ */ import_react120.default.createElement(Text2, { bold: true })]
|
|
81955
81916
|
}
|
|
81956
81917
|
),
|
|
81957
|
-
Local: ({ path: path4 }) => /* @__PURE__ */
|
|
81918
|
+
Local: ({ path: path4 }) => /* @__PURE__ */ import_react120.default.createElement(
|
|
81958
81919
|
Trans2,
|
|
81959
81920
|
{
|
|
81960
81921
|
i18nKey: "create_app.template_is_set_from_options.local",
|
|
81961
81922
|
values: {
|
|
81962
81923
|
templatePath: path4
|
|
81963
81924
|
},
|
|
81964
|
-
components: [/* @__PURE__ */
|
|
81925
|
+
components: [/* @__PURE__ */ import_react120.default.createElement(Text2, { bold: true })]
|
|
81965
81926
|
}
|
|
81966
81927
|
),
|
|
81967
81928
|
Default: () => null
|
|
81968
81929
|
});
|
|
81969
|
-
return /* @__PURE__ */
|
|
81930
|
+
return /* @__PURE__ */ import_react120.default.createElement(Box_default, { marginBottom: 1 }, messageComponent);
|
|
81970
81931
|
};
|
|
81971
81932
|
|
|
81972
81933
|
// ../create-new-packages/app-command/src/components/Questions/Questions.tsx
|
|
@@ -81980,7 +81941,7 @@ var Questions = ({
|
|
|
81980
81941
|
const devCenterClient = useDevCenterClient();
|
|
81981
81942
|
const { reportError: reportError2 } = useErrorReporter();
|
|
81982
81943
|
const { getDeveloperApps } = useDevCenterClient();
|
|
81983
|
-
const [appCreationFlow, setAppCreationFlow] = (0,
|
|
81944
|
+
const [appCreationFlow, setAppCreationFlow] = (0, import_react121.useState)();
|
|
81984
81945
|
const { status } = useAsync2(async () => {
|
|
81985
81946
|
const { template, appName } = await parseCommandOptions(
|
|
81986
81947
|
targetParentFolder2,
|
|
@@ -82011,14 +81972,14 @@ var Questions = ({
|
|
|
82011
81972
|
};
|
|
82012
81973
|
}
|
|
82013
81974
|
}, []);
|
|
82014
|
-
return (0,
|
|
81975
|
+
return (0, import_variant36.match)(status, {
|
|
82015
81976
|
Error: () => null,
|
|
82016
|
-
Loading: () => /* @__PURE__ */
|
|
81977
|
+
Loading: () => /* @__PURE__ */ import_react121.default.createElement(Spinner2, { text: t3("general.loading") }),
|
|
82017
81978
|
Success: ({
|
|
82018
81979
|
result: { template, appName, developerApps, developerAppsStatus }
|
|
82019
81980
|
}) => {
|
|
82020
81981
|
if (template) {
|
|
82021
|
-
return /* @__PURE__ */
|
|
81982
|
+
return /* @__PURE__ */ import_react121.default.createElement(import_react121.default.Fragment, null, /* @__PURE__ */ import_react121.default.createElement(StartFromTemplateMessage, { template }), /* @__PURE__ */ import_react121.default.createElement(
|
|
82022
81983
|
NewAppFlow,
|
|
82023
81984
|
{
|
|
82024
81985
|
onSubmit,
|
|
@@ -82030,8 +81991,8 @@ var Questions = ({
|
|
|
82030
81991
|
}
|
|
82031
81992
|
));
|
|
82032
81993
|
}
|
|
82033
|
-
if ((0,
|
|
82034
|
-
return /* @__PURE__ */
|
|
81994
|
+
if ((0, import_variant36.isType)(developerAppsStatus, "NoApps")) {
|
|
81995
|
+
return /* @__PURE__ */ import_react121.default.createElement(
|
|
82035
81996
|
NewAppFlow,
|
|
82036
81997
|
{
|
|
82037
81998
|
onSubmit,
|
|
@@ -82040,20 +82001,20 @@ var Questions = ({
|
|
|
82040
82001
|
}
|
|
82041
82002
|
);
|
|
82042
82003
|
}
|
|
82043
|
-
return /* @__PURE__ */
|
|
82004
|
+
return /* @__PURE__ */ import_react121.default.createElement(import_react121.default.Fragment, null, /* @__PURE__ */ import_react121.default.createElement(
|
|
82044
82005
|
CreateAppOrExtendExisting,
|
|
82045
82006
|
{
|
|
82046
82007
|
developerAppsStatus,
|
|
82047
82008
|
onStartCreationFlow: setAppCreationFlow
|
|
82048
82009
|
}
|
|
82049
|
-
), appCreationFlow === "new" && /* @__PURE__ */
|
|
82010
|
+
), appCreationFlow === "new" && /* @__PURE__ */ import_react121.default.createElement(
|
|
82050
82011
|
NewAppFlow,
|
|
82051
82012
|
{
|
|
82052
82013
|
onSubmit,
|
|
82053
82014
|
targetParentFolder: targetParentFolder2,
|
|
82054
82015
|
repoType: repoType2
|
|
82055
82016
|
}
|
|
82056
|
-
), appCreationFlow === "existing" && /* @__PURE__ */
|
|
82017
|
+
), appCreationFlow === "existing" && /* @__PURE__ */ import_react121.default.createElement(
|
|
82057
82018
|
ExistingAppFlow,
|
|
82058
82019
|
{
|
|
82059
82020
|
developerApps,
|
|
@@ -82068,7 +82029,7 @@ var Questions = ({
|
|
|
82068
82029
|
|
|
82069
82030
|
// ../create-new-packages/app-command/src/tasks.ts
|
|
82070
82031
|
init_esm_shims();
|
|
82071
|
-
var
|
|
82032
|
+
var import_variant37 = __toESM(require_lib(), 1);
|
|
82072
82033
|
import { mkdir } from "node:fs/promises";
|
|
82073
82034
|
import { join as join12 } from "node:path";
|
|
82074
82035
|
|
|
@@ -82149,7 +82110,7 @@ function getTasks({
|
|
|
82149
82110
|
cause: e2
|
|
82150
82111
|
});
|
|
82151
82112
|
}
|
|
82152
|
-
const { generateApp } = await import("./generator-
|
|
82113
|
+
const { generateApp } = await import("./generator-44WTFHH3.js");
|
|
82153
82114
|
await generateApp({
|
|
82154
82115
|
packageName,
|
|
82155
82116
|
packageFolder,
|
|
@@ -82158,7 +82119,7 @@ function getTasks({
|
|
|
82158
82119
|
repoType: repoType2,
|
|
82159
82120
|
template,
|
|
82160
82121
|
templateParams,
|
|
82161
|
-
ideForMcp: (0,
|
|
82122
|
+
ideForMcp: (0, import_variant37.match)(mcpConfigResult, {
|
|
82162
82123
|
Created: ({ ideForMcp }) => ideForMcp,
|
|
82163
82124
|
Canceled: () => {
|
|
82164
82125
|
}
|
|
@@ -82256,7 +82217,7 @@ function getTasks({
|
|
|
82256
82217
|
successText: agentConfigsTaskText.successText
|
|
82257
82218
|
};
|
|
82258
82219
|
const optionalInstallAndAgentsTask = skipInstall ? [] : [installDependenciesTask, addWixSkillsTask, generateAgentConfigsTask];
|
|
82259
|
-
return (0,
|
|
82220
|
+
return (0, import_variant37.match)(repoType2, {
|
|
82260
82221
|
None: () => [
|
|
82261
82222
|
generateProjectTask,
|
|
82262
82223
|
...skipGit ? [] : [initializeGitTask],
|
|
@@ -82270,10 +82231,10 @@ function getTasks({
|
|
|
82270
82231
|
|
|
82271
82232
|
// ../create-new-packages/app-command/src/components/FinishedSuccessfullyMessage.tsx
|
|
82272
82233
|
init_esm_shims();
|
|
82273
|
-
var
|
|
82234
|
+
var import_react122 = __toESM(require_react(), 1);
|
|
82274
82235
|
var FinishedSuccessfullyMessage = ({ packageName, appData: { appName, appId }, packageManager: packageManager2 }) => {
|
|
82275
82236
|
const { t: t3 } = useTranslation();
|
|
82276
|
-
return /* @__PURE__ */
|
|
82237
|
+
return /* @__PURE__ */ import_react122.default.createElement(
|
|
82277
82238
|
Box_default,
|
|
82278
82239
|
{
|
|
82279
82240
|
borderColor: "blue",
|
|
@@ -82285,22 +82246,22 @@ var FinishedSuccessfullyMessage = ({ packageName, appData: { appName, appId }, p
|
|
|
82285
82246
|
marginLeft: -2,
|
|
82286
82247
|
marginBottom: 1
|
|
82287
82248
|
},
|
|
82288
|
-
/* @__PURE__ */
|
|
82289
|
-
/* @__PURE__ */
|
|
82249
|
+
/* @__PURE__ */ import_react122.default.createElement(Box_default, { marginTop: -2, marginLeft: -4 }, /* @__PURE__ */ import_react122.default.createElement(Text2, { skin: "question", bold: true }, t3("create_app.results"), " ")),
|
|
82250
|
+
/* @__PURE__ */ import_react122.default.createElement(Text2, null, /* @__PURE__ */ import_react122.default.createElement(
|
|
82290
82251
|
Trans2,
|
|
82291
82252
|
{
|
|
82292
82253
|
i18nKey: "create_app.generate_project.finished.ready_to_start",
|
|
82293
|
-
components: [/* @__PURE__ */
|
|
82254
|
+
components: [/* @__PURE__ */ import_react122.default.createElement(Text2, { bold: true })],
|
|
82294
82255
|
values: { appName }
|
|
82295
82256
|
}
|
|
82296
82257
|
)),
|
|
82297
|
-
/* @__PURE__ */
|
|
82298
|
-
/* @__PURE__ */
|
|
82258
|
+
/* @__PURE__ */ import_react122.default.createElement(Text2, { bold: true }, t3("create_app.generate_project.finished.next_steps")),
|
|
82259
|
+
/* @__PURE__ */ import_react122.default.createElement(UnorderedList, { gap: 1 }, /* @__PURE__ */ import_react122.default.createElement(UnorderedList.Item, { marker: "\u{1F45F}" }, /* @__PURE__ */ import_react122.default.createElement(Text2, null, t3("create_app.generate_project.finished.run_local_development")), /* @__PURE__ */ import_react122.default.createElement(Text2, { skin: "info" }, `cd ${packageName}`), /* @__PURE__ */ import_react122.default.createElement(Text2, { skin: "info" }, `${packageManager2.getRunCmd()} dev`)), /* @__PURE__ */ import_react122.default.createElement(UnorderedList.Item, { marker: "\u{1F3AF}" }, /* @__PURE__ */ import_react122.default.createElement(Text2, null, t3("create_app.generate_project.finished.generate_extensions")), /* @__PURE__ */ import_react122.default.createElement(Text2, { skin: "info" }, `${packageManager2.getRunCmd()} generate`)), /* @__PURE__ */ import_react122.default.createElement(UnorderedList.Item, { marker: "\u{1F91D}" }, /* @__PURE__ */ import_react122.default.createElement(
|
|
82299
82260
|
Trans2,
|
|
82300
82261
|
{
|
|
82301
82262
|
i18nKey: "create_app.create_new.app_on_dev_center",
|
|
82302
82263
|
components: [
|
|
82303
|
-
/* @__PURE__ */
|
|
82264
|
+
/* @__PURE__ */ import_react122.default.createElement(
|
|
82304
82265
|
Link,
|
|
82305
82266
|
{
|
|
82306
82267
|
skin: "info",
|
|
@@ -82309,12 +82270,12 @@ var FinishedSuccessfullyMessage = ({ packageName, appData: { appName, appId }, p
|
|
|
82309
82270
|
)
|
|
82310
82271
|
]
|
|
82311
82272
|
}
|
|
82312
|
-
)), /* @__PURE__ */
|
|
82273
|
+
)), /* @__PURE__ */ import_react122.default.createElement(UnorderedList.Item, { marker: /* @__PURE__ */ import_react122.default.createElement(Learn, null) }, /* @__PURE__ */ import_react122.default.createElement(
|
|
82313
82274
|
Trans2,
|
|
82314
82275
|
{
|
|
82315
82276
|
i18nKey: "create_app.generate_project.finished.visit_docs",
|
|
82316
82277
|
components: [
|
|
82317
|
-
/* @__PURE__ */
|
|
82278
|
+
/* @__PURE__ */ import_react122.default.createElement(
|
|
82318
82279
|
Link,
|
|
82319
82280
|
{
|
|
82320
82281
|
skin: "info",
|
|
@@ -82323,12 +82284,12 @@ var FinishedSuccessfullyMessage = ({ packageName, appData: { appName, appId }, p
|
|
|
82323
82284
|
)
|
|
82324
82285
|
]
|
|
82325
82286
|
}
|
|
82326
|
-
)), /* @__PURE__ */
|
|
82287
|
+
)), /* @__PURE__ */ import_react122.default.createElement(UnorderedList.Item, { marker: "\u{1F4AC}" }, /* @__PURE__ */ import_react122.default.createElement(
|
|
82327
82288
|
Trans2,
|
|
82328
82289
|
{
|
|
82329
82290
|
i18nKey: "create_app.generate_project.finished.join_community",
|
|
82330
82291
|
components: [
|
|
82331
|
-
/* @__PURE__ */
|
|
82292
|
+
/* @__PURE__ */ import_react122.default.createElement(Link, { skin: "info", url: "https://discord.gg/wixstudio" })
|
|
82332
82293
|
]
|
|
82333
82294
|
}
|
|
82334
82295
|
)))
|
|
@@ -82337,23 +82298,23 @@ var FinishedSuccessfullyMessage = ({ packageName, appData: { appName, appId }, p
|
|
|
82337
82298
|
|
|
82338
82299
|
// ../create-new-packages/app-command/src/components/TaskList.tsx
|
|
82339
82300
|
init_esm_shims();
|
|
82340
|
-
var
|
|
82301
|
+
var import_react123 = __toESM(require_react(), 1);
|
|
82341
82302
|
var TaskList = ({ tasks, totalTaskCount }) => {
|
|
82342
|
-
return /* @__PURE__ */
|
|
82303
|
+
return /* @__PURE__ */ import_react123.default.createElement(import_react123.default.Fragment, null, tasks.map((task, index) => {
|
|
82343
82304
|
const stepper = `[${index + 1}/${totalTaskCount}]`;
|
|
82344
82305
|
const fullText = `${stepper} ${task.text}`;
|
|
82345
82306
|
if (task.status === "running") {
|
|
82346
|
-
return /* @__PURE__ */
|
|
82307
|
+
return /* @__PURE__ */ import_react123.default.createElement(Spinner2, { key: index, text: fullText });
|
|
82347
82308
|
}
|
|
82348
|
-
return /* @__PURE__ */
|
|
82309
|
+
return /* @__PURE__ */ import_react123.default.createElement(Alert, { key: index, type: "success" }, fullText);
|
|
82349
82310
|
}));
|
|
82350
82311
|
};
|
|
82351
82312
|
|
|
82352
82313
|
// ../create-new-packages/app-command/src/task-runner.ts
|
|
82353
82314
|
init_esm_shims();
|
|
82354
|
-
var
|
|
82355
|
-
var
|
|
82356
|
-
var TaskRunnerStatus = (0,
|
|
82315
|
+
var import_react124 = __toESM(require_react(), 1);
|
|
82316
|
+
var import_variant38 = __toESM(require_lib(), 1);
|
|
82317
|
+
var TaskRunnerStatus = (0, import_variant38.variant)({
|
|
82357
82318
|
Idle: {},
|
|
82358
82319
|
Running: (runningTasks, totalTaskCount) => {
|
|
82359
82320
|
const taskStatuses = runningTasks.map((task, index) => {
|
|
@@ -82377,7 +82338,7 @@ var TaskRunnerStatus = (0, import_variant37.variant)({
|
|
|
82377
82338
|
}
|
|
82378
82339
|
});
|
|
82379
82340
|
function useTaskRunner() {
|
|
82380
|
-
const [status, setStatus] = (0,
|
|
82341
|
+
const [status, setStatus] = (0, import_react124.useState)(
|
|
82381
82342
|
TaskRunnerStatus.Idle()
|
|
82382
82343
|
);
|
|
82383
82344
|
const { execute } = useAsyncCallback3(async (_2, tasks) => {
|
|
@@ -82397,23 +82358,23 @@ function useTaskRunner() {
|
|
|
82397
82358
|
|
|
82398
82359
|
// ../create-new-packages/app-command/src/components/mcp/McpConfigCreated.tsx
|
|
82399
82360
|
init_esm_shims();
|
|
82400
|
-
var
|
|
82361
|
+
var import_react125 = __toESM(require_react(), 1);
|
|
82401
82362
|
var McpConfigCreated = ({
|
|
82402
82363
|
mcpPath,
|
|
82403
82364
|
docsUrl
|
|
82404
82365
|
}) => {
|
|
82405
|
-
return /* @__PURE__ */
|
|
82366
|
+
return /* @__PURE__ */ import_react125.default.createElement(Box_default, { flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ import_react125.default.createElement(Box_default, { marginLeft: -2 }, /* @__PURE__ */ import_react125.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react125.default.createElement(Badge, { skin: "success" }, /* @__PURE__ */ import_react125.default.createElement(Trans2, { i18nKey: "create_app.mcp_config_created_badge" })), " ")), /* @__PURE__ */ import_react125.default.createElement(Box_default, { marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ import_react125.default.createElement(Text2, null, /* @__PURE__ */ import_react125.default.createElement(
|
|
82406
82367
|
Trans2,
|
|
82407
82368
|
{
|
|
82408
82369
|
i18nKey: "create_app.mcp_config_created_1",
|
|
82409
|
-
components: [/* @__PURE__ */
|
|
82370
|
+
components: [/* @__PURE__ */ import_react125.default.createElement(Text2, { bold: true })],
|
|
82410
82371
|
values: { mcpPath }
|
|
82411
82372
|
}
|
|
82412
|
-
)), /* @__PURE__ */
|
|
82373
|
+
)), /* @__PURE__ */ import_react125.default.createElement(Text2, null, /* @__PURE__ */ import_react125.default.createElement(Trans2, { i18nKey: "create_app.mcp_config_created_2" })), /* @__PURE__ */ import_react125.default.createElement(Text2, null, /* @__PURE__ */ import_react125.default.createElement(
|
|
82413
82374
|
Trans2,
|
|
82414
82375
|
{
|
|
82415
82376
|
i18nKey: "create_app.mcp_config_created_3",
|
|
82416
|
-
components: [/* @__PURE__ */
|
|
82377
|
+
components: [/* @__PURE__ */ import_react125.default.createElement(Link, { skin: "info", url: docsUrl })]
|
|
82417
82378
|
}
|
|
82418
82379
|
))));
|
|
82419
82380
|
};
|
|
@@ -82421,7 +82382,7 @@ var McpConfigCreated = ({
|
|
|
82421
82382
|
// ../create-new-packages/app-command/src/components/CreateAppCommand.tsx
|
|
82422
82383
|
var GenerationProgress = ({ tasks, totalTaskCount }) => {
|
|
82423
82384
|
const { t: t3 } = useTranslation();
|
|
82424
|
-
return /* @__PURE__ */
|
|
82385
|
+
return /* @__PURE__ */ import_react126.default.createElement(import_react126.default.Fragment, null, /* @__PURE__ */ import_react126.default.createElement(Box_default, { marginBottom: 1, marginTop: 1 }, /* @__PURE__ */ import_react126.default.createElement(Text2, null, t3("create_app.generate_project.generating_project"))), /* @__PURE__ */ import_react126.default.createElement(Box_default, { marginBottom: 1, flexDirection: "column" }, /* @__PURE__ */ import_react126.default.createElement(TaskList, { tasks, totalTaskCount })));
|
|
82425
82386
|
};
|
|
82426
82387
|
var CreateAppCommand = ({
|
|
82427
82388
|
userInfo: userInfo2,
|
|
@@ -82432,13 +82393,13 @@ var CreateAppCommand = ({
|
|
|
82432
82393
|
}) => {
|
|
82433
82394
|
const { t: t3 } = useTranslation();
|
|
82434
82395
|
const { execute: executeTaskRunner, status: taskRunnerStatus } = useTaskRunner();
|
|
82435
|
-
const [generationData, setGenerationData] = (0,
|
|
82396
|
+
const [generationData, setGenerationData] = (0, import_react126.useState)();
|
|
82436
82397
|
async function runTasks(data) {
|
|
82437
82398
|
setGenerationData(data);
|
|
82438
82399
|
const tasks = getTasks(data, t3);
|
|
82439
82400
|
await executeTaskRunner(tasks);
|
|
82440
82401
|
}
|
|
82441
|
-
return /* @__PURE__ */
|
|
82402
|
+
return /* @__PURE__ */ import_react126.default.createElement(
|
|
82442
82403
|
Box_default,
|
|
82443
82404
|
{
|
|
82444
82405
|
flexDirection: "column",
|
|
@@ -82449,8 +82410,8 @@ var CreateAppCommand = ({
|
|
|
82449
82410
|
borderTop: false,
|
|
82450
82411
|
paddingLeft: 1
|
|
82451
82412
|
},
|
|
82452
|
-
/* @__PURE__ */
|
|
82453
|
-
/* @__PURE__ */
|
|
82413
|
+
/* @__PURE__ */ import_react126.default.createElement(WelcomeMessage, null),
|
|
82414
|
+
/* @__PURE__ */ import_react126.default.createElement(AuthProvider2, { userInfo: userInfo2 }, /* @__PURE__ */ import_react126.default.createElement(
|
|
82454
82415
|
Questions,
|
|
82455
82416
|
{
|
|
82456
82417
|
repoType: repoType2,
|
|
@@ -82467,13 +82428,13 @@ var CreateAppCommand = ({
|
|
|
82467
82428
|
})
|
|
82468
82429
|
}
|
|
82469
82430
|
)),
|
|
82470
|
-
generationData && (0,
|
|
82431
|
+
generationData && (0, import_variant39.match)(taskRunnerStatus, {
|
|
82471
82432
|
Idle: () => null,
|
|
82472
|
-
Running: (status) => /* @__PURE__ */
|
|
82473
|
-
Done: (status) => /* @__PURE__ */
|
|
82474
|
-
Created: ({ mcpPath, docsUrl }) => /* @__PURE__ */
|
|
82433
|
+
Running: (status) => /* @__PURE__ */ import_react126.default.createElement(GenerationProgress, { ...status }),
|
|
82434
|
+
Done: (status) => /* @__PURE__ */ import_react126.default.createElement(import_react126.default.Fragment, null, /* @__PURE__ */ import_react126.default.createElement(GenerationProgress, { ...status }), (0, import_variant39.match)(generationData.mcpConfigResult, {
|
|
82435
|
+
Created: ({ mcpPath, docsUrl }) => /* @__PURE__ */ import_react126.default.createElement(McpConfigCreated, { mcpPath, docsUrl }),
|
|
82475
82436
|
Canceled: () => null
|
|
82476
|
-
}), /* @__PURE__ */
|
|
82437
|
+
}), /* @__PURE__ */ import_react126.default.createElement(
|
|
82477
82438
|
FinishedSuccessfullyMessage,
|
|
82478
82439
|
{
|
|
82479
82440
|
packageName: generationData.packageName,
|
|
@@ -82559,6 +82520,7 @@ var getAppCommand = ({
|
|
|
82559
82520
|
userInfo: userInfo2,
|
|
82560
82521
|
panorama: panorama2,
|
|
82561
82522
|
cliVersion,
|
|
82523
|
+
cliSessionId: cliSessionId2,
|
|
82562
82524
|
targetParentFolder: targetParentFolder2,
|
|
82563
82525
|
packageManager: packageManager2,
|
|
82564
82526
|
repoType: repoType2
|
|
@@ -82612,11 +82574,12 @@ var getAppCommand = ({
|
|
|
82612
82574
|
Arguments: command.args,
|
|
82613
82575
|
Options: command.opts()
|
|
82614
82576
|
});
|
|
82615
|
-
const { biLogger, reportCommandStartEvent: reportCommandStartEvent2 } = await createBiLogger2(
|
|
82616
|
-
errorReporter2,
|
|
82577
|
+
const { biLogger, reportCommandStartEvent: reportCommandStartEvent2 } = await createBiLogger2({
|
|
82578
|
+
errorReporter: errorReporter2,
|
|
82617
82579
|
cliVersion,
|
|
82618
|
-
|
|
82619
|
-
|
|
82580
|
+
cliSessionId: cliSessionId2,
|
|
82581
|
+
userId: userInfo2?.userId
|
|
82582
|
+
});
|
|
82620
82583
|
const commandStatus = reportCommandStartEvent2(command);
|
|
82621
82584
|
const commandOptions = {
|
|
82622
82585
|
...options,
|
|
@@ -82632,7 +82595,7 @@ var getAppCommand = ({
|
|
|
82632
82595
|
try {
|
|
82633
82596
|
transaction.start();
|
|
82634
82597
|
await render2(
|
|
82635
|
-
/* @__PURE__ */
|
|
82598
|
+
/* @__PURE__ */ import_react127.default.createElement(BiProvider, { value: biLogger }, /* @__PURE__ */ import_react127.default.createElement(ErrorReporterProvider, { value: errorReporter2 }, /* @__PURE__ */ import_react127.default.createElement(PanoramaProvider, { value: panorama2 }, /* @__PURE__ */ import_react127.default.createElement(HttpClientProvider, { headers }, /* @__PURE__ */ import_react127.default.createElement(I18nProvider, { messages: messages_default3 }, /* @__PURE__ */ import_react127.default.createElement(
|
|
82636
82599
|
CreateAppCommand,
|
|
82637
82600
|
{
|
|
82638
82601
|
userInfo: userInfo2,
|
|
@@ -82654,7 +82617,7 @@ var getAppCommand = ({
|
|
|
82654
82617
|
|
|
82655
82618
|
// ../create-new-packages/headless-command/src/index.tsx
|
|
82656
82619
|
init_esm_shims();
|
|
82657
|
-
var
|
|
82620
|
+
var import_react150 = __toESM(require_react(), 1);
|
|
82658
82621
|
|
|
82659
82622
|
// ../create-new-packages/headless-command/src/validations/validate-business-name.ts
|
|
82660
82623
|
init_esm_shims();
|
|
@@ -82681,21 +82644,21 @@ var validateProjectName = (value2) => {
|
|
|
82681
82644
|
|
|
82682
82645
|
// ../create-new-packages/headless-command/src/components/LinkCommand/LinkCommand.tsx
|
|
82683
82646
|
init_esm_shims();
|
|
82684
|
-
var
|
|
82685
|
-
var
|
|
82647
|
+
var import_react138 = __toESM(require_react(), 1);
|
|
82648
|
+
var import_variant44 = __toESM(require_lib(), 1);
|
|
82686
82649
|
|
|
82687
82650
|
// ../create-new-packages/headless-command/src/components/WelcomeMessage.tsx
|
|
82688
82651
|
init_esm_shims();
|
|
82689
|
-
var
|
|
82652
|
+
var import_react128 = __toESM(require_react(), 1);
|
|
82690
82653
|
var WelcomeMessage2 = () => {
|
|
82691
|
-
return /* @__PURE__ */
|
|
82654
|
+
return /* @__PURE__ */ import_react128.default.createElement(Box_default, { flexDirection: "column", marginBottom: 1, paddingTop: 1 }, /* @__PURE__ */ import_react128.default.createElement(Text2, { bold: true }, "Create Headless Site"));
|
|
82692
82655
|
};
|
|
82693
82656
|
|
|
82694
82657
|
// ../create-new-packages/headless-command/src/components/ChooseBusinessName.tsx
|
|
82695
82658
|
init_esm_shims();
|
|
82696
|
-
var
|
|
82659
|
+
var import_react129 = __toESM(require_react(), 1);
|
|
82697
82660
|
var ChooseBusinessName = ({ onSubmit }) => {
|
|
82698
|
-
const validate3 = (0,
|
|
82661
|
+
const validate3 = (0, import_react129.useCallback)((businessName) => {
|
|
82699
82662
|
try {
|
|
82700
82663
|
validateBusinessName(businessName);
|
|
82701
82664
|
return true;
|
|
@@ -82703,7 +82666,7 @@ var ChooseBusinessName = ({ onSubmit }) => {
|
|
|
82703
82666
|
return e2.message;
|
|
82704
82667
|
}
|
|
82705
82668
|
}, []);
|
|
82706
|
-
return /* @__PURE__ */
|
|
82669
|
+
return /* @__PURE__ */ import_react129.default.createElement(
|
|
82707
82670
|
TextInput2,
|
|
82708
82671
|
{
|
|
82709
82672
|
label: "What's the name of your business?",
|
|
@@ -82716,12 +82679,12 @@ var ChooseBusinessName = ({ onSubmit }) => {
|
|
|
82716
82679
|
|
|
82717
82680
|
// ../create-new-packages/headless-command/src/components/CreateBusiness.tsx
|
|
82718
82681
|
init_esm_shims();
|
|
82719
|
-
var
|
|
82720
|
-
var
|
|
82682
|
+
var import_react131 = __toESM(require_react(), 1);
|
|
82683
|
+
var import_variant40 = __toESM(require_lib(), 1);
|
|
82721
82684
|
|
|
82722
82685
|
// ../create-new-packages/headless-command/src/clients/funnel-projects/useFunnelProjectsClient.ts
|
|
82723
82686
|
init_esm_shims();
|
|
82724
|
-
var
|
|
82687
|
+
var import_react130 = __toESM(require_react(), 1);
|
|
82725
82688
|
|
|
82726
82689
|
// ../create-new-packages/headless-command/src/clients/funnel-projects/funnel-projects-client.ts
|
|
82727
82690
|
init_esm_shims();
|
|
@@ -82827,7 +82790,7 @@ var FunnelProjectsClient = class {
|
|
|
82827
82790
|
// ../create-new-packages/headless-command/src/clients/funnel-projects/useFunnelProjectsClient.ts
|
|
82828
82791
|
function useFunnelProjectsClient() {
|
|
82829
82792
|
const httpClient = useHttpClient({ type: "api" });
|
|
82830
|
-
const client2 = (0,
|
|
82793
|
+
const client2 = (0, import_react130.useMemo)(
|
|
82831
82794
|
() => new FunnelProjectsClient(httpClient),
|
|
82832
82795
|
[httpClient]
|
|
82833
82796
|
);
|
|
@@ -82841,18 +82804,18 @@ var CreateBusiness = ({ businessName, businessTemplateId, onDone }) => {
|
|
|
82841
82804
|
const { project } = await createProject3(businessName, businessTemplateId);
|
|
82842
82805
|
onDone({ businessId: project.metaSiteId });
|
|
82843
82806
|
}, []);
|
|
82844
|
-
return /* @__PURE__ */
|
|
82807
|
+
return /* @__PURE__ */ import_react131.default.createElement(import_react131.default.Fragment, null, (0, import_variant40.match)(status, {
|
|
82845
82808
|
Error: () => null,
|
|
82846
|
-
Loading: () => /* @__PURE__ */
|
|
82847
|
-
Success: () => /* @__PURE__ */
|
|
82809
|
+
Loading: () => /* @__PURE__ */ import_react131.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react131.default.createElement(Spinner2, { text: "Creating your business..." })),
|
|
82810
|
+
Success: () => /* @__PURE__ */ import_react131.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react131.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react131.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react131.default.createElement(Text2, null, "Business created successfully"))),
|
|
82848
82811
|
NotRequested: () => null
|
|
82849
82812
|
}));
|
|
82850
82813
|
};
|
|
82851
82814
|
|
|
82852
82815
|
// ../create-new-packages/headless-command/src/components/CreateProject.tsx
|
|
82853
82816
|
init_esm_shims();
|
|
82854
|
-
var
|
|
82855
|
-
var
|
|
82817
|
+
var import_react133 = __toESM(require_react(), 1);
|
|
82818
|
+
var import_variant41 = __toESM(require_lib(), 1);
|
|
82856
82819
|
|
|
82857
82820
|
// ../create-new-packages/headless-command/src/hooks/create-project.ts
|
|
82858
82821
|
init_esm_shims();
|
|
@@ -82864,7 +82827,7 @@ init_esm_shims();
|
|
|
82864
82827
|
|
|
82865
82828
|
// ../metasite-manager-client/src/useMetasiteManagerClient.ts
|
|
82866
82829
|
init_esm_shims();
|
|
82867
|
-
var
|
|
82830
|
+
var import_react132 = __toESM(require_react(), 1);
|
|
82868
82831
|
|
|
82869
82832
|
// ../metasite-manager-client/src/metasite-manager-client.ts
|
|
82870
82833
|
init_esm_shims();
|
|
@@ -82873,11 +82836,146 @@ init_esm_shims();
|
|
|
82873
82836
|
init_esm_shims();
|
|
82874
82837
|
var _createMetaSiteFromTemplateRequest = {};
|
|
82875
82838
|
var _createMetaSiteFromTemplateResponse = { metaSite: "_metaSite" };
|
|
82839
|
+
var _getUrlRequest = {};
|
|
82840
|
+
var _getUrlResponse = {};
|
|
82876
82841
|
var _metaSite = {
|
|
82877
82842
|
dateCreated: "google.protobuf.Timestamp",
|
|
82878
82843
|
dateUpdated: "google.protobuf.Timestamp",
|
|
82879
82844
|
accountCreatedDate: "google.protobuf.Timestamp"
|
|
82880
82845
|
};
|
|
82846
|
+
function resolveComWixpressMetasiteApiV1MetaSiteReadApiUrl(opts) {
|
|
82847
|
+
var domainToMappings = {
|
|
82848
|
+
"www._base_domain_": [
|
|
82849
|
+
{
|
|
82850
|
+
srcPath: "/_api/msm-server",
|
|
82851
|
+
destPath: ""
|
|
82852
|
+
},
|
|
82853
|
+
{
|
|
82854
|
+
srcPath: "/_api/msm/v1/meta-site/get",
|
|
82855
|
+
destPath: "/v1/meta-site/get"
|
|
82856
|
+
},
|
|
82857
|
+
{
|
|
82858
|
+
srcPath: "/_api/msm/v1/meta-site/is-site-name-free",
|
|
82859
|
+
destPath: "/v1/meta-site/is-site-name-free"
|
|
82860
|
+
},
|
|
82861
|
+
{
|
|
82862
|
+
srcPath: "/_api/msm/v1/meta-site/has-sites",
|
|
82863
|
+
destPath: "/v1/meta-site/has-sites"
|
|
82864
|
+
},
|
|
82865
|
+
{
|
|
82866
|
+
srcPath: "/_api/msm/v1/meta-site/get-url",
|
|
82867
|
+
destPath: "/v1/meta-site/get-url"
|
|
82868
|
+
}
|
|
82869
|
+
],
|
|
82870
|
+
"manage._base_domain_": [
|
|
82871
|
+
{
|
|
82872
|
+
srcPath: "/_api/msm-server",
|
|
82873
|
+
destPath: ""
|
|
82874
|
+
},
|
|
82875
|
+
{
|
|
82876
|
+
srcPath: "/_api/msm/v1/meta-site/is-site-name-free",
|
|
82877
|
+
destPath: "/v1/meta-site/is-site-name-free"
|
|
82878
|
+
},
|
|
82879
|
+
{
|
|
82880
|
+
srcPath: "/_api/msm/v1/meta-site/has-sites",
|
|
82881
|
+
destPath: "/v1/meta-site/has-sites"
|
|
82882
|
+
},
|
|
82883
|
+
{
|
|
82884
|
+
srcPath: "/_api/msm/v1/meta-site/get-url",
|
|
82885
|
+
destPath: "/v1/meta-site/get-url"
|
|
82886
|
+
},
|
|
82887
|
+
{
|
|
82888
|
+
srcPath: "/_api/msm/v1/meta-site/get",
|
|
82889
|
+
destPath: "/v1/meta-site/get"
|
|
82890
|
+
}
|
|
82891
|
+
],
|
|
82892
|
+
"editor-flow.wixapps.net": [
|
|
82893
|
+
{
|
|
82894
|
+
srcPath: "/_api/msm/v1/meta-site/get",
|
|
82895
|
+
destPath: "/v1/meta-site/get"
|
|
82896
|
+
}
|
|
82897
|
+
],
|
|
82898
|
+
"editor._base_domain_": [
|
|
82899
|
+
{
|
|
82900
|
+
srcPath: "/_api/msm/v1/meta-site/get",
|
|
82901
|
+
destPath: "/v1/meta-site/get"
|
|
82902
|
+
},
|
|
82903
|
+
{
|
|
82904
|
+
srcPath: "/_api/msm/v1/meta-site/get-url",
|
|
82905
|
+
destPath: "/v1/meta-site/get-url"
|
|
82906
|
+
},
|
|
82907
|
+
{
|
|
82908
|
+
srcPath: "/_api/msm/v1/meta-site/has-sites",
|
|
82909
|
+
destPath: "/v1/meta-site/has-sites"
|
|
82910
|
+
},
|
|
82911
|
+
{
|
|
82912
|
+
srcPath: "/_api/msm/v1/meta-site/is-site-name-free",
|
|
82913
|
+
destPath: "/v1/meta-site/is-site-name-free"
|
|
82914
|
+
}
|
|
82915
|
+
],
|
|
82916
|
+
"blocks._base_domain_": [
|
|
82917
|
+
{
|
|
82918
|
+
srcPath: "/_api/msm/v1/meta-site/get",
|
|
82919
|
+
destPath: "/v1/meta-site/get"
|
|
82920
|
+
},
|
|
82921
|
+
{
|
|
82922
|
+
srcPath: "/_api/msm/v1/meta-site/get-url",
|
|
82923
|
+
destPath: "/v1/meta-site/get-url"
|
|
82924
|
+
},
|
|
82925
|
+
{
|
|
82926
|
+
srcPath: "/_api/msm/v1/meta-site/has-sites",
|
|
82927
|
+
destPath: "/v1/meta-site/has-sites"
|
|
82928
|
+
},
|
|
82929
|
+
{
|
|
82930
|
+
srcPath: "/_api/msm/v1/meta-site/is-site-name-free",
|
|
82931
|
+
destPath: "/v1/meta-site/is-site-name-free"
|
|
82932
|
+
}
|
|
82933
|
+
],
|
|
82934
|
+
"create.editorx": [
|
|
82935
|
+
{
|
|
82936
|
+
srcPath: "/_api/msm/v1/meta-site/get",
|
|
82937
|
+
destPath: "/v1/meta-site/get"
|
|
82938
|
+
},
|
|
82939
|
+
{
|
|
82940
|
+
srcPath: "/_api/msm/v1/meta-site/get-url",
|
|
82941
|
+
destPath: "/v1/meta-site/get-url"
|
|
82942
|
+
},
|
|
82943
|
+
{
|
|
82944
|
+
srcPath: "/_api/msm/v1/meta-site/has-sites",
|
|
82945
|
+
destPath: "/v1/meta-site/has-sites"
|
|
82946
|
+
},
|
|
82947
|
+
{
|
|
82948
|
+
srcPath: "/_api/msm/v1/meta-site/is-site-name-free",
|
|
82949
|
+
destPath: "/v1/meta-site/is-site-name-free"
|
|
82950
|
+
}
|
|
82951
|
+
],
|
|
82952
|
+
"www.wixgateway.com": [
|
|
82953
|
+
{
|
|
82954
|
+
srcPath: "/v1/meta-site/session-token",
|
|
82955
|
+
destPath: "/v1/meta-site/session-token"
|
|
82956
|
+
}
|
|
82957
|
+
],
|
|
82958
|
+
"api._api_base_domain_": [
|
|
82959
|
+
{
|
|
82960
|
+
srcPath: "/msm-server",
|
|
82961
|
+
destPath: ""
|
|
82962
|
+
}
|
|
82963
|
+
],
|
|
82964
|
+
"dev._base_domain_": [
|
|
82965
|
+
{
|
|
82966
|
+
srcPath: "/_api/msm/v1/meta-site/has-sites",
|
|
82967
|
+
destPath: "/v1/meta-site/has-sites"
|
|
82968
|
+
}
|
|
82969
|
+
],
|
|
82970
|
+
"online.codux.com": [
|
|
82971
|
+
{
|
|
82972
|
+
srcPath: "/_api/msm/v1/meta-site",
|
|
82973
|
+
destPath: "/v1/meta-site"
|
|
82974
|
+
}
|
|
82975
|
+
]
|
|
82976
|
+
};
|
|
82977
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
82978
|
+
}
|
|
82881
82979
|
function resolveComWixpressMetasiteApiV1MetaSiteLifecycleUrl(opts) {
|
|
82882
82980
|
var domainToMappings = {
|
|
82883
82981
|
"www._base_domain_": [
|
|
@@ -82951,6 +83049,275 @@ function createMetaSiteFromTemplate(payload7) {
|
|
|
82951
83049
|
__createMetaSiteFromTemplate.__isAmbassador = true;
|
|
82952
83050
|
return __createMetaSiteFromTemplate;
|
|
82953
83051
|
}
|
|
83052
|
+
function getUrl(payload7) {
|
|
83053
|
+
var _a3 = serializer(_getUrlRequest, {}), toReq = _a3.toJSON, fromReq = _a3.fromJSON;
|
|
83054
|
+
var fromRes = serializer(_getUrlResponse, {}).fromJSON;
|
|
83055
|
+
function __getUrl(_a4) {
|
|
83056
|
+
var host = _a4.host;
|
|
83057
|
+
var serializedData = toReq(payload7);
|
|
83058
|
+
var metadata = {
|
|
83059
|
+
entityFqdn: "wix.metasite.api.v1.meta_site",
|
|
83060
|
+
method: "GET",
|
|
83061
|
+
methodFqn: "com.wixpress.metasite.api.v1.MetaSiteReadApi.GetUrl",
|
|
83062
|
+
url: resolveComWixpressMetasiteApiV1MetaSiteReadApiUrl({
|
|
83063
|
+
protoPath: "/v1/meta-site/get-url",
|
|
83064
|
+
data: serializedData,
|
|
83065
|
+
host
|
|
83066
|
+
}),
|
|
83067
|
+
params: toURLSearchParams(serializedData),
|
|
83068
|
+
transformResponse: fromRes,
|
|
83069
|
+
fallback: [
|
|
83070
|
+
{
|
|
83071
|
+
method: "GET",
|
|
83072
|
+
url: resolveComWixpressMetasiteApiV1MetaSiteReadApiUrl({
|
|
83073
|
+
protoPath: "/v1/meta-site/get-url",
|
|
83074
|
+
data: serializedData,
|
|
83075
|
+
host
|
|
83076
|
+
}),
|
|
83077
|
+
params: toURLSearchParams(serializedData)
|
|
83078
|
+
}
|
|
83079
|
+
]
|
|
83080
|
+
};
|
|
83081
|
+
return metadata;
|
|
83082
|
+
}
|
|
83083
|
+
__getUrl.fromReq = fromReq;
|
|
83084
|
+
__getUrl.__isAmbassador = true;
|
|
83085
|
+
return __getUrl;
|
|
83086
|
+
}
|
|
83087
|
+
|
|
83088
|
+
// ../../node_modules/@wix/ambassador-metasite-api-v1-meta-site/build/es/types.impl.js
|
|
83089
|
+
init_esm_shims();
|
|
83090
|
+
var State2;
|
|
83091
|
+
(function(State4) {
|
|
83092
|
+
State4["UNKNOWN"] = "UNKNOWN";
|
|
83093
|
+
State4["ENABLED"] = "ENABLED";
|
|
83094
|
+
State4["DISABLED"] = "DISABLED";
|
|
83095
|
+
State4["TEMPLATE"] = "TEMPLATE";
|
|
83096
|
+
State4["PENDING"] = "PENDING";
|
|
83097
|
+
})(State2 || (State2 = {}));
|
|
83098
|
+
var Namespace;
|
|
83099
|
+
(function(Namespace3) {
|
|
83100
|
+
Namespace3["UNKNOWN_NAMESPACE"] = "UNKNOWN_NAMESPACE";
|
|
83101
|
+
Namespace3["WIX"] = "WIX";
|
|
83102
|
+
Namespace3["SHOUT_OUT"] = "SHOUT_OUT";
|
|
83103
|
+
Namespace3["ALBUMS"] = "ALBUMS";
|
|
83104
|
+
Namespace3["WIX_STORES_TEST_DRIVE"] = "WIX_STORES_TEST_DRIVE";
|
|
83105
|
+
Namespace3["HOTELS"] = "HOTELS";
|
|
83106
|
+
Namespace3["CLUBS"] = "CLUBS";
|
|
83107
|
+
Namespace3["ONBOARDING_DRAFT"] = "ONBOARDING_DRAFT";
|
|
83108
|
+
Namespace3["DEV_SITE"] = "DEV_SITE";
|
|
83109
|
+
Namespace3["LOGOS"] = "LOGOS";
|
|
83110
|
+
Namespace3["VIDEO_MAKER"] = "VIDEO_MAKER";
|
|
83111
|
+
Namespace3["PARTNER_DASHBOARD"] = "PARTNER_DASHBOARD";
|
|
83112
|
+
Namespace3["DEV_CENTER_COMPANY"] = "DEV_CENTER_COMPANY";
|
|
83113
|
+
Namespace3["HTML_DRAFT"] = "HTML_DRAFT";
|
|
83114
|
+
Namespace3["SITELESS_BUSINESS"] = "SITELESS_BUSINESS";
|
|
83115
|
+
Namespace3["CREATOR_ECONOMY"] = "CREATOR_ECONOMY";
|
|
83116
|
+
Namespace3["DASHBOARD_FIRST"] = "DASHBOARD_FIRST";
|
|
83117
|
+
Namespace3["ANYWHERE"] = "ANYWHERE";
|
|
83118
|
+
Namespace3["HEADLESS"] = "HEADLESS";
|
|
83119
|
+
Namespace3["ACCOUNT_MASTER_CMS"] = "ACCOUNT_MASTER_CMS";
|
|
83120
|
+
Namespace3["RISE"] = "RISE";
|
|
83121
|
+
Namespace3["BRANDED_FIRST"] = "BRANDED_FIRST";
|
|
83122
|
+
Namespace3["NOWNIA"] = "NOWNIA";
|
|
83123
|
+
Namespace3["UGC_TEMPLATE"] = "UGC_TEMPLATE";
|
|
83124
|
+
Namespace3["CODUX"] = "CODUX";
|
|
83125
|
+
Namespace3["MEDIA_DESIGN_CREATOR"] = "MEDIA_DESIGN_CREATOR";
|
|
83126
|
+
Namespace3["SHARED_BLOG_ENTERPRISE"] = "SHARED_BLOG_ENTERPRISE";
|
|
83127
|
+
Namespace3["STANDALONE_FORMS"] = "STANDALONE_FORMS";
|
|
83128
|
+
Namespace3["STANDALONE_EVENTS"] = "STANDALONE_EVENTS";
|
|
83129
|
+
Namespace3["MIMIR"] = "MIMIR";
|
|
83130
|
+
Namespace3["TWINS"] = "TWINS";
|
|
83131
|
+
Namespace3["NANO"] = "NANO";
|
|
83132
|
+
})(Namespace || (Namespace = {}));
|
|
83133
|
+
var DocumentType;
|
|
83134
|
+
(function(DocumentType2) {
|
|
83135
|
+
DocumentType2["UNKNOWN_DOCUMENT_TYPE"] = "UNKNOWN_DOCUMENT_TYPE";
|
|
83136
|
+
DocumentType2["UGC"] = "UGC";
|
|
83137
|
+
DocumentType2["TEMPLATE"] = "TEMPLATE";
|
|
83138
|
+
DocumentType2["WIX_SITE"] = "WIX_SITE";
|
|
83139
|
+
})(DocumentType || (DocumentType = {}));
|
|
83140
|
+
var PremiumFeature;
|
|
83141
|
+
(function(PremiumFeature2) {
|
|
83142
|
+
PremiumFeature2["UNKNOWN_PREMIUM_FEATURE"] = "UNKNOWN_PREMIUM_FEATURE";
|
|
83143
|
+
PremiumFeature2["SHOW_WIX_WHILE_LOADING"] = "SHOW_WIX_WHILE_LOADING";
|
|
83144
|
+
PremiumFeature2["ADS_FREE"] = "ADS_FREE";
|
|
83145
|
+
PremiumFeature2["HAS_ECOMMERCE"] = "HAS_ECOMMERCE";
|
|
83146
|
+
PremiumFeature2["HAS_DOMAIN"] = "HAS_DOMAIN";
|
|
83147
|
+
PremiumFeature2["ALWAYS_SHOW_FOOTER"] = "ALWAYS_SHOW_FOOTER";
|
|
83148
|
+
PremiumFeature2["NO_ADS_IN_SOCIAL_SITES"] = "NO_ADS_IN_SOCIAL_SITES";
|
|
83149
|
+
})(PremiumFeature || (PremiumFeature = {}));
|
|
83150
|
+
var ApplicationType;
|
|
83151
|
+
(function(ApplicationType2) {
|
|
83152
|
+
ApplicationType2["UNKNOWN_APPLICATION_TYPE"] = "UNKNOWN_APPLICATION_TYPE";
|
|
83153
|
+
ApplicationType2["FLASH"] = "FLASH";
|
|
83154
|
+
ApplicationType2["FLASH_FACEBOOK"] = "FLASH_FACEBOOK";
|
|
83155
|
+
ApplicationType2["FLASH_WIDGET"] = "FLASH_WIDGET";
|
|
83156
|
+
ApplicationType2["FLASH_BANNER"] = "FLASH_BANNER";
|
|
83157
|
+
ApplicationType2["HTML_MOBILE"] = "HTML_MOBILE";
|
|
83158
|
+
ApplicationType2["HTML_WEB"] = "HTML_WEB";
|
|
83159
|
+
ApplicationType2["HTML_FACEBOOK"] = "HTML_FACEBOOK";
|
|
83160
|
+
ApplicationType2["BLOG"] = "BLOG";
|
|
83161
|
+
ApplicationType2["WIX_LISTS"] = "WIX_LISTS";
|
|
83162
|
+
ApplicationType2["STATIC_MOUNT"] = "STATIC_MOUNT";
|
|
83163
|
+
ApplicationType2["STATIC_MOUNT_REDIRECT"] = "STATIC_MOUNT_REDIRECT";
|
|
83164
|
+
ApplicationType2["AMP_BLOG"] = "AMP_BLOG";
|
|
83165
|
+
ApplicationType2["COMMUNITIES_AMP_BLOG"] = "COMMUNITIES_AMP_BLOG";
|
|
83166
|
+
ApplicationType2["HTML_ANYWHERE"] = "HTML_ANYWHERE";
|
|
83167
|
+
ApplicationType2["HOPP"] = "HOPP";
|
|
83168
|
+
})(ApplicationType || (ApplicationType = {}));
|
|
83169
|
+
var Compatibility;
|
|
83170
|
+
(function(Compatibility2) {
|
|
83171
|
+
Compatibility2["UNKNOWN_COMPATIBILITY"] = "UNKNOWN_COMPATIBILITY";
|
|
83172
|
+
Compatibility2["WEB"] = "WEB";
|
|
83173
|
+
Compatibility2["MOBILE"] = "MOBILE";
|
|
83174
|
+
Compatibility2["ALL"] = "ALL";
|
|
83175
|
+
})(Compatibility || (Compatibility = {}));
|
|
83176
|
+
var ApiState;
|
|
83177
|
+
(function(ApiState2) {
|
|
83178
|
+
ApiState2["UNKNOWN_STATE"] = "UNKNOWN_STATE";
|
|
83179
|
+
ApiState2["TEMPLATE"] = "TEMPLATE";
|
|
83180
|
+
ApiState2["STUB"] = "STUB";
|
|
83181
|
+
ApiState2["INITIALIZED"] = "INITIALIZED";
|
|
83182
|
+
})(ApiState || (ApiState = {}));
|
|
83183
|
+
var Kind;
|
|
83184
|
+
(function(Kind2) {
|
|
83185
|
+
Kind2["OPEN"] = "OPEN";
|
|
83186
|
+
Kind2["CLOSED"] = "CLOSED";
|
|
83187
|
+
Kind2["APPLY_FOR_MEMBERSHIP"] = "APPLY_FOR_MEMBERSHIP";
|
|
83188
|
+
})(Kind || (Kind = {}));
|
|
83189
|
+
var FormFace;
|
|
83190
|
+
(function(FormFace2) {
|
|
83191
|
+
FormFace2["REGISTER"] = "REGISTER";
|
|
83192
|
+
FormFace2["LOGIN"] = "LOGIN";
|
|
83193
|
+
})(FormFace || (FormFace = {}));
|
|
83194
|
+
var CollectionExposure;
|
|
83195
|
+
(function(CollectionExposure2) {
|
|
83196
|
+
CollectionExposure2["PUBLIC"] = "PUBLIC";
|
|
83197
|
+
CollectionExposure2["WIX_INTERNAL"] = "WIX_INTERNAL";
|
|
83198
|
+
})(CollectionExposure || (CollectionExposure = {}));
|
|
83199
|
+
var HttpsPolicy;
|
|
83200
|
+
(function(HttpsPolicy2) {
|
|
83201
|
+
HttpsPolicy2["UNKNOWN_HTTPS_POLICY"] = "UNKNOWN_HTTPS_POLICY";
|
|
83202
|
+
HttpsPolicy2["DISALLOW"] = "DISALLOW";
|
|
83203
|
+
HttpsPolicy2["ALLOW"] = "ALLOW";
|
|
83204
|
+
HttpsPolicy2["ENFORCE"] = "ENFORCE";
|
|
83205
|
+
})(HttpsPolicy || (HttpsPolicy = {}));
|
|
83206
|
+
var Flag;
|
|
83207
|
+
(function(Flag2) {
|
|
83208
|
+
Flag2["UNKNOWN_FLAG"] = "UNKNOWN_FLAG";
|
|
83209
|
+
Flag2["URL_MIGRATED"] = "URL_MIGRATED";
|
|
83210
|
+
Flag2["USE_HTTPS"] = "USE_HTTPS";
|
|
83211
|
+
Flag2["EDITOR_X"] = "EDITOR_X";
|
|
83212
|
+
Flag2["BLOCKED"] = "BLOCKED";
|
|
83213
|
+
Flag2["DONT_USE_DEFAULT_ROUTING"] = "DONT_USE_DEFAULT_ROUTING";
|
|
83214
|
+
Flag2["STUDIO"] = "STUDIO";
|
|
83215
|
+
Flag2["CRITICAL_ASSET"] = "CRITICAL_ASSET";
|
|
83216
|
+
Flag2["ODEDITOR"] = "ODEDITOR";
|
|
83217
|
+
Flag2["PICASSO"] = "PICASSO";
|
|
83218
|
+
})(Flag || (Flag = {}));
|
|
83219
|
+
var PendingReason;
|
|
83220
|
+
(function(PendingReason2) {
|
|
83221
|
+
PendingReason2["UNKNOWN"] = "UNKNOWN";
|
|
83222
|
+
PendingReason2["PREMIUM"] = "PREMIUM";
|
|
83223
|
+
PendingReason2["APP_MARKET"] = "APP_MARKET";
|
|
83224
|
+
})(PendingReason || (PendingReason = {}));
|
|
83225
|
+
var ResolutionMethod;
|
|
83226
|
+
(function(ResolutionMethod2) {
|
|
83227
|
+
ResolutionMethod2["QUERY_PARAM"] = "QUERY_PARAM";
|
|
83228
|
+
ResolutionMethod2["SUBDOMAIN"] = "SUBDOMAIN";
|
|
83229
|
+
ResolutionMethod2["SUBDIRECTORY"] = "SUBDIRECTORY";
|
|
83230
|
+
})(ResolutionMethod || (ResolutionMethod = {}));
|
|
83231
|
+
var DeleteStatus;
|
|
83232
|
+
(function(DeleteStatus3) {
|
|
83233
|
+
DeleteStatus3["UNKNOWN"] = "UNKNOWN";
|
|
83234
|
+
DeleteStatus3["TRASH"] = "TRASH";
|
|
83235
|
+
DeleteStatus3["DELETED"] = "DELETED";
|
|
83236
|
+
DeleteStatus3["PENDING_PURGE"] = "PENDING_PURGE";
|
|
83237
|
+
DeleteStatus3["PURGED_EXTERNALLY"] = "PURGED_EXTERNALLY";
|
|
83238
|
+
})(DeleteStatus || (DeleteStatus = {}));
|
|
83239
|
+
var Context;
|
|
83240
|
+
(function(Context2) {
|
|
83241
|
+
Context2["UNKNOWN"] = "UNKNOWN";
|
|
83242
|
+
Context2["CREATE"] = "CREATE";
|
|
83243
|
+
Context2["UPDATE"] = "UPDATE";
|
|
83244
|
+
Context2["HARD_DELETE"] = "HARD_DELETE";
|
|
83245
|
+
Context2["ARCHIVE"] = "ARCHIVE";
|
|
83246
|
+
Context2["RESTORE"] = "RESTORE";
|
|
83247
|
+
Context2["UPDATE_DELETED"] = "UPDATE_DELETED";
|
|
83248
|
+
Context2["PURGED_EXTERNALLY"] = "PURGED_EXTERNALLY";
|
|
83249
|
+
})(Context || (Context = {}));
|
|
83250
|
+
var SiteCreatedContext;
|
|
83251
|
+
(function(SiteCreatedContext3) {
|
|
83252
|
+
SiteCreatedContext3["OTHER"] = "OTHER";
|
|
83253
|
+
SiteCreatedContext3["FROM_TEMPLATE"] = "FROM_TEMPLATE";
|
|
83254
|
+
SiteCreatedContext3["DUPLICATE_BY_SITE_TRANSFER"] = "DUPLICATE_BY_SITE_TRANSFER";
|
|
83255
|
+
SiteCreatedContext3["DUPLICATE"] = "DUPLICATE";
|
|
83256
|
+
SiteCreatedContext3["OLD_SITE_TRANSFER"] = "OLD_SITE_TRANSFER";
|
|
83257
|
+
SiteCreatedContext3["FLASH"] = "FLASH";
|
|
83258
|
+
})(SiteCreatedContext || (SiteCreatedContext = {}));
|
|
83259
|
+
var AssetState;
|
|
83260
|
+
(function(AssetState2) {
|
|
83261
|
+
AssetState2["UNKNOWN"] = "UNKNOWN";
|
|
83262
|
+
AssetState2["ENABLED"] = "ENABLED";
|
|
83263
|
+
AssetState2["DISABLED"] = "DISABLED";
|
|
83264
|
+
AssetState2["PENDING"] = "PENDING";
|
|
83265
|
+
AssetState2["DEMO"] = "DEMO";
|
|
83266
|
+
})(AssetState || (AssetState = {}));
|
|
83267
|
+
var PlacementType;
|
|
83268
|
+
(function(PlacementType2) {
|
|
83269
|
+
PlacementType2["BEFORE"] = "BEFORE";
|
|
83270
|
+
PlacementType2["AFTER"] = "AFTER";
|
|
83271
|
+
PlacementType2["REPLACE"] = "REPLACE";
|
|
83272
|
+
})(PlacementType || (PlacementType = {}));
|
|
83273
|
+
var DayOfWeek;
|
|
83274
|
+
(function(DayOfWeek2) {
|
|
83275
|
+
DayOfWeek2["MONDAY"] = "MONDAY";
|
|
83276
|
+
DayOfWeek2["TUESDAY"] = "TUESDAY";
|
|
83277
|
+
DayOfWeek2["WEDNESDAY"] = "WEDNESDAY";
|
|
83278
|
+
DayOfWeek2["THURSDAY"] = "THURSDAY";
|
|
83279
|
+
DayOfWeek2["FRIDAY"] = "FRIDAY";
|
|
83280
|
+
DayOfWeek2["SATURDAY"] = "SATURDAY";
|
|
83281
|
+
DayOfWeek2["SUNDAY"] = "SUNDAY";
|
|
83282
|
+
})(DayOfWeek || (DayOfWeek = {}));
|
|
83283
|
+
var V4ResolutionMethod;
|
|
83284
|
+
(function(V4ResolutionMethod2) {
|
|
83285
|
+
V4ResolutionMethod2["QUERY_PARAM"] = "QUERY_PARAM";
|
|
83286
|
+
V4ResolutionMethod2["SUBDOMAIN"] = "SUBDOMAIN";
|
|
83287
|
+
V4ResolutionMethod2["SUBDIRECTORY"] = "SUBDIRECTORY";
|
|
83288
|
+
})(V4ResolutionMethod || (V4ResolutionMethod = {}));
|
|
83289
|
+
var WebhookIdentityType6;
|
|
83290
|
+
(function(WebhookIdentityType11) {
|
|
83291
|
+
WebhookIdentityType11["UNKNOWN"] = "UNKNOWN";
|
|
83292
|
+
WebhookIdentityType11["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
83293
|
+
WebhookIdentityType11["MEMBER"] = "MEMBER";
|
|
83294
|
+
WebhookIdentityType11["WIX_USER"] = "WIX_USER";
|
|
83295
|
+
WebhookIdentityType11["APP"] = "APP";
|
|
83296
|
+
})(WebhookIdentityType6 || (WebhookIdentityType6 = {}));
|
|
83297
|
+
var Cause;
|
|
83298
|
+
(function(Cause2) {
|
|
83299
|
+
Cause2["EMPTY"] = "EMPTY";
|
|
83300
|
+
Cause2["NAMESPACE_LIMIT_REACHED"] = "NAMESPACE_LIMIT_REACHED";
|
|
83301
|
+
Cause2["AUTOMATION_USER_LIMIT_REACHED"] = "AUTOMATION_USER_LIMIT_REACHED";
|
|
83302
|
+
Cause2["WIX_EMPLOYEE_LIMIT_REACHED"] = "WIX_EMPLOYEE_LIMIT_REACHED";
|
|
83303
|
+
})(Cause || (Cause = {}));
|
|
83304
|
+
var UrlFilter;
|
|
83305
|
+
(function(UrlFilter2) {
|
|
83306
|
+
UrlFilter2["NO_URL_TYPE_FILTER"] = "NO_URL_TYPE_FILTER";
|
|
83307
|
+
UrlFilter2["FREE"] = "FREE";
|
|
83308
|
+
})(UrlFilter || (UrlFilter = {}));
|
|
83309
|
+
var MigrationResult;
|
|
83310
|
+
(function(MigrationResult2) {
|
|
83311
|
+
MigrationResult2["UNKNOWN_FORMAT"] = "UNKNOWN_FORMAT";
|
|
83312
|
+
MigrationResult2["OK"] = "OK";
|
|
83313
|
+
MigrationResult2["SKIP"] = "SKIP";
|
|
83314
|
+
})(MigrationResult || (MigrationResult = {}));
|
|
83315
|
+
var MigrateEmbeddedServiceToTpaResponseMigrationResult;
|
|
83316
|
+
(function(MigrateEmbeddedServiceToTpaResponseMigrationResult2) {
|
|
83317
|
+
MigrateEmbeddedServiceToTpaResponseMigrationResult2["UNKNOWN_FORMAT"] = "UNKNOWN_FORMAT";
|
|
83318
|
+
MigrateEmbeddedServiceToTpaResponseMigrationResult2["OK"] = "OK";
|
|
83319
|
+
MigrateEmbeddedServiceToTpaResponseMigrationResult2["SKIP"] = "SKIP";
|
|
83320
|
+
})(MigrateEmbeddedServiceToTpaResponseMigrationResult || (MigrateEmbeddedServiceToTpaResponseMigrationResult = {}));
|
|
82954
83321
|
|
|
82955
83322
|
// ../../node_modules/@wix/ambassador-document-management-document-store-v1-transaction/build/es/http.impl.js
|
|
82956
83323
|
init_esm_shims();
|
|
@@ -83152,6 +83519,10 @@ var createMetaSiteFromTemplateSchema = external_exports.object({
|
|
|
83152
83519
|
metaSiteId: external_exports.string()
|
|
83153
83520
|
})
|
|
83154
83521
|
});
|
|
83522
|
+
var getMetaSiteUrlSchema = external_exports.object({
|
|
83523
|
+
url: external_exports.string(),
|
|
83524
|
+
published: external_exports.boolean()
|
|
83525
|
+
});
|
|
83155
83526
|
|
|
83156
83527
|
// ../metasite-manager-client/src/metasite-manager-client.ts
|
|
83157
83528
|
var MetasiteManagerClient = class {
|
|
@@ -83227,6 +83598,19 @@ var MetasiteManagerClient = class {
|
|
|
83227
83598
|
});
|
|
83228
83599
|
}
|
|
83229
83600
|
};
|
|
83601
|
+
getMetaSiteUrl = async () => {
|
|
83602
|
+
try {
|
|
83603
|
+
const { data } = await this.httpClient.request(
|
|
83604
|
+
getUrl({ urlFilter: UrlFilter.NO_URL_TYPE_FILTER })
|
|
83605
|
+
);
|
|
83606
|
+
return getMetaSiteUrlSchema.parse(data);
|
|
83607
|
+
} catch (e2) {
|
|
83608
|
+
throw new CliError({
|
|
83609
|
+
code: CliErrorCode.FailedToGetUrl(),
|
|
83610
|
+
cause: e2
|
|
83611
|
+
});
|
|
83612
|
+
}
|
|
83613
|
+
};
|
|
83230
83614
|
distributeClientUpdate = async (appId) => {
|
|
83231
83615
|
try {
|
|
83232
83616
|
await this.httpClient.request(
|
|
@@ -83253,9 +83637,11 @@ var MetasiteManagerClient = class {
|
|
|
83253
83637
|
};
|
|
83254
83638
|
|
|
83255
83639
|
// ../metasite-manager-client/src/useMetasiteManagerClient.ts
|
|
83256
|
-
function useMetasiteManagerClient(
|
|
83257
|
-
|
|
83258
|
-
|
|
83640
|
+
function useMetasiteManagerClient({
|
|
83641
|
+
siteId
|
|
83642
|
+
} = {}) {
|
|
83643
|
+
const httpClient = useHttpClient({ type: "general", siteId });
|
|
83644
|
+
const client2 = (0, import_react132.useMemo)(
|
|
83259
83645
|
() => new MetasiteManagerClient(httpClient),
|
|
83260
83646
|
[httpClient]
|
|
83261
83647
|
);
|
|
@@ -83276,8 +83662,10 @@ function truncateName(name, maxLength) {
|
|
|
83276
83662
|
return name;
|
|
83277
83663
|
}
|
|
83278
83664
|
var useCreateProject = (businessId) => {
|
|
83279
|
-
const { createOAuthApp: createOAuthApp2, updateOAuthApp: updateOAuthApp2, getAppSecret } = useDevCenterClient(
|
|
83280
|
-
|
|
83665
|
+
const { createOAuthApp: createOAuthApp2, updateOAuthApp: updateOAuthApp2, getAppSecret } = useDevCenterClient({
|
|
83666
|
+
siteId: businessId
|
|
83667
|
+
});
|
|
83668
|
+
const { getInstalledAppInstanceId, getMetaSiteUrl } = useMetasiteManagerClient();
|
|
83281
83669
|
const { createAppProject: createAppProject2, upsertAppEnvironment: upsertAppEnvironment2 } = useBackendAsAServiceClient();
|
|
83282
83670
|
return useAsyncCallback3(
|
|
83283
83671
|
async (_2, {
|
|
@@ -83287,12 +83675,13 @@ var useCreateProject = (businessId) => {
|
|
|
83287
83675
|
const { id: projectId } = await createOAuthApp2({
|
|
83288
83676
|
name: truncateName(`Private App for: ${projectName}`, 50)
|
|
83289
83677
|
});
|
|
83290
|
-
const [publicKeyAndSecret, instanceId] = await Promise.all([
|
|
83678
|
+
const [publicKeyAndSecret, instanceId, metaSiteUrl] = await Promise.all([
|
|
83291
83679
|
getAppSecret({ appId: projectId }),
|
|
83292
83680
|
getInstalledAppInstanceId({
|
|
83293
83681
|
metaSiteId: businessId,
|
|
83294
83682
|
appId: projectId
|
|
83295
|
-
})
|
|
83683
|
+
}),
|
|
83684
|
+
getMetaSiteUrl()
|
|
83296
83685
|
]);
|
|
83297
83686
|
const appProject = await createAppProject2({
|
|
83298
83687
|
id: projectId,
|
|
@@ -83327,7 +83716,8 @@ var useCreateProject = (businessId) => {
|
|
|
83327
83716
|
`${previewBaseRedirect}/${logoutRoute}`,
|
|
83328
83717
|
`${prodBaseDomain}/${loginRoute}`,
|
|
83329
83718
|
`${prodBaseDomain}/${logoutRoute}`
|
|
83330
|
-
]
|
|
83719
|
+
],
|
|
83720
|
+
redirectUrlWixPages: metaSiteUrl.url
|
|
83331
83721
|
});
|
|
83332
83722
|
const projectData = {
|
|
83333
83723
|
projectId,
|
|
@@ -83351,17 +83741,17 @@ var CreateProject = ({
|
|
|
83351
83741
|
cloudProviders
|
|
83352
83742
|
}) => {
|
|
83353
83743
|
const { status, execute } = useCreateProject(businessId);
|
|
83354
|
-
(0,
|
|
83355
|
-
if ((0,
|
|
83744
|
+
(0, import_react133.useEffect)(() => {
|
|
83745
|
+
if ((0, import_variant41.isType)(status, "Success")) {
|
|
83356
83746
|
onSubmit(status.result);
|
|
83357
83747
|
}
|
|
83358
83748
|
}, [status, onSubmit]);
|
|
83359
|
-
(0,
|
|
83749
|
+
(0, import_react133.useEffect)(() => {
|
|
83360
83750
|
if (providedProjectName) {
|
|
83361
83751
|
void execute({ projectName: providedProjectName, cloudProviders });
|
|
83362
83752
|
}
|
|
83363
83753
|
}, [providedProjectName, cloudProviders, execute]);
|
|
83364
|
-
const validate3 = (0,
|
|
83754
|
+
const validate3 = (0, import_react133.useCallback)(async (projectName) => {
|
|
83365
83755
|
try {
|
|
83366
83756
|
validateProjectName(projectName);
|
|
83367
83757
|
return true;
|
|
@@ -83369,7 +83759,7 @@ var CreateProject = ({
|
|
|
83369
83759
|
return e2.message;
|
|
83370
83760
|
}
|
|
83371
83761
|
}, []);
|
|
83372
|
-
return /* @__PURE__ */
|
|
83762
|
+
return /* @__PURE__ */ import_react133.default.createElement(import_react133.default.Fragment, null, !providedProjectName && /* @__PURE__ */ import_react133.default.createElement(
|
|
83373
83763
|
TextInput2,
|
|
83374
83764
|
{
|
|
83375
83765
|
label: "What's the name of your Custom Frontend project?",
|
|
@@ -83377,18 +83767,18 @@ var CreateProject = ({
|
|
|
83377
83767
|
validate: validate3,
|
|
83378
83768
|
inCreateFlow: true
|
|
83379
83769
|
}
|
|
83380
|
-
), (0,
|
|
83770
|
+
), (0, import_variant41.match)(status, {
|
|
83381
83771
|
Error: () => null,
|
|
83382
|
-
Loading: () => /* @__PURE__ */
|
|
83383
|
-
Success: () => /* @__PURE__ */
|
|
83772
|
+
Loading: () => /* @__PURE__ */ import_react133.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react133.default.createElement(Spinner2, { text: "Creating your project..." })),
|
|
83773
|
+
Success: () => /* @__PURE__ */ import_react133.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react133.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react133.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react133.default.createElement(Text2, null, "Project created successfully"))),
|
|
83384
83774
|
NotRequested: () => null
|
|
83385
83775
|
}));
|
|
83386
83776
|
};
|
|
83387
83777
|
|
|
83388
83778
|
// ../create-new-packages/headless-command/src/components/LinkCommand/GenerateProject.tsx
|
|
83389
83779
|
init_esm_shims();
|
|
83390
|
-
var
|
|
83391
|
-
var
|
|
83780
|
+
var import_react136 = __toESM(require_react(), 1);
|
|
83781
|
+
var import_variant43 = __toESM(require_lib(), 1);
|
|
83392
83782
|
|
|
83393
83783
|
// ../cli-project-extender/src/index.ts
|
|
83394
83784
|
init_esm_shims();
|
|
@@ -85222,8 +85612,8 @@ function pathVisitorPlugin(fork2) {
|
|
|
85222
85612
|
return this._changeReported;
|
|
85223
85613
|
};
|
|
85224
85614
|
function makeContextConstructor(visitor) {
|
|
85225
|
-
function
|
|
85226
|
-
if (!(this instanceof
|
|
85615
|
+
function Context2(path4) {
|
|
85616
|
+
if (!(this instanceof Context2)) {
|
|
85227
85617
|
throw new Error("");
|
|
85228
85618
|
}
|
|
85229
85619
|
if (!(this instanceof PathVisitor2)) {
|
|
@@ -85245,10 +85635,10 @@ function pathVisitorPlugin(fork2) {
|
|
|
85245
85635
|
if (!(visitor instanceof PathVisitor2)) {
|
|
85246
85636
|
throw new Error("");
|
|
85247
85637
|
}
|
|
85248
|
-
var Cp =
|
|
85249
|
-
Cp.constructor =
|
|
85638
|
+
var Cp = Context2.prototype = Object.create(visitor);
|
|
85639
|
+
Cp.constructor = Context2;
|
|
85250
85640
|
extend3(Cp, sharedContextProtoMethods);
|
|
85251
|
-
return
|
|
85641
|
+
return Context2;
|
|
85252
85642
|
}
|
|
85253
85643
|
var sharedContextProtoMethods = /* @__PURE__ */ Object.create(null);
|
|
85254
85644
|
sharedContextProtoMethods.reset = function reset(path4) {
|
|
@@ -92140,12 +92530,12 @@ function detectCodeFormat(code, userStyles = {}) {
|
|
|
92140
92530
|
}
|
|
92141
92531
|
if (detect.quote || detect.arrowParens) {
|
|
92142
92532
|
const matches = trimmitedLine.matchAll(syntaxDetectRegex);
|
|
92143
|
-
for (const
|
|
92144
|
-
if (!
|
|
92533
|
+
for (const match35 of matches) {
|
|
92534
|
+
if (!match35.groups) {
|
|
92145
92535
|
continue;
|
|
92146
92536
|
}
|
|
92147
92537
|
for (const key in syntaxUsages) {
|
|
92148
|
-
if (
|
|
92538
|
+
if (match35.groups[key]) {
|
|
92149
92539
|
syntaxUsages[key]++;
|
|
92150
92540
|
}
|
|
92151
92541
|
}
|
|
@@ -92441,9 +92831,9 @@ async function extend2(projectFolder) {
|
|
|
92441
92831
|
|
|
92442
92832
|
// ../create-new-packages/headless-command/src/task-runner.ts
|
|
92443
92833
|
init_esm_shims();
|
|
92444
|
-
var
|
|
92445
|
-
var
|
|
92446
|
-
var TaskRunnerStatus2 = (0,
|
|
92834
|
+
var import_react134 = __toESM(require_react(), 1);
|
|
92835
|
+
var import_variant42 = __toESM(require_lib(), 1);
|
|
92836
|
+
var TaskRunnerStatus2 = (0, import_variant42.variant)({
|
|
92447
92837
|
Idle: {},
|
|
92448
92838
|
Running: (runningTasks, totalTaskCount) => {
|
|
92449
92839
|
const taskStatuses = runningTasks.map((task, index) => {
|
|
@@ -92467,7 +92857,7 @@ var TaskRunnerStatus2 = (0, import_variant41.variant)({
|
|
|
92467
92857
|
}
|
|
92468
92858
|
});
|
|
92469
92859
|
function useTaskRunner2() {
|
|
92470
|
-
const [status, setStatus] = (0,
|
|
92860
|
+
const [status, setStatus] = (0, import_react134.useState)(
|
|
92471
92861
|
TaskRunnerStatus2.Idle()
|
|
92472
92862
|
);
|
|
92473
92863
|
const { execute } = useAsyncCallback3(async (_2, tasks) => {
|
|
@@ -92487,25 +92877,25 @@ function useTaskRunner2() {
|
|
|
92487
92877
|
|
|
92488
92878
|
// ../create-new-packages/headless-command/src/components/TaskList.tsx
|
|
92489
92879
|
init_esm_shims();
|
|
92490
|
-
var
|
|
92880
|
+
var import_react135 = __toESM(require_react(), 1);
|
|
92491
92881
|
var TaskList2 = ({ tasks, totalTaskCount }) => {
|
|
92492
|
-
return /* @__PURE__ */
|
|
92882
|
+
return /* @__PURE__ */ import_react135.default.createElement(import_react135.default.Fragment, null, tasks.map((task, index) => {
|
|
92493
92883
|
const stepper = `[${index + 1}/${totalTaskCount}]`;
|
|
92494
92884
|
const fullText = `${stepper} ${task.text}`;
|
|
92495
92885
|
if (task.status === "running") {
|
|
92496
|
-
return /* @__PURE__ */
|
|
92886
|
+
return /* @__PURE__ */ import_react135.default.createElement(Spinner2, { key: index, text: fullText });
|
|
92497
92887
|
}
|
|
92498
|
-
return /* @__PURE__ */
|
|
92888
|
+
return /* @__PURE__ */ import_react135.default.createElement(Alert, { key: index, type: "success" }, fullText);
|
|
92499
92889
|
}));
|
|
92500
92890
|
};
|
|
92501
92891
|
|
|
92502
92892
|
// ../create-new-packages/headless-command/src/components/LinkCommand/GenerateProject.tsx
|
|
92503
92893
|
var GenerationProgress2 = ({ tasks, totalTaskCount }) => {
|
|
92504
|
-
return /* @__PURE__ */
|
|
92894
|
+
return /* @__PURE__ */ import_react136.default.createElement(import_react136.default.Fragment, null, /* @__PURE__ */ import_react136.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react136.default.createElement(Text2, null, "Generating your headless site...")), /* @__PURE__ */ import_react136.default.createElement(TaskList2, { tasks, totalTaskCount }));
|
|
92505
92895
|
};
|
|
92506
92896
|
var GenerateProject = ({ projectFolder, businessId, projectData, onDone, packageManager: packageManager2 }) => {
|
|
92507
92897
|
const { execute: executeTaskRunner, status: taskRunnerStatus } = useTaskRunner2();
|
|
92508
|
-
const generateProject = (0,
|
|
92898
|
+
const generateProject = (0, import_react136.useCallback)(async () => {
|
|
92509
92899
|
const wixConfigFilePath = getWixConfigFilePath(projectFolder);
|
|
92510
92900
|
const envFilePath = getEnvFilePath(projectFolder);
|
|
92511
92901
|
await writeJson(
|
|
@@ -92518,10 +92908,10 @@ var GenerateProject = ({ projectFolder, businessId, projectData, onDone, package
|
|
|
92518
92908
|
);
|
|
92519
92909
|
await updateEnvFile(envFilePath, projectData.environmentVariables);
|
|
92520
92910
|
}, [businessId, projectFolder, projectData]);
|
|
92521
|
-
const extendProject = (0,
|
|
92911
|
+
const extendProject = (0, import_react136.useCallback)(async () => {
|
|
92522
92912
|
await extend2(projectFolder);
|
|
92523
92913
|
}, [projectFolder]);
|
|
92524
|
-
const installDependencies = (0,
|
|
92914
|
+
const installDependencies = (0, import_react136.useCallback)(async () => {
|
|
92525
92915
|
try {
|
|
92526
92916
|
await packageManager2.runInstall(projectFolder);
|
|
92527
92917
|
} catch (e2) {
|
|
@@ -92531,7 +92921,7 @@ var GenerateProject = ({ projectFolder, businessId, projectData, onDone, package
|
|
|
92531
92921
|
});
|
|
92532
92922
|
}
|
|
92533
92923
|
}, [projectFolder, packageManager2]);
|
|
92534
|
-
const tasks = (0,
|
|
92924
|
+
const tasks = (0, import_react136.useMemo)(() => {
|
|
92535
92925
|
const result = [
|
|
92536
92926
|
{
|
|
92537
92927
|
action: generateProject,
|
|
@@ -92555,18 +92945,18 @@ var GenerateProject = ({ projectFolder, businessId, projectData, onDone, package
|
|
|
92555
92945
|
await executeTaskRunner(tasks);
|
|
92556
92946
|
onDone(true);
|
|
92557
92947
|
}, []);
|
|
92558
|
-
return (0,
|
|
92948
|
+
return (0, import_variant43.match)(taskRunnerStatus, {
|
|
92559
92949
|
Idle: () => null,
|
|
92560
|
-
Running: (status) => /* @__PURE__ */
|
|
92561
|
-
Done: (status) => /* @__PURE__ */
|
|
92950
|
+
Running: (status) => /* @__PURE__ */ import_react136.default.createElement(GenerationProgress2, { ...status }),
|
|
92951
|
+
Done: (status) => /* @__PURE__ */ import_react136.default.createElement(Box_default, { flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ import_react136.default.createElement(GenerationProgress2, { ...status }), /* @__PURE__ */ import_react136.default.createElement(Box_default, { marginLeft: -2, marginTop: 1 }, /* @__PURE__ */ import_react136.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react136.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react136.default.createElement(Text2, null, "Project set up successfully"))))
|
|
92562
92952
|
});
|
|
92563
92953
|
};
|
|
92564
92954
|
|
|
92565
92955
|
// ../create-new-packages/headless-command/src/components/LinkCommand/FinishedSuccessfullyMessage.tsx
|
|
92566
92956
|
init_esm_shims();
|
|
92567
|
-
var
|
|
92957
|
+
var import_react137 = __toESM(require_react(), 1);
|
|
92568
92958
|
var FinishedSuccessfullyMessage2 = ({ packageManager: packageManager2 }) => {
|
|
92569
|
-
return /* @__PURE__ */
|
|
92959
|
+
return /* @__PURE__ */ import_react137.default.createElement(
|
|
92570
92960
|
Box_default,
|
|
92571
92961
|
{
|
|
92572
92962
|
borderColor: "blue",
|
|
@@ -92578,8 +92968,8 @@ var FinishedSuccessfullyMessage2 = ({ packageManager: packageManager2 }) => {
|
|
|
92578
92968
|
marginLeft: -2,
|
|
92579
92969
|
marginTop: 1
|
|
92580
92970
|
},
|
|
92581
|
-
/* @__PURE__ */
|
|
92582
|
-
/* @__PURE__ */
|
|
92971
|
+
/* @__PURE__ */ import_react137.default.createElement(Text2, { bold: true }, "Next Steps:"),
|
|
92972
|
+
/* @__PURE__ */ import_react137.default.createElement(UnorderedList, { gap: 1 }, /* @__PURE__ */ import_react137.default.createElement(UnorderedList.Item, { marker: "\u{1F45F}" }, /* @__PURE__ */ import_react137.default.createElement(Text2, null, "Start developing"), /* @__PURE__ */ import_react137.default.createElement(Text2, { skin: "info" }, `${packageManager2.getRunCmd()} dev`)), /* @__PURE__ */ import_react137.default.createElement(UnorderedList.Item, { marker: /* @__PURE__ */ import_react137.default.createElement(Learn, null) }, /* @__PURE__ */ import_react137.default.createElement(Text2, null, "For guides and API references visit our"), /* @__PURE__ */ import_react137.default.createElement(Link, { skin: "info", url: "https://dev.wix.com/docs/go-headless" }, "documentation")), /* @__PURE__ */ import_react137.default.createElement(UnorderedList.Item, { marker: "\u{1F4AC}" }, /* @__PURE__ */ import_react137.default.createElement(Text2, null, "Join our"), /* @__PURE__ */ import_react137.default.createElement(Link, { skin: "info", url: "https://discord.gg/wixstudio" }, "Discord community")))
|
|
92583
92973
|
);
|
|
92584
92974
|
};
|
|
92585
92975
|
|
|
@@ -92600,10 +92990,10 @@ var LinkCommand = ({
|
|
|
92600
92990
|
projectName: preEnteredProjectName,
|
|
92601
92991
|
businessName: preEnteredBusinessName
|
|
92602
92992
|
}) => {
|
|
92603
|
-
const [businessName, setBusinessName] = (0,
|
|
92604
|
-
const [businessId, setBusinessId] = (0,
|
|
92605
|
-
const [projectData, setProjectData] = (0,
|
|
92606
|
-
const [isDone, setIsDone] = (0,
|
|
92993
|
+
const [businessName, setBusinessName] = (0, import_react138.useState)(preEnteredBusinessName);
|
|
92994
|
+
const [businessId, setBusinessId] = (0, import_react138.useState)();
|
|
92995
|
+
const [projectData, setProjectData] = (0, import_react138.useState)();
|
|
92996
|
+
const [isDone, setIsDone] = (0, import_react138.useState)(false);
|
|
92607
92997
|
const { status } = useAsync2(async () => {
|
|
92608
92998
|
const alreadyLinked = await isWixConfigExists(projectFolder);
|
|
92609
92999
|
if (alreadyLinked) {
|
|
@@ -92623,11 +93013,11 @@ var LinkCommand = ({
|
|
|
92623
93013
|
const packageManager2 = await createPackageManager(repoType2);
|
|
92624
93014
|
return { repoType: repoType2, packageManager: packageManager2 };
|
|
92625
93015
|
}, []);
|
|
92626
|
-
return (0,
|
|
93016
|
+
return (0, import_variant44.match)(status, {
|
|
92627
93017
|
Error: () => null,
|
|
92628
|
-
Loading: () => /* @__PURE__ */
|
|
93018
|
+
Loading: () => /* @__PURE__ */ import_react138.default.createElement(Spinner2, { text: "Loading..." }),
|
|
92629
93019
|
Success: ({ result: { packageManager: packageManager2 } }) => {
|
|
92630
|
-
return /* @__PURE__ */
|
|
93020
|
+
return /* @__PURE__ */ import_react138.default.createElement(
|
|
92631
93021
|
Box_default,
|
|
92632
93022
|
{
|
|
92633
93023
|
flexDirection: "column",
|
|
@@ -92638,14 +93028,14 @@ var LinkCommand = ({
|
|
|
92638
93028
|
borderTop: false,
|
|
92639
93029
|
paddingLeft: 1
|
|
92640
93030
|
},
|
|
92641
|
-
/* @__PURE__ */
|
|
92642
|
-
!preEnteredBusinessName && /* @__PURE__ */
|
|
93031
|
+
/* @__PURE__ */ import_react138.default.createElement(WelcomeMessage2, null),
|
|
93032
|
+
!preEnteredBusinessName && /* @__PURE__ */ import_react138.default.createElement(
|
|
92643
93033
|
ChooseBusinessName,
|
|
92644
93034
|
{
|
|
92645
93035
|
onSubmit: ({ businessName: businessName2 }) => setBusinessName(businessName2)
|
|
92646
93036
|
}
|
|
92647
93037
|
),
|
|
92648
|
-
businessName && /* @__PURE__ */
|
|
93038
|
+
businessName && /* @__PURE__ */ import_react138.default.createElement(AuthProvider, null, /* @__PURE__ */ import_react138.default.createElement(
|
|
92649
93039
|
CreateBusiness,
|
|
92650
93040
|
{
|
|
92651
93041
|
businessName,
|
|
@@ -92653,7 +93043,7 @@ var LinkCommand = ({
|
|
|
92653
93043
|
onDone: ({ businessId: businessId2 }) => setBusinessId(businessId2)
|
|
92654
93044
|
}
|
|
92655
93045
|
)),
|
|
92656
|
-
businessName && businessId && /* @__PURE__ */
|
|
93046
|
+
businessName && businessId && /* @__PURE__ */ import_react138.default.createElement(AuthProvider, null, /* @__PURE__ */ import_react138.default.createElement(
|
|
92657
93047
|
CreateProject,
|
|
92658
93048
|
{
|
|
92659
93049
|
businessId,
|
|
@@ -92661,7 +93051,7 @@ var LinkCommand = ({
|
|
|
92661
93051
|
onSubmit: (data) => setProjectData(data)
|
|
92662
93052
|
}
|
|
92663
93053
|
)),
|
|
92664
|
-
businessName && businessId && projectData && /* @__PURE__ */
|
|
93054
|
+
businessName && businessId && projectData && /* @__PURE__ */ import_react138.default.createElement(
|
|
92665
93055
|
GenerateProject,
|
|
92666
93056
|
{
|
|
92667
93057
|
packageManager: packageManager2,
|
|
@@ -92671,7 +93061,7 @@ var LinkCommand = ({
|
|
|
92671
93061
|
onDone: () => setIsDone(true)
|
|
92672
93062
|
}
|
|
92673
93063
|
),
|
|
92674
|
-
businessName && businessId && projectData && isDone && /* @__PURE__ */
|
|
93064
|
+
businessName && businessId && projectData && isDone && /* @__PURE__ */ import_react138.default.createElement(FinishedSuccessfullyMessage2, { packageManager: packageManager2 })
|
|
92675
93065
|
);
|
|
92676
93066
|
}
|
|
92677
93067
|
});
|
|
@@ -92723,12 +93113,12 @@ var validateCloudProvider = (value2) => {
|
|
|
92723
93113
|
|
|
92724
93114
|
// ../create-new-packages/headless-command/src/components/ProcessCommand.tsx
|
|
92725
93115
|
init_esm_shims();
|
|
92726
|
-
var
|
|
92727
|
-
var
|
|
93116
|
+
var import_react149 = __toESM(require_react(), 1);
|
|
93117
|
+
var import_variant54 = __toESM(require_lib(), 1);
|
|
92728
93118
|
|
|
92729
93119
|
// ../create-new-packages/headless-command/src/parse-command-options.ts
|
|
92730
93120
|
init_esm_shims();
|
|
92731
|
-
var
|
|
93121
|
+
var import_variant46 = __toESM(require_lib(), 1);
|
|
92732
93122
|
import { join as join14 } from "node:path";
|
|
92733
93123
|
|
|
92734
93124
|
// ../create-new-packages/headless-command/src/validations/index.ts
|
|
@@ -92747,11 +93137,11 @@ async function validateDirectory2(projectRoot) {
|
|
|
92747
93137
|
// ../create-new-packages/headless-command/src/validations/package-name.ts
|
|
92748
93138
|
init_esm_shims();
|
|
92749
93139
|
var import_validate_npm_package_name2 = __toESM(require_lib2(), 1);
|
|
92750
|
-
var
|
|
92751
|
-
var Result2 = (0,
|
|
92752
|
-
(0,
|
|
92753
|
-
Error: (0,
|
|
92754
|
-
Ok:
|
|
93140
|
+
var import_variant45 = __toESM(require_lib(), 1);
|
|
93141
|
+
var Result2 = (0, import_variant45.variant)(
|
|
93142
|
+
(0, import_variant45.onTerms)(({ T }) => ({
|
|
93143
|
+
Error: (0, import_variant45.payload)(T),
|
|
93144
|
+
Ok: import_variant45.nil
|
|
92755
93145
|
}))
|
|
92756
93146
|
);
|
|
92757
93147
|
async function validatePackageName2(name) {
|
|
@@ -92821,10 +93211,10 @@ var headlessTemplates = [
|
|
|
92821
93211
|
...vibeCompatibleTemplates,
|
|
92822
93212
|
...pureHeadlessTemplates
|
|
92823
93213
|
];
|
|
92824
|
-
var TemplateSource2 = (0,
|
|
92825
|
-
HeadlessApp: (0,
|
|
92826
|
-
GitRepo: (0,
|
|
92827
|
-
Local: (0,
|
|
93214
|
+
var TemplateSource2 = (0, import_variant46.variant)({
|
|
93215
|
+
HeadlessApp: (0, import_variant46.fields)(),
|
|
93216
|
+
GitRepo: (0, import_variant46.fields)(),
|
|
93217
|
+
Local: (0, import_variant46.fields)()
|
|
92828
93218
|
});
|
|
92829
93219
|
function parseProviderString(cloudProvider) {
|
|
92830
93220
|
switch (cloudProvider.trim().toLowerCase()) {
|
|
@@ -92893,7 +93283,7 @@ async function parseProjectNameOptions(targetParentFolder2, options) {
|
|
|
92893
93283
|
});
|
|
92894
93284
|
}
|
|
92895
93285
|
const npmValidationErrors = await validatePackageName2(projectName);
|
|
92896
|
-
if ((0,
|
|
93286
|
+
if ((0, import_variant46.isType)(npmValidationErrors, "Error")) {
|
|
92897
93287
|
throw new CliError({
|
|
92898
93288
|
code: CliErrorCode.ProjectNameArgumentIsInvalid({
|
|
92899
93289
|
errorMessage: `Invalid package name "${projectName}". Please fix the following issues: ${npmValidationErrors.payload.join(", ")}`
|
|
@@ -92948,32 +93338,32 @@ async function parseCommandOptions2(targetParentFolder2, options) {
|
|
|
92948
93338
|
|
|
92949
93339
|
// ../create-new-packages/headless-command/src/components/CreateHeadlessSiteCommand.tsx
|
|
92950
93340
|
init_esm_shims();
|
|
92951
|
-
var
|
|
92952
|
-
var
|
|
93341
|
+
var import_react148 = __toESM(require_react(), 1);
|
|
93342
|
+
var import_variant53 = __toESM(require_lib(), 1);
|
|
92953
93343
|
var import_kebabCase5 = __toESM(require_kebabCase(), 1);
|
|
92954
93344
|
import { join as join19 } from "node:path";
|
|
92955
93345
|
|
|
92956
93346
|
// ../create-new-packages/headless-command/src/components/ChooseFolder.tsx
|
|
92957
93347
|
init_esm_shims();
|
|
92958
|
-
var
|
|
92959
|
-
var
|
|
93348
|
+
var import_react139 = __toESM(require_react(), 1);
|
|
93349
|
+
var import_variant47 = __toESM(require_lib(), 1);
|
|
92960
93350
|
import { join as join15 } from "node:path";
|
|
92961
93351
|
var validateAppDirectory = async (targetParentFolder2, packageName) => {
|
|
92962
93352
|
if (!await validateDirectory2(join15(targetParentFolder2, packageName))) {
|
|
92963
93353
|
return `Provided directory "${packageName}" is not empty`;
|
|
92964
93354
|
}
|
|
92965
93355
|
const npmValidationErrors = await validatePackageName2(packageName);
|
|
92966
|
-
return (0,
|
|
93356
|
+
return (0, import_variant47.match)(npmValidationErrors, {
|
|
92967
93357
|
Ok: () => true,
|
|
92968
93358
|
Error: ({ payload: payload7 }) => `Invalid folder name. Please fix the following issues: ${payload7.join(", ")}`
|
|
92969
93359
|
});
|
|
92970
93360
|
};
|
|
92971
93361
|
var ChooseFolder = ({ initialFolderName, targetParentFolder: targetParentFolder2, onSubmit }) => {
|
|
92972
|
-
const validate3 = (0,
|
|
93362
|
+
const validate3 = (0, import_react139.useCallback)(
|
|
92973
93363
|
async (packageName) => validateAppDirectory(targetParentFolder2, packageName),
|
|
92974
93364
|
[targetParentFolder2]
|
|
92975
93365
|
);
|
|
92976
|
-
return /* @__PURE__ */
|
|
93366
|
+
return /* @__PURE__ */ import_react139.default.createElement(
|
|
92977
93367
|
TextInput2,
|
|
92978
93368
|
{
|
|
92979
93369
|
label: "In which directory do you want to create your application?",
|
|
@@ -92988,8 +93378,8 @@ var ChooseFolder = ({ initialFolderName, targetParentFolder: targetParentFolder2
|
|
|
92988
93378
|
// ../create-new-packages/headless-command/src/components/GenerateProject.tsx
|
|
92989
93379
|
init_esm_shims();
|
|
92990
93380
|
import { mkdir as mkdir2 } from "node:fs/promises";
|
|
92991
|
-
var
|
|
92992
|
-
var
|
|
93381
|
+
var import_react140 = __toESM(require_react(), 1);
|
|
93382
|
+
var import_variant48 = __toESM(require_lib(), 1);
|
|
92993
93383
|
import { join as join17 } from "node:path";
|
|
92994
93384
|
|
|
92995
93385
|
// ../create-new-packages/headless-command/src/services/generator/template-fetcher.ts
|
|
@@ -93036,14 +93426,14 @@ async function resolveTemplateFolder(templatePathOverride, selectedTemplate) {
|
|
|
93036
93426
|
if (templatePathOverride) {
|
|
93037
93427
|
return templatePathOverride;
|
|
93038
93428
|
}
|
|
93039
|
-
return (0,
|
|
93429
|
+
return (0, import_variant48.match)(selectedTemplate, {
|
|
93040
93430
|
HeadlessApp: ({ gitPath }) => fetchTemplate(headlessTemplatesGitUrl, gitPath),
|
|
93041
93431
|
GitRepo: ({ url, path: path4 }) => fetchTemplate(url, path4),
|
|
93042
93432
|
Local: ({ path: path4 }) => path4
|
|
93043
93433
|
});
|
|
93044
93434
|
}
|
|
93045
93435
|
var GenerationProgress3 = ({ tasks, totalTaskCount }) => {
|
|
93046
|
-
return /* @__PURE__ */
|
|
93436
|
+
return /* @__PURE__ */ import_react140.default.createElement(import_react140.default.Fragment, null, /* @__PURE__ */ import_react140.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react140.default.createElement(Text2, null, "Generating your headless site...")), /* @__PURE__ */ import_react140.default.createElement(TaskList2, { tasks, totalTaskCount }));
|
|
93047
93437
|
};
|
|
93048
93438
|
var GenerateProject2 = ({
|
|
93049
93439
|
packageManager: packageManager2,
|
|
@@ -93056,11 +93446,11 @@ var GenerateProject2 = ({
|
|
|
93056
93446
|
onDone
|
|
93057
93447
|
}) => {
|
|
93058
93448
|
const { execute: executeTaskRunner, status: taskRunnerStatus } = useTaskRunner2();
|
|
93059
|
-
const packageFolder = (0,
|
|
93449
|
+
const packageFolder = (0, import_react140.useMemo)(
|
|
93060
93450
|
() => join17(targetParentFolder2, folderName),
|
|
93061
93451
|
[folderName, targetParentFolder2]
|
|
93062
93452
|
);
|
|
93063
|
-
const generateProject = (0,
|
|
93453
|
+
const generateProject = (0, import_react140.useCallback)(async () => {
|
|
93064
93454
|
try {
|
|
93065
93455
|
await mkdir2(packageFolder, { recursive: true });
|
|
93066
93456
|
} catch (e2) {
|
|
@@ -93101,10 +93491,10 @@ var GenerateProject2 = ({
|
|
|
93101
93491
|
commandOptions.templateParams,
|
|
93102
93492
|
commandOptions.templatePath
|
|
93103
93493
|
]);
|
|
93104
|
-
const extendProject = (0,
|
|
93494
|
+
const extendProject = (0, import_react140.useCallback)(async () => {
|
|
93105
93495
|
await extend2(packageFolder);
|
|
93106
93496
|
}, [packageFolder]);
|
|
93107
|
-
const initializeGit = (0,
|
|
93497
|
+
const initializeGit = (0, import_react140.useCallback)(async () => {
|
|
93108
93498
|
try {
|
|
93109
93499
|
await gitInit(packageFolder);
|
|
93110
93500
|
} catch (e2) {
|
|
@@ -93114,7 +93504,7 @@ var GenerateProject2 = ({
|
|
|
93114
93504
|
});
|
|
93115
93505
|
}
|
|
93116
93506
|
}, [packageFolder]);
|
|
93117
|
-
const installDependencies = (0,
|
|
93507
|
+
const installDependencies = (0, import_react140.useCallback)(async () => {
|
|
93118
93508
|
try {
|
|
93119
93509
|
await packageManager2.runInstall(packageFolder);
|
|
93120
93510
|
} catch (e2) {
|
|
@@ -93124,7 +93514,7 @@ var GenerateProject2 = ({
|
|
|
93124
93514
|
});
|
|
93125
93515
|
}
|
|
93126
93516
|
}, [packageFolder, packageManager2]);
|
|
93127
|
-
const commitToGit = (0,
|
|
93517
|
+
const commitToGit = (0, import_react140.useCallback)(async () => {
|
|
93128
93518
|
try {
|
|
93129
93519
|
await gitCommit(packageFolder);
|
|
93130
93520
|
} catch (e2) {
|
|
@@ -93134,7 +93524,7 @@ var GenerateProject2 = ({
|
|
|
93134
93524
|
});
|
|
93135
93525
|
}
|
|
93136
93526
|
}, [packageFolder]);
|
|
93137
|
-
const tasks = (0,
|
|
93527
|
+
const tasks = (0, import_react140.useMemo)(() => {
|
|
93138
93528
|
const result = [
|
|
93139
93529
|
{
|
|
93140
93530
|
action: generateProject,
|
|
@@ -93188,18 +93578,18 @@ var GenerateProject2 = ({
|
|
|
93188
93578
|
await executeTaskRunner(tasks);
|
|
93189
93579
|
onDone(true);
|
|
93190
93580
|
}, []);
|
|
93191
|
-
return (0,
|
|
93581
|
+
return (0, import_variant48.match)(taskRunnerStatus, {
|
|
93192
93582
|
Idle: () => null,
|
|
93193
|
-
Running: (status) => /* @__PURE__ */
|
|
93194
|
-
Done: (status) => /* @__PURE__ */
|
|
93583
|
+
Running: (status) => /* @__PURE__ */ import_react140.default.createElement(GenerationProgress3, { ...status }),
|
|
93584
|
+
Done: (status) => /* @__PURE__ */ import_react140.default.createElement(Box_default, { flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ import_react140.default.createElement(GenerationProgress3, { ...status }), /* @__PURE__ */ import_react140.default.createElement(Box_default, { marginLeft: -2, marginTop: 1 }, /* @__PURE__ */ import_react140.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react140.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react140.default.createElement(Text2, null, "Project set up successfully"))))
|
|
93195
93585
|
});
|
|
93196
93586
|
};
|
|
93197
93587
|
|
|
93198
93588
|
// ../create-new-packages/headless-command/src/components/ChooseTemplate.tsx
|
|
93199
93589
|
init_esm_shims();
|
|
93200
|
-
var
|
|
93590
|
+
var import_react141 = __toESM(require_react(), 1);
|
|
93201
93591
|
var ChooseTemplate2 = ({ onSubmit }) => {
|
|
93202
|
-
const groups = (0,
|
|
93592
|
+
const groups = (0, import_react141.useMemo)(
|
|
93203
93593
|
() => [
|
|
93204
93594
|
{
|
|
93205
93595
|
title: "Wix Vibe compatible templates",
|
|
@@ -93213,7 +93603,7 @@ var ChooseTemplate2 = ({ onSubmit }) => {
|
|
|
93213
93603
|
{
|
|
93214
93604
|
title: "Standard templates",
|
|
93215
93605
|
// https://dev.wix.com/docs/go-headless/get-started/templates/wix-managed-templates/wix-cli-for-headless-templates
|
|
93216
|
-
description: /* @__PURE__ */
|
|
93606
|
+
description: /* @__PURE__ */ import_react141.default.createElement(Text2, null, "(", /* @__PURE__ */ import_react141.default.createElement(Link, { url: "https://wix.to/zuKh3Fo" }, "Learn more"), ")"),
|
|
93217
93607
|
items: pureHeadlessTemplates.map((template) => ({
|
|
93218
93608
|
key: template.siteTemplateId,
|
|
93219
93609
|
title: template.title,
|
|
@@ -93224,7 +93614,7 @@ var ChooseTemplate2 = ({ onSubmit }) => {
|
|
|
93224
93614
|
],
|
|
93225
93615
|
[]
|
|
93226
93616
|
);
|
|
93227
|
-
return /* @__PURE__ */
|
|
93617
|
+
return /* @__PURE__ */ import_react141.default.createElement(
|
|
93228
93618
|
SelectGroupsInput,
|
|
93229
93619
|
{
|
|
93230
93620
|
label: "Choose an initial template for your business",
|
|
@@ -93236,14 +93626,14 @@ var ChooseTemplate2 = ({ onSubmit }) => {
|
|
|
93236
93626
|
|
|
93237
93627
|
// ../create-new-packages/headless-command/src/components/ReleaseProject.tsx
|
|
93238
93628
|
init_esm_shims();
|
|
93239
|
-
var
|
|
93240
|
-
var
|
|
93629
|
+
var import_react143 = __toESM(require_react(), 1);
|
|
93630
|
+
var import_variant50 = __toESM(require_lib(), 1);
|
|
93241
93631
|
|
|
93242
93632
|
// ../create-new-packages/headless-command/src/components/FinishedSuccessfullyMessage.tsx
|
|
93243
93633
|
init_esm_shims();
|
|
93244
|
-
var
|
|
93634
|
+
var import_react142 = __toESM(require_react(), 1);
|
|
93245
93635
|
var FinishedSuccessfullyMessage3 = ({ packageManager: packageManager2, folderName, projectData, isReleased }) => {
|
|
93246
|
-
return /* @__PURE__ */
|
|
93636
|
+
return /* @__PURE__ */ import_react142.default.createElement(
|
|
93247
93637
|
Box_default,
|
|
93248
93638
|
{
|
|
93249
93639
|
borderColor: "blue",
|
|
@@ -93255,17 +93645,17 @@ var FinishedSuccessfullyMessage3 = ({ packageManager: packageManager2, folderNam
|
|
|
93255
93645
|
marginLeft: -2,
|
|
93256
93646
|
marginTop: 1
|
|
93257
93647
|
},
|
|
93258
|
-
isReleased && /* @__PURE__ */
|
|
93259
|
-
/* @__PURE__ */
|
|
93260
|
-
/* @__PURE__ */
|
|
93648
|
+
isReleased && /* @__PURE__ */ import_react142.default.createElement(Text2, { bold: true }, /* @__PURE__ */ import_react142.default.createElement(Rocket, null), " Visit your site at: ", projectData.baseUrl),
|
|
93649
|
+
/* @__PURE__ */ import_react142.default.createElement(Text2, { bold: true }, "Next Steps:"),
|
|
93650
|
+
/* @__PURE__ */ import_react142.default.createElement(UnorderedList, { gap: 1 }, /* @__PURE__ */ import_react142.default.createElement(UnorderedList.Item, { marker: "\u{1F45F}" }, /* @__PURE__ */ import_react142.default.createElement(Text2, null, "Start developing"), /* @__PURE__ */ import_react142.default.createElement(Text2, { skin: "info" }, `cd ${folderName}`), /* @__PURE__ */ import_react142.default.createElement(Text2, { skin: "info" }, `${packageManager2.getRunCmd()} dev`)), /* @__PURE__ */ import_react142.default.createElement(UnorderedList.Item, { marker: /* @__PURE__ */ import_react142.default.createElement(Learn, null) }, /* @__PURE__ */ import_react142.default.createElement(Text2, null, "For guides and API references visit our"), /* @__PURE__ */ import_react142.default.createElement(Link, { skin: "info", url: "https://dev.wix.com/docs/go-headless" }, "documentation")), /* @__PURE__ */ import_react142.default.createElement(UnorderedList.Item, { marker: "\u{1F4AC}" }, /* @__PURE__ */ import_react142.default.createElement(Text2, null, "Join our"), /* @__PURE__ */ import_react142.default.createElement(Link, { skin: "info", url: "https://discord.gg/wixstudio" }, "Discord community")))
|
|
93261
93651
|
);
|
|
93262
93652
|
};
|
|
93263
93653
|
|
|
93264
93654
|
// ../create-new-packages/headless-command/src/hooks/release-project.ts
|
|
93265
93655
|
init_esm_shims();
|
|
93266
|
-
var
|
|
93656
|
+
var import_variant49 = __toESM(require_lib(), 1);
|
|
93267
93657
|
import { join as join18 } from "node:path";
|
|
93268
|
-
var ReleaseStateVariant = (0,
|
|
93658
|
+
var ReleaseStateVariant = (0, import_variant49.variant)({
|
|
93269
93659
|
Success: {},
|
|
93270
93660
|
Skipped: {},
|
|
93271
93661
|
Error: {}
|
|
@@ -93313,7 +93703,7 @@ var ReleaseProject = ({
|
|
|
93313
93703
|
releaseNonInteractive
|
|
93314
93704
|
}) => {
|
|
93315
93705
|
const { status, execute } = useReleaseProject();
|
|
93316
|
-
(0,
|
|
93706
|
+
(0, import_react143.useEffect)(() => {
|
|
93317
93707
|
if (releaseNonInteractive != null) {
|
|
93318
93708
|
void execute({
|
|
93319
93709
|
confirmed: releaseNonInteractive,
|
|
@@ -93323,7 +93713,7 @@ var ReleaseProject = ({
|
|
|
93323
93713
|
});
|
|
93324
93714
|
}
|
|
93325
93715
|
}, []);
|
|
93326
|
-
return /* @__PURE__ */
|
|
93716
|
+
return /* @__PURE__ */ import_react143.default.createElement(import_react143.default.Fragment, null, releaseNonInteractive == null && /* @__PURE__ */ import_react143.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react143.default.createElement(
|
|
93327
93717
|
ConfirmInput,
|
|
93328
93718
|
{
|
|
93329
93719
|
label: "Would you like to publish your site now?",
|
|
@@ -93337,42 +93727,42 @@ var ReleaseProject = ({
|
|
|
93337
93727
|
});
|
|
93338
93728
|
}
|
|
93339
93729
|
}
|
|
93340
|
-
)), (0,
|
|
93730
|
+
)), (0, import_variant50.match)(status, {
|
|
93341
93731
|
NotRequested: () => null,
|
|
93342
93732
|
Success: ({ result }) => {
|
|
93343
|
-
return /* @__PURE__ */
|
|
93344
|
-
Success: () => /* @__PURE__ */
|
|
93345
|
-
Skipped: () => /* @__PURE__ */
|
|
93346
|
-
Error: () => /* @__PURE__ */
|
|
93347
|
-
}), /* @__PURE__ */
|
|
93733
|
+
return /* @__PURE__ */ import_react143.default.createElement(import_react143.default.Fragment, null, (0, import_variant50.match)(result, {
|
|
93734
|
+
Success: () => /* @__PURE__ */ import_react143.default.createElement(Box_default, { marginLeft: -2 }, /* @__PURE__ */ import_react143.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react143.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react143.default.createElement(Text2, null, "Site published successfully"))),
|
|
93735
|
+
Skipped: () => /* @__PURE__ */ import_react143.default.createElement(Text2, null, `No worries, you can publish your site later by running ${packageManager2.getRunCmd()} release`),
|
|
93736
|
+
Error: () => /* @__PURE__ */ import_react143.default.createElement(Box_default, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ import_react143.default.createElement(Alert, { type: "error" }, "Failed to publish your site"), /* @__PURE__ */ import_react143.default.createElement(Text2, null, `No worries, you can publish your site later by running ${packageManager2.getRunCmd()} release`))
|
|
93737
|
+
}), /* @__PURE__ */ import_react143.default.createElement(
|
|
93348
93738
|
FinishedSuccessfullyMessage3,
|
|
93349
93739
|
{
|
|
93350
93740
|
packageManager: packageManager2,
|
|
93351
93741
|
folderName,
|
|
93352
93742
|
projectData,
|
|
93353
|
-
isReleased: (0,
|
|
93743
|
+
isReleased: (0, import_variant50.isType)(result, "Success")
|
|
93354
93744
|
}
|
|
93355
93745
|
));
|
|
93356
93746
|
},
|
|
93357
93747
|
Error: () => null,
|
|
93358
|
-
Loading: () => /* @__PURE__ */
|
|
93748
|
+
Loading: () => /* @__PURE__ */ import_react143.default.createElement(Spinner2, { text: "Publishing your site..." })
|
|
93359
93749
|
}));
|
|
93360
93750
|
};
|
|
93361
93751
|
|
|
93362
93752
|
// ../create-new-packages/headless-command/src/components/ChooseVibeSetup.tsx
|
|
93363
93753
|
init_esm_shims();
|
|
93364
|
-
var
|
|
93365
|
-
var
|
|
93366
|
-
var VibeSetupChoice = (0,
|
|
93754
|
+
var import_react144 = __toESM(require_react(), 1);
|
|
93755
|
+
var import_variant51 = __toESM(require_lib(), 1);
|
|
93756
|
+
var VibeSetupChoice = (0, import_variant51.variant)({
|
|
93367
93757
|
SetupVibe: {},
|
|
93368
93758
|
Skip: {}
|
|
93369
93759
|
});
|
|
93370
93760
|
var ChooseVibeSetup = ({ onSubmit }) => {
|
|
93371
|
-
return /* @__PURE__ */
|
|
93761
|
+
return /* @__PURE__ */ import_react144.default.createElement(
|
|
93372
93762
|
SelectInput2,
|
|
93373
93763
|
{
|
|
93374
93764
|
label: "Would you like to set up your project for editing in Wix Vibe?",
|
|
93375
|
-
info: /* @__PURE__ */
|
|
93765
|
+
info: /* @__PURE__ */ import_react144.default.createElement(import_react144.default.Fragment, null, "Use vibe coding with a drag-and-drop editor and an IDE. Requires using GitHub to sync your project.", " ", /* @__PURE__ */ import_react144.default.createElement(Link, { url: "https://support.wix.com/en/using-wix-vibe" }, /* @__PURE__ */ import_react144.default.createElement(Text2, { underline: true }, "Learn more"))),
|
|
93376
93766
|
options: [
|
|
93377
93767
|
{
|
|
93378
93768
|
key: "setup-vibe",
|
|
@@ -93394,8 +93784,8 @@ var ChooseVibeSetup = ({ onSubmit }) => {
|
|
|
93394
93784
|
|
|
93395
93785
|
// ../create-new-packages/headless-command/src/components/VibeRepositorySetupPolling.tsx
|
|
93396
93786
|
init_esm_shims();
|
|
93397
|
-
var
|
|
93398
|
-
var
|
|
93787
|
+
var import_react147 = __toESM(require_react(), 1);
|
|
93788
|
+
var import_variant52 = __toESM(require_lib(), 1);
|
|
93399
93789
|
|
|
93400
93790
|
// ../velo-client/src/index.ts
|
|
93401
93791
|
init_esm_shims();
|
|
@@ -93424,14 +93814,14 @@ var Action;
|
|
|
93424
93814
|
Action2["OVERWRITE"] = "OVERWRITE";
|
|
93425
93815
|
Action2["COPY"] = "COPY";
|
|
93426
93816
|
})(Action || (Action = {}));
|
|
93427
|
-
var
|
|
93428
|
-
(function(
|
|
93429
|
-
|
|
93430
|
-
|
|
93431
|
-
|
|
93432
|
-
|
|
93433
|
-
|
|
93434
|
-
})(
|
|
93817
|
+
var WebhookIdentityType7;
|
|
93818
|
+
(function(WebhookIdentityType11) {
|
|
93819
|
+
WebhookIdentityType11["UNKNOWN"] = "UNKNOWN";
|
|
93820
|
+
WebhookIdentityType11["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
93821
|
+
WebhookIdentityType11["MEMBER"] = "MEMBER";
|
|
93822
|
+
WebhookIdentityType11["WIX_USER"] = "WIX_USER";
|
|
93823
|
+
WebhookIdentityType11["APP"] = "APP";
|
|
93824
|
+
})(WebhookIdentityType7 || (WebhookIdentityType7 = {}));
|
|
93435
93825
|
|
|
93436
93826
|
// ../../node_modules/@wix/ambassador-velo-github-v1-github-onboarding-status/build/es/types.impl.js
|
|
93437
93827
|
init_esm_shims();
|
|
@@ -93452,75 +93842,75 @@ var OnboardingState;
|
|
|
93452
93842
|
OnboardingState2["GITHUB_REPOSITORY_CREATED"] = "GITHUB_REPOSITORY_CREATED";
|
|
93453
93843
|
OnboardingState2["GITHUB_ENABLED"] = "GITHUB_ENABLED";
|
|
93454
93844
|
})(OnboardingState || (OnboardingState = {}));
|
|
93455
|
-
var
|
|
93456
|
-
(function(
|
|
93457
|
-
|
|
93458
|
-
|
|
93459
|
-
|
|
93460
|
-
|
|
93461
|
-
|
|
93462
|
-
})(
|
|
93463
|
-
var
|
|
93464
|
-
(function(
|
|
93465
|
-
|
|
93466
|
-
|
|
93467
|
-
|
|
93468
|
-
|
|
93469
|
-
|
|
93470
|
-
|
|
93471
|
-
})(
|
|
93472
|
-
var
|
|
93473
|
-
(function(
|
|
93474
|
-
|
|
93475
|
-
|
|
93476
|
-
|
|
93477
|
-
|
|
93478
|
-
|
|
93479
|
-
|
|
93480
|
-
|
|
93481
|
-
|
|
93482
|
-
|
|
93483
|
-
|
|
93484
|
-
|
|
93485
|
-
|
|
93486
|
-
|
|
93487
|
-
|
|
93488
|
-
|
|
93489
|
-
|
|
93490
|
-
|
|
93491
|
-
|
|
93492
|
-
|
|
93493
|
-
|
|
93494
|
-
|
|
93495
|
-
|
|
93496
|
-
|
|
93497
|
-
|
|
93498
|
-
|
|
93499
|
-
|
|
93500
|
-
|
|
93501
|
-
|
|
93502
|
-
|
|
93503
|
-
|
|
93504
|
-
|
|
93505
|
-
|
|
93506
|
-
|
|
93507
|
-
})(
|
|
93508
|
-
var
|
|
93509
|
-
(function(
|
|
93510
|
-
|
|
93511
|
-
|
|
93512
|
-
|
|
93513
|
-
|
|
93514
|
-
|
|
93515
|
-
})(
|
|
93516
|
-
var
|
|
93517
|
-
(function(
|
|
93518
|
-
|
|
93519
|
-
|
|
93520
|
-
|
|
93521
|
-
|
|
93522
|
-
|
|
93523
|
-
})(
|
|
93845
|
+
var State3;
|
|
93846
|
+
(function(State4) {
|
|
93847
|
+
State4["UNKNOWN"] = "UNKNOWN";
|
|
93848
|
+
State4["ENABLED"] = "ENABLED";
|
|
93849
|
+
State4["DISABLED"] = "DISABLED";
|
|
93850
|
+
State4["PENDING"] = "PENDING";
|
|
93851
|
+
State4["DEMO"] = "DEMO";
|
|
93852
|
+
})(State3 || (State3 = {}));
|
|
93853
|
+
var SiteCreatedContext2;
|
|
93854
|
+
(function(SiteCreatedContext3) {
|
|
93855
|
+
SiteCreatedContext3["OTHER"] = "OTHER";
|
|
93856
|
+
SiteCreatedContext3["FROM_TEMPLATE"] = "FROM_TEMPLATE";
|
|
93857
|
+
SiteCreatedContext3["DUPLICATE_BY_SITE_TRANSFER"] = "DUPLICATE_BY_SITE_TRANSFER";
|
|
93858
|
+
SiteCreatedContext3["DUPLICATE"] = "DUPLICATE";
|
|
93859
|
+
SiteCreatedContext3["OLD_SITE_TRANSFER"] = "OLD_SITE_TRANSFER";
|
|
93860
|
+
SiteCreatedContext3["FLASH"] = "FLASH";
|
|
93861
|
+
})(SiteCreatedContext2 || (SiteCreatedContext2 = {}));
|
|
93862
|
+
var Namespace2;
|
|
93863
|
+
(function(Namespace3) {
|
|
93864
|
+
Namespace3["UNKNOWN_NAMESPACE"] = "UNKNOWN_NAMESPACE";
|
|
93865
|
+
Namespace3["WIX"] = "WIX";
|
|
93866
|
+
Namespace3["SHOUT_OUT"] = "SHOUT_OUT";
|
|
93867
|
+
Namespace3["ALBUMS"] = "ALBUMS";
|
|
93868
|
+
Namespace3["WIX_STORES_TEST_DRIVE"] = "WIX_STORES_TEST_DRIVE";
|
|
93869
|
+
Namespace3["HOTELS"] = "HOTELS";
|
|
93870
|
+
Namespace3["CLUBS"] = "CLUBS";
|
|
93871
|
+
Namespace3["ONBOARDING_DRAFT"] = "ONBOARDING_DRAFT";
|
|
93872
|
+
Namespace3["DEV_SITE"] = "DEV_SITE";
|
|
93873
|
+
Namespace3["LOGOS"] = "LOGOS";
|
|
93874
|
+
Namespace3["VIDEO_MAKER"] = "VIDEO_MAKER";
|
|
93875
|
+
Namespace3["PARTNER_DASHBOARD"] = "PARTNER_DASHBOARD";
|
|
93876
|
+
Namespace3["DEV_CENTER_COMPANY"] = "DEV_CENTER_COMPANY";
|
|
93877
|
+
Namespace3["HTML_DRAFT"] = "HTML_DRAFT";
|
|
93878
|
+
Namespace3["SITELESS_BUSINESS"] = "SITELESS_BUSINESS";
|
|
93879
|
+
Namespace3["CREATOR_ECONOMY"] = "CREATOR_ECONOMY";
|
|
93880
|
+
Namespace3["DASHBOARD_FIRST"] = "DASHBOARD_FIRST";
|
|
93881
|
+
Namespace3["ANYWHERE"] = "ANYWHERE";
|
|
93882
|
+
Namespace3["HEADLESS"] = "HEADLESS";
|
|
93883
|
+
Namespace3["ACCOUNT_MASTER_CMS"] = "ACCOUNT_MASTER_CMS";
|
|
93884
|
+
Namespace3["RISE"] = "RISE";
|
|
93885
|
+
Namespace3["BRANDED_FIRST"] = "BRANDED_FIRST";
|
|
93886
|
+
Namespace3["NOWNIA"] = "NOWNIA";
|
|
93887
|
+
Namespace3["UGC_TEMPLATE"] = "UGC_TEMPLATE";
|
|
93888
|
+
Namespace3["CODUX"] = "CODUX";
|
|
93889
|
+
Namespace3["MEDIA_DESIGN_CREATOR"] = "MEDIA_DESIGN_CREATOR";
|
|
93890
|
+
Namespace3["SHARED_BLOG_ENTERPRISE"] = "SHARED_BLOG_ENTERPRISE";
|
|
93891
|
+
Namespace3["STANDALONE_FORMS"] = "STANDALONE_FORMS";
|
|
93892
|
+
Namespace3["STANDALONE_EVENTS"] = "STANDALONE_EVENTS";
|
|
93893
|
+
Namespace3["MIMIR"] = "MIMIR";
|
|
93894
|
+
Namespace3["TWINS"] = "TWINS";
|
|
93895
|
+
Namespace3["NANO"] = "NANO";
|
|
93896
|
+
Namespace3["BASE44"] = "BASE44";
|
|
93897
|
+
})(Namespace2 || (Namespace2 = {}));
|
|
93898
|
+
var DeleteStatus2;
|
|
93899
|
+
(function(DeleteStatus3) {
|
|
93900
|
+
DeleteStatus3["UNKNOWN"] = "UNKNOWN";
|
|
93901
|
+
DeleteStatus3["TRASH"] = "TRASH";
|
|
93902
|
+
DeleteStatus3["DELETED"] = "DELETED";
|
|
93903
|
+
DeleteStatus3["PENDING_PURGE"] = "PENDING_PURGE";
|
|
93904
|
+
DeleteStatus3["PURGED_EXTERNALLY"] = "PURGED_EXTERNALLY";
|
|
93905
|
+
})(DeleteStatus2 || (DeleteStatus2 = {}));
|
|
93906
|
+
var WebhookIdentityType8;
|
|
93907
|
+
(function(WebhookIdentityType11) {
|
|
93908
|
+
WebhookIdentityType11["UNKNOWN"] = "UNKNOWN";
|
|
93909
|
+
WebhookIdentityType11["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
93910
|
+
WebhookIdentityType11["MEMBER"] = "MEMBER";
|
|
93911
|
+
WebhookIdentityType11["WIX_USER"] = "WIX_USER";
|
|
93912
|
+
WebhookIdentityType11["APP"] = "APP";
|
|
93913
|
+
})(WebhookIdentityType8 || (WebhookIdentityType8 = {}));
|
|
93524
93914
|
|
|
93525
93915
|
// ../velo-client/src/velo-client.ts
|
|
93526
93916
|
init_esm_shims();
|
|
@@ -93551,14 +93941,14 @@ var RcLabel;
|
|
|
93551
93941
|
RcLabel2["UNKNOWN"] = "UNKNOWN";
|
|
93552
93942
|
RcLabel2["WIX_CLI"] = "WIX_CLI";
|
|
93553
93943
|
})(RcLabel || (RcLabel = {}));
|
|
93554
|
-
var
|
|
93555
|
-
(function(
|
|
93556
|
-
|
|
93557
|
-
|
|
93558
|
-
|
|
93559
|
-
|
|
93560
|
-
|
|
93561
|
-
})(
|
|
93944
|
+
var WebhookIdentityType9;
|
|
93945
|
+
(function(WebhookIdentityType11) {
|
|
93946
|
+
WebhookIdentityType11["UNKNOWN"] = "UNKNOWN";
|
|
93947
|
+
WebhookIdentityType11["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
93948
|
+
WebhookIdentityType11["MEMBER"] = "MEMBER";
|
|
93949
|
+
WebhookIdentityType11["WIX_USER"] = "WIX_USER";
|
|
93950
|
+
WebhookIdentityType11["APP"] = "APP";
|
|
93951
|
+
})(WebhookIdentityType9 || (WebhookIdentityType9 = {}));
|
|
93562
93952
|
|
|
93563
93953
|
// ../../node_modules/@wix/ambassador-velo-apps-v1-app/build/es/http.impl.js
|
|
93564
93954
|
init_esm_shims();
|
|
@@ -94130,10 +94520,10 @@ var VeloClient = class {
|
|
|
94130
94520
|
|
|
94131
94521
|
// ../velo-client/src/useVeloClient.ts
|
|
94132
94522
|
init_esm_shims();
|
|
94133
|
-
var
|
|
94523
|
+
var import_react145 = __toESM(require_react(), 1);
|
|
94134
94524
|
function useVeloClient() {
|
|
94135
94525
|
const httpClient = useHttpClient({ type: "code" });
|
|
94136
|
-
const client2 = (0,
|
|
94526
|
+
const client2 = (0, import_react145.useMemo)(() => new VeloClient(httpClient), [httpClient]);
|
|
94137
94527
|
return usePanoramaMethodLogger(client2);
|
|
94138
94528
|
}
|
|
94139
94529
|
|
|
@@ -94142,7 +94532,7 @@ init_esm_shims();
|
|
|
94142
94532
|
|
|
94143
94533
|
// ../codestore-client/src/useCodestoreClient.ts
|
|
94144
94534
|
init_esm_shims();
|
|
94145
|
-
var
|
|
94535
|
+
var import_react146 = __toESM(require_react(), 1);
|
|
94146
94536
|
|
|
94147
94537
|
// ../codestore-client/src/codestore-client.ts
|
|
94148
94538
|
init_esm_shims();
|
|
@@ -94226,14 +94616,14 @@ var GitRemoteType;
|
|
|
94226
94616
|
GitRemoteType2["S3"] = "S3";
|
|
94227
94617
|
GitRemoteType2["GITHUB"] = "GITHUB";
|
|
94228
94618
|
})(GitRemoteType || (GitRemoteType = {}));
|
|
94229
|
-
var
|
|
94230
|
-
(function(
|
|
94231
|
-
|
|
94232
|
-
|
|
94233
|
-
|
|
94234
|
-
|
|
94235
|
-
|
|
94236
|
-
})(
|
|
94619
|
+
var WebhookIdentityType10;
|
|
94620
|
+
(function(WebhookIdentityType11) {
|
|
94621
|
+
WebhookIdentityType11["UNKNOWN"] = "UNKNOWN";
|
|
94622
|
+
WebhookIdentityType11["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
94623
|
+
WebhookIdentityType11["MEMBER"] = "MEMBER";
|
|
94624
|
+
WebhookIdentityType11["WIX_USER"] = "WIX_USER";
|
|
94625
|
+
WebhookIdentityType11["APP"] = "APP";
|
|
94626
|
+
})(WebhookIdentityType10 || (WebhookIdentityType10 = {}));
|
|
94237
94627
|
var SortOrder4;
|
|
94238
94628
|
(function(SortOrder5) {
|
|
94239
94629
|
SortOrder5["ASC"] = "ASC";
|
|
@@ -94306,13 +94696,13 @@ var CodestoreClient = class {
|
|
|
94306
94696
|
// ../codestore-client/src/useCodestoreClient.ts
|
|
94307
94697
|
function useCodestoreClient() {
|
|
94308
94698
|
const httpClient = useHttpClient({ type: "backoffice" });
|
|
94309
|
-
const client2 = (0,
|
|
94699
|
+
const client2 = (0, import_react146.useMemo)(() => new CodestoreClient(httpClient), [httpClient]);
|
|
94310
94700
|
return usePanoramaMethodLogger(client2);
|
|
94311
94701
|
}
|
|
94312
94702
|
|
|
94313
94703
|
// ../create-new-packages/headless-command/src/components/VibeRepositorySetupPolling.tsx
|
|
94314
|
-
var VibeSetupResult = (0,
|
|
94315
|
-
Success: (0,
|
|
94704
|
+
var VibeSetupResult = (0, import_variant52.variant)({
|
|
94705
|
+
Success: (0, import_variant52.fields)(),
|
|
94316
94706
|
Canceled: {},
|
|
94317
94707
|
Failed: {}
|
|
94318
94708
|
});
|
|
@@ -94374,7 +94764,7 @@ var VibeRepositorySetupPolling = ({
|
|
|
94374
94764
|
[projectFolder, projectId],
|
|
94375
94765
|
{
|
|
94376
94766
|
onSuccess: (result) => {
|
|
94377
|
-
if ((0,
|
|
94767
|
+
if ((0, import_variant52.isType)(result, VibeSetupResult.Success)) {
|
|
94378
94768
|
onSubmit?.();
|
|
94379
94769
|
}
|
|
94380
94770
|
},
|
|
@@ -94385,11 +94775,11 @@ var VibeRepositorySetupPolling = ({
|
|
|
94385
94775
|
}
|
|
94386
94776
|
}
|
|
94387
94777
|
);
|
|
94388
|
-
return (0,
|
|
94389
|
-
Error: () => /* @__PURE__ */
|
|
94390
|
-
Loading: () => /* @__PURE__ */
|
|
94391
|
-
Success: ({ result }) => (0,
|
|
94392
|
-
Success: ({ repoName, htmlUrl }) => /* @__PURE__ */
|
|
94778
|
+
return (0, import_variant52.match)(status, {
|
|
94779
|
+
Error: () => /* @__PURE__ */ import_react147.default.createElement(Box_default, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ import_react147.default.createElement(Text2, { skin: "error" }, "Failed to connect to Wix Vibe")),
|
|
94780
|
+
Loading: () => /* @__PURE__ */ import_react147.default.createElement(Box_default, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ import_react147.default.createElement(Spinner2, { text: "Opening browser for Wix Vibe setup..." }), /* @__PURE__ */ import_react147.default.createElement(Text2, { skin: "secondary" }, "Complete the setup in your browser. We're waiting for you to finish...")),
|
|
94781
|
+
Success: ({ result }) => (0, import_variant52.match)(result, {
|
|
94782
|
+
Success: ({ repoName, htmlUrl }) => /* @__PURE__ */ import_react147.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react147.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react147.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react147.default.createElement(Text2, null, "GitHub repository '", repoName, "' created and Synced.", " ", /* @__PURE__ */ import_react147.default.createElement(Link, { url: htmlUrl }, "View Repository.")))),
|
|
94393
94783
|
Canceled: () => null
|
|
94394
94784
|
})
|
|
94395
94785
|
});
|
|
@@ -94405,19 +94795,19 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94405
94795
|
businessName: defaultBusinessName,
|
|
94406
94796
|
cloudProviders
|
|
94407
94797
|
}) => {
|
|
94408
|
-
const [businessName, setBusinessName] = (0,
|
|
94798
|
+
const [businessName, setBusinessName] = (0, import_react148.useState)(
|
|
94409
94799
|
defaultBusinessName
|
|
94410
94800
|
);
|
|
94411
|
-
const [selectedTemplate, setSelectedTemplate] = (0,
|
|
94412
|
-
const [folderName, setFolderName] = (0,
|
|
94801
|
+
const [selectedTemplate, setSelectedTemplate] = (0, import_react148.useState)(defaultTemplate);
|
|
94802
|
+
const [folderName, setFolderName] = (0, import_react148.useState)(
|
|
94413
94803
|
defaultProjectName
|
|
94414
94804
|
);
|
|
94415
|
-
const [businessId, setBusinessId] = (0,
|
|
94416
|
-
const [projectData, setProjectData] = (0,
|
|
94417
|
-
const [generationDone, setGenerationDone] = (0,
|
|
94418
|
-
const [vibeSetupChoice, setVibeSetupChoice] = (0,
|
|
94419
|
-
const [vibeSetupDone, setVibeSetupDone] = (0,
|
|
94420
|
-
const projectFolder = (0,
|
|
94805
|
+
const [businessId, setBusinessId] = (0, import_react148.useState)();
|
|
94806
|
+
const [projectData, setProjectData] = (0, import_react148.useState)();
|
|
94807
|
+
const [generationDone, setGenerationDone] = (0, import_react148.useState)(false);
|
|
94808
|
+
const [vibeSetupChoice, setVibeSetupChoice] = (0, import_react148.useState)();
|
|
94809
|
+
const [vibeSetupDone, setVibeSetupDone] = (0, import_react148.useState)(false);
|
|
94810
|
+
const projectFolder = (0, import_react148.useMemo)(
|
|
94421
94811
|
() => folderName ? join19(targetParentFolder2, folderName) : void 0,
|
|
94422
94812
|
[targetParentFolder2, folderName]
|
|
94423
94813
|
);
|
|
@@ -94426,15 +94816,15 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94426
94816
|
const packageManager2 = await createPackageManager(repoType2);
|
|
94427
94817
|
return { packageManager: packageManager2 };
|
|
94428
94818
|
}, []);
|
|
94429
|
-
const isVibeCompatible = (0,
|
|
94430
|
-
() => (0,
|
|
94819
|
+
const isVibeCompatible = (0, import_react148.useMemo)(
|
|
94820
|
+
() => (0, import_variant53.isType)(selectedTemplate, "HeadlessApp") && selectedTemplate.vibeCompatible,
|
|
94431
94821
|
[selectedTemplate]
|
|
94432
94822
|
);
|
|
94433
|
-
return (0,
|
|
94823
|
+
return (0, import_variant53.match)(status, {
|
|
94434
94824
|
Error: () => null,
|
|
94435
|
-
Loading: () => /* @__PURE__ */
|
|
94825
|
+
Loading: () => /* @__PURE__ */ import_react148.default.createElement(Spinner2, { text: "Loading..." }),
|
|
94436
94826
|
Success: ({ result: { packageManager: packageManager2 } }) => {
|
|
94437
|
-
return /* @__PURE__ */
|
|
94827
|
+
return /* @__PURE__ */ import_react148.default.createElement(
|
|
94438
94828
|
Box_default,
|
|
94439
94829
|
{
|
|
94440
94830
|
flexDirection: "column",
|
|
@@ -94445,14 +94835,14 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94445
94835
|
borderTop: false,
|
|
94446
94836
|
paddingLeft: 1
|
|
94447
94837
|
},
|
|
94448
|
-
/* @__PURE__ */
|
|
94449
|
-
!defaultBusinessName && /* @__PURE__ */
|
|
94838
|
+
/* @__PURE__ */ import_react148.default.createElement(WelcomeMessage2, null),
|
|
94839
|
+
!defaultBusinessName && /* @__PURE__ */ import_react148.default.createElement(
|
|
94450
94840
|
ChooseBusinessName,
|
|
94451
94841
|
{
|
|
94452
94842
|
onSubmit: ({ businessName: businessName2 }) => setBusinessName(businessName2)
|
|
94453
94843
|
}
|
|
94454
94844
|
),
|
|
94455
|
-
!defaultTemplate && businessName && /* @__PURE__ */
|
|
94845
|
+
!defaultTemplate && businessName && /* @__PURE__ */ import_react148.default.createElement(
|
|
94456
94846
|
ChooseTemplate2,
|
|
94457
94847
|
{
|
|
94458
94848
|
onSubmit: ({ template }) => {
|
|
@@ -94460,7 +94850,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94460
94850
|
}
|
|
94461
94851
|
}
|
|
94462
94852
|
),
|
|
94463
|
-
businessName && selectedTemplate && /* @__PURE__ */
|
|
94853
|
+
businessName && selectedTemplate && /* @__PURE__ */ import_react148.default.createElement(AuthProvider, null, /* @__PURE__ */ import_react148.default.createElement(
|
|
94464
94854
|
CreateBusiness,
|
|
94465
94855
|
{
|
|
94466
94856
|
businessName,
|
|
@@ -94468,7 +94858,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94468
94858
|
onDone: ({ businessId: businessId2 }) => setBusinessId(businessId2)
|
|
94469
94859
|
}
|
|
94470
94860
|
)),
|
|
94471
|
-
!defaultProjectName && businessName && selectedTemplate && businessId && /* @__PURE__ */
|
|
94861
|
+
!defaultProjectName && businessName && selectedTemplate && businessId && /* @__PURE__ */ import_react148.default.createElement(
|
|
94472
94862
|
ChooseFolder,
|
|
94473
94863
|
{
|
|
94474
94864
|
initialFolderName: (0, import_kebabCase5.default)(businessName),
|
|
@@ -94476,7 +94866,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94476
94866
|
onSubmit: ({ folderName: folderName2 }) => setFolderName(folderName2)
|
|
94477
94867
|
}
|
|
94478
94868
|
),
|
|
94479
|
-
businessName && selectedTemplate && businessId && folderName && /* @__PURE__ */
|
|
94869
|
+
businessName && selectedTemplate && businessId && folderName && /* @__PURE__ */ import_react148.default.createElement(AuthProvider, null, /* @__PURE__ */ import_react148.default.createElement(
|
|
94480
94870
|
CreateProject,
|
|
94481
94871
|
{
|
|
94482
94872
|
businessId,
|
|
@@ -94485,7 +94875,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94485
94875
|
onSubmit: (data) => setProjectData(data)
|
|
94486
94876
|
}
|
|
94487
94877
|
)),
|
|
94488
|
-
businessName && selectedTemplate && businessId && projectData && folderName && /* @__PURE__ */
|
|
94878
|
+
businessName && selectedTemplate && businessId && projectData && folderName && /* @__PURE__ */ import_react148.default.createElement(
|
|
94489
94879
|
GenerateProject2,
|
|
94490
94880
|
{
|
|
94491
94881
|
folderName,
|
|
@@ -94498,13 +94888,13 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94498
94888
|
onDone: (isDone) => setGenerationDone(isDone)
|
|
94499
94889
|
}
|
|
94500
94890
|
),
|
|
94501
|
-
businessName && selectedTemplate && businessId && projectData && folderName && generationDone && !vibeSetupChoice && isVibeCompatible && /* @__PURE__ */
|
|
94891
|
+
businessName && selectedTemplate && businessId && projectData && folderName && generationDone && !vibeSetupChoice && isVibeCompatible && /* @__PURE__ */ import_react148.default.createElement(
|
|
94502
94892
|
ChooseVibeSetup,
|
|
94503
94893
|
{
|
|
94504
94894
|
onSubmit: (choice) => setVibeSetupChoice(choice)
|
|
94505
94895
|
}
|
|
94506
94896
|
),
|
|
94507
|
-
businessName && selectedTemplate && businessId && projectData && projectFolder && generationDone && isVibeCompatible && (0,
|
|
94897
|
+
businessName && selectedTemplate && businessId && projectData && projectFolder && generationDone && isVibeCompatible && (0, import_variant53.isType)(vibeSetupChoice, "SetupVibe") && /* @__PURE__ */ import_react148.default.createElement(AuthProvider, null, /* @__PURE__ */ import_react148.default.createElement(
|
|
94508
94898
|
VibeRepositorySetupPolling,
|
|
94509
94899
|
{
|
|
94510
94900
|
projectId: projectData.projectId,
|
|
@@ -94512,7 +94902,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94512
94902
|
onSubmit: () => setVibeSetupDone(true)
|
|
94513
94903
|
}
|
|
94514
94904
|
)),
|
|
94515
|
-
businessName && selectedTemplate && businessId && projectData && folderName && generationDone && (vibeSetupDone || (0,
|
|
94905
|
+
businessName && selectedTemplate && businessId && projectData && folderName && generationDone && (vibeSetupDone || (0, import_variant53.isType)(vibeSetupChoice, "Skip") || !isVibeCompatible) && /* @__PURE__ */ import_react148.default.createElement(
|
|
94516
94906
|
ReleaseProject,
|
|
94517
94907
|
{
|
|
94518
94908
|
folderName,
|
|
@@ -94550,13 +94940,13 @@ var ProcessCommand = ({ targetParentFolder: targetParentFolder2, commandOptions
|
|
|
94550
94940
|
}
|
|
94551
94941
|
return result;
|
|
94552
94942
|
}, []);
|
|
94553
|
-
return (0,
|
|
94943
|
+
return (0, import_variant54.match)(status, {
|
|
94554
94944
|
Error: () => null,
|
|
94555
|
-
Loading: () => /* @__PURE__ */
|
|
94945
|
+
Loading: () => /* @__PURE__ */ import_react149.default.createElement(Spinner2, { text: "Loading..." }),
|
|
94556
94946
|
Success: ({
|
|
94557
94947
|
result: { template, projectName, businessName, cloudProviders, publish }
|
|
94558
94948
|
}) => {
|
|
94559
|
-
return /* @__PURE__ */
|
|
94949
|
+
return /* @__PURE__ */ import_react149.default.createElement(
|
|
94560
94950
|
CreateHeadlessSiteCommand,
|
|
94561
94951
|
{
|
|
94562
94952
|
targetParentFolder: targetParentFolder2,
|
|
@@ -94577,12 +94967,16 @@ init_esm_shims();
|
|
|
94577
94967
|
|
|
94578
94968
|
// ../create-new-packages/headless-command/src/bi/createBiLogger.ts
|
|
94579
94969
|
init_esm_shims();
|
|
94580
|
-
|
|
94581
|
-
|
|
94970
|
+
var createBiLogger3 = async ({
|
|
94971
|
+
errorReporter: errorReporter2,
|
|
94972
|
+
cliVersion,
|
|
94973
|
+
cliSessionId: cliSessionId2,
|
|
94974
|
+
userId
|
|
94975
|
+
}) => {
|
|
94582
94976
|
const biLogger = await createBiLogger(
|
|
94583
94977
|
{
|
|
94584
94978
|
command: "create-headless-site",
|
|
94585
|
-
cliSessionId:
|
|
94979
|
+
cliSessionId: cliSessionId2,
|
|
94586
94980
|
cliVersion
|
|
94587
94981
|
},
|
|
94588
94982
|
userId
|
|
@@ -94631,6 +95025,7 @@ var getHeadlessCommand = ({
|
|
|
94631
95025
|
userInfo: userInfo2,
|
|
94632
95026
|
panorama: panorama2,
|
|
94633
95027
|
cliVersion,
|
|
95028
|
+
cliSessionId: cliSessionId2,
|
|
94634
95029
|
targetParentFolder: targetParentFolder2
|
|
94635
95030
|
}) => {
|
|
94636
95031
|
const program3 = new Command().name("headless").description("Create a Wix headless site");
|
|
@@ -94649,17 +95044,18 @@ var getHeadlessCommand = ({
|
|
|
94649
95044
|
Arguments: command.args,
|
|
94650
95045
|
Options: command.opts()
|
|
94651
95046
|
});
|
|
94652
|
-
const { biLogger, reportCommandStartEvent: reportCommandStartEvent2 } = await createBiLogger3(
|
|
94653
|
-
errorReporter2,
|
|
95047
|
+
const { biLogger, reportCommandStartEvent: reportCommandStartEvent2 } = await createBiLogger3({
|
|
95048
|
+
errorReporter: errorReporter2,
|
|
94654
95049
|
cliVersion,
|
|
94655
|
-
|
|
94656
|
-
|
|
95050
|
+
cliSessionId: cliSessionId2,
|
|
95051
|
+
userId: userInfo2?.userId
|
|
95052
|
+
});
|
|
94657
95053
|
const commandStatus = reportCommandStartEvent2(command);
|
|
94658
95054
|
const transaction = createCommandTransaction(panorama2, command);
|
|
94659
95055
|
try {
|
|
94660
95056
|
transaction.start();
|
|
94661
95057
|
await render2(
|
|
94662
|
-
/* @__PURE__ */
|
|
95058
|
+
/* @__PURE__ */ import_react150.default.createElement(BiProvider, { value: biLogger }, /* @__PURE__ */ import_react150.default.createElement(ErrorReporterProvider, { value: errorReporter2 }, /* @__PURE__ */ import_react150.default.createElement(PanoramaProvider, { value: panorama2 }, /* @__PURE__ */ import_react150.default.createElement(
|
|
94663
95059
|
LinkCommand,
|
|
94664
95060
|
{
|
|
94665
95061
|
projectName: options.projectName,
|
|
@@ -94734,17 +95130,18 @@ var getHeadlessCommand = ({
|
|
|
94734
95130
|
Arguments: command.args,
|
|
94735
95131
|
Options: command.opts()
|
|
94736
95132
|
});
|
|
94737
|
-
const { biLogger, reportCommandStartEvent: reportCommandStartEvent2 } = await createBiLogger3(
|
|
94738
|
-
errorReporter2,
|
|
95133
|
+
const { biLogger, reportCommandStartEvent: reportCommandStartEvent2 } = await createBiLogger3({
|
|
95134
|
+
errorReporter: errorReporter2,
|
|
94739
95135
|
cliVersion,
|
|
94740
|
-
|
|
94741
|
-
|
|
95136
|
+
cliSessionId: cliSessionId2,
|
|
95137
|
+
userId: userInfo2?.userId
|
|
95138
|
+
});
|
|
94742
95139
|
const commandStatus = reportCommandStartEvent2(command);
|
|
94743
95140
|
const transaction = createCommandTransaction(panorama2, command);
|
|
94744
95141
|
try {
|
|
94745
95142
|
transaction.start();
|
|
94746
95143
|
await render2(
|
|
94747
|
-
/* @__PURE__ */
|
|
95144
|
+
/* @__PURE__ */ import_react150.default.createElement(BiProvider, { value: biLogger }, /* @__PURE__ */ import_react150.default.createElement(ErrorReporterProvider, { value: errorReporter2 }, /* @__PURE__ */ import_react150.default.createElement(PanoramaProvider, { value: panorama2 }, /* @__PURE__ */ import_react150.default.createElement(
|
|
94748
95145
|
ProcessCommand,
|
|
94749
95146
|
{
|
|
94750
95147
|
targetParentFolder: targetParentFolder2,
|
|
@@ -94762,11 +95159,14 @@ var getHeadlessCommand = ({
|
|
|
94762
95159
|
return program3;
|
|
94763
95160
|
};
|
|
94764
95161
|
|
|
95162
|
+
// src/index.tsx
|
|
95163
|
+
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
95164
|
+
|
|
94765
95165
|
// package.json
|
|
94766
95166
|
var package_default = {
|
|
94767
95167
|
name: "@wix/create-new",
|
|
94768
95168
|
description: "General entry point for creating Wix projects",
|
|
94769
|
-
version: "0.0.
|
|
95169
|
+
version: "0.0.35",
|
|
94770
95170
|
bin: "bin/index.cjs",
|
|
94771
95171
|
devDependencies: {
|
|
94772
95172
|
"@commander-js/extra-typings": "^13.0.0",
|
|
@@ -94834,11 +95234,13 @@ var userInfo = await getUserInfo();
|
|
|
94834
95234
|
if (userInfo) {
|
|
94835
95235
|
errorReporter.setUser({ id: userInfo.userId });
|
|
94836
95236
|
}
|
|
95237
|
+
var cliSessionId = randomUUID2();
|
|
94837
95238
|
var panorama = await createPanorama({
|
|
94838
95239
|
artifact: package_default.wix.artifact,
|
|
94839
95240
|
version: package_default.version,
|
|
94840
95241
|
userId: userInfo?.userId,
|
|
94841
|
-
errorReporter
|
|
95242
|
+
errorReporter,
|
|
95243
|
+
cliSessionId
|
|
94842
95244
|
});
|
|
94843
95245
|
var repoType = await getRepoType(targetParentFolder);
|
|
94844
95246
|
var packageManager = await createPackageManager(repoType);
|
|
@@ -94849,6 +95251,7 @@ program2.addCommand(
|
|
|
94849
95251
|
userInfo,
|
|
94850
95252
|
panorama,
|
|
94851
95253
|
cliVersion: package_default.version,
|
|
95254
|
+
cliSessionId,
|
|
94852
95255
|
targetParentFolder,
|
|
94853
95256
|
packageManager,
|
|
94854
95257
|
repoType
|
|
@@ -94860,6 +95263,7 @@ program2.addCommand(
|
|
|
94860
95263
|
userInfo,
|
|
94861
95264
|
panorama,
|
|
94862
95265
|
cliVersion: package_default.version,
|
|
95266
|
+
cliSessionId,
|
|
94863
95267
|
targetParentFolder
|
|
94864
95268
|
})
|
|
94865
95269
|
);
|