@wix/create-new 0.0.38 → 0.0.40
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-OZM7WZ4W.js → chunk-CEXXL22E.js} +3 -1
- package/build/{chunk-OZM7WZ4W.js.map → chunk-CEXXL22E.js.map} +1 -1
- package/build/{generator-LMHXVMXT.js → generator-D63KTZEK.js} +2 -2
- package/build/index.js +1501 -1099
- package/build/index.js.map +1 -1
- package/package.json +2 -2
- /package/build/{generator-LMHXVMXT.js.map → generator-D63KTZEK.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-CEXXL22E.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 match37;
|
|
3378
|
+
if ((match37 = arg.match(/^(--inspect(-brk)?)$/)) !== null) {
|
|
3379
|
+
debugOption = match37[1];
|
|
3380
|
+
} else if ((match37 = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null) {
|
|
3381
|
+
debugOption = match37[1];
|
|
3382
|
+
if (/^\d+$/.test(match37[3])) {
|
|
3383
|
+
debugPort = match37[3];
|
|
3384
3384
|
} else {
|
|
3385
|
-
debugHost =
|
|
3385
|
+
debugHost = match37[3];
|
|
3386
3386
|
}
|
|
3387
|
-
} else if ((
|
|
3388
|
-
debugOption =
|
|
3389
|
-
debugHost =
|
|
3390
|
-
debugPort =
|
|
3387
|
+
} else if ((match37 = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/)) !== null) {
|
|
3388
|
+
debugOption = match37[1];
|
|
3389
|
+
debugHost = match37[3];
|
|
3390
|
+
debugPort = match37[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 match37 = /^(-?(?:\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 (!match37) {
|
|
5261
5261
|
return;
|
|
5262
5262
|
}
|
|
5263
|
-
var n3 = parseFloat(
|
|
5264
|
-
var type = (
|
|
5263
|
+
var n3 = parseFloat(match37[1]);
|
|
5264
|
+
var type = (match37[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, (match37, format2) => {
|
|
5398
|
+
if (match37 === "%%") {
|
|
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
|
+
match37 = formatter.call(self2, val);
|
|
5406
5406
|
args.splice(index, 1);
|
|
5407
5407
|
index--;
|
|
5408
5408
|
}
|
|
5409
|
-
return
|
|
5409
|
+
return match37;
|
|
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, (match37) => {
|
|
5647
|
+
if (match37 === "%%") {
|
|
5648
5648
|
return;
|
|
5649
5649
|
}
|
|
5650
5650
|
index++;
|
|
5651
|
-
if (
|
|
5651
|
+
if (match37 === "%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 match37 = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
|
|
6955
|
+
return match37 ? decodeURIComponent(match37[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 match37 = line && line.match(re);
|
|
14915
|
+
if (!match37) {
|
|
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 = match37[1] === "new";
|
|
14919
|
+
let fname = match37[2];
|
|
14920
|
+
const evalOrigin = match37[3];
|
|
14921
|
+
const evalFile = match37[4];
|
|
14922
|
+
const evalLine = Number(match37[5]);
|
|
14923
|
+
const evalCol = Number(match37[6]);
|
|
14924
|
+
let file = match37[7];
|
|
14925
|
+
const lnum = match37[8];
|
|
14926
|
+
const col = match37[9];
|
|
14927
|
+
const native = match37[10] === "native";
|
|
14928
|
+
const closeParen = match37[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), isType24 = !isArr && !isArg && !isBuff && isTypedArray(value2), skipIndexes = isArr || isArg || isBuff || isType24, 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
|
+
isType24 && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
|
|
15358
15358
|
isIndex(key, length)))) {
|
|
15359
15359
|
result.push(key);
|
|
15360
15360
|
}
|
|
@@ -15726,89 +15726,6 @@ var require_arr_rotate = __commonJS({
|
|
|
15726
15726
|
}
|
|
15727
15727
|
});
|
|
15728
15728
|
|
|
15729
|
-
// ../../node_modules/supports-hyperlinks/index.js
|
|
15730
|
-
var require_supports_hyperlinks = __commonJS({
|
|
15731
|
-
"../../node_modules/supports-hyperlinks/index.js"(exports, module2) {
|
|
15732
|
-
"use strict";
|
|
15733
|
-
init_esm_shims();
|
|
15734
|
-
var supportsColor2 = require_supports_color();
|
|
15735
|
-
var hasFlag2 = require_has_flag();
|
|
15736
|
-
function parseVersion(versionString) {
|
|
15737
|
-
if (/^\d{3,4}$/.test(versionString)) {
|
|
15738
|
-
const m = /(\d{1,2})(\d{2})/.exec(versionString);
|
|
15739
|
-
return {
|
|
15740
|
-
major: 0,
|
|
15741
|
-
minor: parseInt(m[1], 10),
|
|
15742
|
-
patch: parseInt(m[2], 10)
|
|
15743
|
-
};
|
|
15744
|
-
}
|
|
15745
|
-
const versions = (versionString || "").split(".").map((n3) => parseInt(n3, 10));
|
|
15746
|
-
return {
|
|
15747
|
-
major: versions[0],
|
|
15748
|
-
minor: versions[1],
|
|
15749
|
-
patch: versions[2]
|
|
15750
|
-
};
|
|
15751
|
-
}
|
|
15752
|
-
function supportsHyperlink(stream) {
|
|
15753
|
-
const { env: env2 } = process;
|
|
15754
|
-
if ("FORCE_HYPERLINK" in env2) {
|
|
15755
|
-
return !(env2.FORCE_HYPERLINK.length > 0 && parseInt(env2.FORCE_HYPERLINK, 10) === 0);
|
|
15756
|
-
}
|
|
15757
|
-
if (hasFlag2("no-hyperlink") || hasFlag2("no-hyperlinks") || hasFlag2("hyperlink=false") || hasFlag2("hyperlink=never")) {
|
|
15758
|
-
return false;
|
|
15759
|
-
}
|
|
15760
|
-
if (hasFlag2("hyperlink=true") || hasFlag2("hyperlink=always")) {
|
|
15761
|
-
return true;
|
|
15762
|
-
}
|
|
15763
|
-
if ("NETLIFY" in env2) {
|
|
15764
|
-
return true;
|
|
15765
|
-
}
|
|
15766
|
-
if (!supportsColor2.supportsColor(stream)) {
|
|
15767
|
-
return false;
|
|
15768
|
-
}
|
|
15769
|
-
if (stream && !stream.isTTY) {
|
|
15770
|
-
return false;
|
|
15771
|
-
}
|
|
15772
|
-
if (process.platform === "win32") {
|
|
15773
|
-
return false;
|
|
15774
|
-
}
|
|
15775
|
-
if ("CI" in env2) {
|
|
15776
|
-
return false;
|
|
15777
|
-
}
|
|
15778
|
-
if ("TEAMCITY_VERSION" in env2) {
|
|
15779
|
-
return false;
|
|
15780
|
-
}
|
|
15781
|
-
if ("TERM_PROGRAM" in env2) {
|
|
15782
|
-
const version = parseVersion(env2.TERM_PROGRAM_VERSION);
|
|
15783
|
-
switch (env2.TERM_PROGRAM) {
|
|
15784
|
-
case "iTerm.app":
|
|
15785
|
-
if (version.major === 3) {
|
|
15786
|
-
return version.minor >= 1;
|
|
15787
|
-
}
|
|
15788
|
-
return version.major > 3;
|
|
15789
|
-
case "WezTerm":
|
|
15790
|
-
return version.major >= 20200620;
|
|
15791
|
-
case "vscode":
|
|
15792
|
-
return version.major > 1 || version.major === 1 && version.minor >= 72;
|
|
15793
|
-
}
|
|
15794
|
-
}
|
|
15795
|
-
if ("VTE_VERSION" in env2) {
|
|
15796
|
-
if (env2.VTE_VERSION === "0.50.0") {
|
|
15797
|
-
return false;
|
|
15798
|
-
}
|
|
15799
|
-
const version = parseVersion(env2.VTE_VERSION);
|
|
15800
|
-
return version.major > 0 || version.minor >= 50;
|
|
15801
|
-
}
|
|
15802
|
-
return false;
|
|
15803
|
-
}
|
|
15804
|
-
module2.exports = {
|
|
15805
|
-
supportsHyperlink,
|
|
15806
|
-
stdout: supportsHyperlink(process.stdout),
|
|
15807
|
-
stderr: supportsHyperlink(process.stderr)
|
|
15808
|
-
};
|
|
15809
|
-
}
|
|
15810
|
-
});
|
|
15811
|
-
|
|
15812
15729
|
// ../../node_modules/cli-spinners/spinners.json
|
|
15813
15730
|
var require_spinners = __commonJS({
|
|
15814
15731
|
"../../node_modules/cli-spinners/spinners.json"(exports, module2) {
|
|
@@ -17455,6 +17372,89 @@ var require_cli_spinners = __commonJS({
|
|
|
17455
17372
|
}
|
|
17456
17373
|
});
|
|
17457
17374
|
|
|
17375
|
+
// ../../node_modules/supports-hyperlinks/index.js
|
|
17376
|
+
var require_supports_hyperlinks = __commonJS({
|
|
17377
|
+
"../../node_modules/supports-hyperlinks/index.js"(exports, module2) {
|
|
17378
|
+
"use strict";
|
|
17379
|
+
init_esm_shims();
|
|
17380
|
+
var supportsColor2 = require_supports_color();
|
|
17381
|
+
var hasFlag2 = require_has_flag();
|
|
17382
|
+
function parseVersion(versionString) {
|
|
17383
|
+
if (/^\d{3,4}$/.test(versionString)) {
|
|
17384
|
+
const m = /(\d{1,2})(\d{2})/.exec(versionString);
|
|
17385
|
+
return {
|
|
17386
|
+
major: 0,
|
|
17387
|
+
minor: parseInt(m[1], 10),
|
|
17388
|
+
patch: parseInt(m[2], 10)
|
|
17389
|
+
};
|
|
17390
|
+
}
|
|
17391
|
+
const versions = (versionString || "").split(".").map((n3) => parseInt(n3, 10));
|
|
17392
|
+
return {
|
|
17393
|
+
major: versions[0],
|
|
17394
|
+
minor: versions[1],
|
|
17395
|
+
patch: versions[2]
|
|
17396
|
+
};
|
|
17397
|
+
}
|
|
17398
|
+
function supportsHyperlink(stream) {
|
|
17399
|
+
const { env: env2 } = process;
|
|
17400
|
+
if ("FORCE_HYPERLINK" in env2) {
|
|
17401
|
+
return !(env2.FORCE_HYPERLINK.length > 0 && parseInt(env2.FORCE_HYPERLINK, 10) === 0);
|
|
17402
|
+
}
|
|
17403
|
+
if (hasFlag2("no-hyperlink") || hasFlag2("no-hyperlinks") || hasFlag2("hyperlink=false") || hasFlag2("hyperlink=never")) {
|
|
17404
|
+
return false;
|
|
17405
|
+
}
|
|
17406
|
+
if (hasFlag2("hyperlink=true") || hasFlag2("hyperlink=always")) {
|
|
17407
|
+
return true;
|
|
17408
|
+
}
|
|
17409
|
+
if ("NETLIFY" in env2) {
|
|
17410
|
+
return true;
|
|
17411
|
+
}
|
|
17412
|
+
if (!supportsColor2.supportsColor(stream)) {
|
|
17413
|
+
return false;
|
|
17414
|
+
}
|
|
17415
|
+
if (stream && !stream.isTTY) {
|
|
17416
|
+
return false;
|
|
17417
|
+
}
|
|
17418
|
+
if (process.platform === "win32") {
|
|
17419
|
+
return false;
|
|
17420
|
+
}
|
|
17421
|
+
if ("CI" in env2) {
|
|
17422
|
+
return false;
|
|
17423
|
+
}
|
|
17424
|
+
if ("TEAMCITY_VERSION" in env2) {
|
|
17425
|
+
return false;
|
|
17426
|
+
}
|
|
17427
|
+
if ("TERM_PROGRAM" in env2) {
|
|
17428
|
+
const version = parseVersion(env2.TERM_PROGRAM_VERSION);
|
|
17429
|
+
switch (env2.TERM_PROGRAM) {
|
|
17430
|
+
case "iTerm.app":
|
|
17431
|
+
if (version.major === 3) {
|
|
17432
|
+
return version.minor >= 1;
|
|
17433
|
+
}
|
|
17434
|
+
return version.major > 3;
|
|
17435
|
+
case "WezTerm":
|
|
17436
|
+
return version.major >= 20200620;
|
|
17437
|
+
case "vscode":
|
|
17438
|
+
return version.major > 1 || version.major === 1 && version.minor >= 72;
|
|
17439
|
+
}
|
|
17440
|
+
}
|
|
17441
|
+
if ("VTE_VERSION" in env2) {
|
|
17442
|
+
if (env2.VTE_VERSION === "0.50.0") {
|
|
17443
|
+
return false;
|
|
17444
|
+
}
|
|
17445
|
+
const version = parseVersion(env2.VTE_VERSION);
|
|
17446
|
+
return version.major > 0 || version.minor >= 50;
|
|
17447
|
+
}
|
|
17448
|
+
return false;
|
|
17449
|
+
}
|
|
17450
|
+
module2.exports = {
|
|
17451
|
+
supportsHyperlink,
|
|
17452
|
+
stdout: supportsHyperlink(process.stdout),
|
|
17453
|
+
stderr: supportsHyperlink(process.stderr)
|
|
17454
|
+
};
|
|
17455
|
+
}
|
|
17456
|
+
});
|
|
17457
|
+
|
|
17458
17458
|
// ../../node_modules/void-elements/index.js
|
|
17459
17459
|
var require_void_elements = __commonJS({
|
|
17460
17460
|
"../../node_modules/void-elements/index.js"(exports, module2) {
|
|
@@ -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 match37 = TRACE_PARENT_REGEX.exec(traceParent);
|
|
18977
|
+
if (!match37)
|
|
18978
18978
|
return null;
|
|
18979
|
-
if (
|
|
18979
|
+
if (match37[1] === "00" && match37[5])
|
|
18980
18980
|
return null;
|
|
18981
18981
|
return {
|
|
18982
|
-
traceId:
|
|
18983
|
-
spanId:
|
|
18984
|
-
traceFlags: parseInt(
|
|
18982
|
+
traceId: match37[2],
|
|
18983
|
+
spanId: match37[3],
|
|
18984
|
+
traceFlags: parseInt(match37[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 match37 = `-${identifier}`.match(r2);
|
|
20087
|
+
if (!match37 || match37[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 match37 = null;
|
|
20571
20571
|
if (!options.rtl) {
|
|
20572
|
-
|
|
20572
|
+
match37 = 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)) && (!match37 || match37.index + match37[0].length !== version.length)) {
|
|
20577
|
+
if (!match37 || next.index + next[0].length !== match37.index + match37[0].length) {
|
|
20578
|
+
match37 = 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 (match37 === 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 = match37[2];
|
|
20588
|
+
const minor = match37[3] || "0";
|
|
20589
|
+
const patch = match37[4] || "0";
|
|
20590
|
+
const prerelease = options.includePrerelease && match37[5] ? `-${match37[5]}` : "";
|
|
20591
|
+
const build = options.includePrerelease && match37[6] ? `+${match37[6]}` : "";
|
|
20592
20592
|
return parse4(`${major}.${minor}.${patch}${prerelease}${build}`, options);
|
|
20593
20593
|
};
|
|
20594
20594
|
module2.exports = coerce;
|
|
@@ -26589,10 +26589,10 @@ var require_utils6 = __commonJS({
|
|
|
26589
26589
|
if (!type || typeof type.getFields !== "function" || type[symbols_1.OTEL_PATCHED_SYMBOL]) {
|
|
26590
26590
|
return;
|
|
26591
26591
|
}
|
|
26592
|
-
const
|
|
26592
|
+
const fields12 = type.getFields();
|
|
26593
26593
|
type[symbols_1.OTEL_PATCHED_SYMBOL] = true;
|
|
26594
|
-
Object.keys(
|
|
26595
|
-
const field =
|
|
26594
|
+
Object.keys(fields12).forEach((key) => {
|
|
26595
|
+
const field = fields12[key];
|
|
26596
26596
|
if (!field) {
|
|
26597
26597
|
return;
|
|
26598
26598
|
}
|
|
@@ -28293,7 +28293,7 @@ var require_instrumentation5 = __commonJS({
|
|
|
28293
28293
|
}
|
|
28294
28294
|
_patchCallbackQuery(span, parentContext) {
|
|
28295
28295
|
return (originalCallback) => {
|
|
28296
|
-
return function(err, results,
|
|
28296
|
+
return function(err, results, fields12) {
|
|
28297
28297
|
if (err) {
|
|
28298
28298
|
span.setStatus({
|
|
28299
28299
|
code: api_1.SpanStatusCode.ERROR,
|
|
@@ -28606,7 +28606,7 @@ var require_instrumentation6 = __commonJS({
|
|
|
28606
28606
|
}
|
|
28607
28607
|
_patchCallbackQuery(endSpan) {
|
|
28608
28608
|
return (originalCallback) => {
|
|
28609
|
-
return function(err, results,
|
|
28609
|
+
return function(err, results, fields12) {
|
|
28610
28610
|
endSpan(err, results);
|
|
28611
28611
|
return originalCallback(...arguments);
|
|
28612
28612
|
};
|
|
@@ -31802,7 +31802,7 @@ var require_batch_queue = __commonJS({
|
|
|
31802
31802
|
var fieldCounts = {};
|
|
31803
31803
|
var batchLen = batch.e.length;
|
|
31804
31804
|
var events = batch.e.map(function(event) {
|
|
31805
|
-
var
|
|
31805
|
+
var fields12 = Object.keys(event.f).map(function(field) {
|
|
31806
31806
|
var value2 = event.f[field];
|
|
31807
31807
|
var key = field + "|" + value2;
|
|
31808
31808
|
fieldCounts[key] = fieldCounts[key] || 0;
|
|
@@ -31810,12 +31810,12 @@ var require_batch_queue = __commonJS({
|
|
|
31810
31810
|
return [field, value2, key];
|
|
31811
31811
|
});
|
|
31812
31812
|
return _extends2({}, event, {
|
|
31813
|
-
f:
|
|
31813
|
+
f: fields12
|
|
31814
31814
|
});
|
|
31815
31815
|
});
|
|
31816
31816
|
var globalFields = {};
|
|
31817
31817
|
events = events.map(function(event) {
|
|
31818
|
-
var
|
|
31818
|
+
var fields12 = event.f.reduce(function(res, _ref) {
|
|
31819
31819
|
var _ref2 = _slicedToArray(_ref, 3), field = _ref2[0], value2 = _ref2[1], key = _ref2[2];
|
|
31820
31820
|
if (fieldCounts[key] === batchLen) {
|
|
31821
31821
|
globalFields[field] = value2;
|
|
@@ -31825,7 +31825,7 @@ var require_batch_queue = __commonJS({
|
|
|
31825
31825
|
return res;
|
|
31826
31826
|
}, {});
|
|
31827
31827
|
return _extends2({}, event, {
|
|
31828
|
-
f:
|
|
31828
|
+
f: fields12
|
|
31829
31829
|
});
|
|
31830
31830
|
});
|
|
31831
31831
|
return _extends2({}, batch, {
|
|
@@ -32642,6 +32642,19 @@ var require_lib2 = __commonJS({
|
|
|
32642
32642
|
}
|
|
32643
32643
|
});
|
|
32644
32644
|
|
|
32645
|
+
// ../../node_modules/lodash/snakeCase.js
|
|
32646
|
+
var require_snakeCase = __commonJS({
|
|
32647
|
+
"../../node_modules/lodash/snakeCase.js"(exports, module2) {
|
|
32648
|
+
"use strict";
|
|
32649
|
+
init_esm_shims();
|
|
32650
|
+
var createCompounder = require_createCompounder();
|
|
32651
|
+
var snakeCase2 = createCompounder(function(result, word, index) {
|
|
32652
|
+
return result + (index ? "_" : "") + word.toLowerCase();
|
|
32653
|
+
});
|
|
32654
|
+
module2.exports = snakeCase2;
|
|
32655
|
+
}
|
|
32656
|
+
});
|
|
32657
|
+
|
|
32645
32658
|
// ../../node_modules/source-map-js/lib/base64.js
|
|
32646
32659
|
var require_base642 = __commonJS({
|
|
32647
32660
|
"../../node_modules/source-map-js/lib/base64.js"(exports) {
|
|
@@ -32759,16 +32772,16 @@ var require_util = __commonJS({
|
|
|
32759
32772
|
var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
|
|
32760
32773
|
var dataUrlRegexp = /^data:.+\,.+$/;
|
|
32761
32774
|
function urlParse(aUrl) {
|
|
32762
|
-
var
|
|
32763
|
-
if (!
|
|
32775
|
+
var match37 = aUrl.match(urlRegexp);
|
|
32776
|
+
if (!match37) {
|
|
32764
32777
|
return null;
|
|
32765
32778
|
}
|
|
32766
32779
|
return {
|
|
32767
|
-
scheme:
|
|
32768
|
-
auth:
|
|
32769
|
-
host:
|
|
32770
|
-
port:
|
|
32771
|
-
path:
|
|
32780
|
+
scheme: match37[1],
|
|
32781
|
+
auth: match37[2],
|
|
32782
|
+
host: match37[3],
|
|
32783
|
+
port: match37[4],
|
|
32784
|
+
path: match37[5]
|
|
32772
32785
|
};
|
|
32773
32786
|
}
|
|
32774
32787
|
exports.urlParse = urlParse;
|
|
@@ -40083,8 +40096,8 @@ var require_lib3 = __commonJS({
|
|
|
40083
40096
|
default:
|
|
40084
40097
|
if (ch >= 48 && ch <= 55) {
|
|
40085
40098
|
const startPos = pos - 1;
|
|
40086
|
-
const
|
|
40087
|
-
let octalStr =
|
|
40099
|
+
const match37 = /^[0-7]+/.exec(input.slice(startPos, pos + 2));
|
|
40100
|
+
let octalStr = match37[0];
|
|
40088
40101
|
let octal = parseInt(octalStr, 8);
|
|
40089
40102
|
if (octal > 255) {
|
|
40090
40103
|
octalStr = octalStr.slice(0, -1);
|
|
@@ -51371,12 +51384,12 @@ var getAllProperties = (object) => {
|
|
|
51371
51384
|
};
|
|
51372
51385
|
function autoBind(self2, { include, exclude } = {}) {
|
|
51373
51386
|
const filter = (key) => {
|
|
51374
|
-
const
|
|
51387
|
+
const match37 = (pattern) => typeof pattern === "string" ? key === pattern : pattern.test(key);
|
|
51375
51388
|
if (include) {
|
|
51376
|
-
return include.some(
|
|
51389
|
+
return include.some(match37);
|
|
51377
51390
|
}
|
|
51378
51391
|
if (exclude) {
|
|
51379
|
-
return !exclude.some(
|
|
51392
|
+
return !exclude.some(match37);
|
|
51380
51393
|
}
|
|
51381
51394
|
return true;
|
|
51382
51395
|
};
|
|
@@ -56952,6 +56965,7 @@ var Input2 = ({
|
|
|
56952
56965
|
},
|
|
56953
56966
|
onSubmit: () => {
|
|
56954
56967
|
if (!currentValue && placeholder) {
|
|
56968
|
+
setCurrentValue(placeholder);
|
|
56955
56969
|
onSubmit?.(placeholder);
|
|
56956
56970
|
} else {
|
|
56957
56971
|
onSubmit?.(currentValue);
|
|
@@ -57126,9 +57140,9 @@ var Highlighter = ({ pattern, text }) => {
|
|
|
57126
57140
|
}
|
|
57127
57141
|
const matches = text.matchAll(pattern);
|
|
57128
57142
|
const hightlightMap = new Array(text.length).fill(0);
|
|
57129
|
-
for (const
|
|
57130
|
-
const start =
|
|
57131
|
-
const end =
|
|
57143
|
+
for (const match37 of matches) {
|
|
57144
|
+
const start = match37.index;
|
|
57145
|
+
const end = match37.index + match37[0].length;
|
|
57132
57146
|
for (let i2 = start; i2 < end; i2++) {
|
|
57133
57147
|
hightlightMap[i2] = 1;
|
|
57134
57148
|
}
|
|
@@ -57430,8 +57444,45 @@ init_esm_shims();
|
|
|
57430
57444
|
|
|
57431
57445
|
// ../cli-ui-kit/src/components/TextInput/TextInput.tsx
|
|
57432
57446
|
init_esm_shims();
|
|
57433
|
-
var
|
|
57447
|
+
var import_react57 = __toESM(require_react(), 1);
|
|
57434
57448
|
var import_variant15 = __toESM(require_lib(), 1);
|
|
57449
|
+
|
|
57450
|
+
// ../cli-ui-kit/src/components/Spinner.tsx
|
|
57451
|
+
init_esm_shims();
|
|
57452
|
+
var import_react56 = __toESM(require_react(), 1);
|
|
57453
|
+
|
|
57454
|
+
// ../../node_modules/ink-spinner/build/index.js
|
|
57455
|
+
init_esm_shims();
|
|
57456
|
+
var import_react55 = __toESM(require_react(), 1);
|
|
57457
|
+
var import_cli_spinners = __toESM(require_cli_spinners(), 1);
|
|
57458
|
+
function Spinner({ type = "dots" }) {
|
|
57459
|
+
const [frame, setFrame] = (0, import_react55.useState)(0);
|
|
57460
|
+
const spinner = import_cli_spinners.default[type];
|
|
57461
|
+
(0, import_react55.useEffect)(() => {
|
|
57462
|
+
const timer = setInterval(() => {
|
|
57463
|
+
setFrame((previousFrame) => {
|
|
57464
|
+
const isLastFrame = previousFrame === spinner.frames.length - 1;
|
|
57465
|
+
return isLastFrame ? 0 : previousFrame + 1;
|
|
57466
|
+
});
|
|
57467
|
+
}, spinner.interval);
|
|
57468
|
+
return () => {
|
|
57469
|
+
clearInterval(timer);
|
|
57470
|
+
};
|
|
57471
|
+
}, [spinner]);
|
|
57472
|
+
return import_react55.default.createElement(Text, null, spinner.frames[frame]);
|
|
57473
|
+
}
|
|
57474
|
+
var build_default2 = Spinner;
|
|
57475
|
+
|
|
57476
|
+
// ../cli-ui-kit/src/components/Spinner.tsx
|
|
57477
|
+
var Spinner2 = ({ text }) => {
|
|
57478
|
+
const spinnerNode = /* @__PURE__ */ import_react56.default.createElement(Text2, { skin: "info" }, /* @__PURE__ */ import_react56.default.createElement(build_default2, { type: "dots" }));
|
|
57479
|
+
if (text) {
|
|
57480
|
+
return /* @__PURE__ */ import_react56.default.createElement(Box_default, { gap: 1 }, spinnerNode, typeof text === "string" ? /* @__PURE__ */ import_react56.default.createElement(Text2, null, text) : text);
|
|
57481
|
+
}
|
|
57482
|
+
return spinnerNode;
|
|
57483
|
+
};
|
|
57484
|
+
|
|
57485
|
+
// ../cli-ui-kit/src/components/TextInput/TextInput.tsx
|
|
57435
57486
|
var TextInput2 = ({
|
|
57436
57487
|
label,
|
|
57437
57488
|
isActive,
|
|
@@ -57440,38 +57491,48 @@ var TextInput2 = ({
|
|
|
57440
57491
|
validate: validate3 = () => true,
|
|
57441
57492
|
inCreateFlow = false
|
|
57442
57493
|
}) => {
|
|
57443
|
-
const [inputState, setInputState] = (0,
|
|
57494
|
+
const [inputState, setInputState] = (0, import_react57.useState)(
|
|
57444
57495
|
() => InputState.NotSubmitted(placeholder)
|
|
57445
57496
|
);
|
|
57446
|
-
const [isDirty, setIsDirty] = (0,
|
|
57447
|
-
const [
|
|
57448
|
-
const
|
|
57497
|
+
const [isDirty, setIsDirty] = (0, import_react57.useState)(false);
|
|
57498
|
+
const [showSpinner, setShowSpinner] = (0, import_react57.useState)(false);
|
|
57499
|
+
const [validationError, setValidationError] = (0, import_react57.useState)();
|
|
57500
|
+
const handleSubmit = (0, import_react57.useCallback)(
|
|
57449
57501
|
async (value2) => {
|
|
57502
|
+
setValidationError(void 0);
|
|
57450
57503
|
setIsDirty(false);
|
|
57451
|
-
const
|
|
57452
|
-
|
|
57453
|
-
|
|
57454
|
-
|
|
57455
|
-
|
|
57456
|
-
|
|
57457
|
-
|
|
57504
|
+
const validatingTimer = setTimeout(() => {
|
|
57505
|
+
setShowSpinner(true);
|
|
57506
|
+
}, 300);
|
|
57507
|
+
try {
|
|
57508
|
+
const validationResult = await validate3(value2);
|
|
57509
|
+
if (validationResult !== true) {
|
|
57510
|
+
setValidationError(validationResult);
|
|
57511
|
+
} else {
|
|
57512
|
+
setValidationError(void 0);
|
|
57513
|
+
setInputState(InputState.Submitted(value2));
|
|
57514
|
+
onSubmit(value2);
|
|
57515
|
+
}
|
|
57516
|
+
} finally {
|
|
57517
|
+
clearTimeout(validatingTimer);
|
|
57518
|
+
setShowSpinner(false);
|
|
57458
57519
|
}
|
|
57459
57520
|
},
|
|
57460
57521
|
[onSubmit, validate3]
|
|
57461
57522
|
);
|
|
57462
57523
|
const afterValidationError = Boolean(validationError && !isDirty);
|
|
57463
|
-
(0,
|
|
57524
|
+
(0, import_react57.useEffect)(() => {
|
|
57464
57525
|
if (isActive) {
|
|
57465
57526
|
setInputState(InputState.NotSubmitted(inputState.value));
|
|
57466
57527
|
}
|
|
57467
57528
|
}, [isActive]);
|
|
57468
|
-
return /* @__PURE__ */
|
|
57529
|
+
return /* @__PURE__ */ import_react57.default.createElement(import_react57.default.Fragment, null, /* @__PURE__ */ import_react57.default.createElement(Box_default, { marginBottom: 1, marginLeft: inCreateFlow ? -2 : 0 }, /* @__PURE__ */ import_react57.default.createElement(Text2, null, /* @__PURE__ */ import_react57.default.createElement(
|
|
57469
57530
|
InputLabel,
|
|
57470
57531
|
{
|
|
57471
|
-
icon: /* @__PURE__ */
|
|
57532
|
+
icon: /* @__PURE__ */ import_react57.default.createElement(Text2, { skin: "question" }, /* @__PURE__ */ import_react57.default.createElement(PointerIcon, { appearance: "triangle" }))
|
|
57472
57533
|
},
|
|
57473
57534
|
label
|
|
57474
|
-
), (0, import_variant15.isType)(inputState, InputState.NotSubmitted) && /* @__PURE__ */
|
|
57535
|
+
), (0, import_variant15.isType)(inputState, InputState.NotSubmitted) && /* @__PURE__ */ import_react57.default.createElement(import_react57.default.Fragment, null, " ", /* @__PURE__ */ import_react57.default.createElement(Text2, { skin: afterValidationError ? "error" : "standard" }, /* @__PURE__ */ import_react57.default.createElement(
|
|
57475
57536
|
Input2,
|
|
57476
57537
|
{
|
|
57477
57538
|
placeholder: inputState.value,
|
|
@@ -57479,52 +57540,52 @@ var TextInput2 = ({
|
|
|
57479
57540
|
onChange: () => setIsDirty(true),
|
|
57480
57541
|
showCursor: afterValidationError
|
|
57481
57542
|
}
|
|
57482
|
-
))))), (0, import_variant15.isType)(inputState, InputState.Submitted) && /* @__PURE__ */
|
|
57543
|
+
))))), (0, import_variant15.isType)(inputState, InputState.Submitted) && /* @__PURE__ */ import_react57.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react57.default.createElement(Text2, { skin: "secondary" }, /* @__PURE__ */ import_react57.default.createElement(SuccessIcon, null), " ", inputState.value)), validationError && /* @__PURE__ */ import_react57.default.createElement(Box_default, { columnGap: 1 }, /* @__PURE__ */ import_react57.default.createElement(Text2, { skin: "error" }, /* @__PURE__ */ import_react57.default.createElement(PointerIcon, { appearance: "exclamation" })), /* @__PURE__ */ import_react57.default.createElement(Text2, { skin: "error" }, validationError)), showSpinner && /* @__PURE__ */ import_react57.default.createElement(Box_default, { columnGap: 1 }, /* @__PURE__ */ import_react57.default.createElement(Text2, { skin: "secondary" }, /* @__PURE__ */ import_react57.default.createElement(Spinner2, null), " ", "Validating...")));
|
|
57483
57544
|
};
|
|
57484
57545
|
|
|
57485
57546
|
// ../cli-ui-kit/src/components/Alert.tsx
|
|
57486
57547
|
init_esm_shims();
|
|
57487
|
-
var
|
|
57548
|
+
var import_react58 = __toESM(require_react(), 1);
|
|
57488
57549
|
var import_variant16 = __toESM(require_lib(), 1);
|
|
57489
57550
|
var Alert = ({ type, children }) => {
|
|
57490
57551
|
const icon = (0, import_variant16.match)(type, {
|
|
57491
57552
|
error: (0, import_variant16.constant)(
|
|
57492
|
-
/* @__PURE__ */
|
|
57553
|
+
/* @__PURE__ */ import_react58.default.createElement(Text2, { skin: "error" }, /* @__PURE__ */ import_react58.default.createElement(ErrorIcon, null))
|
|
57493
57554
|
),
|
|
57494
57555
|
warning: (0, import_variant16.constant)(
|
|
57495
|
-
/* @__PURE__ */
|
|
57556
|
+
/* @__PURE__ */ import_react58.default.createElement(Text2, { skin: "warning" }, /* @__PURE__ */ import_react58.default.createElement(WarningIcon, null))
|
|
57496
57557
|
),
|
|
57497
57558
|
success: (0, import_variant16.constant)(
|
|
57498
|
-
/* @__PURE__ */
|
|
57559
|
+
/* @__PURE__ */ import_react58.default.createElement(Text2, { skin: "success" }, /* @__PURE__ */ import_react58.default.createElement(SuccessIcon, null))
|
|
57499
57560
|
),
|
|
57500
|
-
insight: (0, import_variant16.constant)(/* @__PURE__ */
|
|
57561
|
+
insight: (0, import_variant16.constant)(/* @__PURE__ */ import_react58.default.createElement(InsightIcon, null))
|
|
57501
57562
|
});
|
|
57502
|
-
return /* @__PURE__ */
|
|
57563
|
+
return /* @__PURE__ */ import_react58.default.createElement(Text2, null, icon, " ", children);
|
|
57503
57564
|
};
|
|
57504
57565
|
|
|
57505
57566
|
// ../cli-ui-kit/src/components/Badge.tsx
|
|
57506
57567
|
init_esm_shims();
|
|
57507
|
-
var
|
|
57568
|
+
var import_react59 = __toESM(require_react(), 1);
|
|
57508
57569
|
var skins2 = {
|
|
57509
57570
|
success: { backgroundColor: "green" }
|
|
57510
57571
|
};
|
|
57511
57572
|
var Badge = ({ children, skin }) => {
|
|
57512
|
-
return /* @__PURE__ */
|
|
57573
|
+
return /* @__PURE__ */ import_react59.default.createElement(Text, { ...skins2[skin] }, " ", children, " ");
|
|
57513
57574
|
};
|
|
57514
57575
|
|
|
57515
57576
|
// ../cli-ui-kit/src/components/Key.tsx
|
|
57516
57577
|
init_esm_shims();
|
|
57517
|
-
var
|
|
57578
|
+
var import_react60 = __toESM(require_react(), 1);
|
|
57518
57579
|
var Key = ({ value: value2, skin }) => {
|
|
57519
57580
|
if (skin === "secondary") {
|
|
57520
|
-
return /* @__PURE__ */
|
|
57581
|
+
return /* @__PURE__ */ import_react60.default.createElement(Text, null, /* @__PURE__ */ import_react60.default.createElement(Text, { inverse: true }, " ", value2, " "), /* @__PURE__ */ import_react60.default.createElement(Text, null, "\u2591"));
|
|
57521
57582
|
}
|
|
57522
|
-
return /* @__PURE__ */
|
|
57583
|
+
return /* @__PURE__ */ import_react60.default.createElement(Text, null, /* @__PURE__ */ import_react60.default.createElement(Text, { backgroundColor: "blueBright" }, " ", value2, " "), /* @__PURE__ */ import_react60.default.createElement(Text, { color: "blueBright" }, "\u2591"));
|
|
57523
57584
|
};
|
|
57524
57585
|
|
|
57525
57586
|
// ../cli-ui-kit/src/components/Link.tsx
|
|
57526
57587
|
init_esm_shims();
|
|
57527
|
-
var
|
|
57588
|
+
var import_react61 = __toESM(require_react(), 1);
|
|
57528
57589
|
|
|
57529
57590
|
// ../../node_modules/terminal-link/index.js
|
|
57530
57591
|
init_esm_shims();
|
|
@@ -57671,52 +57732,17 @@ terminalLink.stderr.isSupported = import_supports_hyperlinks.default.stderr;
|
|
|
57671
57732
|
var Link = ({ skin, children, url }) => {
|
|
57672
57733
|
if (children) {
|
|
57673
57734
|
if (terminalLink.isSupported) {
|
|
57674
|
-
return /* @__PURE__ */
|
|
57735
|
+
return /* @__PURE__ */ import_react61.default.createElement(
|
|
57675
57736
|
Transform,
|
|
57676
57737
|
{
|
|
57677
57738
|
transform: (childrenAsString) => terminalLink(childrenAsString, url, { fallback: false })
|
|
57678
57739
|
},
|
|
57679
|
-
/* @__PURE__ */
|
|
57740
|
+
/* @__PURE__ */ import_react61.default.createElement(Text2, { skin }, children)
|
|
57680
57741
|
);
|
|
57681
57742
|
}
|
|
57682
|
-
return /* @__PURE__ */
|
|
57683
|
-
}
|
|
57684
|
-
return /* @__PURE__ */ import_react59.default.createElement(Text2, { skin: "info" }, url);
|
|
57685
|
-
};
|
|
57686
|
-
|
|
57687
|
-
// ../cli-ui-kit/src/components/Spinner.tsx
|
|
57688
|
-
init_esm_shims();
|
|
57689
|
-
var import_react61 = __toESM(require_react(), 1);
|
|
57690
|
-
|
|
57691
|
-
// ../../node_modules/ink-spinner/build/index.js
|
|
57692
|
-
init_esm_shims();
|
|
57693
|
-
var import_react60 = __toESM(require_react(), 1);
|
|
57694
|
-
var import_cli_spinners = __toESM(require_cli_spinners(), 1);
|
|
57695
|
-
function Spinner({ type = "dots" }) {
|
|
57696
|
-
const [frame, setFrame] = (0, import_react60.useState)(0);
|
|
57697
|
-
const spinner = import_cli_spinners.default[type];
|
|
57698
|
-
(0, import_react60.useEffect)(() => {
|
|
57699
|
-
const timer = setInterval(() => {
|
|
57700
|
-
setFrame((previousFrame) => {
|
|
57701
|
-
const isLastFrame = previousFrame === spinner.frames.length - 1;
|
|
57702
|
-
return isLastFrame ? 0 : previousFrame + 1;
|
|
57703
|
-
});
|
|
57704
|
-
}, spinner.interval);
|
|
57705
|
-
return () => {
|
|
57706
|
-
clearInterval(timer);
|
|
57707
|
-
};
|
|
57708
|
-
}, [spinner]);
|
|
57709
|
-
return import_react60.default.createElement(Text, null, spinner.frames[frame]);
|
|
57710
|
-
}
|
|
57711
|
-
var build_default2 = Spinner;
|
|
57712
|
-
|
|
57713
|
-
// ../cli-ui-kit/src/components/Spinner.tsx
|
|
57714
|
-
var Spinner2 = ({ text }) => {
|
|
57715
|
-
const spinnerNode = /* @__PURE__ */ import_react61.default.createElement(Text2, { skin: "info" }, /* @__PURE__ */ import_react61.default.createElement(build_default2, { type: "dots" }));
|
|
57716
|
-
if (text) {
|
|
57717
|
-
return /* @__PURE__ */ import_react61.default.createElement(Box_default, { gap: 1 }, spinnerNode, typeof text === "string" ? /* @__PURE__ */ import_react61.default.createElement(Text2, null, text) : text);
|
|
57743
|
+
return /* @__PURE__ */ import_react61.default.createElement(Text2, null, /* @__PURE__ */ import_react61.default.createElement(Text2, { skin }, children), " (", url, ")");
|
|
57718
57744
|
}
|
|
57719
|
-
return
|
|
57745
|
+
return /* @__PURE__ */ import_react61.default.createElement(Text2, { skin: "info" }, url);
|
|
57720
57746
|
};
|
|
57721
57747
|
|
|
57722
57748
|
// ../cli-ui-kit/src/components/ErrorDetails.tsx
|
|
@@ -59140,9 +59166,9 @@ init_esm_shims();
|
|
|
59140
59166
|
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;
|
|
59141
59167
|
function parseDateTimeSkeleton(skeleton) {
|
|
59142
59168
|
var result = {};
|
|
59143
|
-
skeleton.replace(DATE_TIME_REGEX, function(
|
|
59144
|
-
var len =
|
|
59145
|
-
switch (
|
|
59169
|
+
skeleton.replace(DATE_TIME_REGEX, function(match37) {
|
|
59170
|
+
var len = match37.length;
|
|
59171
|
+
switch (match37[0]) {
|
|
59146
59172
|
// Era
|
|
59147
59173
|
case "G":
|
|
59148
59174
|
result.era = len === 4 ? "long" : len === 5 ? "narrow" : "short";
|
|
@@ -61152,21 +61178,21 @@ if (REGEX_SUPPORTS_U_AND_Y) {
|
|
|
61152
61178
|
matchIdentifierAtIndex = function matchIdentifierAtIndex2(s2, index) {
|
|
61153
61179
|
var _a3;
|
|
61154
61180
|
IDENTIFIER_PREFIX_RE_1.lastIndex = index;
|
|
61155
|
-
var
|
|
61156
|
-
return (_a3 =
|
|
61181
|
+
var match37 = IDENTIFIER_PREFIX_RE_1.exec(s2);
|
|
61182
|
+
return (_a3 = match37[1]) !== null && _a3 !== void 0 ? _a3 : "";
|
|
61157
61183
|
};
|
|
61158
61184
|
} else {
|
|
61159
61185
|
matchIdentifierAtIndex = function matchIdentifierAtIndex2(s2, index) {
|
|
61160
|
-
var
|
|
61186
|
+
var match37 = [];
|
|
61161
61187
|
while (true) {
|
|
61162
61188
|
var c2 = codePointAt(s2, index);
|
|
61163
61189
|
if (c2 === void 0 || _isWhiteSpace(c2) || _isPatternSyntax(c2)) {
|
|
61164
61190
|
break;
|
|
61165
61191
|
}
|
|
61166
|
-
|
|
61192
|
+
match37.push(c2);
|
|
61167
61193
|
index += c2 >= 65536 ? 2 : 1;
|
|
61168
61194
|
}
|
|
61169
|
-
return fromCodePoint.apply(void 0,
|
|
61195
|
+
return fromCodePoint.apply(void 0, match37);
|
|
61170
61196
|
};
|
|
61171
61197
|
}
|
|
61172
61198
|
var IDENTIFIER_PREFIX_RE_1;
|
|
@@ -63589,7 +63615,7 @@ var Interpolator = class {
|
|
|
63589
63615
|
this.nestingRegexp = getOrResetRegExp(this.nestingRegexp, `${this.nestingPrefix}(.+?)${this.nestingSuffix}`);
|
|
63590
63616
|
}
|
|
63591
63617
|
interpolate(str, data, lng, options) {
|
|
63592
|
-
let
|
|
63618
|
+
let match37;
|
|
63593
63619
|
let value2;
|
|
63594
63620
|
let replaces;
|
|
63595
63621
|
const defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
|
|
@@ -63623,17 +63649,17 @@ var Interpolator = class {
|
|
|
63623
63649
|
}];
|
|
63624
63650
|
todos.forEach((todo) => {
|
|
63625
63651
|
replaces = 0;
|
|
63626
|
-
while (
|
|
63627
|
-
const matchedVar =
|
|
63652
|
+
while (match37 = todo.regex.exec(str)) {
|
|
63653
|
+
const matchedVar = match37[1].trim();
|
|
63628
63654
|
value2 = handleFormat(matchedVar);
|
|
63629
63655
|
if (value2 === void 0) {
|
|
63630
63656
|
if (typeof missingInterpolationHandler === "function") {
|
|
63631
|
-
const temp = missingInterpolationHandler(str,
|
|
63657
|
+
const temp = missingInterpolationHandler(str, match37, options);
|
|
63632
63658
|
value2 = isString2(temp) ? temp : "";
|
|
63633
63659
|
} else if (options && Object.prototype.hasOwnProperty.call(options, matchedVar)) {
|
|
63634
63660
|
value2 = "";
|
|
63635
63661
|
} else if (skipOnVariables) {
|
|
63636
|
-
value2 =
|
|
63662
|
+
value2 = match37[0];
|
|
63637
63663
|
continue;
|
|
63638
63664
|
} else {
|
|
63639
63665
|
this.logger.warn(`missed to pass in variable ${matchedVar} for interpolating ${str}`);
|
|
@@ -63643,10 +63669,10 @@ var Interpolator = class {
|
|
|
63643
63669
|
value2 = makeString(value2);
|
|
63644
63670
|
}
|
|
63645
63671
|
const safeValue = todo.safeValue(value2);
|
|
63646
|
-
str = str.replace(
|
|
63672
|
+
str = str.replace(match37[0], safeValue);
|
|
63647
63673
|
if (skipOnVariables) {
|
|
63648
63674
|
todo.regex.lastIndex += value2.length;
|
|
63649
|
-
todo.regex.lastIndex -=
|
|
63675
|
+
todo.regex.lastIndex -= match37[0].length;
|
|
63650
63676
|
} else {
|
|
63651
63677
|
todo.regex.lastIndex = 0;
|
|
63652
63678
|
}
|
|
@@ -63660,7 +63686,7 @@ var Interpolator = class {
|
|
|
63660
63686
|
}
|
|
63661
63687
|
nest(str, fc) {
|
|
63662
63688
|
let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
63663
|
-
let
|
|
63689
|
+
let match37;
|
|
63664
63690
|
let value2;
|
|
63665
63691
|
let clonedOptions;
|
|
63666
63692
|
const handleHasOptions = (key, inheritedOptions) => {
|
|
@@ -63688,7 +63714,7 @@ var Interpolator = class {
|
|
|
63688
63714
|
if (clonedOptions.defaultValue && clonedOptions.defaultValue.indexOf(this.prefix) > -1) delete clonedOptions.defaultValue;
|
|
63689
63715
|
return key;
|
|
63690
63716
|
};
|
|
63691
|
-
while (
|
|
63717
|
+
while (match37 = this.nestingRegexp.exec(str)) {
|
|
63692
63718
|
let formatters = [];
|
|
63693
63719
|
clonedOptions = {
|
|
63694
63720
|
...options
|
|
@@ -63697,26 +63723,26 @@ var Interpolator = class {
|
|
|
63697
63723
|
clonedOptions.applyPostProcessor = false;
|
|
63698
63724
|
delete clonedOptions.defaultValue;
|
|
63699
63725
|
let doReduce = false;
|
|
63700
|
-
if (
|
|
63701
|
-
const r2 =
|
|
63702
|
-
|
|
63726
|
+
if (match37[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(match37[1])) {
|
|
63727
|
+
const r2 = match37[1].split(this.formatSeparator).map((elem) => elem.trim());
|
|
63728
|
+
match37[1] = r2.shift();
|
|
63703
63729
|
formatters = r2;
|
|
63704
63730
|
doReduce = true;
|
|
63705
63731
|
}
|
|
63706
|
-
value2 = fc(handleHasOptions.call(this,
|
|
63707
|
-
if (value2 &&
|
|
63732
|
+
value2 = fc(handleHasOptions.call(this, match37[1].trim(), clonedOptions), clonedOptions);
|
|
63733
|
+
if (value2 && match37[0] === str && !isString2(value2)) return value2;
|
|
63708
63734
|
if (!isString2(value2)) value2 = makeString(value2);
|
|
63709
63735
|
if (!value2) {
|
|
63710
|
-
this.logger.warn(`missed to resolve ${
|
|
63736
|
+
this.logger.warn(`missed to resolve ${match37[1]} for nesting ${str}`);
|
|
63711
63737
|
value2 = "";
|
|
63712
63738
|
}
|
|
63713
63739
|
if (doReduce) {
|
|
63714
63740
|
value2 = formatters.reduce((v, f) => this.format(v, f, options.lng, {
|
|
63715
63741
|
...options,
|
|
63716
|
-
interpolationkey:
|
|
63742
|
+
interpolationkey: match37[1].trim()
|
|
63717
63743
|
}), value2.trim());
|
|
63718
63744
|
}
|
|
63719
|
-
str = str.replace(
|
|
63745
|
+
str = str.replace(match37[0], value2);
|
|
63720
63746
|
this.regexp.lastIndex = 0;
|
|
63721
63747
|
}
|
|
63722
63748
|
return str;
|
|
@@ -64839,8 +64865,8 @@ async function defaultBrowserId() {
|
|
|
64839
64865
|
throw new Error("macOS only");
|
|
64840
64866
|
}
|
|
64841
64867
|
const { stdout } = await execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]);
|
|
64842
|
-
const
|
|
64843
|
-
return
|
|
64868
|
+
const match37 = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
|
|
64869
|
+
return match37?.groups.id ?? "com.apple.Safari";
|
|
64844
64870
|
}
|
|
64845
64871
|
|
|
64846
64872
|
// ../../node_modules/bundle-name/index.js
|
|
@@ -64894,11 +64920,11 @@ async function defaultBrowser(_execFileAsync = execFileAsync3) {
|
|
|
64894
64920
|
"/v",
|
|
64895
64921
|
"ProgId"
|
|
64896
64922
|
]);
|
|
64897
|
-
const
|
|
64898
|
-
if (!
|
|
64923
|
+
const match37 = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
|
|
64924
|
+
if (!match37) {
|
|
64899
64925
|
throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
|
|
64900
64926
|
}
|
|
64901
|
-
const { id } =
|
|
64927
|
+
const { id } = match37.groups;
|
|
64902
64928
|
const browser = windowsBrowserProgIds[id];
|
|
64903
64929
|
if (!browser) {
|
|
64904
64930
|
throw new UnknownBrowserError(`Unknown browser ID: ${id}`);
|
|
@@ -65333,9 +65359,9 @@ var reDetectIndentation = /(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/;
|
|
|
65333
65359
|
var reOnlyWhitespaceWithAtLeastOneNewline = /^[ \t]*[\r\n][ \t\r\n]*$/;
|
|
65334
65360
|
function _outdentArray(strings, firstInterpolatedValueSetsIndentationLevel, options) {
|
|
65335
65361
|
var indentationLevel = 0;
|
|
65336
|
-
var
|
|
65337
|
-
if (
|
|
65338
|
-
indentationLevel =
|
|
65362
|
+
var match37 = strings[0].match(reDetectIndentation);
|
|
65363
|
+
if (match37) {
|
|
65364
|
+
indentationLevel = match37[1].length;
|
|
65339
65365
|
}
|
|
65340
65366
|
var reSource = "(\\r\\n|\\r|\\n).{0," + indentationLevel + "}";
|
|
65341
65367
|
var reMatchIndent = new RegExp(reSource, "g");
|
|
@@ -67087,6 +67113,12 @@ ${errorMessage2}`
|
|
|
67087
67113
|
message: "The development command failed to execute. Please review the output log above for details."
|
|
67088
67114
|
}
|
|
67089
67115
|
);
|
|
67116
|
+
},
|
|
67117
|
+
FailedToSetCodeIdentifier: () => {
|
|
67118
|
+
return () => /* @__PURE__ */ import_react82.default.createElement(ErrorMessage, { cause, message: "Failed to set code identifier." });
|
|
67119
|
+
},
|
|
67120
|
+
FailedToSetNamespace: () => {
|
|
67121
|
+
return () => /* @__PURE__ */ import_react82.default.createElement(ErrorMessage, { cause, message: "Failed to set namespace." });
|
|
67090
67122
|
}
|
|
67091
67123
|
});
|
|
67092
67124
|
}
|
|
@@ -67736,8 +67768,8 @@ var LINUX_VERSIONS = {
|
|
|
67736
67768
|
ubuntu: (content) => matchFirst(/distrib_release=(.*)/, content)
|
|
67737
67769
|
};
|
|
67738
67770
|
function matchFirst(regex2, text) {
|
|
67739
|
-
const
|
|
67740
|
-
return
|
|
67771
|
+
const match37 = regex2.exec(text);
|
|
67772
|
+
return match37 ? match37[1] : void 0;
|
|
67741
67773
|
}
|
|
67742
67774
|
async function getDarwinInfo() {
|
|
67743
67775
|
const darwinInfo = {
|
|
@@ -70403,7 +70435,7 @@ function getErrorLogFilePath(cwd3) {
|
|
|
70403
70435
|
|
|
70404
70436
|
// ../create-new-packages/app-command/src/index.tsx
|
|
70405
70437
|
init_esm_shims();
|
|
70406
|
-
var
|
|
70438
|
+
var import_react131 = __toESM(require_react(), 1);
|
|
70407
70439
|
|
|
70408
70440
|
// ../cli-http-client-react/src/index.ts
|
|
70409
70441
|
init_esm_shims();
|
|
@@ -70517,6 +70549,8 @@ function usePanoramaMethodLogger(target) {
|
|
|
70517
70549
|
|
|
70518
70550
|
// ../cli-panorama/src/createPanorama.ts
|
|
70519
70551
|
init_esm_shims();
|
|
70552
|
+
var import_verror5 = __toESM(require_verror(), 1);
|
|
70553
|
+
var import_variant25 = __toESM(require_lib(), 1);
|
|
70520
70554
|
|
|
70521
70555
|
// ../../node_modules/@wix/panorama-client-node/dist/esm/index.js
|
|
70522
70556
|
init_esm_shims();
|
|
@@ -71576,14 +71610,25 @@ async function createPanorama(options) {
|
|
|
71576
71610
|
}).withGlobalConfig(globalConfig).setMuted(!userConfig.telemetry);
|
|
71577
71611
|
const panorama2 = createPanoramaWrapper(factory);
|
|
71578
71612
|
if (errorReporter2) {
|
|
71579
|
-
errorReporter2.on("errorReported", (
|
|
71613
|
+
errorReporter2.on("errorReported", (cliError) => {
|
|
71580
71614
|
const panoramaClient2 = panorama2.client({
|
|
71581
71615
|
baseParams: {
|
|
71582
71616
|
componentId: "error-reporter"
|
|
71583
71617
|
}
|
|
71584
71618
|
});
|
|
71585
71619
|
const errorMonitor = panoramaClient2.errorMonitor();
|
|
71586
|
-
|
|
71620
|
+
const error = (0, import_variant25.isType)(cliError.cliCode, CliSystemErrorCode.UnknownFailure) && cliError.cliCode.error instanceof Error ? cliError.cliCode.error : cliError;
|
|
71621
|
+
const errorToReport = new Error(error.message);
|
|
71622
|
+
errorToReport.name = error.name;
|
|
71623
|
+
errorToReport.stack = import_verror5.default.fullStack(error);
|
|
71624
|
+
const httpError = extractHttpError(cliError);
|
|
71625
|
+
if (httpError) {
|
|
71626
|
+
errorToReport.cause = httpError;
|
|
71627
|
+
}
|
|
71628
|
+
errorMonitor.reportError(errorToReport, {
|
|
71629
|
+
// panorama by default uses constructor.name for errorName
|
|
71630
|
+
errorName: cliError.name
|
|
71631
|
+
});
|
|
71587
71632
|
});
|
|
71588
71633
|
}
|
|
71589
71634
|
return panorama2;
|
|
@@ -71593,17 +71638,17 @@ async function createPanorama(options) {
|
|
|
71593
71638
|
init_esm_shims();
|
|
71594
71639
|
var import_kebabCase = __toESM(require_kebabCase(), 1);
|
|
71595
71640
|
function createCommandTransaction(panorama2, command) {
|
|
71596
|
-
const commandFullName = getFullCommandName(command);
|
|
71641
|
+
const commandFullName = (0, import_kebabCase.default)(getFullCommandName(command));
|
|
71642
|
+
panorama2.setDefaultClientData({
|
|
71643
|
+
commandName: command.name(),
|
|
71644
|
+
commandFullName
|
|
71645
|
+
});
|
|
71597
71646
|
const client2 = panorama2.client({
|
|
71598
71647
|
baseParams: {
|
|
71599
71648
|
componentId: "command"
|
|
71600
|
-
},
|
|
71601
|
-
data: {
|
|
71602
|
-
commandName: command.name(),
|
|
71603
|
-
commandFullName
|
|
71604
71649
|
}
|
|
71605
71650
|
});
|
|
71606
|
-
return client2.transaction(
|
|
71651
|
+
return client2.transaction(commandFullName);
|
|
71607
71652
|
}
|
|
71608
71653
|
function getFullCommandName(command) {
|
|
71609
71654
|
if (command.parent) {
|
|
@@ -71914,8 +71959,8 @@ var createBiLogger2 = async ({
|
|
|
71914
71959
|
|
|
71915
71960
|
// ../create-new-packages/app-command/src/components/CreateAppCommand.tsx
|
|
71916
71961
|
init_esm_shims();
|
|
71917
|
-
var
|
|
71918
|
-
var
|
|
71962
|
+
var import_react130 = __toESM(require_react(), 1);
|
|
71963
|
+
var import_variant45 = __toESM(require_lib(), 1);
|
|
71919
71964
|
|
|
71920
71965
|
// ../create-new-packages/app-command/src/components/WelcomeMessage.tsx
|
|
71921
71966
|
init_esm_shims();
|
|
@@ -71953,14 +71998,15 @@ var AuthProvider2 = ({ userInfo: userInfo2, children }) => {
|
|
|
71953
71998
|
|
|
71954
71999
|
// ../create-new-packages/app-command/src/components/Questions/Questions.tsx
|
|
71955
72000
|
init_esm_shims();
|
|
71956
|
-
var
|
|
71957
|
-
var
|
|
72001
|
+
var import_react125 = __toESM(require_react(), 1);
|
|
72002
|
+
var import_variant42 = __toESM(require_lib(), 1);
|
|
71958
72003
|
|
|
71959
72004
|
// ../dev-center-client/src/index.ts
|
|
71960
72005
|
init_esm_shims();
|
|
71961
72006
|
|
|
71962
72007
|
// ../dev-center-client/src/dev-center-client.ts
|
|
71963
72008
|
init_esm_shims();
|
|
72009
|
+
var import_variant26 = __toESM(require_lib(), 1);
|
|
71964
72010
|
|
|
71965
72011
|
// ../../node_modules/@wix/ambassador-devcenter-apps-v1-app-old/es/build/http.impl.js
|
|
71966
72012
|
init_esm_shims();
|
|
@@ -72666,10 +72712,14 @@ function getAppByVersion(payload7) {
|
|
|
72666
72712
|
return __getAppByVersion;
|
|
72667
72713
|
}
|
|
72668
72714
|
|
|
72669
|
-
// ../../node_modules/@wix/ambassador-devcenter-apps-v1-app/build/
|
|
72715
|
+
// ../../node_modules/@wix/ambassador-devcenter-apps-v1-app/es/build/http.impl.js
|
|
72670
72716
|
init_esm_shims();
|
|
72671
72717
|
var _queryAppRequest = {};
|
|
72672
72718
|
var _queryAppResponse = { apps: "_v1App" };
|
|
72719
|
+
var _setCodeIdentifierRequest = {};
|
|
72720
|
+
var _setCodeIdentifierResponse = {};
|
|
72721
|
+
var _setNamespaceRequest = {};
|
|
72722
|
+
var _setNamespaceResponse = {};
|
|
72673
72723
|
var _v1App = {
|
|
72674
72724
|
createdDate: "google.protobuf.Timestamp",
|
|
72675
72725
|
updatedDate: "google.protobuf.Timestamp"
|
|
@@ -72815,6 +72865,60 @@ function getApp(payload7) {
|
|
|
72815
72865
|
__getApp.__isAmbassador = true;
|
|
72816
72866
|
return __getApp;
|
|
72817
72867
|
}
|
|
72868
|
+
function setNamespace(payload7) {
|
|
72869
|
+
var _a3 = serializer(_setNamespaceRequest, {}), toReq = _a3.toJSON, fromReq = _a3.fromJSON;
|
|
72870
|
+
var fromRes = serializer(_setNamespaceResponse, {}).fromJSON;
|
|
72871
|
+
function __setNamespace(_a4) {
|
|
72872
|
+
var host = _a4.host;
|
|
72873
|
+
var serializedData = toReq(payload7);
|
|
72874
|
+
var metadata = {
|
|
72875
|
+
entityFqdn: "wix.devcenter.apps.v1.app",
|
|
72876
|
+
method: "PATCH",
|
|
72877
|
+
methodFqn: "wix.devcenter.apps.v1.AppsService.SetNamespace",
|
|
72878
|
+
migrationOptions: {
|
|
72879
|
+
optInTransformResponse: true
|
|
72880
|
+
},
|
|
72881
|
+
url: resolveWixDevcenterAppsV1AppsServiceUrl({
|
|
72882
|
+
protoPath: "/v1/apps/{appId}/set-namespace",
|
|
72883
|
+
data: serializedData,
|
|
72884
|
+
host
|
|
72885
|
+
}),
|
|
72886
|
+
data: serializedData,
|
|
72887
|
+
transformResponse: fromRes
|
|
72888
|
+
};
|
|
72889
|
+
return metadata;
|
|
72890
|
+
}
|
|
72891
|
+
__setNamespace.fromReq = fromReq;
|
|
72892
|
+
__setNamespace.__isAmbassador = true;
|
|
72893
|
+
return __setNamespace;
|
|
72894
|
+
}
|
|
72895
|
+
function setCodeIdentifier(payload7) {
|
|
72896
|
+
var _a3 = serializer(_setCodeIdentifierRequest, {}), toReq = _a3.toJSON, fromReq = _a3.fromJSON;
|
|
72897
|
+
var fromRes = serializer(_setCodeIdentifierResponse, {}).fromJSON;
|
|
72898
|
+
function __setCodeIdentifier(_a4) {
|
|
72899
|
+
var host = _a4.host;
|
|
72900
|
+
var serializedData = toReq(payload7);
|
|
72901
|
+
var metadata = {
|
|
72902
|
+
entityFqdn: "wix.devcenter.apps.v1.app",
|
|
72903
|
+
method: "PATCH",
|
|
72904
|
+
methodFqn: "wix.devcenter.apps.v1.AppsService.SetCodeIdentifier",
|
|
72905
|
+
migrationOptions: {
|
|
72906
|
+
optInTransformResponse: true
|
|
72907
|
+
},
|
|
72908
|
+
url: resolveWixDevcenterAppsV1AppsServiceUrl({
|
|
72909
|
+
protoPath: "/v1/apps/{appId}/set-code-identifier",
|
|
72910
|
+
data: serializedData,
|
|
72911
|
+
host
|
|
72912
|
+
}),
|
|
72913
|
+
data: serializedData,
|
|
72914
|
+
transformResponse: fromRes
|
|
72915
|
+
};
|
|
72916
|
+
return metadata;
|
|
72917
|
+
}
|
|
72918
|
+
__setCodeIdentifier.fromReq = fromReq;
|
|
72919
|
+
__setCodeIdentifier.__isAmbassador = true;
|
|
72920
|
+
return __setCodeIdentifier;
|
|
72921
|
+
}
|
|
72818
72922
|
function queryApp(payload7) {
|
|
72819
72923
|
var _a3 = serializer(_queryAppRequest, {}), toReq = _a3.toJSON, fromReq = _a3.fromJSON;
|
|
72820
72924
|
var fromRes = serializer(_queryAppResponse, { _v1App }).fromJSON;
|
|
@@ -79911,6 +80015,14 @@ var listShareUrlsSchema = external_exports.object({
|
|
|
79911
80015
|
|
|
79912
80016
|
// ../dev-center-client/src/dev-center-client.ts
|
|
79913
80017
|
var EMPTY_SITE_TEMPLATE = "24bafe8a-7c80-4b63-8a71-08752062f246";
|
|
80018
|
+
var SetCodeIdentifierResult = (0, import_variant26.variant)({
|
|
80019
|
+
Success: {},
|
|
80020
|
+
ShouldBeUnique: (0, import_variant26.fields)()
|
|
80021
|
+
});
|
|
80022
|
+
var SetNamespaceResult = (0, import_variant26.variant)({
|
|
80023
|
+
Success: {},
|
|
80024
|
+
ShouldBeUnique: (0, import_variant26.fields)()
|
|
80025
|
+
});
|
|
79914
80026
|
var DevCenterClient = class {
|
|
79915
80027
|
constructor(httpClient) {
|
|
79916
80028
|
this.httpClient = httpClient;
|
|
@@ -79962,6 +80074,41 @@ var DevCenterClient = class {
|
|
|
79962
80074
|
});
|
|
79963
80075
|
}
|
|
79964
80076
|
};
|
|
80077
|
+
setNamespace = async ({ appId, namespace }) => {
|
|
80078
|
+
try {
|
|
80079
|
+
await this.httpClient.request(
|
|
80080
|
+
setNamespace({ appId, appName: namespace })
|
|
80081
|
+
);
|
|
80082
|
+
return SetNamespaceResult.Success();
|
|
80083
|
+
} catch (e2) {
|
|
80084
|
+
if (isHttpError(e2) && e2.response?.status === 409 && isHttpApplicationError(e2) && e2.response.data.details.applicationError.code === "ALREADY_EXISTS") {
|
|
80085
|
+
return SetNamespaceResult.ShouldBeUnique({ namespace });
|
|
80086
|
+
}
|
|
80087
|
+
throw new CliError({
|
|
80088
|
+
code: CliErrorCode.FailedToSetNamespace(),
|
|
80089
|
+
cause: e2
|
|
80090
|
+
});
|
|
80091
|
+
}
|
|
80092
|
+
};
|
|
80093
|
+
setCodeIdentifier = async ({
|
|
80094
|
+
appId,
|
|
80095
|
+
codeIdentifier
|
|
80096
|
+
}) => {
|
|
80097
|
+
try {
|
|
80098
|
+
await this.httpClient.request(
|
|
80099
|
+
setCodeIdentifier({ appId, codeIdentifier })
|
|
80100
|
+
);
|
|
80101
|
+
return SetCodeIdentifierResult.Success();
|
|
80102
|
+
} catch (e2) {
|
|
80103
|
+
if (isHttpError(e2) && e2.response?.status === 409 && isHttpApplicationError(e2) && e2.response.data.details.applicationError.code === "ALREADY_EXISTS") {
|
|
80104
|
+
return SetCodeIdentifierResult.ShouldBeUnique({ codeIdentifier });
|
|
80105
|
+
}
|
|
80106
|
+
throw new CliError({
|
|
80107
|
+
code: CliErrorCode.FailedToSetCodeIdentifier(),
|
|
80108
|
+
cause: e2
|
|
80109
|
+
});
|
|
80110
|
+
}
|
|
80111
|
+
};
|
|
79965
80112
|
createOAuthApp = async (oAuthApp) => {
|
|
79966
80113
|
try {
|
|
79967
80114
|
const { data } = await this.httpClient.request(
|
|
@@ -80356,7 +80503,7 @@ function useDevCenterClient({
|
|
|
80356
80503
|
|
|
80357
80504
|
// ../create-new-packages/app-command/src/parse-command-options.ts
|
|
80358
80505
|
init_esm_shims();
|
|
80359
|
-
var
|
|
80506
|
+
var import_variant28 = __toESM(require_lib(), 1);
|
|
80360
80507
|
var import_kebabCase2 = __toESM(require_kebabCase(), 1);
|
|
80361
80508
|
import { join as join8, resolve as resolve3 } from "node:path";
|
|
80362
80509
|
|
|
@@ -80389,11 +80536,11 @@ var import_validate_npm_package_name = __toESM(require_lib2(), 1);
|
|
|
80389
80536
|
|
|
80390
80537
|
// ../create-new-packages/app-command/src/validations/result.ts
|
|
80391
80538
|
init_esm_shims();
|
|
80392
|
-
var
|
|
80393
|
-
var Result = (0,
|
|
80394
|
-
(0,
|
|
80395
|
-
Error: (0,
|
|
80396
|
-
Ok:
|
|
80539
|
+
var import_variant27 = __toESM(require_lib(), 1);
|
|
80540
|
+
var Result = (0, import_variant27.variant)(
|
|
80541
|
+
(0, import_variant27.onTerms)(({ T }) => ({
|
|
80542
|
+
Error: (0, import_variant27.payload)(T),
|
|
80543
|
+
Ok: import_variant27.nil
|
|
80397
80544
|
}))
|
|
80398
80545
|
);
|
|
80399
80546
|
|
|
@@ -80454,12 +80601,43 @@ function validateAppName(value2) {
|
|
|
80454
80601
|
throw new InvalidArgumentError(result);
|
|
80455
80602
|
}
|
|
80456
80603
|
|
|
80604
|
+
// ../create-new-packages/app-command/src/validations/validate-namespace.ts
|
|
80605
|
+
init_esm_shims();
|
|
80606
|
+
var namespaceSchema = external_exports.string().min(1, "Namespace is required").max(150, "Namespace must be at most 150 characters").regex(
|
|
80607
|
+
/^[a-zA-Z0-9]([a-zA-Z0-9._-]*[a-zA-Z0-9])?$/,
|
|
80608
|
+
"Namespace can only contain letters, numbers, dots, hyphens and underscores"
|
|
80609
|
+
);
|
|
80610
|
+
function validateNamespace(value2) {
|
|
80611
|
+
const result = namespaceSchema.safeParse(value2);
|
|
80612
|
+
if (result.success) {
|
|
80613
|
+
return true;
|
|
80614
|
+
}
|
|
80615
|
+
const first = result.error.errors[0];
|
|
80616
|
+
return first?.message ?? "Invalid namespace";
|
|
80617
|
+
}
|
|
80618
|
+
|
|
80619
|
+
// ../create-new-packages/app-command/src/validations/validate-code-identifier.ts
|
|
80620
|
+
init_esm_shims();
|
|
80621
|
+
var CODE_IDENTIFIER_REGEX = /^(?!\d)[A-Za-z_$][A-Za-z0-9_$]*$/;
|
|
80622
|
+
var codeIdentifierSchema = external_exports.string().min(3, "Code identifier must be at least 3 characters").max(150, "Code identifier must be at most 150 characters").regex(
|
|
80623
|
+
CODE_IDENTIFIER_REGEX,
|
|
80624
|
+
'Code identifier must start with a letter, "_" or "$" and contain only letters, numbers, "_" or "$"'
|
|
80625
|
+
);
|
|
80626
|
+
function validateCodeIdentifier(value2) {
|
|
80627
|
+
const result = codeIdentifierSchema.safeParse(value2);
|
|
80628
|
+
if (result.success) {
|
|
80629
|
+
return true;
|
|
80630
|
+
}
|
|
80631
|
+
const first = result.error.errors[0];
|
|
80632
|
+
return first?.message ?? "Invalid code identifier";
|
|
80633
|
+
}
|
|
80634
|
+
|
|
80457
80635
|
// ../create-new-packages/app-command/src/parse-command-options.ts
|
|
80458
|
-
var TemplateSource = (0,
|
|
80459
|
-
App: (0,
|
|
80460
|
-
GitRepo: (0,
|
|
80461
|
-
Local: (0,
|
|
80462
|
-
Default: (0,
|
|
80636
|
+
var TemplateSource = (0, import_variant28.variant)({
|
|
80637
|
+
App: (0, import_variant28.payload)(),
|
|
80638
|
+
GitRepo: (0, import_variant28.fields)(),
|
|
80639
|
+
Local: (0, import_variant28.fields)(),
|
|
80640
|
+
Default: (0, import_variant28.constant)({ path: resolve3(__dirname, "../templates/app/blank") })
|
|
80463
80641
|
});
|
|
80464
80642
|
async function parseTemplateOptions(options, { devCenterClient }) {
|
|
80465
80643
|
if (options.template) {
|
|
@@ -80492,8 +80670,8 @@ async function parseTemplateOptions(options, { devCenterClient }) {
|
|
|
80492
80670
|
return TemplateSource.Local({ path: options.templatePath });
|
|
80493
80671
|
}
|
|
80494
80672
|
}
|
|
80495
|
-
var AppNameOptions = (0,
|
|
80496
|
-
Provided: (0,
|
|
80673
|
+
var AppNameOptions = (0, import_variant28.variant)({
|
|
80674
|
+
Provided: (0, import_variant28.fields)(),
|
|
80497
80675
|
Missing: {}
|
|
80498
80676
|
});
|
|
80499
80677
|
async function parseAppNameOptions(targetParentFolder2, options) {
|
|
@@ -80509,7 +80687,7 @@ async function parseAppNameOptions(targetParentFolder2, options) {
|
|
|
80509
80687
|
});
|
|
80510
80688
|
}
|
|
80511
80689
|
const npmValidationErrors = await validatePackageName(packageName);
|
|
80512
|
-
if ((0,
|
|
80690
|
+
if ((0, import_variant28.isType)(npmValidationErrors, "Error")) {
|
|
80513
80691
|
throw new CliError({
|
|
80514
80692
|
code: CliErrorCode.AppNameArgumentIsInvalid({
|
|
80515
80693
|
errorMessage: `Invalid package name "${packageName}". Please fix the following issues: ${npmValidationErrors.payload.join(", ")}`
|
|
@@ -80524,7 +80702,7 @@ async function parseAppNameOptions(targetParentFolder2, options) {
|
|
|
80524
80702
|
async function parseCommandOptions(targetParentFolder2, options, clients) {
|
|
80525
80703
|
const template = await parseTemplateOptions(options, clients);
|
|
80526
80704
|
const appNameOptions = await parseAppNameOptions(targetParentFolder2, options);
|
|
80527
|
-
if ((0,
|
|
80705
|
+
if ((0, import_variant28.isType)(appNameOptions, "Provided") && !template) {
|
|
80528
80706
|
throw new CliError({
|
|
80529
80707
|
code: CliErrorCode.AppNameArgumentIsInvalid({
|
|
80530
80708
|
errorMessage: "An application name was provided, but no template was specified. Please specify a template when defining the application name."
|
|
@@ -80537,8 +80715,8 @@ async function parseCommandOptions(targetParentFolder2, options, clients) {
|
|
|
80537
80715
|
|
|
80538
80716
|
// ../create-new-packages/app-command/src/types.ts
|
|
80539
80717
|
init_esm_shims();
|
|
80540
|
-
var
|
|
80541
|
-
var DeveloperAppsStatus = (0,
|
|
80718
|
+
var import_variant29 = __toESM(require_lib(), 1);
|
|
80719
|
+
var DeveloperAppsStatus = (0, import_variant29.variant)({
|
|
80542
80720
|
NoApps: {},
|
|
80543
80721
|
FailedLoadingApps: {},
|
|
80544
80722
|
Available: {}
|
|
@@ -80547,16 +80725,16 @@ var DeveloperAppsStatus = (0, import_variant27.variant)({
|
|
|
80547
80725
|
// ../create-new-packages/app-command/src/components/CreateAppOrExtendExisting.tsx
|
|
80548
80726
|
init_esm_shims();
|
|
80549
80727
|
var import_react106 = __toESM(require_react(), 1);
|
|
80550
|
-
var
|
|
80728
|
+
var import_variant30 = __toESM(require_lib(), 1);
|
|
80551
80729
|
var CreateAppOrExtendExisting = ({
|
|
80552
80730
|
developerAppsStatus,
|
|
80553
80731
|
onStartCreationFlow
|
|
80554
80732
|
}) => {
|
|
80555
80733
|
const { t: t3 } = useTranslation();
|
|
80556
80734
|
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
80557
|
-
const exisitingAvailabilty = (0,
|
|
80735
|
+
const exisitingAvailabilty = (0, import_variant30.match)(
|
|
80558
80736
|
developerAppsStatus,
|
|
80559
|
-
(0,
|
|
80737
|
+
(0, import_variant30.lookup)({
|
|
80560
80738
|
FailedLoadingApps: SelectOptionAvailability.Disabled({
|
|
80561
80739
|
reason: t3("create_app.create_new_or_extend.failed_fetching_apps")
|
|
80562
80740
|
}),
|
|
@@ -80594,17 +80772,530 @@ var CreateAppOrExtendExisting = ({
|
|
|
80594
80772
|
));
|
|
80595
80773
|
};
|
|
80596
80774
|
|
|
80597
|
-
// ../create-new-packages/app-command/src/components/Questions/NewAppFlow.tsx
|
|
80775
|
+
// ../create-new-packages/app-command/src/components/Questions/NewAppFlow/RegularFlow.tsx
|
|
80776
|
+
init_esm_shims();
|
|
80777
|
+
var import_react120 = __toESM(require_react(), 1);
|
|
80778
|
+
var import_variant38 = __toESM(require_lib(), 1);
|
|
80779
|
+
|
|
80780
|
+
// ../create-new-packages/app-command/src/components/ChooseAppName.tsx
|
|
80781
|
+
init_esm_shims();
|
|
80782
|
+
var import_react107 = __toESM(require_react(), 1);
|
|
80783
|
+
var ChooseAppName = ({ onSubmit }) => {
|
|
80784
|
+
const { t: t3 } = useTranslation();
|
|
80785
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
80786
|
+
return /* @__PURE__ */ import_react107.default.createElement(
|
|
80787
|
+
TextInput2,
|
|
80788
|
+
{
|
|
80789
|
+
label: t3("create_app.create_new.name_of_app.label"),
|
|
80790
|
+
placeholder: t3("create_app.create_new.name_of_app.placeholder"),
|
|
80791
|
+
validate: validateAppNameSafe,
|
|
80792
|
+
onSubmit: (appName) => {
|
|
80793
|
+
cliFlowStepAnswered({
|
|
80794
|
+
question: t3("create_app.create_new.name_of_app.label"),
|
|
80795
|
+
questionKey: "create_app.create_new.name_of_app.label",
|
|
80796
|
+
answer: appName
|
|
80797
|
+
});
|
|
80798
|
+
onSubmit(appName);
|
|
80799
|
+
},
|
|
80800
|
+
inCreateFlow: true
|
|
80801
|
+
}
|
|
80802
|
+
);
|
|
80803
|
+
};
|
|
80804
|
+
|
|
80805
|
+
// ../create-new-packages/app-command/src/components/ChoosePackageName.tsx
|
|
80806
|
+
init_esm_shims();
|
|
80807
|
+
var import_react109 = __toESM(require_react(), 1);
|
|
80808
|
+
var import_variant31 = __toESM(require_lib(), 1);
|
|
80809
|
+
import { join as join9, relative } from "node:path";
|
|
80810
|
+
var import_kebabCase3 = __toESM(require_kebabCase(), 1);
|
|
80811
|
+
|
|
80812
|
+
// ../create-new-packages/app-command/src/components/ConfirmPackagePath.tsx
|
|
80813
|
+
init_esm_shims();
|
|
80814
|
+
var import_react108 = __toESM(require_react(), 1);
|
|
80815
|
+
var ConfirmPackagePath = ({
|
|
80816
|
+
path: path4,
|
|
80817
|
+
onSubmit
|
|
80818
|
+
}) => {
|
|
80819
|
+
const { t: t3 } = useTranslation();
|
|
80820
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
80821
|
+
const [cancelled, setCancelled] = (0, import_react108.useState)(false);
|
|
80822
|
+
return /* @__PURE__ */ import_react108.default.createElement(import_react108.default.Fragment, null, /* @__PURE__ */ import_react108.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react108.default.createElement(
|
|
80823
|
+
ConfirmInput,
|
|
80824
|
+
{
|
|
80825
|
+
label: t3("create_app.confirm_path_message", {
|
|
80826
|
+
path: path4
|
|
80827
|
+
}),
|
|
80828
|
+
initialValue: true,
|
|
80829
|
+
onSubmit: (confirmation) => {
|
|
80830
|
+
cliFlowStepAnswered({
|
|
80831
|
+
question: t3("create_app.confirm_path.title"),
|
|
80832
|
+
questionKey: "create_app.confirm_path.title",
|
|
80833
|
+
answer: String(confirmation)
|
|
80834
|
+
});
|
|
80835
|
+
onSubmit(confirmation);
|
|
80836
|
+
if (!confirmation) {
|
|
80837
|
+
setCancelled(true);
|
|
80838
|
+
}
|
|
80839
|
+
}
|
|
80840
|
+
}
|
|
80841
|
+
)), cancelled && /* @__PURE__ */ import_react108.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react108.default.createElement(Text2, null, t3("create_app.confirm_path_exit_message"))));
|
|
80842
|
+
};
|
|
80843
|
+
|
|
80844
|
+
// ../create-new-packages/app-command/src/components/ChoosePackageName.tsx
|
|
80845
|
+
var ChoosePackageName = ({
|
|
80846
|
+
appName,
|
|
80847
|
+
targetParentFolder: targetParentFolder2,
|
|
80848
|
+
repoType: repoType2,
|
|
80849
|
+
onSelected
|
|
80850
|
+
}) => {
|
|
80851
|
+
const { t: t3 } = useTranslation();
|
|
80852
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
80853
|
+
const [packageName, setPackageName] = (0, import_react109.useState)();
|
|
80854
|
+
const defaultPackageName = (0, import_react109.useMemo)(() => {
|
|
80855
|
+
return (0, import_kebabCase3.default)(appName);
|
|
80856
|
+
}, [appName]);
|
|
80857
|
+
const isMonorepo = (0, import_variant31.isType)(repoType2, RepoType.Monorepo);
|
|
80858
|
+
async function validate3(packageName2) {
|
|
80859
|
+
if (!await validateDirectory(join9(targetParentFolder2, packageName2))) {
|
|
80860
|
+
return t3("validation_errors.invalid_directory");
|
|
80861
|
+
}
|
|
80862
|
+
const npmValidationErrors = await validatePackageName(packageName2);
|
|
80863
|
+
return (0, import_variant31.match)(npmValidationErrors, {
|
|
80864
|
+
Ok: () => true,
|
|
80865
|
+
Error: ({ payload: payload7 }) => t3("validation_errors.invalid_package_name", {
|
|
80866
|
+
errors: payload7.join(", ")
|
|
80867
|
+
})
|
|
80868
|
+
});
|
|
80869
|
+
}
|
|
80870
|
+
const handlePackageNameSet = (0, import_react109.useCallback)(
|
|
80871
|
+
(packageName2) => {
|
|
80872
|
+
cliFlowStepAnswered({
|
|
80873
|
+
question: t3("create_app.choose_package_name.label"),
|
|
80874
|
+
questionKey: "create_app.choose_package_name.label",
|
|
80875
|
+
answer: packageName2
|
|
80876
|
+
});
|
|
80877
|
+
if (isMonorepo) {
|
|
80878
|
+
setPackageName(packageName2);
|
|
80879
|
+
} else {
|
|
80880
|
+
onSelected(packageName2);
|
|
80881
|
+
}
|
|
80882
|
+
},
|
|
80883
|
+
[cliFlowStepAnswered, setPackageName, onSelected, isMonorepo, t3]
|
|
80884
|
+
);
|
|
80885
|
+
const handlePackagePathConfirm = (0, import_react109.useCallback)(
|
|
80886
|
+
(packageName2, isConfirmed) => {
|
|
80887
|
+
if (isConfirmed) {
|
|
80888
|
+
onSelected(packageName2);
|
|
80889
|
+
}
|
|
80890
|
+
},
|
|
80891
|
+
[onSelected]
|
|
80892
|
+
);
|
|
80893
|
+
return /* @__PURE__ */ import_react109.default.createElement(import_react109.default.Fragment, null, /* @__PURE__ */ import_react109.default.createElement(
|
|
80894
|
+
TextInput2,
|
|
80895
|
+
{
|
|
80896
|
+
label: t3("create_app.choose_package_name.label"),
|
|
80897
|
+
placeholder: defaultPackageName,
|
|
80898
|
+
onSubmit: handlePackageNameSet,
|
|
80899
|
+
validate: validate3,
|
|
80900
|
+
inCreateFlow: true
|
|
80901
|
+
}
|
|
80902
|
+
), packageName && isMonorepo && /* @__PURE__ */ import_react109.default.createElement(
|
|
80903
|
+
ConfirmPackagePath,
|
|
80904
|
+
{
|
|
80905
|
+
path: relative(
|
|
80906
|
+
repoType2.rootDir,
|
|
80907
|
+
join9(targetParentFolder2, packageName)
|
|
80908
|
+
),
|
|
80909
|
+
onSubmit: (confirmed) => handlePackagePathConfirm(packageName, confirmed)
|
|
80910
|
+
}
|
|
80911
|
+
));
|
|
80912
|
+
};
|
|
80913
|
+
|
|
80914
|
+
// ../create-new-packages/app-command/src/components/Questions/ChooseTemplateFlow.tsx
|
|
80915
|
+
init_esm_shims();
|
|
80916
|
+
var import_react112 = __toESM(require_react(), 1);
|
|
80917
|
+
|
|
80918
|
+
// ../create-new-packages/app-command/src/components/ChooseAppCreationSource.tsx
|
|
80919
|
+
init_esm_shims();
|
|
80920
|
+
var import_react110 = __toESM(require_react(), 1);
|
|
80921
|
+
var ChooseAppCreationSource = ({
|
|
80922
|
+
onSelected
|
|
80923
|
+
}) => {
|
|
80924
|
+
const { t: t3 } = useTranslation();
|
|
80925
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
80926
|
+
return /* @__PURE__ */ import_react110.default.createElement(
|
|
80927
|
+
SelectInput2,
|
|
80928
|
+
{
|
|
80929
|
+
label: t3("create_app.choose_app_creation_source.label"),
|
|
80930
|
+
options: [
|
|
80931
|
+
{
|
|
80932
|
+
title: t3("create_app.choose_app_creation_source.basic_app.title"),
|
|
80933
|
+
description: t3(
|
|
80934
|
+
"create_app.choose_app_creation_source.basic_app.description"
|
|
80935
|
+
),
|
|
80936
|
+
value: "basic"
|
|
80937
|
+
},
|
|
80938
|
+
{
|
|
80939
|
+
title: t3("create_app.choose_app_creation_source.template.title"),
|
|
80940
|
+
description: t3(
|
|
80941
|
+
"create_app.choose_app_creation_source.template.description"
|
|
80942
|
+
),
|
|
80943
|
+
value: "template"
|
|
80944
|
+
}
|
|
80945
|
+
],
|
|
80946
|
+
onSubmit: ({ value: value2 }) => {
|
|
80947
|
+
cliFlowStepAnswered({
|
|
80948
|
+
question: t3("create_app.choose_app_creation_source.label"),
|
|
80949
|
+
questionKey: "create_app.choose_app_creation_source.label",
|
|
80950
|
+
answer: value2
|
|
80951
|
+
});
|
|
80952
|
+
onSelected(value2);
|
|
80953
|
+
}
|
|
80954
|
+
}
|
|
80955
|
+
);
|
|
80956
|
+
};
|
|
80957
|
+
|
|
80958
|
+
// ../create-new-packages/app-command/src/components/ChooseTemplate.tsx
|
|
80959
|
+
init_esm_shims();
|
|
80960
|
+
var import_react111 = __toESM(require_react(), 1);
|
|
80961
|
+
var import_variant32 = __toESM(require_lib(), 1);
|
|
80962
|
+
var ChooseTemplate = ({ onSelected }) => {
|
|
80963
|
+
const { t: t3 } = useTranslation();
|
|
80964
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
80965
|
+
const { queryCliAppTemplates } = useDevCenterClient();
|
|
80966
|
+
const [isTemplateSelected, setIsTemplateSelected] = (0, import_react111.useState)(false);
|
|
80967
|
+
const { status } = useAsync2(async () => {
|
|
80968
|
+
const appTemplates = await queryCliAppTemplates();
|
|
80969
|
+
const filteredAppTemplates = appTemplates.filter(
|
|
80970
|
+
(appTemplate) => appTemplate.id !== "a033018e-233a-4ddc-8471-1151d8974866"
|
|
80971
|
+
);
|
|
80972
|
+
return {
|
|
80973
|
+
appTemplatesOptions: filteredAppTemplates.map((appTemplate) => {
|
|
80974
|
+
return {
|
|
80975
|
+
key: appTemplate.id,
|
|
80976
|
+
title: appTemplate.title,
|
|
80977
|
+
description: appTemplate.subtitle,
|
|
80978
|
+
value: appTemplate
|
|
80979
|
+
};
|
|
80980
|
+
})
|
|
80981
|
+
};
|
|
80982
|
+
}, []);
|
|
80983
|
+
return /* @__PURE__ */ import_react111.default.createElement(import_react111.default.Fragment, null, (0, import_variant32.match)(status, {
|
|
80984
|
+
Error: () => null,
|
|
80985
|
+
Loading: () => /* @__PURE__ */ import_react111.default.createElement(Spinner2, null),
|
|
80986
|
+
Success: ({ result: { appTemplatesOptions } }) => /* @__PURE__ */ import_react111.default.createElement(import_react111.default.Fragment, null, /* @__PURE__ */ import_react111.default.createElement(
|
|
80987
|
+
SelectInput2,
|
|
80988
|
+
{
|
|
80989
|
+
label: t3("create_app.choose_template.title"),
|
|
80990
|
+
options: appTemplatesOptions,
|
|
80991
|
+
onSubmit: ({ value: value2 }) => {
|
|
80992
|
+
cliFlowStepAnswered({
|
|
80993
|
+
question: t3("create_app.choose_template.title"),
|
|
80994
|
+
questionKey: "create_app.choose_template.title",
|
|
80995
|
+
answer: value2.title
|
|
80996
|
+
});
|
|
80997
|
+
setIsTemplateSelected(true);
|
|
80998
|
+
onSelected(value2);
|
|
80999
|
+
}
|
|
81000
|
+
}
|
|
81001
|
+
), !isTemplateSelected && /* @__PURE__ */ import_react111.default.createElement(Box_default, { marginTop: 1 }, /* @__PURE__ */ import_react111.default.createElement(
|
|
81002
|
+
Trans2,
|
|
81003
|
+
{
|
|
81004
|
+
i18nKey: "create_app.choose_template.see_templates",
|
|
81005
|
+
components: [
|
|
81006
|
+
/* @__PURE__ */ import_react111.default.createElement(Link, { url: "https://dev.wix.com/apps-templates?filter=cli" })
|
|
81007
|
+
]
|
|
81008
|
+
}
|
|
81009
|
+
)))
|
|
81010
|
+
}));
|
|
81011
|
+
};
|
|
81012
|
+
|
|
81013
|
+
// ../create-new-packages/app-command/src/components/Questions/ChooseTemplateFlow.tsx
|
|
81014
|
+
var ChooseTemplateFlow = ({
|
|
81015
|
+
onTemplateChoose
|
|
81016
|
+
}) => {
|
|
81017
|
+
const [shouldSelectTemplate, setShouldSelectTemplate] = (0, import_react112.useState)(false);
|
|
81018
|
+
return /* @__PURE__ */ import_react112.default.createElement(import_react112.default.Fragment, null, /* @__PURE__ */ import_react112.default.createElement(
|
|
81019
|
+
ChooseAppCreationSource,
|
|
81020
|
+
{
|
|
81021
|
+
onSelected: (source) => {
|
|
81022
|
+
if (source === "basic") {
|
|
81023
|
+
onTemplateChoose(TemplateSource.Default());
|
|
81024
|
+
} else {
|
|
81025
|
+
setShouldSelectTemplate(true);
|
|
81026
|
+
}
|
|
81027
|
+
}
|
|
81028
|
+
}
|
|
81029
|
+
), shouldSelectTemplate && /* @__PURE__ */ import_react112.default.createElement(
|
|
81030
|
+
ChooseTemplate,
|
|
81031
|
+
{
|
|
81032
|
+
onSelected: (template) => {
|
|
81033
|
+
onTemplateChoose(TemplateSource.App(template));
|
|
81034
|
+
}
|
|
81035
|
+
}
|
|
81036
|
+
));
|
|
81037
|
+
};
|
|
81038
|
+
|
|
81039
|
+
// ../create-new-packages/app-command/src/components/RegisteringApp.tsx
|
|
81040
|
+
init_esm_shims();
|
|
81041
|
+
var import_react113 = __toESM(require_react(), 1);
|
|
81042
|
+
var RegisteringApp = () => {
|
|
81043
|
+
const { t: t3 } = useTranslation();
|
|
81044
|
+
return /* @__PURE__ */ import_react113.default.createElement(Box_default, { marginTop: 1 }, /* @__PURE__ */ import_react113.default.createElement(Spinner2, { text: t3("create_app.create_new.registering_your_app") }));
|
|
81045
|
+
};
|
|
81046
|
+
|
|
81047
|
+
// ../create-new-packages/app-command/src/components/AppRegistered.tsx
|
|
81048
|
+
init_esm_shims();
|
|
81049
|
+
var import_react114 = __toESM(require_react(), 1);
|
|
81050
|
+
var AppRegistered = ({ appName }) => {
|
|
81051
|
+
return /* @__PURE__ */ import_react114.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react114.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react114.default.createElement(Badge, { skin: "success" }, /* @__PURE__ */ import_react114.default.createElement(Trans2, { i18nKey: "create_app.success" })), " ", /* @__PURE__ */ import_react114.default.createElement(
|
|
81052
|
+
Trans2,
|
|
81053
|
+
{
|
|
81054
|
+
i18nKey: "create_app.create_new.app_registered_successfully",
|
|
81055
|
+
components: [/* @__PURE__ */ import_react114.default.createElement(Text2, { bold: true })],
|
|
81056
|
+
values: { appName }
|
|
81057
|
+
}
|
|
81058
|
+
)));
|
|
81059
|
+
};
|
|
81060
|
+
|
|
81061
|
+
// ../create-new-packages/app-command/src/components/PostAppRegistration.tsx
|
|
80598
81062
|
init_esm_shims();
|
|
80599
81063
|
var import_react117 = __toESM(require_react(), 1);
|
|
81064
|
+
|
|
81065
|
+
// ../create-new-packages/app-command/src/components/ChooseCodeIdentifier.tsx
|
|
81066
|
+
init_esm_shims();
|
|
81067
|
+
var import_react115 = __toESM(require_react(), 1);
|
|
81068
|
+
var import_snakeCase = __toESM(require_snakeCase(), 1);
|
|
80600
81069
|
var import_variant33 = __toESM(require_lib(), 1);
|
|
81070
|
+
var ChooseCodeIdentifier = ({
|
|
81071
|
+
onSubmit,
|
|
81072
|
+
appId,
|
|
81073
|
+
packageName
|
|
81074
|
+
}) => {
|
|
81075
|
+
const devCenterClient = useDevCenterClient();
|
|
81076
|
+
const { t: t3 } = useTranslation();
|
|
81077
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81078
|
+
const defaultCodeIdentifier = (0, import_react115.useMemo)(
|
|
81079
|
+
() => (0, import_snakeCase.default)(packageName),
|
|
81080
|
+
[packageName]
|
|
81081
|
+
);
|
|
81082
|
+
const validationFn = useAsyncCallback3(
|
|
81083
|
+
async (_2, submitedCodeIdentifier) => {
|
|
81084
|
+
const isValid = validateCodeIdentifier(submitedCodeIdentifier);
|
|
81085
|
+
if (isValid !== true) {
|
|
81086
|
+
return isValid;
|
|
81087
|
+
}
|
|
81088
|
+
const result = await devCenterClient.setCodeIdentifier({
|
|
81089
|
+
appId,
|
|
81090
|
+
codeIdentifier: submitedCodeIdentifier
|
|
81091
|
+
});
|
|
81092
|
+
if ((0, import_variant33.isType)(result, SetCodeIdentifierResult.ShouldBeUnique)) {
|
|
81093
|
+
return `Code identifier ${submitedCodeIdentifier} is already used. Try another.`;
|
|
81094
|
+
}
|
|
81095
|
+
return true;
|
|
81096
|
+
}
|
|
81097
|
+
);
|
|
81098
|
+
return /* @__PURE__ */ import_react115.default.createElement(
|
|
81099
|
+
TextInput2,
|
|
81100
|
+
{
|
|
81101
|
+
label: t3("create_app.choose_code_identifier.label"),
|
|
81102
|
+
placeholder: t3("create_app.choose_code_identifier.placeholder", {
|
|
81103
|
+
suggested: defaultCodeIdentifier
|
|
81104
|
+
}),
|
|
81105
|
+
validate: (submitedCodeIdentifier) => validationFn.execute(submitedCodeIdentifier),
|
|
81106
|
+
onSubmit: (codeIdentifier) => {
|
|
81107
|
+
cliFlowStepAnswered({
|
|
81108
|
+
question: t3("create_app.choose_code_identifier.label"),
|
|
81109
|
+
questionKey: "create_app.choose_code_identifier.label",
|
|
81110
|
+
answer: codeIdentifier
|
|
81111
|
+
});
|
|
81112
|
+
onSubmit(codeIdentifier);
|
|
81113
|
+
},
|
|
81114
|
+
inCreateFlow: true
|
|
81115
|
+
}
|
|
81116
|
+
);
|
|
81117
|
+
};
|
|
81118
|
+
|
|
81119
|
+
// ../create-new-packages/app-command/src/components/ChooseNamespace.tsx
|
|
81120
|
+
init_esm_shims();
|
|
81121
|
+
var import_react116 = __toESM(require_react(), 1);
|
|
81122
|
+
var import_variant34 = __toESM(require_lib(), 1);
|
|
81123
|
+
var ChooseNamespace = ({
|
|
81124
|
+
onSubmit,
|
|
81125
|
+
appId,
|
|
81126
|
+
packageName
|
|
81127
|
+
}) => {
|
|
81128
|
+
const { t: t3 } = useTranslation();
|
|
81129
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81130
|
+
const devCenterClient = useDevCenterClient();
|
|
81131
|
+
const validationFn = useAsyncCallback3(
|
|
81132
|
+
async (_2, submitedNamespace) => {
|
|
81133
|
+
const isValid = validateNamespace(submitedNamespace);
|
|
81134
|
+
if (isValid !== true) {
|
|
81135
|
+
return isValid;
|
|
81136
|
+
}
|
|
81137
|
+
const result = await devCenterClient.setNamespace({
|
|
81138
|
+
appId,
|
|
81139
|
+
namespace: submitedNamespace
|
|
81140
|
+
});
|
|
81141
|
+
if ((0, import_variant34.isType)(result, SetNamespaceResult.ShouldBeUnique)) {
|
|
81142
|
+
return `Namespace ${submitedNamespace} is already used. Try another.`;
|
|
81143
|
+
}
|
|
81144
|
+
return true;
|
|
81145
|
+
}
|
|
81146
|
+
);
|
|
81147
|
+
return /* @__PURE__ */ import_react116.default.createElement(
|
|
81148
|
+
TextInput2,
|
|
81149
|
+
{
|
|
81150
|
+
label: t3("create_app.choose_namespace.label"),
|
|
81151
|
+
placeholder: t3("create_app.choose_namespace.placeholder", {
|
|
81152
|
+
suggested: packageName
|
|
81153
|
+
}),
|
|
81154
|
+
validate: (submitedNamespace) => validationFn.execute(submitedNamespace),
|
|
81155
|
+
onSubmit: (namespace) => {
|
|
81156
|
+
cliFlowStepAnswered({
|
|
81157
|
+
question: t3("create_app.choose_namespace.label"),
|
|
81158
|
+
questionKey: "create_app.choose_namespace.label",
|
|
81159
|
+
answer: namespace
|
|
81160
|
+
});
|
|
81161
|
+
onSubmit(namespace);
|
|
81162
|
+
},
|
|
81163
|
+
inCreateFlow: true
|
|
81164
|
+
}
|
|
81165
|
+
);
|
|
81166
|
+
};
|
|
81167
|
+
|
|
81168
|
+
// ../create-new-packages/app-command/src/components/PostAppRegistration.tsx
|
|
81169
|
+
var PostAppRegistration = ({ appId, packageName, onPostRegistrationComplete }) => {
|
|
81170
|
+
const [namespace, setNamespace2] = (0, import_react117.useState)();
|
|
81171
|
+
return /* @__PURE__ */ import_react117.default.createElement(import_react117.default.Fragment, null, /* @__PURE__ */ import_react117.default.createElement(
|
|
81172
|
+
ChooseNamespace,
|
|
81173
|
+
{
|
|
81174
|
+
appId,
|
|
81175
|
+
packageName,
|
|
81176
|
+
onSubmit: setNamespace2
|
|
81177
|
+
}
|
|
81178
|
+
), namespace && /* @__PURE__ */ import_react117.default.createElement(
|
|
81179
|
+
ChooseCodeIdentifier,
|
|
81180
|
+
{
|
|
81181
|
+
appId,
|
|
81182
|
+
packageName,
|
|
81183
|
+
onSubmit: onPostRegistrationComplete
|
|
81184
|
+
}
|
|
81185
|
+
));
|
|
81186
|
+
};
|
|
81187
|
+
|
|
81188
|
+
// ../create-new-packages/app-command/src/components/mcp/ConfigMcp.tsx
|
|
81189
|
+
init_esm_shims();
|
|
81190
|
+
var import_react118 = __toESM(require_react(), 1);
|
|
81191
|
+
var import_variant35 = __toESM(require_lib(), 1);
|
|
81192
|
+
var IdeForMcp = (0, import_variant35.variant)({
|
|
81193
|
+
VsCode: {},
|
|
81194
|
+
Cursor: {},
|
|
81195
|
+
ClaudeCode: {}
|
|
81196
|
+
});
|
|
81197
|
+
var ConfigMcp = ({ onSelected }) => {
|
|
81198
|
+
const { t: t3 } = useTranslation();
|
|
81199
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81200
|
+
return /* @__PURE__ */ import_react118.default.createElement(
|
|
81201
|
+
SelectInput2,
|
|
81202
|
+
{
|
|
81203
|
+
label: t3("create_app.choose_ide_for_mcp.question"),
|
|
81204
|
+
info: /* @__PURE__ */ import_react118.default.createElement(
|
|
81205
|
+
Trans2,
|
|
81206
|
+
{
|
|
81207
|
+
i18nKey: "create_app.choose_ide_for_mcp.description",
|
|
81208
|
+
components: [
|
|
81209
|
+
/* @__PURE__ */ import_react118.default.createElement(Link, { url: "https://www.wix.com/studio/developers/mcp-server" })
|
|
81210
|
+
]
|
|
81211
|
+
}
|
|
81212
|
+
),
|
|
81213
|
+
options: [
|
|
81214
|
+
{
|
|
81215
|
+
title: t3("create_app.choose_ide_for_mcp.answer.cursor"),
|
|
81216
|
+
key: "cursor",
|
|
81217
|
+
value: IdeForMcp.Cursor()
|
|
81218
|
+
},
|
|
81219
|
+
{
|
|
81220
|
+
title: t3("create_app.choose_ide_for_mcp.answer.vscode"),
|
|
81221
|
+
key: "vscode",
|
|
81222
|
+
value: IdeForMcp.VsCode()
|
|
81223
|
+
},
|
|
81224
|
+
{
|
|
81225
|
+
title: t3("create_app.choose_ide_for_mcp.answer.claude_code"),
|
|
81226
|
+
key: "claude_code",
|
|
81227
|
+
value: IdeForMcp.ClaudeCode()
|
|
81228
|
+
},
|
|
81229
|
+
{
|
|
81230
|
+
title: t3("create_app.choose_ide_for_mcp.answer.no"),
|
|
81231
|
+
key: "no",
|
|
81232
|
+
value: void 0
|
|
81233
|
+
}
|
|
81234
|
+
],
|
|
81235
|
+
onSubmit: ({ value: value2 }) => {
|
|
81236
|
+
cliFlowStepAnswered({
|
|
81237
|
+
question: t3("create_app.choose_ide_for_mcp.question"),
|
|
81238
|
+
questionKey: "create_app.choose_ide_for_mcp.question",
|
|
81239
|
+
answer: value2?.type ?? "No"
|
|
81240
|
+
});
|
|
81241
|
+
onSelected(value2);
|
|
81242
|
+
}
|
|
81243
|
+
}
|
|
81244
|
+
);
|
|
81245
|
+
};
|
|
81246
|
+
|
|
81247
|
+
// ../create-new-packages/app-command/src/components/mcp/getMcpResult.ts
|
|
81248
|
+
init_esm_shims();
|
|
81249
|
+
var import_variant36 = __toESM(require_lib(), 1);
|
|
81250
|
+
import { join as join10 } from "node:path";
|
|
81251
|
+
var McpConfigResult = (0, import_variant36.variant)({
|
|
81252
|
+
Created: (0, import_variant36.fields)(),
|
|
81253
|
+
Canceled: {}
|
|
81254
|
+
});
|
|
81255
|
+
var getMcpData = ({
|
|
81256
|
+
ideForMcp,
|
|
81257
|
+
packageFolder
|
|
81258
|
+
}) => {
|
|
81259
|
+
const mcpPath = (0, import_variant36.match)(ideForMcp, {
|
|
81260
|
+
Cursor: () => join10(packageFolder, ".cursor", "mcp.json"),
|
|
81261
|
+
VsCode: () => join10(packageFolder, ".vscode", "mcp.json"),
|
|
81262
|
+
ClaudeCode: () => join10(packageFolder, ".mcp.json")
|
|
81263
|
+
});
|
|
81264
|
+
return McpConfigResult.Created({
|
|
81265
|
+
mcpPath,
|
|
81266
|
+
ideForMcp,
|
|
81267
|
+
docsUrl: (0, import_variant36.match)(
|
|
81268
|
+
ideForMcp,
|
|
81269
|
+
(0, import_variant36.lookup)({
|
|
81270
|
+
Cursor: "https://cursor.com/docs/context/mcp",
|
|
81271
|
+
VsCode: "https://code.visualstudio.com/docs/copilot/chat/mcp-servers",
|
|
81272
|
+
ClaudeCode: "https://docs.anthropic.com/en/docs/claude-code/mcp"
|
|
81273
|
+
})
|
|
81274
|
+
)
|
|
81275
|
+
});
|
|
81276
|
+
};
|
|
81277
|
+
var getMcpResult = ({
|
|
81278
|
+
ideForMcp,
|
|
81279
|
+
targetParentFolder: targetParentFolder2,
|
|
81280
|
+
packageName
|
|
81281
|
+
}) => {
|
|
81282
|
+
const packageFolder = join10(targetParentFolder2, packageName);
|
|
81283
|
+
return ideForMcp ? getMcpData({
|
|
81284
|
+
ideForMcp,
|
|
81285
|
+
packageFolder
|
|
81286
|
+
}) : McpConfigResult.Canceled();
|
|
81287
|
+
};
|
|
81288
|
+
|
|
81289
|
+
// ../create-new-packages/app-command/src/components/Questions/useAppCreation.tsx
|
|
81290
|
+
init_esm_shims();
|
|
81291
|
+
var import_variant37 = __toESM(require_lib(), 1);
|
|
80601
81292
|
|
|
80602
81293
|
// ../backend-as-a-service-client/src/index.ts
|
|
80603
81294
|
init_esm_shims();
|
|
80604
81295
|
|
|
80605
81296
|
// ../backend-as-a-service-client/src/useBackendAsAServiceClient.ts
|
|
80606
81297
|
init_esm_shims();
|
|
80607
|
-
var
|
|
81298
|
+
var import_react119 = __toESM(require_react(), 1);
|
|
80608
81299
|
|
|
80609
81300
|
// ../backend-as-a-service-client/src/backend-as-a-service-client.ts
|
|
80610
81301
|
init_esm_shims();
|
|
@@ -81126,499 +81817,117 @@ var BackendAsAServiceClient = class {
|
|
|
81126
81817
|
}
|
|
81127
81818
|
return response.json();
|
|
81128
81819
|
},
|
|
81129
|
-
{ retries: 3 }
|
|
81130
|
-
);
|
|
81131
|
-
return StaticFileUploadSchema.parse(responseJson);
|
|
81132
|
-
} catch (e2) {
|
|
81133
|
-
throw new CliError({
|
|
81134
|
-
code: CliErrorCode.FailedToUploadStaticFiles(),
|
|
81135
|
-
cause: e2,
|
|
81136
|
-
info: { endpointUrl }
|
|
81137
|
-
});
|
|
81138
|
-
}
|
|
81139
|
-
};
|
|
81140
|
-
putBinaryFile = async (endpointUrl, fileContent, contentType) => {
|
|
81141
|
-
try {
|
|
81142
|
-
await pRetry(
|
|
81143
|
-
async () => {
|
|
81144
|
-
const response = await fetch(endpointUrl, {
|
|
81145
|
-
method: "PUT",
|
|
81146
|
-
headers: {
|
|
81147
|
-
"Content-Type": contentType
|
|
81148
|
-
},
|
|
81149
|
-
body: fileContent
|
|
81150
|
-
});
|
|
81151
|
-
if (!response.ok) {
|
|
81152
|
-
const error = await createHttpErrorFromFetch(response);
|
|
81153
|
-
throw error;
|
|
81154
|
-
}
|
|
81155
|
-
},
|
|
81156
|
-
{ retries: 3 }
|
|
81157
|
-
);
|
|
81158
|
-
} catch (e2) {
|
|
81159
|
-
throw new CliError({
|
|
81160
|
-
code: CliErrorCode.FailedToUploadStaticFiles(),
|
|
81161
|
-
cause: e2,
|
|
81162
|
-
info: { endpointUrl }
|
|
81163
|
-
});
|
|
81164
|
-
}
|
|
81165
|
-
};
|
|
81166
|
-
// Env management
|
|
81167
|
-
getAppEnvironmentByName = async (appId, environment) => {
|
|
81168
|
-
try {
|
|
81169
|
-
const { data } = await pRetry(
|
|
81170
|
-
() => this.httpClient.request(
|
|
81171
|
-
getAppEnvironmentByName({
|
|
81172
|
-
appProjectId: appId,
|
|
81173
|
-
appEnvironmentName: environment
|
|
81174
|
-
})
|
|
81175
|
-
),
|
|
81176
|
-
this.retryOptions
|
|
81177
|
-
);
|
|
81178
|
-
return AppEnvironmentSchema.parse(data).appEnvironment;
|
|
81179
|
-
} catch (e2) {
|
|
81180
|
-
throw new CliError({
|
|
81181
|
-
code: CliErrorCode.FailedToPullEnvironment(),
|
|
81182
|
-
cause: e2
|
|
81183
|
-
});
|
|
81184
|
-
}
|
|
81185
|
-
};
|
|
81186
|
-
upsertAppEnvironment = async (appId, environment, variables) => {
|
|
81187
|
-
try {
|
|
81188
|
-
const { data } = await this.httpClient.request(
|
|
81189
|
-
upsertAppEnvironment({
|
|
81190
|
-
appEnvironment: {
|
|
81191
|
-
appProjectId: appId,
|
|
81192
|
-
name: environment,
|
|
81193
|
-
variables
|
|
81194
|
-
}
|
|
81195
|
-
})
|
|
81196
|
-
);
|
|
81197
|
-
return AppEnvironmentSchema.parse(data).appEnvironment;
|
|
81198
|
-
} catch (e2) {
|
|
81199
|
-
throw new CliError({
|
|
81200
|
-
code: CliErrorCode.FailedToSetEnvironmentVariable(),
|
|
81201
|
-
cause: e2
|
|
81202
|
-
});
|
|
81203
|
-
}
|
|
81204
|
-
};
|
|
81205
|
-
removeAppEnvironmentVariable = async (appId, environment, variable) => {
|
|
81206
|
-
try {
|
|
81207
|
-
const appEnvironment = await this.getAppEnvironmentByName(
|
|
81208
|
-
appId,
|
|
81209
|
-
environment
|
|
81210
|
-
);
|
|
81211
|
-
const { data } = await pRetry(
|
|
81212
|
-
() => this.httpClient.request(
|
|
81213
|
-
removeAppEnvironmentVariables({
|
|
81214
|
-
appEnvironmentId: appEnvironment.id,
|
|
81215
|
-
appProjectId: appId,
|
|
81216
|
-
variables: [variable]
|
|
81217
|
-
})
|
|
81218
|
-
),
|
|
81219
|
-
this.retryOptions
|
|
81220
|
-
);
|
|
81221
|
-
return AppEnvironmentSchema.parse(data).appEnvironment;
|
|
81222
|
-
} catch (e2) {
|
|
81223
|
-
throw new CliError({
|
|
81224
|
-
code: CliErrorCode.FailedToRemoveEnvironmentVariable(),
|
|
81225
|
-
cause: e2
|
|
81226
|
-
});
|
|
81227
|
-
}
|
|
81228
|
-
};
|
|
81229
|
-
};
|
|
81230
|
-
|
|
81231
|
-
// ../backend-as-a-service-client/src/useBackendAsAServiceClient.ts
|
|
81232
|
-
function useBackendAsAServiceClient() {
|
|
81233
|
-
const httpClient = useHttpClient({ type: "backoffice" });
|
|
81234
|
-
const client2 = (0, import_react107.useMemo)(
|
|
81235
|
-
() => new BackendAsAServiceClient(httpClient),
|
|
81236
|
-
[httpClient]
|
|
81237
|
-
);
|
|
81238
|
-
return usePanoramaMethodLogger(client2);
|
|
81239
|
-
}
|
|
81240
|
-
|
|
81241
|
-
// ../create-new-packages/app-command/src/components/ChooseAppName.tsx
|
|
81242
|
-
init_esm_shims();
|
|
81243
|
-
var import_react108 = __toESM(require_react(), 1);
|
|
81244
|
-
var ChooseAppName = ({ onSubmit }) => {
|
|
81245
|
-
const { t: t3 } = useTranslation();
|
|
81246
|
-
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81247
|
-
return /* @__PURE__ */ import_react108.default.createElement(
|
|
81248
|
-
TextInput2,
|
|
81249
|
-
{
|
|
81250
|
-
label: t3("create_app.create_new.name_of_app.label"),
|
|
81251
|
-
placeholder: t3("create_app.create_new.name_of_app.placeholder"),
|
|
81252
|
-
validate: validateAppNameSafe,
|
|
81253
|
-
onSubmit: (appName) => {
|
|
81254
|
-
cliFlowStepAnswered({
|
|
81255
|
-
question: t3("create_app.create_new.name_of_app.label"),
|
|
81256
|
-
questionKey: "create_app.create_new.name_of_app.label",
|
|
81257
|
-
answer: appName
|
|
81258
|
-
});
|
|
81259
|
-
onSubmit(appName);
|
|
81260
|
-
},
|
|
81261
|
-
inCreateFlow: true
|
|
81262
|
-
}
|
|
81263
|
-
);
|
|
81264
|
-
};
|
|
81265
|
-
|
|
81266
|
-
// ../create-new-packages/app-command/src/components/ChoosePackageName.tsx
|
|
81267
|
-
init_esm_shims();
|
|
81268
|
-
var import_react110 = __toESM(require_react(), 1);
|
|
81269
|
-
var import_variant29 = __toESM(require_lib(), 1);
|
|
81270
|
-
import { join as join9, relative } from "node:path";
|
|
81271
|
-
var import_kebabCase3 = __toESM(require_kebabCase(), 1);
|
|
81272
|
-
|
|
81273
|
-
// ../create-new-packages/app-command/src/components/ConfirmPackagePath.tsx
|
|
81274
|
-
init_esm_shims();
|
|
81275
|
-
var import_react109 = __toESM(require_react(), 1);
|
|
81276
|
-
var ConfirmPackagePath = ({
|
|
81277
|
-
path: path4,
|
|
81278
|
-
onSubmit
|
|
81279
|
-
}) => {
|
|
81280
|
-
const { t: t3 } = useTranslation();
|
|
81281
|
-
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81282
|
-
const [cancelled, setCancelled] = (0, import_react109.useState)(false);
|
|
81283
|
-
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(
|
|
81284
|
-
ConfirmInput,
|
|
81285
|
-
{
|
|
81286
|
-
label: t3("create_app.confirm_path_message", {
|
|
81287
|
-
path: path4
|
|
81288
|
-
}),
|
|
81289
|
-
initialValue: true,
|
|
81290
|
-
onSubmit: (confirmation) => {
|
|
81291
|
-
cliFlowStepAnswered({
|
|
81292
|
-
question: t3("create_app.confirm_path.title"),
|
|
81293
|
-
questionKey: "create_app.confirm_path.title",
|
|
81294
|
-
answer: String(confirmation)
|
|
81295
|
-
});
|
|
81296
|
-
onSubmit(confirmation);
|
|
81297
|
-
if (!confirmation) {
|
|
81298
|
-
setCancelled(true);
|
|
81299
|
-
}
|
|
81300
|
-
}
|
|
81301
|
-
}
|
|
81302
|
-
)), cancelled && /* @__PURE__ */ import_react109.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react109.default.createElement(Text2, null, t3("create_app.confirm_path_exit_message"))));
|
|
81303
|
-
};
|
|
81304
|
-
|
|
81305
|
-
// ../create-new-packages/app-command/src/components/ChoosePackageName.tsx
|
|
81306
|
-
var ChoosePackageName = ({
|
|
81307
|
-
appName,
|
|
81308
|
-
targetParentFolder: targetParentFolder2,
|
|
81309
|
-
repoType: repoType2,
|
|
81310
|
-
onSelected
|
|
81311
|
-
}) => {
|
|
81312
|
-
const { t: t3 } = useTranslation();
|
|
81313
|
-
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81314
|
-
const [packageName, setPackageName] = (0, import_react110.useState)();
|
|
81315
|
-
const defaultPackageName = (0, import_react110.useMemo)(() => {
|
|
81316
|
-
return (0, import_kebabCase3.default)(appName);
|
|
81317
|
-
}, [appName]);
|
|
81318
|
-
const isMonorepo = (0, import_variant29.isType)(repoType2, RepoType.Monorepo);
|
|
81319
|
-
async function validate3(packageName2) {
|
|
81320
|
-
if (!await validateDirectory(join9(targetParentFolder2, packageName2))) {
|
|
81321
|
-
return t3("validation_errors.invalid_directory");
|
|
81322
|
-
}
|
|
81323
|
-
const npmValidationErrors = await validatePackageName(packageName2);
|
|
81324
|
-
return (0, import_variant29.match)(npmValidationErrors, {
|
|
81325
|
-
Ok: () => true,
|
|
81326
|
-
Error: ({ payload: payload7 }) => t3("validation_errors.invalid_package_name", {
|
|
81327
|
-
errors: payload7.join(", ")
|
|
81328
|
-
})
|
|
81329
|
-
});
|
|
81330
|
-
}
|
|
81331
|
-
const handlePackageNameSet = (0, import_react110.useCallback)(
|
|
81332
|
-
(packageName2) => {
|
|
81333
|
-
cliFlowStepAnswered({
|
|
81334
|
-
question: t3("create_app.choose_package_name.label"),
|
|
81335
|
-
questionKey: "create_app.choose_package_name.label",
|
|
81336
|
-
answer: packageName2
|
|
81337
|
-
});
|
|
81338
|
-
if (isMonorepo) {
|
|
81339
|
-
setPackageName(packageName2);
|
|
81340
|
-
} else {
|
|
81341
|
-
onSelected(packageName2);
|
|
81342
|
-
}
|
|
81343
|
-
},
|
|
81344
|
-
[cliFlowStepAnswered, setPackageName, onSelected, isMonorepo, t3]
|
|
81345
|
-
);
|
|
81346
|
-
const handlePackagePathConfirm = (0, import_react110.useCallback)(
|
|
81347
|
-
(packageName2, isConfirmed) => {
|
|
81348
|
-
if (isConfirmed) {
|
|
81349
|
-
onSelected(packageName2);
|
|
81350
|
-
}
|
|
81351
|
-
},
|
|
81352
|
-
[onSelected]
|
|
81353
|
-
);
|
|
81354
|
-
return /* @__PURE__ */ import_react110.default.createElement(import_react110.default.Fragment, null, /* @__PURE__ */ import_react110.default.createElement(
|
|
81355
|
-
TextInput2,
|
|
81356
|
-
{
|
|
81357
|
-
label: t3("create_app.choose_package_name.label"),
|
|
81358
|
-
placeholder: defaultPackageName,
|
|
81359
|
-
onSubmit: handlePackageNameSet,
|
|
81360
|
-
validate: validate3,
|
|
81361
|
-
inCreateFlow: true
|
|
81362
|
-
}
|
|
81363
|
-
), packageName && isMonorepo && /* @__PURE__ */ import_react110.default.createElement(
|
|
81364
|
-
ConfirmPackagePath,
|
|
81365
|
-
{
|
|
81366
|
-
path: relative(
|
|
81367
|
-
repoType2.rootDir,
|
|
81368
|
-
join9(targetParentFolder2, packageName)
|
|
81369
|
-
),
|
|
81370
|
-
onSubmit: (confirmed) => handlePackagePathConfirm(packageName, confirmed)
|
|
81371
|
-
}
|
|
81372
|
-
));
|
|
81373
|
-
};
|
|
81374
|
-
|
|
81375
|
-
// ../create-new-packages/app-command/src/components/Questions/ChooseTemplateFlow.tsx
|
|
81376
|
-
init_esm_shims();
|
|
81377
|
-
var import_react113 = __toESM(require_react(), 1);
|
|
81378
|
-
|
|
81379
|
-
// ../create-new-packages/app-command/src/components/ChooseAppCreationSource.tsx
|
|
81380
|
-
init_esm_shims();
|
|
81381
|
-
var import_react111 = __toESM(require_react(), 1);
|
|
81382
|
-
var ChooseAppCreationSource = ({
|
|
81383
|
-
onSelected
|
|
81384
|
-
}) => {
|
|
81385
|
-
const { t: t3 } = useTranslation();
|
|
81386
|
-
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81387
|
-
return /* @__PURE__ */ import_react111.default.createElement(
|
|
81388
|
-
SelectInput2,
|
|
81389
|
-
{
|
|
81390
|
-
label: t3("create_app.choose_app_creation_source.label"),
|
|
81391
|
-
options: [
|
|
81392
|
-
{
|
|
81393
|
-
title: t3("create_app.choose_app_creation_source.basic_app.title"),
|
|
81394
|
-
description: t3(
|
|
81395
|
-
"create_app.choose_app_creation_source.basic_app.description"
|
|
81396
|
-
),
|
|
81397
|
-
value: "basic"
|
|
81398
|
-
},
|
|
81399
|
-
{
|
|
81400
|
-
title: t3("create_app.choose_app_creation_source.template.title"),
|
|
81401
|
-
description: t3(
|
|
81402
|
-
"create_app.choose_app_creation_source.template.description"
|
|
81403
|
-
),
|
|
81404
|
-
value: "template"
|
|
81405
|
-
}
|
|
81406
|
-
],
|
|
81407
|
-
onSubmit: ({ value: value2 }) => {
|
|
81408
|
-
cliFlowStepAnswered({
|
|
81409
|
-
question: t3("create_app.choose_app_creation_source.label"),
|
|
81410
|
-
questionKey: "create_app.choose_app_creation_source.label",
|
|
81411
|
-
answer: value2
|
|
81412
|
-
});
|
|
81413
|
-
onSelected(value2);
|
|
81414
|
-
}
|
|
81820
|
+
{ retries: 3 }
|
|
81821
|
+
);
|
|
81822
|
+
return StaticFileUploadSchema.parse(responseJson);
|
|
81823
|
+
} catch (e2) {
|
|
81824
|
+
throw new CliError({
|
|
81825
|
+
code: CliErrorCode.FailedToUploadStaticFiles(),
|
|
81826
|
+
cause: e2,
|
|
81827
|
+
info: { endpointUrl }
|
|
81828
|
+
});
|
|
81415
81829
|
}
|
|
81416
|
-
|
|
81417
|
-
|
|
81418
|
-
|
|
81419
|
-
|
|
81420
|
-
|
|
81421
|
-
|
|
81422
|
-
|
|
81423
|
-
|
|
81424
|
-
|
|
81425
|
-
|
|
81426
|
-
|
|
81427
|
-
const [isTemplateSelected, setIsTemplateSelected] = (0, import_react112.useState)(false);
|
|
81428
|
-
const { status } = useAsync2(async () => {
|
|
81429
|
-
const appTemplates = await queryCliAppTemplates();
|
|
81430
|
-
const filteredAppTemplates = appTemplates.filter(
|
|
81431
|
-
(appTemplate) => appTemplate.id !== "a033018e-233a-4ddc-8471-1151d8974866"
|
|
81432
|
-
);
|
|
81433
|
-
return {
|
|
81434
|
-
appTemplatesOptions: filteredAppTemplates.map((appTemplate) => {
|
|
81435
|
-
return {
|
|
81436
|
-
key: appTemplate.id,
|
|
81437
|
-
title: appTemplate.title,
|
|
81438
|
-
description: appTemplate.subtitle,
|
|
81439
|
-
value: appTemplate
|
|
81440
|
-
};
|
|
81441
|
-
})
|
|
81442
|
-
};
|
|
81443
|
-
}, []);
|
|
81444
|
-
return /* @__PURE__ */ import_react112.default.createElement(import_react112.default.Fragment, null, (0, import_variant30.match)(status, {
|
|
81445
|
-
Error: () => null,
|
|
81446
|
-
Loading: () => /* @__PURE__ */ import_react112.default.createElement(Spinner2, null),
|
|
81447
|
-
Success: ({ result: { appTemplatesOptions } }) => /* @__PURE__ */ import_react112.default.createElement(import_react112.default.Fragment, null, /* @__PURE__ */ import_react112.default.createElement(
|
|
81448
|
-
SelectInput2,
|
|
81449
|
-
{
|
|
81450
|
-
label: t3("create_app.choose_template.title"),
|
|
81451
|
-
options: appTemplatesOptions,
|
|
81452
|
-
onSubmit: ({ value: value2 }) => {
|
|
81453
|
-
cliFlowStepAnswered({
|
|
81454
|
-
question: t3("create_app.choose_template.title"),
|
|
81455
|
-
questionKey: "create_app.choose_template.title",
|
|
81456
|
-
answer: value2.title
|
|
81830
|
+
};
|
|
81831
|
+
putBinaryFile = async (endpointUrl, fileContent, contentType) => {
|
|
81832
|
+
try {
|
|
81833
|
+
await pRetry(
|
|
81834
|
+
async () => {
|
|
81835
|
+
const response = await fetch(endpointUrl, {
|
|
81836
|
+
method: "PUT",
|
|
81837
|
+
headers: {
|
|
81838
|
+
"Content-Type": contentType
|
|
81839
|
+
},
|
|
81840
|
+
body: fileContent
|
|
81457
81841
|
});
|
|
81458
|
-
|
|
81459
|
-
|
|
81460
|
-
|
|
81461
|
-
|
|
81462
|
-
|
|
81463
|
-
|
|
81464
|
-
|
|
81465
|
-
|
|
81466
|
-
|
|
81467
|
-
|
|
81468
|
-
|
|
81469
|
-
|
|
81470
|
-
|
|
81471
|
-
}));
|
|
81472
|
-
};
|
|
81473
|
-
|
|
81474
|
-
// ../create-new-packages/app-command/src/components/Questions/ChooseTemplateFlow.tsx
|
|
81475
|
-
var ChooseTemplateFlow = ({
|
|
81476
|
-
onTemplateChoose
|
|
81477
|
-
}) => {
|
|
81478
|
-
const [shouldSelectTemplate, setShouldSelectTemplate] = (0, import_react113.useState)(false);
|
|
81479
|
-
return /* @__PURE__ */ import_react113.default.createElement(import_react113.default.Fragment, null, /* @__PURE__ */ import_react113.default.createElement(
|
|
81480
|
-
ChooseAppCreationSource,
|
|
81481
|
-
{
|
|
81482
|
-
onSelected: (source) => {
|
|
81483
|
-
if (source === "basic") {
|
|
81484
|
-
onTemplateChoose(TemplateSource.Default());
|
|
81485
|
-
} else {
|
|
81486
|
-
setShouldSelectTemplate(true);
|
|
81487
|
-
}
|
|
81488
|
-
}
|
|
81842
|
+
if (!response.ok) {
|
|
81843
|
+
const error = await createHttpErrorFromFetch(response);
|
|
81844
|
+
throw error;
|
|
81845
|
+
}
|
|
81846
|
+
},
|
|
81847
|
+
{ retries: 3 }
|
|
81848
|
+
);
|
|
81849
|
+
} catch (e2) {
|
|
81850
|
+
throw new CliError({
|
|
81851
|
+
code: CliErrorCode.FailedToUploadStaticFiles(),
|
|
81852
|
+
cause: e2,
|
|
81853
|
+
info: { endpointUrl }
|
|
81854
|
+
});
|
|
81489
81855
|
}
|
|
81490
|
-
|
|
81491
|
-
|
|
81492
|
-
|
|
81493
|
-
|
|
81494
|
-
|
|
81495
|
-
|
|
81856
|
+
};
|
|
81857
|
+
// Env management
|
|
81858
|
+
getAppEnvironmentByName = async (appId, environment) => {
|
|
81859
|
+
try {
|
|
81860
|
+
const { data } = await pRetry(
|
|
81861
|
+
() => this.httpClient.request(
|
|
81862
|
+
getAppEnvironmentByName({
|
|
81863
|
+
appProjectId: appId,
|
|
81864
|
+
appEnvironmentName: environment
|
|
81865
|
+
})
|
|
81866
|
+
),
|
|
81867
|
+
this.retryOptions
|
|
81868
|
+
);
|
|
81869
|
+
return AppEnvironmentSchema.parse(data).appEnvironment;
|
|
81870
|
+
} catch (e2) {
|
|
81871
|
+
throw new CliError({
|
|
81872
|
+
code: CliErrorCode.FailedToPullEnvironment(),
|
|
81873
|
+
cause: e2
|
|
81874
|
+
});
|
|
81496
81875
|
}
|
|
81497
|
-
|
|
81498
|
-
|
|
81499
|
-
|
|
81500
|
-
|
|
81501
|
-
|
|
81502
|
-
|
|
81503
|
-
|
|
81504
|
-
|
|
81505
|
-
|
|
81506
|
-
}
|
|
81507
|
-
|
|
81508
|
-
|
|
81509
|
-
|
|
81510
|
-
|
|
81511
|
-
|
|
81512
|
-
|
|
81513
|
-
|
|
81514
|
-
|
|
81515
|
-
i18nKey: "create_app.create_new.app_registered_successfully",
|
|
81516
|
-
components: [/* @__PURE__ */ import_react115.default.createElement(Text2, { bold: true })],
|
|
81517
|
-
values: { appName }
|
|
81876
|
+
};
|
|
81877
|
+
upsertAppEnvironment = async (appId, environment, variables) => {
|
|
81878
|
+
try {
|
|
81879
|
+
const { data } = await this.httpClient.request(
|
|
81880
|
+
upsertAppEnvironment({
|
|
81881
|
+
appEnvironment: {
|
|
81882
|
+
appProjectId: appId,
|
|
81883
|
+
name: environment,
|
|
81884
|
+
variables
|
|
81885
|
+
}
|
|
81886
|
+
})
|
|
81887
|
+
);
|
|
81888
|
+
return AppEnvironmentSchema.parse(data).appEnvironment;
|
|
81889
|
+
} catch (e2) {
|
|
81890
|
+
throw new CliError({
|
|
81891
|
+
code: CliErrorCode.FailedToSetEnvironmentVariable(),
|
|
81892
|
+
cause: e2
|
|
81893
|
+
});
|
|
81518
81894
|
}
|
|
81519
|
-
|
|
81520
|
-
|
|
81521
|
-
|
|
81522
|
-
|
|
81523
|
-
|
|
81524
|
-
|
|
81525
|
-
|
|
81526
|
-
|
|
81527
|
-
|
|
81528
|
-
|
|
81529
|
-
|
|
81530
|
-
|
|
81531
|
-
|
|
81532
|
-
|
|
81533
|
-
|
|
81534
|
-
|
|
81535
|
-
|
|
81536
|
-
|
|
81537
|
-
|
|
81538
|
-
|
|
81539
|
-
|
|
81540
|
-
|
|
81541
|
-
|
|
81542
|
-
components: [
|
|
81543
|
-
/* @__PURE__ */ import_react116.default.createElement(Link, { url: "https://www.wix.com/studio/developers/mcp-server" })
|
|
81544
|
-
]
|
|
81545
|
-
}
|
|
81546
|
-
),
|
|
81547
|
-
options: [
|
|
81548
|
-
{
|
|
81549
|
-
title: t3("create_app.choose_ide_for_mcp.answer.cursor"),
|
|
81550
|
-
key: "cursor",
|
|
81551
|
-
value: IdeForMcp.Cursor()
|
|
81552
|
-
},
|
|
81553
|
-
{
|
|
81554
|
-
title: t3("create_app.choose_ide_for_mcp.answer.vscode"),
|
|
81555
|
-
key: "vscode",
|
|
81556
|
-
value: IdeForMcp.VsCode()
|
|
81557
|
-
},
|
|
81558
|
-
{
|
|
81559
|
-
title: t3("create_app.choose_ide_for_mcp.answer.claude_code"),
|
|
81560
|
-
key: "claude_code",
|
|
81561
|
-
value: IdeForMcp.ClaudeCode()
|
|
81562
|
-
},
|
|
81563
|
-
{
|
|
81564
|
-
title: t3("create_app.choose_ide_for_mcp.answer.no"),
|
|
81565
|
-
key: "no",
|
|
81566
|
-
value: void 0
|
|
81567
|
-
}
|
|
81568
|
-
],
|
|
81569
|
-
onSubmit: ({ value: value2 }) => {
|
|
81570
|
-
cliFlowStepAnswered({
|
|
81571
|
-
question: t3("create_app.choose_ide_for_mcp.question"),
|
|
81572
|
-
questionKey: "create_app.choose_ide_for_mcp.question",
|
|
81573
|
-
answer: value2?.type ?? "No"
|
|
81574
|
-
});
|
|
81575
|
-
onSelected(value2);
|
|
81576
|
-
}
|
|
81895
|
+
};
|
|
81896
|
+
removeAppEnvironmentVariable = async (appId, environment, variable) => {
|
|
81897
|
+
try {
|
|
81898
|
+
const appEnvironment = await this.getAppEnvironmentByName(
|
|
81899
|
+
appId,
|
|
81900
|
+
environment
|
|
81901
|
+
);
|
|
81902
|
+
const { data } = await pRetry(
|
|
81903
|
+
() => this.httpClient.request(
|
|
81904
|
+
removeAppEnvironmentVariables({
|
|
81905
|
+
appEnvironmentId: appEnvironment.id,
|
|
81906
|
+
appProjectId: appId,
|
|
81907
|
+
variables: [variable]
|
|
81908
|
+
})
|
|
81909
|
+
),
|
|
81910
|
+
this.retryOptions
|
|
81911
|
+
);
|
|
81912
|
+
return AppEnvironmentSchema.parse(data).appEnvironment;
|
|
81913
|
+
} catch (e2) {
|
|
81914
|
+
throw new CliError({
|
|
81915
|
+
code: CliErrorCode.FailedToRemoveEnvironmentVariable(),
|
|
81916
|
+
cause: e2
|
|
81917
|
+
});
|
|
81577
81918
|
}
|
|
81578
|
-
|
|
81919
|
+
};
|
|
81579
81920
|
};
|
|
81580
81921
|
|
|
81581
|
-
// ../
|
|
81582
|
-
|
|
81583
|
-
|
|
81584
|
-
|
|
81585
|
-
|
|
81586
|
-
|
|
81587
|
-
|
|
81588
|
-
|
|
81589
|
-
|
|
81590
|
-
ideForMcp,
|
|
81591
|
-
packageFolder
|
|
81592
|
-
}) => {
|
|
81593
|
-
const mcpPath = (0, import_variant32.match)(ideForMcp, {
|
|
81594
|
-
Cursor: () => join10(packageFolder, ".cursor", "mcp.json"),
|
|
81595
|
-
VsCode: () => join10(packageFolder, ".vscode", "mcp.json"),
|
|
81596
|
-
ClaudeCode: () => join10(packageFolder, ".mcp.json")
|
|
81597
|
-
});
|
|
81598
|
-
return McpConfigResult.Created({
|
|
81599
|
-
mcpPath,
|
|
81600
|
-
ideForMcp,
|
|
81601
|
-
docsUrl: (0, import_variant32.match)(
|
|
81602
|
-
ideForMcp,
|
|
81603
|
-
(0, import_variant32.lookup)({
|
|
81604
|
-
Cursor: "https://cursor.com/docs/context/mcp",
|
|
81605
|
-
VsCode: "https://code.visualstudio.com/docs/copilot/chat/mcp-servers",
|
|
81606
|
-
ClaudeCode: "https://docs.anthropic.com/en/docs/claude-code/mcp"
|
|
81607
|
-
})
|
|
81608
|
-
)
|
|
81609
|
-
});
|
|
81610
|
-
};
|
|
81611
|
-
var getMcpResult = ({
|
|
81612
|
-
ideForMcp,
|
|
81613
|
-
targetParentFolder: targetParentFolder2,
|
|
81614
|
-
packageName
|
|
81615
|
-
}) => {
|
|
81616
|
-
const packageFolder = join10(targetParentFolder2, packageName);
|
|
81617
|
-
return ideForMcp ? getMcpData({
|
|
81618
|
-
ideForMcp,
|
|
81619
|
-
packageFolder
|
|
81620
|
-
}) : McpConfigResult.Canceled();
|
|
81621
|
-
};
|
|
81922
|
+
// ../backend-as-a-service-client/src/useBackendAsAServiceClient.ts
|
|
81923
|
+
function useBackendAsAServiceClient() {
|
|
81924
|
+
const httpClient = useHttpClient({ type: "backoffice" });
|
|
81925
|
+
const client2 = (0, import_react119.useMemo)(
|
|
81926
|
+
() => new BackendAsAServiceClient(httpClient),
|
|
81927
|
+
[httpClient]
|
|
81928
|
+
);
|
|
81929
|
+
return usePanoramaMethodLogger(client2);
|
|
81930
|
+
}
|
|
81622
81931
|
|
|
81623
81932
|
// ../create-new-packages/app-command/src/services/project-setup.ts
|
|
81624
81933
|
init_esm_shims();
|
|
@@ -81663,31 +81972,19 @@ function generateRandomSlug() {
|
|
|
81663
81972
|
return randomBytes(8).toString("hex");
|
|
81664
81973
|
}
|
|
81665
81974
|
|
|
81666
|
-
// ../create-new-packages/app-command/src/components/Questions/
|
|
81667
|
-
var
|
|
81668
|
-
onSubmit,
|
|
81669
|
-
template: templateFromOptions,
|
|
81670
|
-
appName: appNameFromOptions,
|
|
81671
|
-
targetParentFolder: targetParentFolder2,
|
|
81672
|
-
repoType: repoType2,
|
|
81673
|
-
extendAppId
|
|
81674
|
-
}) => {
|
|
81975
|
+
// ../create-new-packages/app-command/src/components/Questions/useAppCreation.tsx
|
|
81976
|
+
var useAppCreation = ({ extendAppId }) => {
|
|
81675
81977
|
const devCenterClient = useDevCenterClient();
|
|
81676
81978
|
const backendAsAServiceClient = useBackendAsAServiceClient();
|
|
81677
81979
|
const biLogger = useBiLogger();
|
|
81678
|
-
const [templateData, setTemplateData] = (0, import_react117.useState)(
|
|
81679
|
-
templateFromOptions
|
|
81680
|
-
);
|
|
81681
|
-
const [appName, setAppName] = (0, import_react117.useState)();
|
|
81682
|
-
const [packageName, setPackageName] = (0, import_react117.useState)();
|
|
81683
81980
|
const createAppCallback = useAsyncCallback3(
|
|
81684
|
-
async (_2, { appName
|
|
81685
|
-
const { id: appId } = await (0,
|
|
81981
|
+
async (_2, { appName, packageName, template, mcpConfigResult }) => {
|
|
81982
|
+
const { id: appId } = await (0, import_variant37.match)(
|
|
81686
81983
|
template,
|
|
81687
|
-
(0,
|
|
81984
|
+
(0, import_variant37.partial)({
|
|
81688
81985
|
App: ({ payload: payload7 }) => devCenterClient.createAppFromTemplate(
|
|
81689
81986
|
{
|
|
81690
|
-
name:
|
|
81987
|
+
name: appName,
|
|
81691
81988
|
templateId: payload7.id
|
|
81692
81989
|
},
|
|
81693
81990
|
payload7
|
|
@@ -81696,70 +81993,106 @@ var NewAppFlow = ({
|
|
|
81696
81993
|
if (extendAppId) {
|
|
81697
81994
|
return { id: extendAppId };
|
|
81698
81995
|
}
|
|
81699
|
-
return devCenterClient.createApp({ name:
|
|
81996
|
+
return devCenterClient.createApp({ name: appName });
|
|
81700
81997
|
}
|
|
81701
81998
|
})
|
|
81702
81999
|
);
|
|
81703
|
-
const { variables } = await createAppProjectAndEnvironment({
|
|
82000
|
+
const { variables: environmentVariables } = await createAppProjectAndEnvironment({
|
|
81704
82001
|
appId,
|
|
81705
|
-
appName
|
|
82002
|
+
appName,
|
|
81706
82003
|
devCenterClient,
|
|
81707
82004
|
backendAsAServiceClient
|
|
81708
82005
|
});
|
|
81709
82006
|
biLogger.updateDefaults({
|
|
81710
82007
|
_appId: appId
|
|
81711
82008
|
});
|
|
81712
|
-
|
|
82009
|
+
const appCreationResult = {
|
|
81713
82010
|
template,
|
|
81714
|
-
appData: { appName
|
|
81715
|
-
packageName
|
|
82011
|
+
appData: { appName, appId },
|
|
82012
|
+
packageName,
|
|
81716
82013
|
mcpConfigResult,
|
|
81717
|
-
environmentVariables
|
|
81718
|
-
});
|
|
81719
|
-
return {
|
|
81720
|
-
appId,
|
|
81721
|
-
appName: appName2
|
|
82014
|
+
environmentVariables
|
|
81722
82015
|
};
|
|
82016
|
+
return appCreationResult;
|
|
81723
82017
|
}
|
|
81724
82018
|
);
|
|
81725
|
-
|
|
81726
|
-
|
|
81727
|
-
|
|
81728
|
-
|
|
81729
|
-
|
|
81730
|
-
|
|
81731
|
-
|
|
81732
|
-
|
|
81733
|
-
|
|
82019
|
+
return createAppCallback;
|
|
82020
|
+
};
|
|
82021
|
+
|
|
82022
|
+
// ../create-new-packages/app-command/src/components/Questions/NewAppFlow/RegularFlow.tsx
|
|
82023
|
+
var NewAppFlow = ({
|
|
82024
|
+
onSubmit,
|
|
82025
|
+
template: templateFromOptions,
|
|
82026
|
+
targetParentFolder: targetParentFolder2,
|
|
82027
|
+
repoType: repoType2,
|
|
82028
|
+
extendAppId
|
|
82029
|
+
}) => {
|
|
82030
|
+
const createApp3 = useAppCreation({ extendAppId });
|
|
82031
|
+
return /* @__PURE__ */ import_react120.default.createElement(import_react120.default.Fragment, null, (0, import_variant38.isType)(repoType2, RepoType.Monorepo) ? /* @__PURE__ */ import_react120.default.createElement(
|
|
82032
|
+
MonorepoFlow,
|
|
82033
|
+
{
|
|
82034
|
+
onSubmit: createApp3.execute,
|
|
82035
|
+
template: templateFromOptions,
|
|
82036
|
+
targetParentFolder: targetParentFolder2,
|
|
82037
|
+
repoType: repoType2
|
|
81734
82038
|
}
|
|
81735
|
-
|
|
81736
|
-
|
|
82039
|
+
) : /* @__PURE__ */ import_react120.default.createElement(
|
|
82040
|
+
GeneralFlow,
|
|
82041
|
+
{
|
|
82042
|
+
onSubmit: createApp3.execute,
|
|
82043
|
+
template: templateFromOptions,
|
|
82044
|
+
targetParentFolder: targetParentFolder2,
|
|
82045
|
+
repoType: repoType2
|
|
82046
|
+
}
|
|
82047
|
+
), (0, import_variant38.match)(createApp3.status, {
|
|
82048
|
+
Error: () => null,
|
|
82049
|
+
Loading: () => /* @__PURE__ */ import_react120.default.createElement(RegisteringApp, null),
|
|
82050
|
+
Success: ({ result: appCreationData }) => {
|
|
82051
|
+
const {
|
|
82052
|
+
appData: { appId, appName },
|
|
82053
|
+
packageName
|
|
82054
|
+
} = appCreationData;
|
|
82055
|
+
return /* @__PURE__ */ import_react120.default.createElement(import_react120.default.Fragment, null, /* @__PURE__ */ import_react120.default.createElement(AppRegistered, { appId, appName }), /* @__PURE__ */ import_react120.default.createElement(
|
|
82056
|
+
PostAppRegistration,
|
|
82057
|
+
{
|
|
82058
|
+
appId,
|
|
82059
|
+
packageName,
|
|
82060
|
+
onPostRegistrationComplete: () => {
|
|
82061
|
+
onSubmit(appCreationData);
|
|
82062
|
+
}
|
|
82063
|
+
}
|
|
82064
|
+
));
|
|
82065
|
+
},
|
|
82066
|
+
NotRequested: () => null
|
|
82067
|
+
}));
|
|
82068
|
+
};
|
|
82069
|
+
var GeneralFlow = ({
|
|
82070
|
+
onSubmit,
|
|
82071
|
+
template: templateFromOptions,
|
|
82072
|
+
targetParentFolder: targetParentFolder2,
|
|
82073
|
+
repoType: repoType2
|
|
82074
|
+
}) => {
|
|
82075
|
+
const [templateData, setTemplateData] = (0, import_react120.useState)(
|
|
82076
|
+
templateFromOptions
|
|
82077
|
+
);
|
|
82078
|
+
const [appName, setAppName] = (0, import_react120.useState)();
|
|
82079
|
+
const [packageName, setPackageName] = (0, import_react120.useState)();
|
|
82080
|
+
return /* @__PURE__ */ import_react120.default.createElement(import_react120.default.Fragment, null, !templateFromOptions && /* @__PURE__ */ import_react120.default.createElement(ChooseTemplateFlow, { onTemplateChoose: setTemplateData }), templateData && /* @__PURE__ */ import_react120.default.createElement(ChooseAppName, { onSubmit: setAppName }), appName && templateData && /* @__PURE__ */ import_react120.default.createElement(
|
|
81737
82081
|
ChoosePackageName,
|
|
81738
82082
|
{
|
|
81739
82083
|
appName,
|
|
81740
82084
|
targetParentFolder: targetParentFolder2,
|
|
81741
82085
|
repoType: repoType2,
|
|
81742
|
-
onSelected:
|
|
81743
|
-
if ((0, import_variant33.isType)(repoType2, RepoType.Monorepo)) {
|
|
81744
|
-
void createAppCallback.execute({
|
|
81745
|
-
appName,
|
|
81746
|
-
packageName: userPackageName,
|
|
81747
|
-
template: templateData,
|
|
81748
|
-
mcpConfigResult: McpConfigResult.Canceled()
|
|
81749
|
-
});
|
|
81750
|
-
} else {
|
|
81751
|
-
setPackageName(userPackageName);
|
|
81752
|
-
}
|
|
81753
|
-
}
|
|
82086
|
+
onSelected: setPackageName
|
|
81754
82087
|
}
|
|
81755
|
-
), appName &&
|
|
82088
|
+
), appName && templateData && packageName && /* @__PURE__ */ import_react120.default.createElement(
|
|
81756
82089
|
ConfigMcp,
|
|
81757
82090
|
{
|
|
81758
82091
|
onSelected: (ideForMcp) => {
|
|
81759
|
-
|
|
82092
|
+
onSubmit({
|
|
82093
|
+
template: templateData,
|
|
81760
82094
|
appName,
|
|
81761
82095
|
packageName,
|
|
81762
|
-
template: templateData,
|
|
81763
82096
|
mcpConfigResult: getMcpResult({
|
|
81764
82097
|
ideForMcp,
|
|
81765
82098
|
targetParentFolder: targetParentFolder2,
|
|
@@ -81768,29 +82101,87 @@ var NewAppFlow = ({
|
|
|
81768
82101
|
});
|
|
81769
82102
|
}
|
|
81770
82103
|
}
|
|
81771
|
-
))
|
|
82104
|
+
));
|
|
82105
|
+
};
|
|
82106
|
+
var MonorepoFlow = ({
|
|
82107
|
+
onSubmit,
|
|
82108
|
+
template: templateFromOptions,
|
|
82109
|
+
targetParentFolder: targetParentFolder2,
|
|
82110
|
+
repoType: repoType2
|
|
82111
|
+
}) => {
|
|
82112
|
+
const [templateData, setTemplateData] = (0, import_react120.useState)(
|
|
82113
|
+
templateFromOptions
|
|
82114
|
+
);
|
|
82115
|
+
const [appName, setAppName] = (0, import_react120.useState)();
|
|
82116
|
+
return /* @__PURE__ */ import_react120.default.createElement(import_react120.default.Fragment, null, !templateFromOptions && /* @__PURE__ */ import_react120.default.createElement(ChooseTemplateFlow, { onTemplateChoose: setTemplateData }), templateData && /* @__PURE__ */ import_react120.default.createElement(ChooseAppName, { onSubmit: setAppName }), appName && templateData && /* @__PURE__ */ import_react120.default.createElement(
|
|
82117
|
+
ChoosePackageName,
|
|
82118
|
+
{
|
|
82119
|
+
appName,
|
|
82120
|
+
targetParentFolder: targetParentFolder2,
|
|
82121
|
+
repoType: repoType2,
|
|
82122
|
+
onSelected: (packageName) => {
|
|
82123
|
+
onSubmit({
|
|
82124
|
+
template: templateData,
|
|
82125
|
+
appName,
|
|
82126
|
+
packageName,
|
|
82127
|
+
mcpConfigResult: getMcpResult({
|
|
82128
|
+
ideForMcp: void 0,
|
|
82129
|
+
targetParentFolder: targetParentFolder2,
|
|
82130
|
+
packageName
|
|
82131
|
+
})
|
|
82132
|
+
});
|
|
82133
|
+
}
|
|
82134
|
+
}
|
|
82135
|
+
));
|
|
82136
|
+
};
|
|
82137
|
+
|
|
82138
|
+
// ../create-new-packages/app-command/src/components/Questions/NewAppFlow/AutoFlow.tsx
|
|
82139
|
+
init_esm_shims();
|
|
82140
|
+
var import_react121 = __toESM(require_react(), 1);
|
|
82141
|
+
var import_variant39 = __toESM(require_lib(), 1);
|
|
82142
|
+
var NewAppAutoFlow = ({
|
|
82143
|
+
onSubmit,
|
|
82144
|
+
template: templateFromOptions,
|
|
82145
|
+
appName: appNameFromOptions,
|
|
82146
|
+
extendAppId
|
|
82147
|
+
}) => {
|
|
82148
|
+
const createApp3 = useAppCreation({ extendAppId });
|
|
82149
|
+
useAsync2(async () => {
|
|
82150
|
+
const appCreationData = await createApp3.execute({
|
|
82151
|
+
appName: appNameFromOptions.appName,
|
|
82152
|
+
packageName: appNameFromOptions.packageName,
|
|
82153
|
+
template: templateFromOptions,
|
|
82154
|
+
mcpConfigResult: McpConfigResult.Canceled()
|
|
82155
|
+
});
|
|
82156
|
+
onSubmit(appCreationData);
|
|
82157
|
+
}, []);
|
|
82158
|
+
return (0, import_variant39.match)(createApp3.status, {
|
|
81772
82159
|
Error: () => null,
|
|
81773
|
-
Loading: () => /* @__PURE__ */
|
|
81774
|
-
Success: ({
|
|
82160
|
+
Loading: () => /* @__PURE__ */ import_react121.default.createElement(RegisteringApp, null),
|
|
82161
|
+
Success: ({
|
|
82162
|
+
result: {
|
|
82163
|
+
appData: { appId, appName }
|
|
82164
|
+
}
|
|
82165
|
+
}) => /* @__PURE__ */ import_react121.default.createElement(AppRegistered, { appId, appName }),
|
|
81775
82166
|
NotRequested: () => null
|
|
81776
|
-
})
|
|
82167
|
+
});
|
|
81777
82168
|
};
|
|
81778
82169
|
|
|
81779
82170
|
// ../create-new-packages/app-command/src/components/Questions/ExistingAppFlow.tsx
|
|
81780
82171
|
init_esm_shims();
|
|
81781
|
-
var
|
|
81782
|
-
var
|
|
82172
|
+
var import_react123 = __toESM(require_react(), 1);
|
|
82173
|
+
var import_variant40 = __toESM(require_lib(), 1);
|
|
81783
82174
|
|
|
81784
82175
|
// ../create-new-packages/app-command/src/components/ExtendExistingApp.tsx
|
|
81785
82176
|
init_esm_shims();
|
|
81786
|
-
var
|
|
82177
|
+
var import_react122 = __toESM(require_react(), 1);
|
|
81787
82178
|
var ExtendExistingApp = ({
|
|
81788
82179
|
developerApps,
|
|
81789
82180
|
onSelected
|
|
81790
82181
|
}) => {
|
|
81791
82182
|
const { t: t3 } = useTranslation();
|
|
81792
82183
|
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81793
|
-
return /* @__PURE__ */
|
|
82184
|
+
return /* @__PURE__ */ import_react122.default.createElement(
|
|
81794
82185
|
SelectInput2,
|
|
81795
82186
|
{
|
|
81796
82187
|
label: t3("create_app.extend_existing.select_app.label"),
|
|
@@ -81828,7 +82219,7 @@ var ExistingAppFlow = ({
|
|
|
81828
82219
|
const backendAsAServiceClient = useBackendAsAServiceClient();
|
|
81829
82220
|
const biLogger = useBiLogger();
|
|
81830
82221
|
const { t: t3 } = useTranslation();
|
|
81831
|
-
const [appData, setAppData] = (0,
|
|
82222
|
+
const [appData, setAppData] = (0, import_react123.useState)();
|
|
81832
82223
|
const registerAppCallback = useAsyncCallback3(
|
|
81833
82224
|
async (_2, { appData: appData2, packageName }) => {
|
|
81834
82225
|
const { variables } = await createAppProjectAndEnvironment({
|
|
@@ -81846,7 +82237,7 @@ var ExistingAppFlow = ({
|
|
|
81846
82237
|
});
|
|
81847
82238
|
}
|
|
81848
82239
|
);
|
|
81849
|
-
return /* @__PURE__ */
|
|
82240
|
+
return /* @__PURE__ */ import_react123.default.createElement(import_react123.default.Fragment, null, /* @__PURE__ */ import_react123.default.createElement(
|
|
81850
82241
|
ExtendExistingApp,
|
|
81851
82242
|
{
|
|
81852
82243
|
developerApps,
|
|
@@ -81857,7 +82248,7 @@ var ExistingAppFlow = ({
|
|
|
81857
82248
|
setAppData(appData2);
|
|
81858
82249
|
}
|
|
81859
82250
|
}
|
|
81860
|
-
), appData && /* @__PURE__ */
|
|
82251
|
+
), appData && /* @__PURE__ */ import_react123.default.createElement(
|
|
81861
82252
|
ChoosePackageName,
|
|
81862
82253
|
{
|
|
81863
82254
|
appName: appData.appName,
|
|
@@ -81870,9 +82261,9 @@ var ExistingAppFlow = ({
|
|
|
81870
82261
|
});
|
|
81871
82262
|
}
|
|
81872
82263
|
}
|
|
81873
|
-
), (0,
|
|
82264
|
+
), (0, import_variant40.match)(registerAppCallback.status, {
|
|
81874
82265
|
Error: () => null,
|
|
81875
|
-
Loading: () => /* @__PURE__ */
|
|
82266
|
+
Loading: () => /* @__PURE__ */ import_react123.default.createElement(Box_default, { marginTop: 1 }, /* @__PURE__ */ import_react123.default.createElement(Spinner2, { text: t3("create_app.extend_existing.get_project") })),
|
|
81876
82267
|
Success: () => null,
|
|
81877
82268
|
NotRequested: () => null
|
|
81878
82269
|
}));
|
|
@@ -81880,45 +82271,45 @@ var ExistingAppFlow = ({
|
|
|
81880
82271
|
|
|
81881
82272
|
// ../create-new-packages/app-command/src/components/StartFromTemplateMessage.tsx
|
|
81882
82273
|
init_esm_shims();
|
|
81883
|
-
var
|
|
81884
|
-
var
|
|
82274
|
+
var import_react124 = __toESM(require_react(), 1);
|
|
82275
|
+
var import_variant41 = __toESM(require_lib(), 1);
|
|
81885
82276
|
var StartFromTemplateMessage = ({
|
|
81886
82277
|
template
|
|
81887
82278
|
}) => {
|
|
81888
|
-
const messageComponent = (0,
|
|
81889
|
-
App: ({ payload: payload7 }) => /* @__PURE__ */
|
|
82279
|
+
const messageComponent = (0, import_variant41.match)(template, {
|
|
82280
|
+
App: ({ payload: payload7 }) => /* @__PURE__ */ import_react124.default.createElement(
|
|
81890
82281
|
Trans2,
|
|
81891
82282
|
{
|
|
81892
82283
|
i18nKey: "create_app.template_is_set_from_options.template_id",
|
|
81893
82284
|
values: {
|
|
81894
82285
|
templateName: payload7.title
|
|
81895
82286
|
},
|
|
81896
|
-
components: [/* @__PURE__ */
|
|
82287
|
+
components: [/* @__PURE__ */ import_react124.default.createElement(Text2, { bold: true })]
|
|
81897
82288
|
}
|
|
81898
82289
|
),
|
|
81899
|
-
GitRepo: ({ url }) => /* @__PURE__ */
|
|
82290
|
+
GitRepo: ({ url }) => /* @__PURE__ */ import_react124.default.createElement(
|
|
81900
82291
|
Trans2,
|
|
81901
82292
|
{
|
|
81902
82293
|
i18nKey: "create_app.template_is_set_from_options.git_repository",
|
|
81903
82294
|
values: {
|
|
81904
82295
|
templateRepoUrl: url
|
|
81905
82296
|
},
|
|
81906
|
-
components: [/* @__PURE__ */
|
|
82297
|
+
components: [/* @__PURE__ */ import_react124.default.createElement(Text2, { bold: true })]
|
|
81907
82298
|
}
|
|
81908
82299
|
),
|
|
81909
|
-
Local: ({ path: path4 }) => /* @__PURE__ */
|
|
82300
|
+
Local: ({ path: path4 }) => /* @__PURE__ */ import_react124.default.createElement(
|
|
81910
82301
|
Trans2,
|
|
81911
82302
|
{
|
|
81912
82303
|
i18nKey: "create_app.template_is_set_from_options.local",
|
|
81913
82304
|
values: {
|
|
81914
82305
|
templatePath: path4
|
|
81915
82306
|
},
|
|
81916
|
-
components: [/* @__PURE__ */
|
|
82307
|
+
components: [/* @__PURE__ */ import_react124.default.createElement(Text2, { bold: true })]
|
|
81917
82308
|
}
|
|
81918
82309
|
),
|
|
81919
82310
|
Default: () => null
|
|
81920
82311
|
});
|
|
81921
|
-
return /* @__PURE__ */
|
|
82312
|
+
return /* @__PURE__ */ import_react124.default.createElement(Box_default, { marginBottom: 1 }, messageComponent);
|
|
81922
82313
|
};
|
|
81923
82314
|
|
|
81924
82315
|
// ../create-new-packages/app-command/src/components/Questions/Questions.tsx
|
|
@@ -81932,7 +82323,7 @@ var Questions = ({
|
|
|
81932
82323
|
const devCenterClient = useDevCenterClient();
|
|
81933
82324
|
const { reportError: reportError2 } = useErrorReporter();
|
|
81934
82325
|
const { getDeveloperApps } = useDevCenterClient();
|
|
81935
|
-
const [appCreationFlow, setAppCreationFlow] = (0,
|
|
82326
|
+
const [appCreationFlow, setAppCreationFlow] = (0, import_react125.useState)();
|
|
81936
82327
|
const { status } = useAsync2(async () => {
|
|
81937
82328
|
const { template, appName } = await parseCommandOptions(
|
|
81938
82329
|
targetParentFolder2,
|
|
@@ -81963,27 +82354,34 @@ var Questions = ({
|
|
|
81963
82354
|
};
|
|
81964
82355
|
}
|
|
81965
82356
|
}, []);
|
|
81966
|
-
return (0,
|
|
82357
|
+
return (0, import_variant42.match)(status, {
|
|
81967
82358
|
Error: () => null,
|
|
81968
|
-
Loading: () => /* @__PURE__ */
|
|
82359
|
+
Loading: () => /* @__PURE__ */ import_react125.default.createElement(Spinner2, { text: t3("general.loading") }),
|
|
81969
82360
|
Success: ({
|
|
81970
82361
|
result: { template, appName, developerApps, developerAppsStatus }
|
|
81971
82362
|
}) => {
|
|
81972
82363
|
if (template) {
|
|
81973
|
-
return /* @__PURE__ */
|
|
82364
|
+
return /* @__PURE__ */ import_react125.default.createElement(import_react125.default.Fragment, null, /* @__PURE__ */ import_react125.default.createElement(StartFromTemplateMessage, { template }), (0, import_variant42.isType)(appName, AppNameOptions.Provided) ? /* @__PURE__ */ import_react125.default.createElement(
|
|
82365
|
+
NewAppAutoFlow,
|
|
82366
|
+
{
|
|
82367
|
+
extendAppId: commandOptions.extendAppId,
|
|
82368
|
+
appName,
|
|
82369
|
+
onSubmit,
|
|
82370
|
+
template
|
|
82371
|
+
}
|
|
82372
|
+
) : /* @__PURE__ */ import_react125.default.createElement(
|
|
81974
82373
|
NewAppFlow,
|
|
81975
82374
|
{
|
|
81976
82375
|
onSubmit,
|
|
81977
|
-
template,
|
|
81978
82376
|
extendAppId: commandOptions.extendAppId,
|
|
81979
|
-
|
|
82377
|
+
template,
|
|
81980
82378
|
targetParentFolder: targetParentFolder2,
|
|
81981
82379
|
repoType: repoType2
|
|
81982
82380
|
}
|
|
81983
82381
|
));
|
|
81984
82382
|
}
|
|
81985
|
-
if ((0,
|
|
81986
|
-
return /* @__PURE__ */
|
|
82383
|
+
if ((0, import_variant42.isType)(developerAppsStatus, "NoApps")) {
|
|
82384
|
+
return /* @__PURE__ */ import_react125.default.createElement(
|
|
81987
82385
|
NewAppFlow,
|
|
81988
82386
|
{
|
|
81989
82387
|
onSubmit,
|
|
@@ -81992,20 +82390,20 @@ var Questions = ({
|
|
|
81992
82390
|
}
|
|
81993
82391
|
);
|
|
81994
82392
|
}
|
|
81995
|
-
return /* @__PURE__ */
|
|
82393
|
+
return /* @__PURE__ */ import_react125.default.createElement(import_react125.default.Fragment, null, /* @__PURE__ */ import_react125.default.createElement(
|
|
81996
82394
|
CreateAppOrExtendExisting,
|
|
81997
82395
|
{
|
|
81998
82396
|
developerAppsStatus,
|
|
81999
82397
|
onStartCreationFlow: setAppCreationFlow
|
|
82000
82398
|
}
|
|
82001
|
-
), appCreationFlow === "new" && /* @__PURE__ */
|
|
82399
|
+
), appCreationFlow === "new" && /* @__PURE__ */ import_react125.default.createElement(
|
|
82002
82400
|
NewAppFlow,
|
|
82003
82401
|
{
|
|
82004
82402
|
onSubmit,
|
|
82005
82403
|
targetParentFolder: targetParentFolder2,
|
|
82006
82404
|
repoType: repoType2
|
|
82007
82405
|
}
|
|
82008
|
-
), appCreationFlow === "existing" && /* @__PURE__ */
|
|
82406
|
+
), appCreationFlow === "existing" && /* @__PURE__ */ import_react125.default.createElement(
|
|
82009
82407
|
ExistingAppFlow,
|
|
82010
82408
|
{
|
|
82011
82409
|
developerApps,
|
|
@@ -82020,7 +82418,7 @@ var Questions = ({
|
|
|
82020
82418
|
|
|
82021
82419
|
// ../create-new-packages/app-command/src/tasks.ts
|
|
82022
82420
|
init_esm_shims();
|
|
82023
|
-
var
|
|
82421
|
+
var import_variant43 = __toESM(require_lib(), 1);
|
|
82024
82422
|
import { mkdir } from "node:fs/promises";
|
|
82025
82423
|
import { join as join12 } from "node:path";
|
|
82026
82424
|
|
|
@@ -82101,7 +82499,7 @@ function getTasks({
|
|
|
82101
82499
|
cause: e2
|
|
82102
82500
|
});
|
|
82103
82501
|
}
|
|
82104
|
-
const { generateApp } = await import("./generator-
|
|
82502
|
+
const { generateApp } = await import("./generator-D63KTZEK.js");
|
|
82105
82503
|
await generateApp({
|
|
82106
82504
|
packageName,
|
|
82107
82505
|
packageFolder,
|
|
@@ -82110,7 +82508,7 @@ function getTasks({
|
|
|
82110
82508
|
repoType: repoType2,
|
|
82111
82509
|
template,
|
|
82112
82510
|
templateParams,
|
|
82113
|
-
ideForMcp: (0,
|
|
82511
|
+
ideForMcp: (0, import_variant43.match)(mcpConfigResult, {
|
|
82114
82512
|
Created: ({ ideForMcp }) => ideForMcp,
|
|
82115
82513
|
Canceled: () => {
|
|
82116
82514
|
}
|
|
@@ -82208,7 +82606,7 @@ function getTasks({
|
|
|
82208
82606
|
successText: agentConfigsTaskText.successText
|
|
82209
82607
|
};
|
|
82210
82608
|
const optionalInstallAndAgentsTask = skipInstall ? [] : [installDependenciesTask, addWixSkillsTask, generateAgentConfigsTask];
|
|
82211
|
-
return (0,
|
|
82609
|
+
return (0, import_variant43.match)(repoType2, {
|
|
82212
82610
|
None: () => [
|
|
82213
82611
|
generateProjectTask,
|
|
82214
82612
|
...skipGit ? [] : [initializeGitTask],
|
|
@@ -82222,10 +82620,10 @@ function getTasks({
|
|
|
82222
82620
|
|
|
82223
82621
|
// ../create-new-packages/app-command/src/components/FinishedSuccessfullyMessage.tsx
|
|
82224
82622
|
init_esm_shims();
|
|
82225
|
-
var
|
|
82623
|
+
var import_react126 = __toESM(require_react(), 1);
|
|
82226
82624
|
var FinishedSuccessfullyMessage = ({ packageName, appData: { appName, appId }, packageManager: packageManager2 }) => {
|
|
82227
82625
|
const { t: t3 } = useTranslation();
|
|
82228
|
-
return /* @__PURE__ */
|
|
82626
|
+
return /* @__PURE__ */ import_react126.default.createElement(
|
|
82229
82627
|
Box_default,
|
|
82230
82628
|
{
|
|
82231
82629
|
borderColor: "blue",
|
|
@@ -82237,22 +82635,22 @@ var FinishedSuccessfullyMessage = ({ packageName, appData: { appName, appId }, p
|
|
|
82237
82635
|
marginLeft: -2,
|
|
82238
82636
|
marginBottom: 1
|
|
82239
82637
|
},
|
|
82240
|
-
/* @__PURE__ */
|
|
82241
|
-
/* @__PURE__ */
|
|
82638
|
+
/* @__PURE__ */ import_react126.default.createElement(Box_default, { marginTop: -2, marginLeft: -4 }, /* @__PURE__ */ import_react126.default.createElement(Text2, { skin: "question", bold: true }, t3("create_app.results"), " ")),
|
|
82639
|
+
/* @__PURE__ */ import_react126.default.createElement(Text2, null, /* @__PURE__ */ import_react126.default.createElement(
|
|
82242
82640
|
Trans2,
|
|
82243
82641
|
{
|
|
82244
82642
|
i18nKey: "create_app.generate_project.finished.ready_to_start",
|
|
82245
|
-
components: [/* @__PURE__ */
|
|
82643
|
+
components: [/* @__PURE__ */ import_react126.default.createElement(Text2, { bold: true })],
|
|
82246
82644
|
values: { appName }
|
|
82247
82645
|
}
|
|
82248
82646
|
)),
|
|
82249
|
-
/* @__PURE__ */
|
|
82250
|
-
/* @__PURE__ */
|
|
82647
|
+
/* @__PURE__ */ import_react126.default.createElement(Text2, { bold: true }, t3("create_app.generate_project.finished.next_steps")),
|
|
82648
|
+
/* @__PURE__ */ import_react126.default.createElement(UnorderedList, { gap: 1 }, /* @__PURE__ */ import_react126.default.createElement(UnorderedList.Item, { marker: "\u{1F45F}" }, /* @__PURE__ */ import_react126.default.createElement(Text2, null, t3("create_app.generate_project.finished.run_local_development")), /* @__PURE__ */ import_react126.default.createElement(Text2, { skin: "info" }, `cd ${packageName}`), /* @__PURE__ */ import_react126.default.createElement(Text2, { skin: "info" }, `${packageManager2.getRunCmd()} dev`)), /* @__PURE__ */ import_react126.default.createElement(UnorderedList.Item, { marker: "\u{1F3AF}" }, /* @__PURE__ */ import_react126.default.createElement(Text2, null, t3("create_app.generate_project.finished.generate_extensions")), /* @__PURE__ */ import_react126.default.createElement(Text2, { skin: "info" }, `${packageManager2.getRunCmd()} generate`)), /* @__PURE__ */ import_react126.default.createElement(UnorderedList.Item, { marker: "\u{1F91D}" }, /* @__PURE__ */ import_react126.default.createElement(
|
|
82251
82649
|
Trans2,
|
|
82252
82650
|
{
|
|
82253
82651
|
i18nKey: "create_app.create_new.app_on_dev_center",
|
|
82254
82652
|
components: [
|
|
82255
|
-
/* @__PURE__ */
|
|
82653
|
+
/* @__PURE__ */ import_react126.default.createElement(
|
|
82256
82654
|
Link,
|
|
82257
82655
|
{
|
|
82258
82656
|
skin: "info",
|
|
@@ -82261,12 +82659,12 @@ var FinishedSuccessfullyMessage = ({ packageName, appData: { appName, appId }, p
|
|
|
82261
82659
|
)
|
|
82262
82660
|
]
|
|
82263
82661
|
}
|
|
82264
|
-
)), /* @__PURE__ */
|
|
82662
|
+
)), /* @__PURE__ */ import_react126.default.createElement(UnorderedList.Item, { marker: /* @__PURE__ */ import_react126.default.createElement(Learn, null) }, /* @__PURE__ */ import_react126.default.createElement(
|
|
82265
82663
|
Trans2,
|
|
82266
82664
|
{
|
|
82267
82665
|
i18nKey: "create_app.generate_project.finished.visit_docs",
|
|
82268
82666
|
components: [
|
|
82269
|
-
/* @__PURE__ */
|
|
82667
|
+
/* @__PURE__ */ import_react126.default.createElement(
|
|
82270
82668
|
Link,
|
|
82271
82669
|
{
|
|
82272
82670
|
skin: "info",
|
|
@@ -82275,12 +82673,12 @@ var FinishedSuccessfullyMessage = ({ packageName, appData: { appName, appId }, p
|
|
|
82275
82673
|
)
|
|
82276
82674
|
]
|
|
82277
82675
|
}
|
|
82278
|
-
)), /* @__PURE__ */
|
|
82676
|
+
)), /* @__PURE__ */ import_react126.default.createElement(UnorderedList.Item, { marker: "\u{1F4AC}" }, /* @__PURE__ */ import_react126.default.createElement(
|
|
82279
82677
|
Trans2,
|
|
82280
82678
|
{
|
|
82281
82679
|
i18nKey: "create_app.generate_project.finished.join_community",
|
|
82282
82680
|
components: [
|
|
82283
|
-
/* @__PURE__ */
|
|
82681
|
+
/* @__PURE__ */ import_react126.default.createElement(Link, { skin: "info", url: "https://discord.gg/wixstudio" })
|
|
82284
82682
|
]
|
|
82285
82683
|
}
|
|
82286
82684
|
)))
|
|
@@ -82289,23 +82687,23 @@ var FinishedSuccessfullyMessage = ({ packageName, appData: { appName, appId }, p
|
|
|
82289
82687
|
|
|
82290
82688
|
// ../create-new-packages/app-command/src/components/TaskList.tsx
|
|
82291
82689
|
init_esm_shims();
|
|
82292
|
-
var
|
|
82690
|
+
var import_react127 = __toESM(require_react(), 1);
|
|
82293
82691
|
var TaskList = ({ tasks, totalTaskCount }) => {
|
|
82294
|
-
return /* @__PURE__ */
|
|
82692
|
+
return /* @__PURE__ */ import_react127.default.createElement(import_react127.default.Fragment, null, tasks.map((task, index) => {
|
|
82295
82693
|
const stepper = `[${index + 1}/${totalTaskCount}]`;
|
|
82296
82694
|
const fullText = `${stepper} ${task.text}`;
|
|
82297
82695
|
if (task.status === "running") {
|
|
82298
|
-
return /* @__PURE__ */
|
|
82696
|
+
return /* @__PURE__ */ import_react127.default.createElement(Spinner2, { key: index, text: fullText });
|
|
82299
82697
|
}
|
|
82300
|
-
return /* @__PURE__ */
|
|
82698
|
+
return /* @__PURE__ */ import_react127.default.createElement(Alert, { key: index, type: "success" }, fullText);
|
|
82301
82699
|
}));
|
|
82302
82700
|
};
|
|
82303
82701
|
|
|
82304
82702
|
// ../create-new-packages/app-command/src/task-runner.ts
|
|
82305
82703
|
init_esm_shims();
|
|
82306
|
-
var
|
|
82307
|
-
var
|
|
82308
|
-
var TaskRunnerStatus = (0,
|
|
82704
|
+
var import_react128 = __toESM(require_react(), 1);
|
|
82705
|
+
var import_variant44 = __toESM(require_lib(), 1);
|
|
82706
|
+
var TaskRunnerStatus = (0, import_variant44.variant)({
|
|
82309
82707
|
Idle: {},
|
|
82310
82708
|
Running: (runningTasks, totalTaskCount) => {
|
|
82311
82709
|
const taskStatuses = runningTasks.map((task, index) => {
|
|
@@ -82329,7 +82727,7 @@ var TaskRunnerStatus = (0, import_variant38.variant)({
|
|
|
82329
82727
|
}
|
|
82330
82728
|
});
|
|
82331
82729
|
function useTaskRunner() {
|
|
82332
|
-
const [status, setStatus] = (0,
|
|
82730
|
+
const [status, setStatus] = (0, import_react128.useState)(
|
|
82333
82731
|
TaskRunnerStatus.Idle()
|
|
82334
82732
|
);
|
|
82335
82733
|
const { execute } = useAsyncCallback3(async (_2, tasks) => {
|
|
@@ -82349,23 +82747,23 @@ function useTaskRunner() {
|
|
|
82349
82747
|
|
|
82350
82748
|
// ../create-new-packages/app-command/src/components/mcp/McpConfigCreated.tsx
|
|
82351
82749
|
init_esm_shims();
|
|
82352
|
-
var
|
|
82750
|
+
var import_react129 = __toESM(require_react(), 1);
|
|
82353
82751
|
var McpConfigCreated = ({
|
|
82354
82752
|
mcpPath,
|
|
82355
82753
|
docsUrl
|
|
82356
82754
|
}) => {
|
|
82357
|
-
return /* @__PURE__ */
|
|
82755
|
+
return /* @__PURE__ */ import_react129.default.createElement(Box_default, { flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ import_react129.default.createElement(Box_default, { marginLeft: -2 }, /* @__PURE__ */ import_react129.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react129.default.createElement(Badge, { skin: "success" }, /* @__PURE__ */ import_react129.default.createElement(Trans2, { i18nKey: "create_app.mcp_config_created_badge" })), " ")), /* @__PURE__ */ import_react129.default.createElement(Box_default, { marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ import_react129.default.createElement(Text2, null, /* @__PURE__ */ import_react129.default.createElement(
|
|
82358
82756
|
Trans2,
|
|
82359
82757
|
{
|
|
82360
82758
|
i18nKey: "create_app.mcp_config_created_1",
|
|
82361
|
-
components: [/* @__PURE__ */
|
|
82759
|
+
components: [/* @__PURE__ */ import_react129.default.createElement(Text2, { bold: true })],
|
|
82362
82760
|
values: { mcpPath }
|
|
82363
82761
|
}
|
|
82364
|
-
)), /* @__PURE__ */
|
|
82762
|
+
)), /* @__PURE__ */ import_react129.default.createElement(Text2, null, /* @__PURE__ */ import_react129.default.createElement(Trans2, { i18nKey: "create_app.mcp_config_created_2" })), /* @__PURE__ */ import_react129.default.createElement(Text2, null, /* @__PURE__ */ import_react129.default.createElement(
|
|
82365
82763
|
Trans2,
|
|
82366
82764
|
{
|
|
82367
82765
|
i18nKey: "create_app.mcp_config_created_3",
|
|
82368
|
-
components: [/* @__PURE__ */
|
|
82766
|
+
components: [/* @__PURE__ */ import_react129.default.createElement(Link, { skin: "info", url: docsUrl })]
|
|
82369
82767
|
}
|
|
82370
82768
|
))));
|
|
82371
82769
|
};
|
|
@@ -82373,7 +82771,7 @@ var McpConfigCreated = ({
|
|
|
82373
82771
|
// ../create-new-packages/app-command/src/components/CreateAppCommand.tsx
|
|
82374
82772
|
var GenerationProgress = ({ tasks, totalTaskCount }) => {
|
|
82375
82773
|
const { t: t3 } = useTranslation();
|
|
82376
|
-
return /* @__PURE__ */
|
|
82774
|
+
return /* @__PURE__ */ import_react130.default.createElement(import_react130.default.Fragment, null, /* @__PURE__ */ import_react130.default.createElement(Box_default, { marginBottom: 1, marginTop: 1 }, /* @__PURE__ */ import_react130.default.createElement(Text2, null, t3("create_app.generate_project.generating_project"))), /* @__PURE__ */ import_react130.default.createElement(Box_default, { marginBottom: 1, flexDirection: "column" }, /* @__PURE__ */ import_react130.default.createElement(TaskList, { tasks, totalTaskCount })));
|
|
82377
82775
|
};
|
|
82378
82776
|
var CreateAppCommand = ({
|
|
82379
82777
|
userInfo: userInfo2,
|
|
@@ -82384,13 +82782,13 @@ var CreateAppCommand = ({
|
|
|
82384
82782
|
}) => {
|
|
82385
82783
|
const { t: t3 } = useTranslation();
|
|
82386
82784
|
const { execute: executeTaskRunner, status: taskRunnerStatus } = useTaskRunner();
|
|
82387
|
-
const [generationData, setGenerationData] = (0,
|
|
82785
|
+
const [generationData, setGenerationData] = (0, import_react130.useState)();
|
|
82388
82786
|
async function runTasks(data) {
|
|
82389
82787
|
setGenerationData(data);
|
|
82390
82788
|
const tasks = getTasks(data, t3);
|
|
82391
82789
|
await executeTaskRunner(tasks);
|
|
82392
82790
|
}
|
|
82393
|
-
return /* @__PURE__ */
|
|
82791
|
+
return /* @__PURE__ */ import_react130.default.createElement(
|
|
82394
82792
|
Box_default,
|
|
82395
82793
|
{
|
|
82396
82794
|
flexDirection: "column",
|
|
@@ -82401,8 +82799,8 @@ var CreateAppCommand = ({
|
|
|
82401
82799
|
borderTop: false,
|
|
82402
82800
|
paddingLeft: 1
|
|
82403
82801
|
},
|
|
82404
|
-
/* @__PURE__ */
|
|
82405
|
-
/* @__PURE__ */
|
|
82802
|
+
/* @__PURE__ */ import_react130.default.createElement(WelcomeMessage, null),
|
|
82803
|
+
/* @__PURE__ */ import_react130.default.createElement(AuthProvider2, { userInfo: userInfo2 }, /* @__PURE__ */ import_react130.default.createElement(
|
|
82406
82804
|
Questions,
|
|
82407
82805
|
{
|
|
82408
82806
|
repoType: repoType2,
|
|
@@ -82419,13 +82817,13 @@ var CreateAppCommand = ({
|
|
|
82419
82817
|
})
|
|
82420
82818
|
}
|
|
82421
82819
|
)),
|
|
82422
|
-
generationData && (0,
|
|
82820
|
+
generationData && (0, import_variant45.match)(taskRunnerStatus, {
|
|
82423
82821
|
Idle: () => null,
|
|
82424
|
-
Running: (status) => /* @__PURE__ */
|
|
82425
|
-
Done: (status) => /* @__PURE__ */
|
|
82426
|
-
Created: ({ mcpPath, docsUrl }) => /* @__PURE__ */
|
|
82822
|
+
Running: (status) => /* @__PURE__ */ import_react130.default.createElement(GenerationProgress, { ...status }),
|
|
82823
|
+
Done: (status) => /* @__PURE__ */ import_react130.default.createElement(import_react130.default.Fragment, null, /* @__PURE__ */ import_react130.default.createElement(GenerationProgress, { ...status }), (0, import_variant45.match)(generationData.mcpConfigResult, {
|
|
82824
|
+
Created: ({ mcpPath, docsUrl }) => /* @__PURE__ */ import_react130.default.createElement(McpConfigCreated, { mcpPath, docsUrl }),
|
|
82427
82825
|
Canceled: () => null
|
|
82428
|
-
}), /* @__PURE__ */
|
|
82826
|
+
}), /* @__PURE__ */ import_react130.default.createElement(
|
|
82429
82827
|
FinishedSuccessfullyMessage,
|
|
82430
82828
|
{
|
|
82431
82829
|
packageName: generationData.packageName,
|
|
@@ -82479,6 +82877,10 @@ var messages_default3 = {
|
|
|
82479
82877
|
"create_app.extend_existing.select_app.label": "Which app would you like to extend?",
|
|
82480
82878
|
"create_app.extend_existing.get_project": "Fetching application data",
|
|
82481
82879
|
"create_app.choose_package_name.label": "Enter a folder name for your project",
|
|
82880
|
+
"create_app.choose_namespace.label": "Enter a namespace for your app",
|
|
82881
|
+
"create_app.choose_namespace.placeholder": "{suggested}",
|
|
82882
|
+
"create_app.choose_code_identifier.label": "Enter a code identifier for your project",
|
|
82883
|
+
"create_app.choose_code_identifier.placeholder": "{suggested}",
|
|
82482
82884
|
"create_app.generate_project.generating_project": "Generating your app...",
|
|
82483
82885
|
"create_app.generate_project.generating_files.loading": "Generating project files...",
|
|
82484
82886
|
"create_app.generate_project.generating_files.done": "Project files generated!",
|
|
@@ -82586,7 +82988,7 @@ var getAppCommand = ({
|
|
|
82586
82988
|
try {
|
|
82587
82989
|
transaction.start();
|
|
82588
82990
|
await render2(
|
|
82589
|
-
/* @__PURE__ */
|
|
82991
|
+
/* @__PURE__ */ import_react131.default.createElement(BiProvider, { value: biLogger }, /* @__PURE__ */ import_react131.default.createElement(ErrorReporterProvider, { value: errorReporter2 }, /* @__PURE__ */ import_react131.default.createElement(PanoramaProvider, { value: panorama2 }, /* @__PURE__ */ import_react131.default.createElement(HttpClientProvider, { headers }, /* @__PURE__ */ import_react131.default.createElement(I18nProvider, { messages: messages_default3 }, /* @__PURE__ */ import_react131.default.createElement(
|
|
82590
82992
|
CreateAppCommand,
|
|
82591
82993
|
{
|
|
82592
82994
|
userInfo: userInfo2,
|
|
@@ -82608,7 +83010,7 @@ var getAppCommand = ({
|
|
|
82608
83010
|
|
|
82609
83011
|
// ../create-new-packages/headless-command/src/index.tsx
|
|
82610
83012
|
init_esm_shims();
|
|
82611
|
-
var
|
|
83013
|
+
var import_react154 = __toESM(require_react(), 1);
|
|
82612
83014
|
|
|
82613
83015
|
// ../create-new-packages/headless-command/src/validations/validate-business-name.ts
|
|
82614
83016
|
init_esm_shims();
|
|
@@ -82635,21 +83037,21 @@ var validateProjectName = (value2) => {
|
|
|
82635
83037
|
|
|
82636
83038
|
// ../create-new-packages/headless-command/src/components/LinkCommand/LinkCommand.tsx
|
|
82637
83039
|
init_esm_shims();
|
|
82638
|
-
var
|
|
82639
|
-
var
|
|
83040
|
+
var import_react142 = __toESM(require_react(), 1);
|
|
83041
|
+
var import_variant50 = __toESM(require_lib(), 1);
|
|
82640
83042
|
|
|
82641
83043
|
// ../create-new-packages/headless-command/src/components/WelcomeMessage.tsx
|
|
82642
83044
|
init_esm_shims();
|
|
82643
|
-
var
|
|
83045
|
+
var import_react132 = __toESM(require_react(), 1);
|
|
82644
83046
|
var WelcomeMessage2 = () => {
|
|
82645
|
-
return /* @__PURE__ */
|
|
83047
|
+
return /* @__PURE__ */ import_react132.default.createElement(Box_default, { flexDirection: "column", marginBottom: 1, paddingTop: 1 }, /* @__PURE__ */ import_react132.default.createElement(Text2, { bold: true }, "Create Headless Site"));
|
|
82646
83048
|
};
|
|
82647
83049
|
|
|
82648
83050
|
// ../create-new-packages/headless-command/src/components/ChooseBusinessName.tsx
|
|
82649
83051
|
init_esm_shims();
|
|
82650
|
-
var
|
|
83052
|
+
var import_react133 = __toESM(require_react(), 1);
|
|
82651
83053
|
var ChooseBusinessName = ({ onSubmit }) => {
|
|
82652
|
-
const validate3 = (0,
|
|
83054
|
+
const validate3 = (0, import_react133.useCallback)((businessName) => {
|
|
82653
83055
|
try {
|
|
82654
83056
|
validateBusinessName(businessName);
|
|
82655
83057
|
return true;
|
|
@@ -82657,7 +83059,7 @@ var ChooseBusinessName = ({ onSubmit }) => {
|
|
|
82657
83059
|
return e2.message;
|
|
82658
83060
|
}
|
|
82659
83061
|
}, []);
|
|
82660
|
-
return /* @__PURE__ */
|
|
83062
|
+
return /* @__PURE__ */ import_react133.default.createElement(
|
|
82661
83063
|
TextInput2,
|
|
82662
83064
|
{
|
|
82663
83065
|
label: "What's the name of your business?",
|
|
@@ -82670,12 +83072,12 @@ var ChooseBusinessName = ({ onSubmit }) => {
|
|
|
82670
83072
|
|
|
82671
83073
|
// ../create-new-packages/headless-command/src/components/CreateBusiness.tsx
|
|
82672
83074
|
init_esm_shims();
|
|
82673
|
-
var
|
|
82674
|
-
var
|
|
83075
|
+
var import_react135 = __toESM(require_react(), 1);
|
|
83076
|
+
var import_variant46 = __toESM(require_lib(), 1);
|
|
82675
83077
|
|
|
82676
83078
|
// ../create-new-packages/headless-command/src/clients/funnel-projects/useFunnelProjectsClient.ts
|
|
82677
83079
|
init_esm_shims();
|
|
82678
|
-
var
|
|
83080
|
+
var import_react134 = __toESM(require_react(), 1);
|
|
82679
83081
|
|
|
82680
83082
|
// ../create-new-packages/headless-command/src/clients/funnel-projects/funnel-projects-client.ts
|
|
82681
83083
|
init_esm_shims();
|
|
@@ -82781,7 +83183,7 @@ var FunnelProjectsClient = class {
|
|
|
82781
83183
|
// ../create-new-packages/headless-command/src/clients/funnel-projects/useFunnelProjectsClient.ts
|
|
82782
83184
|
function useFunnelProjectsClient() {
|
|
82783
83185
|
const httpClient = useHttpClient({ type: "api" });
|
|
82784
|
-
const client2 = (0,
|
|
83186
|
+
const client2 = (0, import_react134.useMemo)(
|
|
82785
83187
|
() => new FunnelProjectsClient(httpClient),
|
|
82786
83188
|
[httpClient]
|
|
82787
83189
|
);
|
|
@@ -82795,18 +83197,18 @@ var CreateBusiness = ({ businessName, businessTemplateId, onDone }) => {
|
|
|
82795
83197
|
const { project } = await createProject3(businessName, businessTemplateId);
|
|
82796
83198
|
onDone({ businessId: project.metaSiteId });
|
|
82797
83199
|
}, []);
|
|
82798
|
-
return /* @__PURE__ */
|
|
83200
|
+
return /* @__PURE__ */ import_react135.default.createElement(import_react135.default.Fragment, null, (0, import_variant46.match)(status, {
|
|
82799
83201
|
Error: () => null,
|
|
82800
|
-
Loading: () => /* @__PURE__ */
|
|
82801
|
-
Success: () => /* @__PURE__ */
|
|
83202
|
+
Loading: () => /* @__PURE__ */ import_react135.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react135.default.createElement(Spinner2, { text: "Creating your business..." })),
|
|
83203
|
+
Success: () => /* @__PURE__ */ import_react135.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react135.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react135.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react135.default.createElement(Text2, null, "Business created successfully"))),
|
|
82802
83204
|
NotRequested: () => null
|
|
82803
83205
|
}));
|
|
82804
83206
|
};
|
|
82805
83207
|
|
|
82806
83208
|
// ../create-new-packages/headless-command/src/components/CreateProject.tsx
|
|
82807
83209
|
init_esm_shims();
|
|
82808
|
-
var
|
|
82809
|
-
var
|
|
83210
|
+
var import_react137 = __toESM(require_react(), 1);
|
|
83211
|
+
var import_variant47 = __toESM(require_lib(), 1);
|
|
82810
83212
|
|
|
82811
83213
|
// ../create-new-packages/headless-command/src/hooks/create-project.ts
|
|
82812
83214
|
init_esm_shims();
|
|
@@ -82818,7 +83220,7 @@ init_esm_shims();
|
|
|
82818
83220
|
|
|
82819
83221
|
// ../metasite-manager-client/src/useMetasiteManagerClient.ts
|
|
82820
83222
|
init_esm_shims();
|
|
82821
|
-
var
|
|
83223
|
+
var import_react136 = __toESM(require_react(), 1);
|
|
82822
83224
|
|
|
82823
83225
|
// ../metasite-manager-client/src/metasite-manager-client.ts
|
|
82824
83226
|
init_esm_shims();
|
|
@@ -83632,7 +84034,7 @@ function useMetasiteManagerClient({
|
|
|
83632
84034
|
siteId
|
|
83633
84035
|
} = {}) {
|
|
83634
84036
|
const httpClient = useHttpClient({ type: "general", siteId });
|
|
83635
|
-
const client2 = (0,
|
|
84037
|
+
const client2 = (0, import_react136.useMemo)(
|
|
83636
84038
|
() => new MetasiteManagerClient(httpClient),
|
|
83637
84039
|
[httpClient]
|
|
83638
84040
|
);
|
|
@@ -83732,17 +84134,17 @@ var CreateProject = ({
|
|
|
83732
84134
|
cloudProviders
|
|
83733
84135
|
}) => {
|
|
83734
84136
|
const { status, execute } = useCreateProject(businessId);
|
|
83735
|
-
(0,
|
|
83736
|
-
if ((0,
|
|
84137
|
+
(0, import_react137.useEffect)(() => {
|
|
84138
|
+
if ((0, import_variant47.isType)(status, "Success")) {
|
|
83737
84139
|
onSubmit(status.result);
|
|
83738
84140
|
}
|
|
83739
84141
|
}, [status, onSubmit]);
|
|
83740
|
-
(0,
|
|
84142
|
+
(0, import_react137.useEffect)(() => {
|
|
83741
84143
|
if (providedProjectName) {
|
|
83742
84144
|
void execute({ projectName: providedProjectName, cloudProviders });
|
|
83743
84145
|
}
|
|
83744
84146
|
}, [providedProjectName, cloudProviders, execute]);
|
|
83745
|
-
const validate3 = (0,
|
|
84147
|
+
const validate3 = (0, import_react137.useCallback)(async (projectName) => {
|
|
83746
84148
|
try {
|
|
83747
84149
|
validateProjectName(projectName);
|
|
83748
84150
|
return true;
|
|
@@ -83750,7 +84152,7 @@ var CreateProject = ({
|
|
|
83750
84152
|
return e2.message;
|
|
83751
84153
|
}
|
|
83752
84154
|
}, []);
|
|
83753
|
-
return /* @__PURE__ */
|
|
84155
|
+
return /* @__PURE__ */ import_react137.default.createElement(import_react137.default.Fragment, null, !providedProjectName && /* @__PURE__ */ import_react137.default.createElement(
|
|
83754
84156
|
TextInput2,
|
|
83755
84157
|
{
|
|
83756
84158
|
label: "What's the name of your Custom Frontend project?",
|
|
@@ -83758,18 +84160,18 @@ var CreateProject = ({
|
|
|
83758
84160
|
validate: validate3,
|
|
83759
84161
|
inCreateFlow: true
|
|
83760
84162
|
}
|
|
83761
|
-
), (0,
|
|
84163
|
+
), (0, import_variant47.match)(status, {
|
|
83762
84164
|
Error: () => null,
|
|
83763
|
-
Loading: () => /* @__PURE__ */
|
|
83764
|
-
Success: () => /* @__PURE__ */
|
|
84165
|
+
Loading: () => /* @__PURE__ */ import_react137.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react137.default.createElement(Spinner2, { text: "Creating your project..." })),
|
|
84166
|
+
Success: () => /* @__PURE__ */ import_react137.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react137.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react137.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react137.default.createElement(Text2, null, "Project created successfully"))),
|
|
83765
84167
|
NotRequested: () => null
|
|
83766
84168
|
}));
|
|
83767
84169
|
};
|
|
83768
84170
|
|
|
83769
84171
|
// ../create-new-packages/headless-command/src/components/LinkCommand/GenerateProject.tsx
|
|
83770
84172
|
init_esm_shims();
|
|
83771
|
-
var
|
|
83772
|
-
var
|
|
84173
|
+
var import_react140 = __toESM(require_react(), 1);
|
|
84174
|
+
var import_variant49 = __toESM(require_lib(), 1);
|
|
83773
84175
|
|
|
83774
84176
|
// ../cli-project-extender/src/index.ts
|
|
83775
84177
|
init_esm_shims();
|
|
@@ -83931,9 +84333,9 @@ var IdentityType = class extends BaseType {
|
|
|
83931
84333
|
}
|
|
83932
84334
|
};
|
|
83933
84335
|
var ObjectType = class extends BaseType {
|
|
83934
|
-
constructor(
|
|
84336
|
+
constructor(fields12) {
|
|
83935
84337
|
super();
|
|
83936
|
-
this.fields =
|
|
84338
|
+
this.fields = fields12;
|
|
83937
84339
|
__publicField$2(this, "kind", "ObjectType");
|
|
83938
84340
|
}
|
|
83939
84341
|
toString() {
|
|
@@ -89713,17 +90115,17 @@ function genericPrintNoParens(path4, options, print2) {
|
|
|
89713
90115
|
case "ObjectTypeAnnotation": {
|
|
89714
90116
|
const isTypeAnnotation = n3.type === "ObjectTypeAnnotation";
|
|
89715
90117
|
const separator = options.flowObjectCommas ? "," : isTypeAnnotation ? ";" : ",";
|
|
89716
|
-
const
|
|
90118
|
+
const fields12 = [];
|
|
89717
90119
|
let allowBreak = false;
|
|
89718
90120
|
if (isTypeAnnotation) {
|
|
89719
|
-
|
|
90121
|
+
fields12.push("indexers", "callProperties");
|
|
89720
90122
|
if (n3.internalSlots != null) {
|
|
89721
|
-
|
|
90123
|
+
fields12.push("internalSlots");
|
|
89722
90124
|
}
|
|
89723
90125
|
}
|
|
89724
|
-
|
|
90126
|
+
fields12.push("properties");
|
|
89725
90127
|
let len = 0;
|
|
89726
|
-
|
|
90128
|
+
fields12.forEach(function(field) {
|
|
89727
90129
|
len += n3[field].length;
|
|
89728
90130
|
});
|
|
89729
90131
|
const oneLine = isTypeAnnotation && len === 1 || len === 0;
|
|
@@ -89732,7 +90134,7 @@ function genericPrintNoParens(path4, options, print2) {
|
|
|
89732
90134
|
parts.push(oneLine ? leftBrace : leftBrace + "\n");
|
|
89733
90135
|
const leftBraceIndex = parts.length - 1;
|
|
89734
90136
|
let i2 = 0;
|
|
89735
|
-
|
|
90137
|
+
fields12.forEach(function(field) {
|
|
89736
90138
|
path4.each(function(childPath) {
|
|
89737
90139
|
let lines = print2(childPath);
|
|
89738
90140
|
if (!oneLine) {
|
|
@@ -92521,12 +92923,12 @@ function detectCodeFormat(code, userStyles = {}) {
|
|
|
92521
92923
|
}
|
|
92522
92924
|
if (detect.quote || detect.arrowParens) {
|
|
92523
92925
|
const matches = trimmitedLine.matchAll(syntaxDetectRegex);
|
|
92524
|
-
for (const
|
|
92525
|
-
if (!
|
|
92926
|
+
for (const match37 of matches) {
|
|
92927
|
+
if (!match37.groups) {
|
|
92526
92928
|
continue;
|
|
92527
92929
|
}
|
|
92528
92930
|
for (const key in syntaxUsages) {
|
|
92529
|
-
if (
|
|
92931
|
+
if (match37.groups[key]) {
|
|
92530
92932
|
syntaxUsages[key]++;
|
|
92531
92933
|
}
|
|
92532
92934
|
}
|
|
@@ -92822,9 +93224,9 @@ async function extend2(projectFolder) {
|
|
|
92822
93224
|
|
|
92823
93225
|
// ../create-new-packages/headless-command/src/task-runner.ts
|
|
92824
93226
|
init_esm_shims();
|
|
92825
|
-
var
|
|
92826
|
-
var
|
|
92827
|
-
var TaskRunnerStatus2 = (0,
|
|
93227
|
+
var import_react138 = __toESM(require_react(), 1);
|
|
93228
|
+
var import_variant48 = __toESM(require_lib(), 1);
|
|
93229
|
+
var TaskRunnerStatus2 = (0, import_variant48.variant)({
|
|
92828
93230
|
Idle: {},
|
|
92829
93231
|
Running: (runningTasks, totalTaskCount) => {
|
|
92830
93232
|
const taskStatuses = runningTasks.map((task, index) => {
|
|
@@ -92848,7 +93250,7 @@ var TaskRunnerStatus2 = (0, import_variant42.variant)({
|
|
|
92848
93250
|
}
|
|
92849
93251
|
});
|
|
92850
93252
|
function useTaskRunner2() {
|
|
92851
|
-
const [status, setStatus] = (0,
|
|
93253
|
+
const [status, setStatus] = (0, import_react138.useState)(
|
|
92852
93254
|
TaskRunnerStatus2.Idle()
|
|
92853
93255
|
);
|
|
92854
93256
|
const { execute } = useAsyncCallback3(async (_2, tasks) => {
|
|
@@ -92868,25 +93270,25 @@ function useTaskRunner2() {
|
|
|
92868
93270
|
|
|
92869
93271
|
// ../create-new-packages/headless-command/src/components/TaskList.tsx
|
|
92870
93272
|
init_esm_shims();
|
|
92871
|
-
var
|
|
93273
|
+
var import_react139 = __toESM(require_react(), 1);
|
|
92872
93274
|
var TaskList2 = ({ tasks, totalTaskCount }) => {
|
|
92873
|
-
return /* @__PURE__ */
|
|
93275
|
+
return /* @__PURE__ */ import_react139.default.createElement(import_react139.default.Fragment, null, tasks.map((task, index) => {
|
|
92874
93276
|
const stepper = `[${index + 1}/${totalTaskCount}]`;
|
|
92875
93277
|
const fullText = `${stepper} ${task.text}`;
|
|
92876
93278
|
if (task.status === "running") {
|
|
92877
|
-
return /* @__PURE__ */
|
|
93279
|
+
return /* @__PURE__ */ import_react139.default.createElement(Spinner2, { key: index, text: fullText });
|
|
92878
93280
|
}
|
|
92879
|
-
return /* @__PURE__ */
|
|
93281
|
+
return /* @__PURE__ */ import_react139.default.createElement(Alert, { key: index, type: "success" }, fullText);
|
|
92880
93282
|
}));
|
|
92881
93283
|
};
|
|
92882
93284
|
|
|
92883
93285
|
// ../create-new-packages/headless-command/src/components/LinkCommand/GenerateProject.tsx
|
|
92884
93286
|
var GenerationProgress2 = ({ tasks, totalTaskCount }) => {
|
|
92885
|
-
return /* @__PURE__ */
|
|
93287
|
+
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 }));
|
|
92886
93288
|
};
|
|
92887
93289
|
var GenerateProject = ({ projectFolder, businessId, projectData, onDone, packageManager: packageManager2 }) => {
|
|
92888
93290
|
const { execute: executeTaskRunner, status: taskRunnerStatus } = useTaskRunner2();
|
|
92889
|
-
const generateProject = (0,
|
|
93291
|
+
const generateProject = (0, import_react140.useCallback)(async () => {
|
|
92890
93292
|
const wixConfigFilePath = getWixConfigFilePath(projectFolder);
|
|
92891
93293
|
const envFilePath = getEnvFilePath(projectFolder);
|
|
92892
93294
|
await writeJson(
|
|
@@ -92899,10 +93301,10 @@ var GenerateProject = ({ projectFolder, businessId, projectData, onDone, package
|
|
|
92899
93301
|
);
|
|
92900
93302
|
await updateEnvFile(envFilePath, projectData.environmentVariables);
|
|
92901
93303
|
}, [businessId, projectFolder, projectData]);
|
|
92902
|
-
const extendProject = (0,
|
|
93304
|
+
const extendProject = (0, import_react140.useCallback)(async () => {
|
|
92903
93305
|
await extend2(projectFolder);
|
|
92904
93306
|
}, [projectFolder]);
|
|
92905
|
-
const installDependencies = (0,
|
|
93307
|
+
const installDependencies = (0, import_react140.useCallback)(async () => {
|
|
92906
93308
|
try {
|
|
92907
93309
|
await packageManager2.runInstall(projectFolder);
|
|
92908
93310
|
} catch (e2) {
|
|
@@ -92912,7 +93314,7 @@ var GenerateProject = ({ projectFolder, businessId, projectData, onDone, package
|
|
|
92912
93314
|
});
|
|
92913
93315
|
}
|
|
92914
93316
|
}, [projectFolder, packageManager2]);
|
|
92915
|
-
const tasks = (0,
|
|
93317
|
+
const tasks = (0, import_react140.useMemo)(() => {
|
|
92916
93318
|
const result = [
|
|
92917
93319
|
{
|
|
92918
93320
|
action: generateProject,
|
|
@@ -92936,18 +93338,18 @@ var GenerateProject = ({ projectFolder, businessId, projectData, onDone, package
|
|
|
92936
93338
|
await executeTaskRunner(tasks);
|
|
92937
93339
|
onDone(true);
|
|
92938
93340
|
}, []);
|
|
92939
|
-
return (0,
|
|
93341
|
+
return (0, import_variant49.match)(taskRunnerStatus, {
|
|
92940
93342
|
Idle: () => null,
|
|
92941
|
-
Running: (status) => /* @__PURE__ */
|
|
92942
|
-
Done: (status) => /* @__PURE__ */
|
|
93343
|
+
Running: (status) => /* @__PURE__ */ import_react140.default.createElement(GenerationProgress2, { ...status }),
|
|
93344
|
+
Done: (status) => /* @__PURE__ */ import_react140.default.createElement(Box_default, { flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ import_react140.default.createElement(GenerationProgress2, { ...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"))))
|
|
92943
93345
|
});
|
|
92944
93346
|
};
|
|
92945
93347
|
|
|
92946
93348
|
// ../create-new-packages/headless-command/src/components/LinkCommand/FinishedSuccessfullyMessage.tsx
|
|
92947
93349
|
init_esm_shims();
|
|
92948
|
-
var
|
|
93350
|
+
var import_react141 = __toESM(require_react(), 1);
|
|
92949
93351
|
var FinishedSuccessfullyMessage2 = ({ packageManager: packageManager2 }) => {
|
|
92950
|
-
return /* @__PURE__ */
|
|
93352
|
+
return /* @__PURE__ */ import_react141.default.createElement(
|
|
92951
93353
|
Box_default,
|
|
92952
93354
|
{
|
|
92953
93355
|
borderColor: "blue",
|
|
@@ -92959,8 +93361,8 @@ var FinishedSuccessfullyMessage2 = ({ packageManager: packageManager2 }) => {
|
|
|
92959
93361
|
marginLeft: -2,
|
|
92960
93362
|
marginTop: 1
|
|
92961
93363
|
},
|
|
92962
|
-
/* @__PURE__ */
|
|
92963
|
-
/* @__PURE__ */
|
|
93364
|
+
/* @__PURE__ */ import_react141.default.createElement(Text2, { bold: true }, "Next Steps:"),
|
|
93365
|
+
/* @__PURE__ */ import_react141.default.createElement(UnorderedList, { gap: 1 }, /* @__PURE__ */ import_react141.default.createElement(UnorderedList.Item, { marker: "\u{1F45F}" }, /* @__PURE__ */ import_react141.default.createElement(Text2, null, "Start developing"), /* @__PURE__ */ import_react141.default.createElement(Text2, { skin: "info" }, `${packageManager2.getRunCmd()} dev`)), /* @__PURE__ */ import_react141.default.createElement(UnorderedList.Item, { marker: /* @__PURE__ */ import_react141.default.createElement(Learn, null) }, /* @__PURE__ */ import_react141.default.createElement(Text2, null, "For guides and API references visit our"), /* @__PURE__ */ import_react141.default.createElement(Link, { skin: "info", url: "https://dev.wix.com/docs/go-headless" }, "documentation")), /* @__PURE__ */ import_react141.default.createElement(UnorderedList.Item, { marker: "\u{1F4AC}" }, /* @__PURE__ */ import_react141.default.createElement(Text2, null, "Join our"), /* @__PURE__ */ import_react141.default.createElement(Link, { skin: "info", url: "https://discord.gg/wixstudio" }, "Discord community")))
|
|
92964
93366
|
);
|
|
92965
93367
|
};
|
|
92966
93368
|
|
|
@@ -92981,10 +93383,10 @@ var LinkCommand = ({
|
|
|
92981
93383
|
projectName: preEnteredProjectName,
|
|
92982
93384
|
businessName: preEnteredBusinessName
|
|
92983
93385
|
}) => {
|
|
92984
|
-
const [businessName, setBusinessName] = (0,
|
|
92985
|
-
const [businessId, setBusinessId] = (0,
|
|
92986
|
-
const [projectData, setProjectData] = (0,
|
|
92987
|
-
const [isDone, setIsDone] = (0,
|
|
93386
|
+
const [businessName, setBusinessName] = (0, import_react142.useState)(preEnteredBusinessName);
|
|
93387
|
+
const [businessId, setBusinessId] = (0, import_react142.useState)();
|
|
93388
|
+
const [projectData, setProjectData] = (0, import_react142.useState)();
|
|
93389
|
+
const [isDone, setIsDone] = (0, import_react142.useState)(false);
|
|
92988
93390
|
const { status } = useAsync2(async () => {
|
|
92989
93391
|
const alreadyLinked = await isWixConfigExists(projectFolder);
|
|
92990
93392
|
if (alreadyLinked) {
|
|
@@ -93004,11 +93406,11 @@ var LinkCommand = ({
|
|
|
93004
93406
|
const packageManager2 = await createPackageManager(repoType2);
|
|
93005
93407
|
return { repoType: repoType2, packageManager: packageManager2 };
|
|
93006
93408
|
}, []);
|
|
93007
|
-
return (0,
|
|
93409
|
+
return (0, import_variant50.match)(status, {
|
|
93008
93410
|
Error: () => null,
|
|
93009
|
-
Loading: () => /* @__PURE__ */
|
|
93411
|
+
Loading: () => /* @__PURE__ */ import_react142.default.createElement(Spinner2, { text: "Loading..." }),
|
|
93010
93412
|
Success: ({ result: { packageManager: packageManager2 } }) => {
|
|
93011
|
-
return /* @__PURE__ */
|
|
93413
|
+
return /* @__PURE__ */ import_react142.default.createElement(
|
|
93012
93414
|
Box_default,
|
|
93013
93415
|
{
|
|
93014
93416
|
flexDirection: "column",
|
|
@@ -93019,14 +93421,14 @@ var LinkCommand = ({
|
|
|
93019
93421
|
borderTop: false,
|
|
93020
93422
|
paddingLeft: 1
|
|
93021
93423
|
},
|
|
93022
|
-
/* @__PURE__ */
|
|
93023
|
-
!preEnteredBusinessName && /* @__PURE__ */
|
|
93424
|
+
/* @__PURE__ */ import_react142.default.createElement(WelcomeMessage2, null),
|
|
93425
|
+
!preEnteredBusinessName && /* @__PURE__ */ import_react142.default.createElement(
|
|
93024
93426
|
ChooseBusinessName,
|
|
93025
93427
|
{
|
|
93026
93428
|
onSubmit: ({ businessName: businessName2 }) => setBusinessName(businessName2)
|
|
93027
93429
|
}
|
|
93028
93430
|
),
|
|
93029
|
-
businessName && /* @__PURE__ */
|
|
93431
|
+
businessName && /* @__PURE__ */ import_react142.default.createElement(AuthProvider, null, /* @__PURE__ */ import_react142.default.createElement(
|
|
93030
93432
|
CreateBusiness,
|
|
93031
93433
|
{
|
|
93032
93434
|
businessName,
|
|
@@ -93034,7 +93436,7 @@ var LinkCommand = ({
|
|
|
93034
93436
|
onDone: ({ businessId: businessId2 }) => setBusinessId(businessId2)
|
|
93035
93437
|
}
|
|
93036
93438
|
)),
|
|
93037
|
-
businessName && businessId && /* @__PURE__ */
|
|
93439
|
+
businessName && businessId && /* @__PURE__ */ import_react142.default.createElement(AuthProvider, null, /* @__PURE__ */ import_react142.default.createElement(
|
|
93038
93440
|
CreateProject,
|
|
93039
93441
|
{
|
|
93040
93442
|
businessId,
|
|
@@ -93042,7 +93444,7 @@ var LinkCommand = ({
|
|
|
93042
93444
|
onSubmit: (data) => setProjectData(data)
|
|
93043
93445
|
}
|
|
93044
93446
|
)),
|
|
93045
|
-
businessName && businessId && projectData && /* @__PURE__ */
|
|
93447
|
+
businessName && businessId && projectData && /* @__PURE__ */ import_react142.default.createElement(
|
|
93046
93448
|
GenerateProject,
|
|
93047
93449
|
{
|
|
93048
93450
|
packageManager: packageManager2,
|
|
@@ -93052,7 +93454,7 @@ var LinkCommand = ({
|
|
|
93052
93454
|
onDone: () => setIsDone(true)
|
|
93053
93455
|
}
|
|
93054
93456
|
),
|
|
93055
|
-
businessName && businessId && projectData && isDone && /* @__PURE__ */
|
|
93457
|
+
businessName && businessId && projectData && isDone && /* @__PURE__ */ import_react142.default.createElement(FinishedSuccessfullyMessage2, { packageManager: packageManager2 })
|
|
93056
93458
|
);
|
|
93057
93459
|
}
|
|
93058
93460
|
});
|
|
@@ -93104,12 +93506,12 @@ var validateCloudProvider = (value2) => {
|
|
|
93104
93506
|
|
|
93105
93507
|
// ../create-new-packages/headless-command/src/components/ProcessCommand.tsx
|
|
93106
93508
|
init_esm_shims();
|
|
93107
|
-
var
|
|
93108
|
-
var
|
|
93509
|
+
var import_react153 = __toESM(require_react(), 1);
|
|
93510
|
+
var import_variant60 = __toESM(require_lib(), 1);
|
|
93109
93511
|
|
|
93110
93512
|
// ../create-new-packages/headless-command/src/parse-command-options.ts
|
|
93111
93513
|
init_esm_shims();
|
|
93112
|
-
var
|
|
93514
|
+
var import_variant52 = __toESM(require_lib(), 1);
|
|
93113
93515
|
import { join as join14 } from "node:path";
|
|
93114
93516
|
|
|
93115
93517
|
// ../create-new-packages/headless-command/src/validations/index.ts
|
|
@@ -93128,11 +93530,11 @@ async function validateDirectory2(projectRoot) {
|
|
|
93128
93530
|
// ../create-new-packages/headless-command/src/validations/package-name.ts
|
|
93129
93531
|
init_esm_shims();
|
|
93130
93532
|
var import_validate_npm_package_name2 = __toESM(require_lib2(), 1);
|
|
93131
|
-
var
|
|
93132
|
-
var Result2 = (0,
|
|
93133
|
-
(0,
|
|
93134
|
-
Error: (0,
|
|
93135
|
-
Ok:
|
|
93533
|
+
var import_variant51 = __toESM(require_lib(), 1);
|
|
93534
|
+
var Result2 = (0, import_variant51.variant)(
|
|
93535
|
+
(0, import_variant51.onTerms)(({ T }) => ({
|
|
93536
|
+
Error: (0, import_variant51.payload)(T),
|
|
93537
|
+
Ok: import_variant51.nil
|
|
93136
93538
|
}))
|
|
93137
93539
|
);
|
|
93138
93540
|
async function validatePackageName2(name) {
|
|
@@ -93202,10 +93604,10 @@ var headlessTemplates = [
|
|
|
93202
93604
|
...vibeCompatibleTemplates,
|
|
93203
93605
|
...pureHeadlessTemplates
|
|
93204
93606
|
];
|
|
93205
|
-
var TemplateSource2 = (0,
|
|
93206
|
-
HeadlessApp: (0,
|
|
93207
|
-
GitRepo: (0,
|
|
93208
|
-
Local: (0,
|
|
93607
|
+
var TemplateSource2 = (0, import_variant52.variant)({
|
|
93608
|
+
HeadlessApp: (0, import_variant52.fields)(),
|
|
93609
|
+
GitRepo: (0, import_variant52.fields)(),
|
|
93610
|
+
Local: (0, import_variant52.fields)()
|
|
93209
93611
|
});
|
|
93210
93612
|
function parseProviderString(cloudProvider) {
|
|
93211
93613
|
switch (cloudProvider.trim().toLowerCase()) {
|
|
@@ -93274,7 +93676,7 @@ async function parseProjectNameOptions(targetParentFolder2, options) {
|
|
|
93274
93676
|
});
|
|
93275
93677
|
}
|
|
93276
93678
|
const npmValidationErrors = await validatePackageName2(projectName);
|
|
93277
|
-
if ((0,
|
|
93679
|
+
if ((0, import_variant52.isType)(npmValidationErrors, "Error")) {
|
|
93278
93680
|
throw new CliError({
|
|
93279
93681
|
code: CliErrorCode.ProjectNameArgumentIsInvalid({
|
|
93280
93682
|
errorMessage: `Invalid package name "${projectName}". Please fix the following issues: ${npmValidationErrors.payload.join(", ")}`
|
|
@@ -93329,32 +93731,32 @@ async function parseCommandOptions2(targetParentFolder2, options) {
|
|
|
93329
93731
|
|
|
93330
93732
|
// ../create-new-packages/headless-command/src/components/CreateHeadlessSiteCommand.tsx
|
|
93331
93733
|
init_esm_shims();
|
|
93332
|
-
var
|
|
93333
|
-
var
|
|
93734
|
+
var import_react152 = __toESM(require_react(), 1);
|
|
93735
|
+
var import_variant59 = __toESM(require_lib(), 1);
|
|
93334
93736
|
var import_kebabCase5 = __toESM(require_kebabCase(), 1);
|
|
93335
93737
|
import { join as join19 } from "node:path";
|
|
93336
93738
|
|
|
93337
93739
|
// ../create-new-packages/headless-command/src/components/ChooseFolder.tsx
|
|
93338
93740
|
init_esm_shims();
|
|
93339
|
-
var
|
|
93340
|
-
var
|
|
93741
|
+
var import_react143 = __toESM(require_react(), 1);
|
|
93742
|
+
var import_variant53 = __toESM(require_lib(), 1);
|
|
93341
93743
|
import { join as join15 } from "node:path";
|
|
93342
93744
|
var validateAppDirectory = async (targetParentFolder2, packageName) => {
|
|
93343
93745
|
if (!await validateDirectory2(join15(targetParentFolder2, packageName))) {
|
|
93344
93746
|
return `Provided directory "${packageName}" is not empty`;
|
|
93345
93747
|
}
|
|
93346
93748
|
const npmValidationErrors = await validatePackageName2(packageName);
|
|
93347
|
-
return (0,
|
|
93749
|
+
return (0, import_variant53.match)(npmValidationErrors, {
|
|
93348
93750
|
Ok: () => true,
|
|
93349
93751
|
Error: ({ payload: payload7 }) => `Invalid folder name. Please fix the following issues: ${payload7.join(", ")}`
|
|
93350
93752
|
});
|
|
93351
93753
|
};
|
|
93352
93754
|
var ChooseFolder = ({ initialFolderName, targetParentFolder: targetParentFolder2, onSubmit }) => {
|
|
93353
|
-
const validate3 = (0,
|
|
93755
|
+
const validate3 = (0, import_react143.useCallback)(
|
|
93354
93756
|
async (packageName) => validateAppDirectory(targetParentFolder2, packageName),
|
|
93355
93757
|
[targetParentFolder2]
|
|
93356
93758
|
);
|
|
93357
|
-
return /* @__PURE__ */
|
|
93759
|
+
return /* @__PURE__ */ import_react143.default.createElement(
|
|
93358
93760
|
TextInput2,
|
|
93359
93761
|
{
|
|
93360
93762
|
label: "In which directory do you want to create your application?",
|
|
@@ -93369,8 +93771,8 @@ var ChooseFolder = ({ initialFolderName, targetParentFolder: targetParentFolder2
|
|
|
93369
93771
|
// ../create-new-packages/headless-command/src/components/GenerateProject.tsx
|
|
93370
93772
|
init_esm_shims();
|
|
93371
93773
|
import { mkdir as mkdir2 } from "node:fs/promises";
|
|
93372
|
-
var
|
|
93373
|
-
var
|
|
93774
|
+
var import_react144 = __toESM(require_react(), 1);
|
|
93775
|
+
var import_variant54 = __toESM(require_lib(), 1);
|
|
93374
93776
|
import { join as join17 } from "node:path";
|
|
93375
93777
|
|
|
93376
93778
|
// ../create-new-packages/headless-command/src/services/generator/template-fetcher.ts
|
|
@@ -93417,14 +93819,14 @@ async function resolveTemplateFolder(templatePathOverride, selectedTemplate) {
|
|
|
93417
93819
|
if (templatePathOverride) {
|
|
93418
93820
|
return templatePathOverride;
|
|
93419
93821
|
}
|
|
93420
|
-
return (0,
|
|
93822
|
+
return (0, import_variant54.match)(selectedTemplate, {
|
|
93421
93823
|
HeadlessApp: ({ gitPath }) => fetchTemplate(headlessTemplatesGitUrl, gitPath),
|
|
93422
93824
|
GitRepo: ({ url, path: path4 }) => fetchTemplate(url, path4),
|
|
93423
93825
|
Local: ({ path: path4 }) => path4
|
|
93424
93826
|
});
|
|
93425
93827
|
}
|
|
93426
93828
|
var GenerationProgress3 = ({ tasks, totalTaskCount }) => {
|
|
93427
|
-
return /* @__PURE__ */
|
|
93829
|
+
return /* @__PURE__ */ import_react144.default.createElement(import_react144.default.Fragment, null, /* @__PURE__ */ import_react144.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react144.default.createElement(Text2, null, "Generating your headless site...")), /* @__PURE__ */ import_react144.default.createElement(TaskList2, { tasks, totalTaskCount }));
|
|
93428
93830
|
};
|
|
93429
93831
|
var GenerateProject2 = ({
|
|
93430
93832
|
packageManager: packageManager2,
|
|
@@ -93437,11 +93839,11 @@ var GenerateProject2 = ({
|
|
|
93437
93839
|
onDone
|
|
93438
93840
|
}) => {
|
|
93439
93841
|
const { execute: executeTaskRunner, status: taskRunnerStatus } = useTaskRunner2();
|
|
93440
|
-
const packageFolder = (0,
|
|
93842
|
+
const packageFolder = (0, import_react144.useMemo)(
|
|
93441
93843
|
() => join17(targetParentFolder2, folderName),
|
|
93442
93844
|
[folderName, targetParentFolder2]
|
|
93443
93845
|
);
|
|
93444
|
-
const generateProject = (0,
|
|
93846
|
+
const generateProject = (0, import_react144.useCallback)(async () => {
|
|
93445
93847
|
try {
|
|
93446
93848
|
await mkdir2(packageFolder, { recursive: true });
|
|
93447
93849
|
} catch (e2) {
|
|
@@ -93482,10 +93884,10 @@ var GenerateProject2 = ({
|
|
|
93482
93884
|
commandOptions.templateParams,
|
|
93483
93885
|
commandOptions.templatePath
|
|
93484
93886
|
]);
|
|
93485
|
-
const extendProject = (0,
|
|
93887
|
+
const extendProject = (0, import_react144.useCallback)(async () => {
|
|
93486
93888
|
await extend2(packageFolder);
|
|
93487
93889
|
}, [packageFolder]);
|
|
93488
|
-
const initializeGit = (0,
|
|
93890
|
+
const initializeGit = (0, import_react144.useCallback)(async () => {
|
|
93489
93891
|
try {
|
|
93490
93892
|
await gitInit(packageFolder);
|
|
93491
93893
|
} catch (e2) {
|
|
@@ -93495,7 +93897,7 @@ var GenerateProject2 = ({
|
|
|
93495
93897
|
});
|
|
93496
93898
|
}
|
|
93497
93899
|
}, [packageFolder]);
|
|
93498
|
-
const installDependencies = (0,
|
|
93900
|
+
const installDependencies = (0, import_react144.useCallback)(async () => {
|
|
93499
93901
|
try {
|
|
93500
93902
|
await packageManager2.runInstall(packageFolder);
|
|
93501
93903
|
} catch (e2) {
|
|
@@ -93505,7 +93907,7 @@ var GenerateProject2 = ({
|
|
|
93505
93907
|
});
|
|
93506
93908
|
}
|
|
93507
93909
|
}, [packageFolder, packageManager2]);
|
|
93508
|
-
const commitToGit = (0,
|
|
93910
|
+
const commitToGit = (0, import_react144.useCallback)(async () => {
|
|
93509
93911
|
try {
|
|
93510
93912
|
await gitCommit(packageFolder);
|
|
93511
93913
|
} catch (e2) {
|
|
@@ -93515,7 +93917,7 @@ var GenerateProject2 = ({
|
|
|
93515
93917
|
});
|
|
93516
93918
|
}
|
|
93517
93919
|
}, [packageFolder]);
|
|
93518
|
-
const tasks = (0,
|
|
93920
|
+
const tasks = (0, import_react144.useMemo)(() => {
|
|
93519
93921
|
const result = [
|
|
93520
93922
|
{
|
|
93521
93923
|
action: generateProject,
|
|
@@ -93569,18 +93971,18 @@ var GenerateProject2 = ({
|
|
|
93569
93971
|
await executeTaskRunner(tasks);
|
|
93570
93972
|
onDone(true);
|
|
93571
93973
|
}, []);
|
|
93572
|
-
return (0,
|
|
93974
|
+
return (0, import_variant54.match)(taskRunnerStatus, {
|
|
93573
93975
|
Idle: () => null,
|
|
93574
|
-
Running: (status) => /* @__PURE__ */
|
|
93575
|
-
Done: (status) => /* @__PURE__ */
|
|
93976
|
+
Running: (status) => /* @__PURE__ */ import_react144.default.createElement(GenerationProgress3, { ...status }),
|
|
93977
|
+
Done: (status) => /* @__PURE__ */ import_react144.default.createElement(Box_default, { flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ import_react144.default.createElement(GenerationProgress3, { ...status }), /* @__PURE__ */ import_react144.default.createElement(Box_default, { marginLeft: -2, marginTop: 1 }, /* @__PURE__ */ import_react144.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react144.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react144.default.createElement(Text2, null, "Project set up successfully"))))
|
|
93576
93978
|
});
|
|
93577
93979
|
};
|
|
93578
93980
|
|
|
93579
93981
|
// ../create-new-packages/headless-command/src/components/ChooseTemplate.tsx
|
|
93580
93982
|
init_esm_shims();
|
|
93581
|
-
var
|
|
93983
|
+
var import_react145 = __toESM(require_react(), 1);
|
|
93582
93984
|
var ChooseTemplate2 = ({ onSubmit }) => {
|
|
93583
|
-
const groups = (0,
|
|
93985
|
+
const groups = (0, import_react145.useMemo)(
|
|
93584
93986
|
() => [
|
|
93585
93987
|
{
|
|
93586
93988
|
title: "Wix Vibe compatible templates",
|
|
@@ -93594,7 +93996,7 @@ var ChooseTemplate2 = ({ onSubmit }) => {
|
|
|
93594
93996
|
{
|
|
93595
93997
|
title: "Standard templates",
|
|
93596
93998
|
// https://dev.wix.com/docs/go-headless/get-started/templates/wix-managed-templates/wix-cli-for-headless-templates
|
|
93597
|
-
description: /* @__PURE__ */
|
|
93999
|
+
description: /* @__PURE__ */ import_react145.default.createElement(Text2, null, "(", /* @__PURE__ */ import_react145.default.createElement(Link, { url: "https://wix.to/zuKh3Fo" }, "Learn more"), ")"),
|
|
93598
94000
|
items: pureHeadlessTemplates.map((template) => ({
|
|
93599
94001
|
key: template.siteTemplateId,
|
|
93600
94002
|
title: template.title,
|
|
@@ -93605,7 +94007,7 @@ var ChooseTemplate2 = ({ onSubmit }) => {
|
|
|
93605
94007
|
],
|
|
93606
94008
|
[]
|
|
93607
94009
|
);
|
|
93608
|
-
return /* @__PURE__ */
|
|
94010
|
+
return /* @__PURE__ */ import_react145.default.createElement(
|
|
93609
94011
|
SelectGroupsInput,
|
|
93610
94012
|
{
|
|
93611
94013
|
label: "Choose an initial template for your business",
|
|
@@ -93617,14 +94019,14 @@ var ChooseTemplate2 = ({ onSubmit }) => {
|
|
|
93617
94019
|
|
|
93618
94020
|
// ../create-new-packages/headless-command/src/components/ReleaseProject.tsx
|
|
93619
94021
|
init_esm_shims();
|
|
93620
|
-
var
|
|
93621
|
-
var
|
|
94022
|
+
var import_react147 = __toESM(require_react(), 1);
|
|
94023
|
+
var import_variant56 = __toESM(require_lib(), 1);
|
|
93622
94024
|
|
|
93623
94025
|
// ../create-new-packages/headless-command/src/components/FinishedSuccessfullyMessage.tsx
|
|
93624
94026
|
init_esm_shims();
|
|
93625
|
-
var
|
|
94027
|
+
var import_react146 = __toESM(require_react(), 1);
|
|
93626
94028
|
var FinishedSuccessfullyMessage3 = ({ packageManager: packageManager2, folderName, projectData, isReleased }) => {
|
|
93627
|
-
return /* @__PURE__ */
|
|
94029
|
+
return /* @__PURE__ */ import_react146.default.createElement(
|
|
93628
94030
|
Box_default,
|
|
93629
94031
|
{
|
|
93630
94032
|
borderColor: "blue",
|
|
@@ -93636,17 +94038,17 @@ var FinishedSuccessfullyMessage3 = ({ packageManager: packageManager2, folderNam
|
|
|
93636
94038
|
marginLeft: -2,
|
|
93637
94039
|
marginTop: 1
|
|
93638
94040
|
},
|
|
93639
|
-
isReleased && /* @__PURE__ */
|
|
93640
|
-
/* @__PURE__ */
|
|
93641
|
-
/* @__PURE__ */
|
|
94041
|
+
isReleased && /* @__PURE__ */ import_react146.default.createElement(Text2, { bold: true }, /* @__PURE__ */ import_react146.default.createElement(Rocket, null), " Visit your site at: ", projectData.baseUrl),
|
|
94042
|
+
/* @__PURE__ */ import_react146.default.createElement(Text2, { bold: true }, "Next Steps:"),
|
|
94043
|
+
/* @__PURE__ */ import_react146.default.createElement(UnorderedList, { gap: 1 }, /* @__PURE__ */ import_react146.default.createElement(UnorderedList.Item, { marker: "\u{1F45F}" }, /* @__PURE__ */ import_react146.default.createElement(Text2, null, "Start developing"), /* @__PURE__ */ import_react146.default.createElement(Text2, { skin: "info" }, `cd ${folderName}`), /* @__PURE__ */ import_react146.default.createElement(Text2, { skin: "info" }, `${packageManager2.getRunCmd()} dev`)), /* @__PURE__ */ import_react146.default.createElement(UnorderedList.Item, { marker: /* @__PURE__ */ import_react146.default.createElement(Learn, null) }, /* @__PURE__ */ import_react146.default.createElement(Text2, null, "For guides and API references visit our"), /* @__PURE__ */ import_react146.default.createElement(Link, { skin: "info", url: "https://dev.wix.com/docs/go-headless" }, "documentation")), /* @__PURE__ */ import_react146.default.createElement(UnorderedList.Item, { marker: "\u{1F4AC}" }, /* @__PURE__ */ import_react146.default.createElement(Text2, null, "Join our"), /* @__PURE__ */ import_react146.default.createElement(Link, { skin: "info", url: "https://discord.gg/wixstudio" }, "Discord community")))
|
|
93642
94044
|
);
|
|
93643
94045
|
};
|
|
93644
94046
|
|
|
93645
94047
|
// ../create-new-packages/headless-command/src/hooks/release-project.ts
|
|
93646
94048
|
init_esm_shims();
|
|
93647
|
-
var
|
|
94049
|
+
var import_variant55 = __toESM(require_lib(), 1);
|
|
93648
94050
|
import { join as join18 } from "node:path";
|
|
93649
|
-
var ReleaseStateVariant = (0,
|
|
94051
|
+
var ReleaseStateVariant = (0, import_variant55.variant)({
|
|
93650
94052
|
Success: {},
|
|
93651
94053
|
Skipped: {},
|
|
93652
94054
|
Error: {}
|
|
@@ -93694,7 +94096,7 @@ var ReleaseProject = ({
|
|
|
93694
94096
|
releaseNonInteractive
|
|
93695
94097
|
}) => {
|
|
93696
94098
|
const { status, execute } = useReleaseProject();
|
|
93697
|
-
(0,
|
|
94099
|
+
(0, import_react147.useEffect)(() => {
|
|
93698
94100
|
if (releaseNonInteractive != null) {
|
|
93699
94101
|
void execute({
|
|
93700
94102
|
confirmed: releaseNonInteractive,
|
|
@@ -93704,7 +94106,7 @@ var ReleaseProject = ({
|
|
|
93704
94106
|
});
|
|
93705
94107
|
}
|
|
93706
94108
|
}, []);
|
|
93707
|
-
return /* @__PURE__ */
|
|
94109
|
+
return /* @__PURE__ */ import_react147.default.createElement(import_react147.default.Fragment, null, releaseNonInteractive == null && /* @__PURE__ */ import_react147.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react147.default.createElement(
|
|
93708
94110
|
ConfirmInput,
|
|
93709
94111
|
{
|
|
93710
94112
|
label: "Would you like to publish your site now?",
|
|
@@ -93718,42 +94120,42 @@ var ReleaseProject = ({
|
|
|
93718
94120
|
});
|
|
93719
94121
|
}
|
|
93720
94122
|
}
|
|
93721
|
-
)), (0,
|
|
94123
|
+
)), (0, import_variant56.match)(status, {
|
|
93722
94124
|
NotRequested: () => null,
|
|
93723
94125
|
Success: ({ result }) => {
|
|
93724
|
-
return /* @__PURE__ */
|
|
93725
|
-
Success: () => /* @__PURE__ */
|
|
93726
|
-
Skipped: () => /* @__PURE__ */
|
|
93727
|
-
Error: () => /* @__PURE__ */
|
|
93728
|
-
}), /* @__PURE__ */
|
|
94126
|
+
return /* @__PURE__ */ import_react147.default.createElement(import_react147.default.Fragment, null, (0, import_variant56.match)(result, {
|
|
94127
|
+
Success: () => /* @__PURE__ */ import_react147.default.createElement(Box_default, { marginLeft: -2 }, /* @__PURE__ */ import_react147.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react147.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react147.default.createElement(Text2, null, "Site published successfully"))),
|
|
94128
|
+
Skipped: () => /* @__PURE__ */ import_react147.default.createElement(Text2, null, `No worries, you can publish your site later by running ${packageManager2.getRunCmd()} release`),
|
|
94129
|
+
Error: () => /* @__PURE__ */ import_react147.default.createElement(Box_default, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ import_react147.default.createElement(Alert, { type: "error" }, "Failed to publish your site"), /* @__PURE__ */ import_react147.default.createElement(Text2, null, `No worries, you can publish your site later by running ${packageManager2.getRunCmd()} release`))
|
|
94130
|
+
}), /* @__PURE__ */ import_react147.default.createElement(
|
|
93729
94131
|
FinishedSuccessfullyMessage3,
|
|
93730
94132
|
{
|
|
93731
94133
|
packageManager: packageManager2,
|
|
93732
94134
|
folderName,
|
|
93733
94135
|
projectData,
|
|
93734
|
-
isReleased: (0,
|
|
94136
|
+
isReleased: (0, import_variant56.isType)(result, "Success")
|
|
93735
94137
|
}
|
|
93736
94138
|
));
|
|
93737
94139
|
},
|
|
93738
94140
|
Error: () => null,
|
|
93739
|
-
Loading: () => /* @__PURE__ */
|
|
94141
|
+
Loading: () => /* @__PURE__ */ import_react147.default.createElement(Spinner2, { text: "Publishing your site..." })
|
|
93740
94142
|
}));
|
|
93741
94143
|
};
|
|
93742
94144
|
|
|
93743
94145
|
// ../create-new-packages/headless-command/src/components/ChooseVibeSetup.tsx
|
|
93744
94146
|
init_esm_shims();
|
|
93745
|
-
var
|
|
93746
|
-
var
|
|
93747
|
-
var VibeSetupChoice = (0,
|
|
94147
|
+
var import_react148 = __toESM(require_react(), 1);
|
|
94148
|
+
var import_variant57 = __toESM(require_lib(), 1);
|
|
94149
|
+
var VibeSetupChoice = (0, import_variant57.variant)({
|
|
93748
94150
|
SetupVibe: {},
|
|
93749
94151
|
Skip: {}
|
|
93750
94152
|
});
|
|
93751
94153
|
var ChooseVibeSetup = ({ onSubmit }) => {
|
|
93752
|
-
return /* @__PURE__ */
|
|
94154
|
+
return /* @__PURE__ */ import_react148.default.createElement(
|
|
93753
94155
|
SelectInput2,
|
|
93754
94156
|
{
|
|
93755
94157
|
label: "Would you like to set up your project for editing in Wix Vibe?",
|
|
93756
|
-
info: /* @__PURE__ */
|
|
94158
|
+
info: /* @__PURE__ */ import_react148.default.createElement(import_react148.default.Fragment, null, "Use vibe coding with a drag-and-drop editor and an IDE. Requires using GitHub to sync your project.", " ", /* @__PURE__ */ import_react148.default.createElement(Link, { url: "https://support.wix.com/en/using-wix-vibe" }, /* @__PURE__ */ import_react148.default.createElement(Text2, { underline: true }, "Learn more"))),
|
|
93757
94159
|
options: [
|
|
93758
94160
|
{
|
|
93759
94161
|
key: "setup-vibe",
|
|
@@ -93775,8 +94177,8 @@ var ChooseVibeSetup = ({ onSubmit }) => {
|
|
|
93775
94177
|
|
|
93776
94178
|
// ../create-new-packages/headless-command/src/components/VibeRepositorySetupPolling.tsx
|
|
93777
94179
|
init_esm_shims();
|
|
93778
|
-
var
|
|
93779
|
-
var
|
|
94180
|
+
var import_react151 = __toESM(require_react(), 1);
|
|
94181
|
+
var import_variant58 = __toESM(require_lib(), 1);
|
|
93780
94182
|
|
|
93781
94183
|
// ../velo-client/src/index.ts
|
|
93782
94184
|
init_esm_shims();
|
|
@@ -94511,10 +94913,10 @@ var VeloClient = class {
|
|
|
94511
94913
|
|
|
94512
94914
|
// ../velo-client/src/useVeloClient.ts
|
|
94513
94915
|
init_esm_shims();
|
|
94514
|
-
var
|
|
94916
|
+
var import_react149 = __toESM(require_react(), 1);
|
|
94515
94917
|
function useVeloClient() {
|
|
94516
94918
|
const httpClient = useHttpClient({ type: "code" });
|
|
94517
|
-
const client2 = (0,
|
|
94919
|
+
const client2 = (0, import_react149.useMemo)(() => new VeloClient(httpClient), [httpClient]);
|
|
94518
94920
|
return usePanoramaMethodLogger(client2);
|
|
94519
94921
|
}
|
|
94520
94922
|
|
|
@@ -94523,7 +94925,7 @@ init_esm_shims();
|
|
|
94523
94925
|
|
|
94524
94926
|
// ../codestore-client/src/useCodestoreClient.ts
|
|
94525
94927
|
init_esm_shims();
|
|
94526
|
-
var
|
|
94928
|
+
var import_react150 = __toESM(require_react(), 1);
|
|
94527
94929
|
|
|
94528
94930
|
// ../codestore-client/src/codestore-client.ts
|
|
94529
94931
|
init_esm_shims();
|
|
@@ -94687,13 +95089,13 @@ var CodestoreClient = class {
|
|
|
94687
95089
|
// ../codestore-client/src/useCodestoreClient.ts
|
|
94688
95090
|
function useCodestoreClient() {
|
|
94689
95091
|
const httpClient = useHttpClient({ type: "backoffice" });
|
|
94690
|
-
const client2 = (0,
|
|
95092
|
+
const client2 = (0, import_react150.useMemo)(() => new CodestoreClient(httpClient), [httpClient]);
|
|
94691
95093
|
return usePanoramaMethodLogger(client2);
|
|
94692
95094
|
}
|
|
94693
95095
|
|
|
94694
95096
|
// ../create-new-packages/headless-command/src/components/VibeRepositorySetupPolling.tsx
|
|
94695
|
-
var VibeSetupResult = (0,
|
|
94696
|
-
Success: (0,
|
|
95097
|
+
var VibeSetupResult = (0, import_variant58.variant)({
|
|
95098
|
+
Success: (0, import_variant58.fields)(),
|
|
94697
95099
|
Canceled: {},
|
|
94698
95100
|
Failed: {}
|
|
94699
95101
|
});
|
|
@@ -94755,7 +95157,7 @@ var VibeRepositorySetupPolling = ({
|
|
|
94755
95157
|
[projectFolder, projectId],
|
|
94756
95158
|
{
|
|
94757
95159
|
onSuccess: (result) => {
|
|
94758
|
-
if ((0,
|
|
95160
|
+
if ((0, import_variant58.isType)(result, VibeSetupResult.Success)) {
|
|
94759
95161
|
onSubmit?.();
|
|
94760
95162
|
}
|
|
94761
95163
|
},
|
|
@@ -94766,11 +95168,11 @@ var VibeRepositorySetupPolling = ({
|
|
|
94766
95168
|
}
|
|
94767
95169
|
}
|
|
94768
95170
|
);
|
|
94769
|
-
return (0,
|
|
94770
|
-
Error: () => /* @__PURE__ */
|
|
94771
|
-
Loading: () => /* @__PURE__ */
|
|
94772
|
-
Success: ({ result }) => (0,
|
|
94773
|
-
Success: ({ repoName, htmlUrl }) => /* @__PURE__ */
|
|
95171
|
+
return (0, import_variant58.match)(status, {
|
|
95172
|
+
Error: () => /* @__PURE__ */ import_react151.default.createElement(Box_default, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ import_react151.default.createElement(Text2, { skin: "error" }, "Failed to connect to Wix Vibe")),
|
|
95173
|
+
Loading: () => /* @__PURE__ */ import_react151.default.createElement(Box_default, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ import_react151.default.createElement(Spinner2, { text: "Opening browser for Wix Vibe setup..." }), /* @__PURE__ */ import_react151.default.createElement(Text2, { skin: "secondary" }, "Complete the setup in your browser. We're waiting for you to finish...")),
|
|
95174
|
+
Success: ({ result }) => (0, import_variant58.match)(result, {
|
|
95175
|
+
Success: ({ repoName, htmlUrl }) => /* @__PURE__ */ import_react151.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react151.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react151.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react151.default.createElement(Text2, null, "GitHub repository '", repoName, "' created and Synced.", " ", /* @__PURE__ */ import_react151.default.createElement(Link, { url: htmlUrl }, "View Repository.")))),
|
|
94774
95176
|
Canceled: () => null
|
|
94775
95177
|
})
|
|
94776
95178
|
});
|
|
@@ -94786,19 +95188,19 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94786
95188
|
businessName: defaultBusinessName,
|
|
94787
95189
|
cloudProviders
|
|
94788
95190
|
}) => {
|
|
94789
|
-
const [businessName, setBusinessName] = (0,
|
|
95191
|
+
const [businessName, setBusinessName] = (0, import_react152.useState)(
|
|
94790
95192
|
defaultBusinessName
|
|
94791
95193
|
);
|
|
94792
|
-
const [selectedTemplate, setSelectedTemplate] = (0,
|
|
94793
|
-
const [folderName, setFolderName] = (0,
|
|
95194
|
+
const [selectedTemplate, setSelectedTemplate] = (0, import_react152.useState)(defaultTemplate);
|
|
95195
|
+
const [folderName, setFolderName] = (0, import_react152.useState)(
|
|
94794
95196
|
defaultProjectName
|
|
94795
95197
|
);
|
|
94796
|
-
const [businessId, setBusinessId] = (0,
|
|
94797
|
-
const [projectData, setProjectData] = (0,
|
|
94798
|
-
const [generationDone, setGenerationDone] = (0,
|
|
94799
|
-
const [vibeSetupChoice, setVibeSetupChoice] = (0,
|
|
94800
|
-
const [vibeSetupDone, setVibeSetupDone] = (0,
|
|
94801
|
-
const projectFolder = (0,
|
|
95198
|
+
const [businessId, setBusinessId] = (0, import_react152.useState)();
|
|
95199
|
+
const [projectData, setProjectData] = (0, import_react152.useState)();
|
|
95200
|
+
const [generationDone, setGenerationDone] = (0, import_react152.useState)(false);
|
|
95201
|
+
const [vibeSetupChoice, setVibeSetupChoice] = (0, import_react152.useState)();
|
|
95202
|
+
const [vibeSetupDone, setVibeSetupDone] = (0, import_react152.useState)(false);
|
|
95203
|
+
const projectFolder = (0, import_react152.useMemo)(
|
|
94802
95204
|
() => folderName ? join19(targetParentFolder2, folderName) : void 0,
|
|
94803
95205
|
[targetParentFolder2, folderName]
|
|
94804
95206
|
);
|
|
@@ -94807,15 +95209,15 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94807
95209
|
const packageManager2 = await createPackageManager(repoType2);
|
|
94808
95210
|
return { packageManager: packageManager2 };
|
|
94809
95211
|
}, []);
|
|
94810
|
-
const isVibeCompatible = (0,
|
|
94811
|
-
() => (0,
|
|
95212
|
+
const isVibeCompatible = (0, import_react152.useMemo)(
|
|
95213
|
+
() => (0, import_variant59.isType)(selectedTemplate, "HeadlessApp") && selectedTemplate.vibeCompatible,
|
|
94812
95214
|
[selectedTemplate]
|
|
94813
95215
|
);
|
|
94814
|
-
return (0,
|
|
95216
|
+
return (0, import_variant59.match)(status, {
|
|
94815
95217
|
Error: () => null,
|
|
94816
|
-
Loading: () => /* @__PURE__ */
|
|
95218
|
+
Loading: () => /* @__PURE__ */ import_react152.default.createElement(Spinner2, { text: "Loading..." }),
|
|
94817
95219
|
Success: ({ result: { packageManager: packageManager2 } }) => {
|
|
94818
|
-
return /* @__PURE__ */
|
|
95220
|
+
return /* @__PURE__ */ import_react152.default.createElement(
|
|
94819
95221
|
Box_default,
|
|
94820
95222
|
{
|
|
94821
95223
|
flexDirection: "column",
|
|
@@ -94826,14 +95228,14 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94826
95228
|
borderTop: false,
|
|
94827
95229
|
paddingLeft: 1
|
|
94828
95230
|
},
|
|
94829
|
-
/* @__PURE__ */
|
|
94830
|
-
!defaultBusinessName && /* @__PURE__ */
|
|
95231
|
+
/* @__PURE__ */ import_react152.default.createElement(WelcomeMessage2, null),
|
|
95232
|
+
!defaultBusinessName && /* @__PURE__ */ import_react152.default.createElement(
|
|
94831
95233
|
ChooseBusinessName,
|
|
94832
95234
|
{
|
|
94833
95235
|
onSubmit: ({ businessName: businessName2 }) => setBusinessName(businessName2)
|
|
94834
95236
|
}
|
|
94835
95237
|
),
|
|
94836
|
-
!defaultTemplate && businessName && /* @__PURE__ */
|
|
95238
|
+
!defaultTemplate && businessName && /* @__PURE__ */ import_react152.default.createElement(
|
|
94837
95239
|
ChooseTemplate2,
|
|
94838
95240
|
{
|
|
94839
95241
|
onSubmit: ({ template }) => {
|
|
@@ -94841,7 +95243,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94841
95243
|
}
|
|
94842
95244
|
}
|
|
94843
95245
|
),
|
|
94844
|
-
businessName && selectedTemplate && /* @__PURE__ */
|
|
95246
|
+
businessName && selectedTemplate && /* @__PURE__ */ import_react152.default.createElement(AuthProvider, null, /* @__PURE__ */ import_react152.default.createElement(
|
|
94845
95247
|
CreateBusiness,
|
|
94846
95248
|
{
|
|
94847
95249
|
businessName,
|
|
@@ -94849,7 +95251,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94849
95251
|
onDone: ({ businessId: businessId2 }) => setBusinessId(businessId2)
|
|
94850
95252
|
}
|
|
94851
95253
|
)),
|
|
94852
|
-
!defaultProjectName && businessName && selectedTemplate && businessId && /* @__PURE__ */
|
|
95254
|
+
!defaultProjectName && businessName && selectedTemplate && businessId && /* @__PURE__ */ import_react152.default.createElement(
|
|
94853
95255
|
ChooseFolder,
|
|
94854
95256
|
{
|
|
94855
95257
|
initialFolderName: (0, import_kebabCase5.default)(businessName),
|
|
@@ -94857,7 +95259,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94857
95259
|
onSubmit: ({ folderName: folderName2 }) => setFolderName(folderName2)
|
|
94858
95260
|
}
|
|
94859
95261
|
),
|
|
94860
|
-
businessName && selectedTemplate && businessId && folderName && /* @__PURE__ */
|
|
95262
|
+
businessName && selectedTemplate && businessId && folderName && /* @__PURE__ */ import_react152.default.createElement(AuthProvider, null, /* @__PURE__ */ import_react152.default.createElement(
|
|
94861
95263
|
CreateProject,
|
|
94862
95264
|
{
|
|
94863
95265
|
businessId,
|
|
@@ -94866,7 +95268,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94866
95268
|
onSubmit: (data) => setProjectData(data)
|
|
94867
95269
|
}
|
|
94868
95270
|
)),
|
|
94869
|
-
businessName && selectedTemplate && businessId && projectData && folderName && /* @__PURE__ */
|
|
95271
|
+
businessName && selectedTemplate && businessId && projectData && folderName && /* @__PURE__ */ import_react152.default.createElement(
|
|
94870
95272
|
GenerateProject2,
|
|
94871
95273
|
{
|
|
94872
95274
|
folderName,
|
|
@@ -94879,13 +95281,13 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94879
95281
|
onDone: (isDone) => setGenerationDone(isDone)
|
|
94880
95282
|
}
|
|
94881
95283
|
),
|
|
94882
|
-
businessName && selectedTemplate && businessId && projectData && folderName && generationDone && !vibeSetupChoice && isVibeCompatible && /* @__PURE__ */
|
|
95284
|
+
businessName && selectedTemplate && businessId && projectData && folderName && generationDone && !vibeSetupChoice && isVibeCompatible && /* @__PURE__ */ import_react152.default.createElement(
|
|
94883
95285
|
ChooseVibeSetup,
|
|
94884
95286
|
{
|
|
94885
95287
|
onSubmit: (choice) => setVibeSetupChoice(choice)
|
|
94886
95288
|
}
|
|
94887
95289
|
),
|
|
94888
|
-
businessName && selectedTemplate && businessId && projectData && projectFolder && generationDone && isVibeCompatible && (0,
|
|
95290
|
+
businessName && selectedTemplate && businessId && projectData && projectFolder && generationDone && isVibeCompatible && (0, import_variant59.isType)(vibeSetupChoice, "SetupVibe") && /* @__PURE__ */ import_react152.default.createElement(AuthProvider, null, /* @__PURE__ */ import_react152.default.createElement(
|
|
94889
95291
|
VibeRepositorySetupPolling,
|
|
94890
95292
|
{
|
|
94891
95293
|
projectId: projectData.projectId,
|
|
@@ -94893,7 +95295,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94893
95295
|
onSubmit: () => setVibeSetupDone(true)
|
|
94894
95296
|
}
|
|
94895
95297
|
)),
|
|
94896
|
-
businessName && selectedTemplate && businessId && projectData && folderName && generationDone && (vibeSetupDone || (0,
|
|
95298
|
+
businessName && selectedTemplate && businessId && projectData && folderName && generationDone && (vibeSetupDone || (0, import_variant59.isType)(vibeSetupChoice, "Skip") || !isVibeCompatible) && /* @__PURE__ */ import_react152.default.createElement(
|
|
94897
95299
|
ReleaseProject,
|
|
94898
95300
|
{
|
|
94899
95301
|
folderName,
|
|
@@ -94931,13 +95333,13 @@ var ProcessCommand = ({ targetParentFolder: targetParentFolder2, commandOptions
|
|
|
94931
95333
|
}
|
|
94932
95334
|
return result;
|
|
94933
95335
|
}, []);
|
|
94934
|
-
return (0,
|
|
95336
|
+
return (0, import_variant60.match)(status, {
|
|
94935
95337
|
Error: () => null,
|
|
94936
|
-
Loading: () => /* @__PURE__ */
|
|
95338
|
+
Loading: () => /* @__PURE__ */ import_react153.default.createElement(Spinner2, { text: "Loading..." }),
|
|
94937
95339
|
Success: ({
|
|
94938
95340
|
result: { template, projectName, businessName, cloudProviders, publish }
|
|
94939
95341
|
}) => {
|
|
94940
|
-
return /* @__PURE__ */
|
|
95342
|
+
return /* @__PURE__ */ import_react153.default.createElement(
|
|
94941
95343
|
CreateHeadlessSiteCommand,
|
|
94942
95344
|
{
|
|
94943
95345
|
targetParentFolder: targetParentFolder2,
|
|
@@ -95046,7 +95448,7 @@ var getHeadlessCommand = ({
|
|
|
95046
95448
|
try {
|
|
95047
95449
|
transaction.start();
|
|
95048
95450
|
await render2(
|
|
95049
|
-
/* @__PURE__ */
|
|
95451
|
+
/* @__PURE__ */ import_react154.default.createElement(BiProvider, { value: biLogger }, /* @__PURE__ */ import_react154.default.createElement(ErrorReporterProvider, { value: errorReporter2 }, /* @__PURE__ */ import_react154.default.createElement(PanoramaProvider, { value: panorama2 }, /* @__PURE__ */ import_react154.default.createElement(
|
|
95050
95452
|
LinkCommand,
|
|
95051
95453
|
{
|
|
95052
95454
|
projectName: options.projectName,
|
|
@@ -95132,7 +95534,7 @@ var getHeadlessCommand = ({
|
|
|
95132
95534
|
try {
|
|
95133
95535
|
transaction.start();
|
|
95134
95536
|
await render2(
|
|
95135
|
-
/* @__PURE__ */
|
|
95537
|
+
/* @__PURE__ */ import_react154.default.createElement(BiProvider, { value: biLogger }, /* @__PURE__ */ import_react154.default.createElement(ErrorReporterProvider, { value: errorReporter2 }, /* @__PURE__ */ import_react154.default.createElement(PanoramaProvider, { value: panorama2 }, /* @__PURE__ */ import_react154.default.createElement(
|
|
95136
95538
|
ProcessCommand,
|
|
95137
95539
|
{
|
|
95138
95540
|
targetParentFolder: targetParentFolder2,
|
|
@@ -95157,7 +95559,7 @@ import { randomUUID as randomUUID2 } from "node:crypto";
|
|
|
95157
95559
|
var package_default = {
|
|
95158
95560
|
name: "@wix/create-new",
|
|
95159
95561
|
description: "General entry point for creating Wix projects",
|
|
95160
|
-
version: "0.0.
|
|
95562
|
+
version: "0.0.40",
|
|
95161
95563
|
bin: "bin/index.cjs",
|
|
95162
95564
|
devDependencies: {
|
|
95163
95565
|
"@commander-js/extra-typings": "^13.0.0",
|