@wix/create-new 0.0.39 → 0.0.41
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 +1563 -1171
- 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);
|
|
@@ -50214,7 +50227,10 @@ function createHttpClient({
|
|
|
50214
50227
|
"X-XSRF-TOKEN": "nocheck",
|
|
50215
50228
|
Cookie: "XSRF-TOKEN=nocheck",
|
|
50216
50229
|
"User-Agent": "wix-cli"
|
|
50217
|
-
})
|
|
50230
|
+
}),
|
|
50231
|
+
// https://github.com/axios/axios/issues/4263 - fixed in Axios ^1.x.x but currently cannot be bumped in Wix Http Client
|
|
50232
|
+
maxBodyLength: Infinity,
|
|
50233
|
+
maxContentLength: Infinity
|
|
50218
50234
|
});
|
|
50219
50235
|
return {
|
|
50220
50236
|
...client2,
|
|
@@ -51371,12 +51387,12 @@ var getAllProperties = (object) => {
|
|
|
51371
51387
|
};
|
|
51372
51388
|
function autoBind(self2, { include, exclude } = {}) {
|
|
51373
51389
|
const filter = (key) => {
|
|
51374
|
-
const
|
|
51390
|
+
const match37 = (pattern) => typeof pattern === "string" ? key === pattern : pattern.test(key);
|
|
51375
51391
|
if (include) {
|
|
51376
|
-
return include.some(
|
|
51392
|
+
return include.some(match37);
|
|
51377
51393
|
}
|
|
51378
51394
|
if (exclude) {
|
|
51379
|
-
return !exclude.some(
|
|
51395
|
+
return !exclude.some(match37);
|
|
51380
51396
|
}
|
|
51381
51397
|
return true;
|
|
51382
51398
|
};
|
|
@@ -56952,6 +56968,7 @@ var Input2 = ({
|
|
|
56952
56968
|
},
|
|
56953
56969
|
onSubmit: () => {
|
|
56954
56970
|
if (!currentValue && placeholder) {
|
|
56971
|
+
setCurrentValue(placeholder);
|
|
56955
56972
|
onSubmit?.(placeholder);
|
|
56956
56973
|
} else {
|
|
56957
56974
|
onSubmit?.(currentValue);
|
|
@@ -57126,9 +57143,9 @@ var Highlighter = ({ pattern, text }) => {
|
|
|
57126
57143
|
}
|
|
57127
57144
|
const matches = text.matchAll(pattern);
|
|
57128
57145
|
const hightlightMap = new Array(text.length).fill(0);
|
|
57129
|
-
for (const
|
|
57130
|
-
const start =
|
|
57131
|
-
const end =
|
|
57146
|
+
for (const match37 of matches) {
|
|
57147
|
+
const start = match37.index;
|
|
57148
|
+
const end = match37.index + match37[0].length;
|
|
57132
57149
|
for (let i2 = start; i2 < end; i2++) {
|
|
57133
57150
|
hightlightMap[i2] = 1;
|
|
57134
57151
|
}
|
|
@@ -57430,8 +57447,45 @@ init_esm_shims();
|
|
|
57430
57447
|
|
|
57431
57448
|
// ../cli-ui-kit/src/components/TextInput/TextInput.tsx
|
|
57432
57449
|
init_esm_shims();
|
|
57433
|
-
var
|
|
57450
|
+
var import_react57 = __toESM(require_react(), 1);
|
|
57434
57451
|
var import_variant15 = __toESM(require_lib(), 1);
|
|
57452
|
+
|
|
57453
|
+
// ../cli-ui-kit/src/components/Spinner.tsx
|
|
57454
|
+
init_esm_shims();
|
|
57455
|
+
var import_react56 = __toESM(require_react(), 1);
|
|
57456
|
+
|
|
57457
|
+
// ../../node_modules/ink-spinner/build/index.js
|
|
57458
|
+
init_esm_shims();
|
|
57459
|
+
var import_react55 = __toESM(require_react(), 1);
|
|
57460
|
+
var import_cli_spinners = __toESM(require_cli_spinners(), 1);
|
|
57461
|
+
function Spinner({ type = "dots" }) {
|
|
57462
|
+
const [frame, setFrame] = (0, import_react55.useState)(0);
|
|
57463
|
+
const spinner = import_cli_spinners.default[type];
|
|
57464
|
+
(0, import_react55.useEffect)(() => {
|
|
57465
|
+
const timer = setInterval(() => {
|
|
57466
|
+
setFrame((previousFrame) => {
|
|
57467
|
+
const isLastFrame = previousFrame === spinner.frames.length - 1;
|
|
57468
|
+
return isLastFrame ? 0 : previousFrame + 1;
|
|
57469
|
+
});
|
|
57470
|
+
}, spinner.interval);
|
|
57471
|
+
return () => {
|
|
57472
|
+
clearInterval(timer);
|
|
57473
|
+
};
|
|
57474
|
+
}, [spinner]);
|
|
57475
|
+
return import_react55.default.createElement(Text, null, spinner.frames[frame]);
|
|
57476
|
+
}
|
|
57477
|
+
var build_default2 = Spinner;
|
|
57478
|
+
|
|
57479
|
+
// ../cli-ui-kit/src/components/Spinner.tsx
|
|
57480
|
+
var Spinner2 = ({ text }) => {
|
|
57481
|
+
const spinnerNode = /* @__PURE__ */ import_react56.default.createElement(Text2, { skin: "info" }, /* @__PURE__ */ import_react56.default.createElement(build_default2, { type: "dots" }));
|
|
57482
|
+
if (text) {
|
|
57483
|
+
return /* @__PURE__ */ import_react56.default.createElement(Box_default, { gap: 1 }, spinnerNode, typeof text === "string" ? /* @__PURE__ */ import_react56.default.createElement(Text2, null, text) : text);
|
|
57484
|
+
}
|
|
57485
|
+
return spinnerNode;
|
|
57486
|
+
};
|
|
57487
|
+
|
|
57488
|
+
// ../cli-ui-kit/src/components/TextInput/TextInput.tsx
|
|
57435
57489
|
var TextInput2 = ({
|
|
57436
57490
|
label,
|
|
57437
57491
|
isActive,
|
|
@@ -57440,38 +57494,48 @@ var TextInput2 = ({
|
|
|
57440
57494
|
validate: validate3 = () => true,
|
|
57441
57495
|
inCreateFlow = false
|
|
57442
57496
|
}) => {
|
|
57443
|
-
const [inputState, setInputState] = (0,
|
|
57497
|
+
const [inputState, setInputState] = (0, import_react57.useState)(
|
|
57444
57498
|
() => InputState.NotSubmitted(placeholder)
|
|
57445
57499
|
);
|
|
57446
|
-
const [isDirty, setIsDirty] = (0,
|
|
57447
|
-
const [
|
|
57448
|
-
const
|
|
57500
|
+
const [isDirty, setIsDirty] = (0, import_react57.useState)(false);
|
|
57501
|
+
const [showSpinner, setShowSpinner] = (0, import_react57.useState)(false);
|
|
57502
|
+
const [validationError, setValidationError] = (0, import_react57.useState)();
|
|
57503
|
+
const handleSubmit = (0, import_react57.useCallback)(
|
|
57449
57504
|
async (value2) => {
|
|
57505
|
+
setValidationError(void 0);
|
|
57450
57506
|
setIsDirty(false);
|
|
57451
|
-
const
|
|
57452
|
-
|
|
57453
|
-
|
|
57454
|
-
|
|
57455
|
-
|
|
57456
|
-
|
|
57457
|
-
|
|
57507
|
+
const validatingTimer = setTimeout(() => {
|
|
57508
|
+
setShowSpinner(true);
|
|
57509
|
+
}, 300);
|
|
57510
|
+
try {
|
|
57511
|
+
const validationResult = await validate3(value2);
|
|
57512
|
+
if (validationResult !== true) {
|
|
57513
|
+
setValidationError(validationResult);
|
|
57514
|
+
} else {
|
|
57515
|
+
setValidationError(void 0);
|
|
57516
|
+
setInputState(InputState.Submitted(value2));
|
|
57517
|
+
onSubmit(value2);
|
|
57518
|
+
}
|
|
57519
|
+
} finally {
|
|
57520
|
+
clearTimeout(validatingTimer);
|
|
57521
|
+
setShowSpinner(false);
|
|
57458
57522
|
}
|
|
57459
57523
|
},
|
|
57460
57524
|
[onSubmit, validate3]
|
|
57461
57525
|
);
|
|
57462
57526
|
const afterValidationError = Boolean(validationError && !isDirty);
|
|
57463
|
-
(0,
|
|
57527
|
+
(0, import_react57.useEffect)(() => {
|
|
57464
57528
|
if (isActive) {
|
|
57465
57529
|
setInputState(InputState.NotSubmitted(inputState.value));
|
|
57466
57530
|
}
|
|
57467
57531
|
}, [isActive]);
|
|
57468
|
-
return /* @__PURE__ */
|
|
57532
|
+
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
57533
|
InputLabel,
|
|
57470
57534
|
{
|
|
57471
|
-
icon: /* @__PURE__ */
|
|
57535
|
+
icon: /* @__PURE__ */ import_react57.default.createElement(Text2, { skin: "question" }, /* @__PURE__ */ import_react57.default.createElement(PointerIcon, { appearance: "triangle" }))
|
|
57472
57536
|
},
|
|
57473
57537
|
label
|
|
57474
|
-
), (0, import_variant15.isType)(inputState, InputState.NotSubmitted) && /* @__PURE__ */
|
|
57538
|
+
), (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
57539
|
Input2,
|
|
57476
57540
|
{
|
|
57477
57541
|
placeholder: inputState.value,
|
|
@@ -57479,52 +57543,52 @@ var TextInput2 = ({
|
|
|
57479
57543
|
onChange: () => setIsDirty(true),
|
|
57480
57544
|
showCursor: afterValidationError
|
|
57481
57545
|
}
|
|
57482
|
-
))))), (0, import_variant15.isType)(inputState, InputState.Submitted) && /* @__PURE__ */
|
|
57546
|
+
))))), (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
57547
|
};
|
|
57484
57548
|
|
|
57485
57549
|
// ../cli-ui-kit/src/components/Alert.tsx
|
|
57486
57550
|
init_esm_shims();
|
|
57487
|
-
var
|
|
57551
|
+
var import_react58 = __toESM(require_react(), 1);
|
|
57488
57552
|
var import_variant16 = __toESM(require_lib(), 1);
|
|
57489
57553
|
var Alert = ({ type, children }) => {
|
|
57490
57554
|
const icon = (0, import_variant16.match)(type, {
|
|
57491
57555
|
error: (0, import_variant16.constant)(
|
|
57492
|
-
/* @__PURE__ */
|
|
57556
|
+
/* @__PURE__ */ import_react58.default.createElement(Text2, { skin: "error" }, /* @__PURE__ */ import_react58.default.createElement(ErrorIcon, null))
|
|
57493
57557
|
),
|
|
57494
57558
|
warning: (0, import_variant16.constant)(
|
|
57495
|
-
/* @__PURE__ */
|
|
57559
|
+
/* @__PURE__ */ import_react58.default.createElement(Text2, { skin: "warning" }, /* @__PURE__ */ import_react58.default.createElement(WarningIcon, null))
|
|
57496
57560
|
),
|
|
57497
57561
|
success: (0, import_variant16.constant)(
|
|
57498
|
-
/* @__PURE__ */
|
|
57562
|
+
/* @__PURE__ */ import_react58.default.createElement(Text2, { skin: "success" }, /* @__PURE__ */ import_react58.default.createElement(SuccessIcon, null))
|
|
57499
57563
|
),
|
|
57500
|
-
insight: (0, import_variant16.constant)(/* @__PURE__ */
|
|
57564
|
+
insight: (0, import_variant16.constant)(/* @__PURE__ */ import_react58.default.createElement(InsightIcon, null))
|
|
57501
57565
|
});
|
|
57502
|
-
return /* @__PURE__ */
|
|
57566
|
+
return /* @__PURE__ */ import_react58.default.createElement(Text2, null, icon, " ", children);
|
|
57503
57567
|
};
|
|
57504
57568
|
|
|
57505
57569
|
// ../cli-ui-kit/src/components/Badge.tsx
|
|
57506
57570
|
init_esm_shims();
|
|
57507
|
-
var
|
|
57571
|
+
var import_react59 = __toESM(require_react(), 1);
|
|
57508
57572
|
var skins2 = {
|
|
57509
57573
|
success: { backgroundColor: "green" }
|
|
57510
57574
|
};
|
|
57511
57575
|
var Badge = ({ children, skin }) => {
|
|
57512
|
-
return /* @__PURE__ */
|
|
57576
|
+
return /* @__PURE__ */ import_react59.default.createElement(Text, { ...skins2[skin] }, " ", children, " ");
|
|
57513
57577
|
};
|
|
57514
57578
|
|
|
57515
57579
|
// ../cli-ui-kit/src/components/Key.tsx
|
|
57516
57580
|
init_esm_shims();
|
|
57517
|
-
var
|
|
57581
|
+
var import_react60 = __toESM(require_react(), 1);
|
|
57518
57582
|
var Key = ({ value: value2, skin }) => {
|
|
57519
57583
|
if (skin === "secondary") {
|
|
57520
|
-
return /* @__PURE__ */
|
|
57584
|
+
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
57585
|
}
|
|
57522
|
-
return /* @__PURE__ */
|
|
57586
|
+
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
57587
|
};
|
|
57524
57588
|
|
|
57525
57589
|
// ../cli-ui-kit/src/components/Link.tsx
|
|
57526
57590
|
init_esm_shims();
|
|
57527
|
-
var
|
|
57591
|
+
var import_react61 = __toESM(require_react(), 1);
|
|
57528
57592
|
|
|
57529
57593
|
// ../../node_modules/terminal-link/index.js
|
|
57530
57594
|
init_esm_shims();
|
|
@@ -57671,52 +57735,17 @@ terminalLink.stderr.isSupported = import_supports_hyperlinks.default.stderr;
|
|
|
57671
57735
|
var Link = ({ skin, children, url }) => {
|
|
57672
57736
|
if (children) {
|
|
57673
57737
|
if (terminalLink.isSupported) {
|
|
57674
|
-
return /* @__PURE__ */
|
|
57738
|
+
return /* @__PURE__ */ import_react61.default.createElement(
|
|
57675
57739
|
Transform,
|
|
57676
57740
|
{
|
|
57677
57741
|
transform: (childrenAsString) => terminalLink(childrenAsString, url, { fallback: false })
|
|
57678
57742
|
},
|
|
57679
|
-
/* @__PURE__ */
|
|
57743
|
+
/* @__PURE__ */ import_react61.default.createElement(Text2, { skin }, children)
|
|
57680
57744
|
);
|
|
57681
57745
|
}
|
|
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);
|
|
57746
|
+
return /* @__PURE__ */ import_react61.default.createElement(Text2, null, /* @__PURE__ */ import_react61.default.createElement(Text2, { skin }, children), " (", url, ")");
|
|
57718
57747
|
}
|
|
57719
|
-
return
|
|
57748
|
+
return /* @__PURE__ */ import_react61.default.createElement(Text2, { skin: "info" }, url);
|
|
57720
57749
|
};
|
|
57721
57750
|
|
|
57722
57751
|
// ../cli-ui-kit/src/components/ErrorDetails.tsx
|
|
@@ -59140,9 +59169,9 @@ init_esm_shims();
|
|
|
59140
59169
|
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
59170
|
function parseDateTimeSkeleton(skeleton) {
|
|
59142
59171
|
var result = {};
|
|
59143
|
-
skeleton.replace(DATE_TIME_REGEX, function(
|
|
59144
|
-
var len =
|
|
59145
|
-
switch (
|
|
59172
|
+
skeleton.replace(DATE_TIME_REGEX, function(match37) {
|
|
59173
|
+
var len = match37.length;
|
|
59174
|
+
switch (match37[0]) {
|
|
59146
59175
|
// Era
|
|
59147
59176
|
case "G":
|
|
59148
59177
|
result.era = len === 4 ? "long" : len === 5 ? "narrow" : "short";
|
|
@@ -61152,21 +61181,21 @@ if (REGEX_SUPPORTS_U_AND_Y) {
|
|
|
61152
61181
|
matchIdentifierAtIndex = function matchIdentifierAtIndex2(s2, index) {
|
|
61153
61182
|
var _a3;
|
|
61154
61183
|
IDENTIFIER_PREFIX_RE_1.lastIndex = index;
|
|
61155
|
-
var
|
|
61156
|
-
return (_a3 =
|
|
61184
|
+
var match37 = IDENTIFIER_PREFIX_RE_1.exec(s2);
|
|
61185
|
+
return (_a3 = match37[1]) !== null && _a3 !== void 0 ? _a3 : "";
|
|
61157
61186
|
};
|
|
61158
61187
|
} else {
|
|
61159
61188
|
matchIdentifierAtIndex = function matchIdentifierAtIndex2(s2, index) {
|
|
61160
|
-
var
|
|
61189
|
+
var match37 = [];
|
|
61161
61190
|
while (true) {
|
|
61162
61191
|
var c2 = codePointAt(s2, index);
|
|
61163
61192
|
if (c2 === void 0 || _isWhiteSpace(c2) || _isPatternSyntax(c2)) {
|
|
61164
61193
|
break;
|
|
61165
61194
|
}
|
|
61166
|
-
|
|
61195
|
+
match37.push(c2);
|
|
61167
61196
|
index += c2 >= 65536 ? 2 : 1;
|
|
61168
61197
|
}
|
|
61169
|
-
return fromCodePoint.apply(void 0,
|
|
61198
|
+
return fromCodePoint.apply(void 0, match37);
|
|
61170
61199
|
};
|
|
61171
61200
|
}
|
|
61172
61201
|
var IDENTIFIER_PREFIX_RE_1;
|
|
@@ -63589,7 +63618,7 @@ var Interpolator = class {
|
|
|
63589
63618
|
this.nestingRegexp = getOrResetRegExp(this.nestingRegexp, `${this.nestingPrefix}(.+?)${this.nestingSuffix}`);
|
|
63590
63619
|
}
|
|
63591
63620
|
interpolate(str, data, lng, options) {
|
|
63592
|
-
let
|
|
63621
|
+
let match37;
|
|
63593
63622
|
let value2;
|
|
63594
63623
|
let replaces;
|
|
63595
63624
|
const defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
|
|
@@ -63623,17 +63652,17 @@ var Interpolator = class {
|
|
|
63623
63652
|
}];
|
|
63624
63653
|
todos.forEach((todo) => {
|
|
63625
63654
|
replaces = 0;
|
|
63626
|
-
while (
|
|
63627
|
-
const matchedVar =
|
|
63655
|
+
while (match37 = todo.regex.exec(str)) {
|
|
63656
|
+
const matchedVar = match37[1].trim();
|
|
63628
63657
|
value2 = handleFormat(matchedVar);
|
|
63629
63658
|
if (value2 === void 0) {
|
|
63630
63659
|
if (typeof missingInterpolationHandler === "function") {
|
|
63631
|
-
const temp = missingInterpolationHandler(str,
|
|
63660
|
+
const temp = missingInterpolationHandler(str, match37, options);
|
|
63632
63661
|
value2 = isString2(temp) ? temp : "";
|
|
63633
63662
|
} else if (options && Object.prototype.hasOwnProperty.call(options, matchedVar)) {
|
|
63634
63663
|
value2 = "";
|
|
63635
63664
|
} else if (skipOnVariables) {
|
|
63636
|
-
value2 =
|
|
63665
|
+
value2 = match37[0];
|
|
63637
63666
|
continue;
|
|
63638
63667
|
} else {
|
|
63639
63668
|
this.logger.warn(`missed to pass in variable ${matchedVar} for interpolating ${str}`);
|
|
@@ -63643,10 +63672,10 @@ var Interpolator = class {
|
|
|
63643
63672
|
value2 = makeString(value2);
|
|
63644
63673
|
}
|
|
63645
63674
|
const safeValue = todo.safeValue(value2);
|
|
63646
|
-
str = str.replace(
|
|
63675
|
+
str = str.replace(match37[0], safeValue);
|
|
63647
63676
|
if (skipOnVariables) {
|
|
63648
63677
|
todo.regex.lastIndex += value2.length;
|
|
63649
|
-
todo.regex.lastIndex -=
|
|
63678
|
+
todo.regex.lastIndex -= match37[0].length;
|
|
63650
63679
|
} else {
|
|
63651
63680
|
todo.regex.lastIndex = 0;
|
|
63652
63681
|
}
|
|
@@ -63660,7 +63689,7 @@ var Interpolator = class {
|
|
|
63660
63689
|
}
|
|
63661
63690
|
nest(str, fc) {
|
|
63662
63691
|
let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
63663
|
-
let
|
|
63692
|
+
let match37;
|
|
63664
63693
|
let value2;
|
|
63665
63694
|
let clonedOptions;
|
|
63666
63695
|
const handleHasOptions = (key, inheritedOptions) => {
|
|
@@ -63688,7 +63717,7 @@ var Interpolator = class {
|
|
|
63688
63717
|
if (clonedOptions.defaultValue && clonedOptions.defaultValue.indexOf(this.prefix) > -1) delete clonedOptions.defaultValue;
|
|
63689
63718
|
return key;
|
|
63690
63719
|
};
|
|
63691
|
-
while (
|
|
63720
|
+
while (match37 = this.nestingRegexp.exec(str)) {
|
|
63692
63721
|
let formatters = [];
|
|
63693
63722
|
clonedOptions = {
|
|
63694
63723
|
...options
|
|
@@ -63697,26 +63726,26 @@ var Interpolator = class {
|
|
|
63697
63726
|
clonedOptions.applyPostProcessor = false;
|
|
63698
63727
|
delete clonedOptions.defaultValue;
|
|
63699
63728
|
let doReduce = false;
|
|
63700
|
-
if (
|
|
63701
|
-
const r2 =
|
|
63702
|
-
|
|
63729
|
+
if (match37[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(match37[1])) {
|
|
63730
|
+
const r2 = match37[1].split(this.formatSeparator).map((elem) => elem.trim());
|
|
63731
|
+
match37[1] = r2.shift();
|
|
63703
63732
|
formatters = r2;
|
|
63704
63733
|
doReduce = true;
|
|
63705
63734
|
}
|
|
63706
|
-
value2 = fc(handleHasOptions.call(this,
|
|
63707
|
-
if (value2 &&
|
|
63735
|
+
value2 = fc(handleHasOptions.call(this, match37[1].trim(), clonedOptions), clonedOptions);
|
|
63736
|
+
if (value2 && match37[0] === str && !isString2(value2)) return value2;
|
|
63708
63737
|
if (!isString2(value2)) value2 = makeString(value2);
|
|
63709
63738
|
if (!value2) {
|
|
63710
|
-
this.logger.warn(`missed to resolve ${
|
|
63739
|
+
this.logger.warn(`missed to resolve ${match37[1]} for nesting ${str}`);
|
|
63711
63740
|
value2 = "";
|
|
63712
63741
|
}
|
|
63713
63742
|
if (doReduce) {
|
|
63714
63743
|
value2 = formatters.reduce((v, f) => this.format(v, f, options.lng, {
|
|
63715
63744
|
...options,
|
|
63716
|
-
interpolationkey:
|
|
63745
|
+
interpolationkey: match37[1].trim()
|
|
63717
63746
|
}), value2.trim());
|
|
63718
63747
|
}
|
|
63719
|
-
str = str.replace(
|
|
63748
|
+
str = str.replace(match37[0], value2);
|
|
63720
63749
|
this.regexp.lastIndex = 0;
|
|
63721
63750
|
}
|
|
63722
63751
|
return str;
|
|
@@ -64839,8 +64868,8 @@ async function defaultBrowserId() {
|
|
|
64839
64868
|
throw new Error("macOS only");
|
|
64840
64869
|
}
|
|
64841
64870
|
const { stdout } = await execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]);
|
|
64842
|
-
const
|
|
64843
|
-
return
|
|
64871
|
+
const match37 = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
|
|
64872
|
+
return match37?.groups.id ?? "com.apple.Safari";
|
|
64844
64873
|
}
|
|
64845
64874
|
|
|
64846
64875
|
// ../../node_modules/bundle-name/index.js
|
|
@@ -64894,11 +64923,11 @@ async function defaultBrowser(_execFileAsync = execFileAsync3) {
|
|
|
64894
64923
|
"/v",
|
|
64895
64924
|
"ProgId"
|
|
64896
64925
|
]);
|
|
64897
|
-
const
|
|
64898
|
-
if (!
|
|
64926
|
+
const match37 = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
|
|
64927
|
+
if (!match37) {
|
|
64899
64928
|
throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
|
|
64900
64929
|
}
|
|
64901
|
-
const { id } =
|
|
64930
|
+
const { id } = match37.groups;
|
|
64902
64931
|
const browser = windowsBrowserProgIds[id];
|
|
64903
64932
|
if (!browser) {
|
|
64904
64933
|
throw new UnknownBrowserError(`Unknown browser ID: ${id}`);
|
|
@@ -65333,9 +65362,9 @@ var reDetectIndentation = /(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/;
|
|
|
65333
65362
|
var reOnlyWhitespaceWithAtLeastOneNewline = /^[ \t]*[\r\n][ \t\r\n]*$/;
|
|
65334
65363
|
function _outdentArray(strings, firstInterpolatedValueSetsIndentationLevel, options) {
|
|
65335
65364
|
var indentationLevel = 0;
|
|
65336
|
-
var
|
|
65337
|
-
if (
|
|
65338
|
-
indentationLevel =
|
|
65365
|
+
var match37 = strings[0].match(reDetectIndentation);
|
|
65366
|
+
if (match37) {
|
|
65367
|
+
indentationLevel = match37[1].length;
|
|
65339
65368
|
}
|
|
65340
65369
|
var reSource = "(\\r\\n|\\r|\\n).{0," + indentationLevel + "}";
|
|
65341
65370
|
var reMatchIndent = new RegExp(reSource, "g");
|
|
@@ -67087,6 +67116,12 @@ ${errorMessage2}`
|
|
|
67087
67116
|
message: "The development command failed to execute. Please review the output log above for details."
|
|
67088
67117
|
}
|
|
67089
67118
|
);
|
|
67119
|
+
},
|
|
67120
|
+
FailedToSetCodeIdentifier: () => {
|
|
67121
|
+
return () => /* @__PURE__ */ import_react82.default.createElement(ErrorMessage, { cause, message: "Failed to set code identifier." });
|
|
67122
|
+
},
|
|
67123
|
+
FailedToSetNamespace: () => {
|
|
67124
|
+
return () => /* @__PURE__ */ import_react82.default.createElement(ErrorMessage, { cause, message: "Failed to set namespace." });
|
|
67090
67125
|
}
|
|
67091
67126
|
});
|
|
67092
67127
|
}
|
|
@@ -67736,8 +67771,8 @@ var LINUX_VERSIONS = {
|
|
|
67736
67771
|
ubuntu: (content) => matchFirst(/distrib_release=(.*)/, content)
|
|
67737
67772
|
};
|
|
67738
67773
|
function matchFirst(regex2, text) {
|
|
67739
|
-
const
|
|
67740
|
-
return
|
|
67774
|
+
const match37 = regex2.exec(text);
|
|
67775
|
+
return match37 ? match37[1] : void 0;
|
|
67741
67776
|
}
|
|
67742
67777
|
async function getDarwinInfo() {
|
|
67743
67778
|
const darwinInfo = {
|
|
@@ -70403,7 +70438,7 @@ function getErrorLogFilePath(cwd3) {
|
|
|
70403
70438
|
|
|
70404
70439
|
// ../create-new-packages/app-command/src/index.tsx
|
|
70405
70440
|
init_esm_shims();
|
|
70406
|
-
var
|
|
70441
|
+
var import_react131 = __toESM(require_react(), 1);
|
|
70407
70442
|
|
|
70408
70443
|
// ../cli-http-client-react/src/index.ts
|
|
70409
70444
|
init_esm_shims();
|
|
@@ -71927,8 +71962,8 @@ var createBiLogger2 = async ({
|
|
|
71927
71962
|
|
|
71928
71963
|
// ../create-new-packages/app-command/src/components/CreateAppCommand.tsx
|
|
71929
71964
|
init_esm_shims();
|
|
71930
|
-
var
|
|
71931
|
-
var
|
|
71965
|
+
var import_react130 = __toESM(require_react(), 1);
|
|
71966
|
+
var import_variant45 = __toESM(require_lib(), 1);
|
|
71932
71967
|
|
|
71933
71968
|
// ../create-new-packages/app-command/src/components/WelcomeMessage.tsx
|
|
71934
71969
|
init_esm_shims();
|
|
@@ -71966,14 +72001,15 @@ var AuthProvider2 = ({ userInfo: userInfo2, children }) => {
|
|
|
71966
72001
|
|
|
71967
72002
|
// ../create-new-packages/app-command/src/components/Questions/Questions.tsx
|
|
71968
72003
|
init_esm_shims();
|
|
71969
|
-
var
|
|
71970
|
-
var
|
|
72004
|
+
var import_react125 = __toESM(require_react(), 1);
|
|
72005
|
+
var import_variant42 = __toESM(require_lib(), 1);
|
|
71971
72006
|
|
|
71972
72007
|
// ../dev-center-client/src/index.ts
|
|
71973
72008
|
init_esm_shims();
|
|
71974
72009
|
|
|
71975
72010
|
// ../dev-center-client/src/dev-center-client.ts
|
|
71976
72011
|
init_esm_shims();
|
|
72012
|
+
var import_variant26 = __toESM(require_lib(), 1);
|
|
71977
72013
|
|
|
71978
72014
|
// ../../node_modules/@wix/ambassador-devcenter-apps-v1-app-old/es/build/http.impl.js
|
|
71979
72015
|
init_esm_shims();
|
|
@@ -72679,10 +72715,14 @@ function getAppByVersion(payload7) {
|
|
|
72679
72715
|
return __getAppByVersion;
|
|
72680
72716
|
}
|
|
72681
72717
|
|
|
72682
|
-
// ../../node_modules/@wix/ambassador-devcenter-apps-v1-app/build/
|
|
72718
|
+
// ../../node_modules/@wix/ambassador-devcenter-apps-v1-app/es/build/http.impl.js
|
|
72683
72719
|
init_esm_shims();
|
|
72684
72720
|
var _queryAppRequest = {};
|
|
72685
72721
|
var _queryAppResponse = { apps: "_v1App" };
|
|
72722
|
+
var _setCodeIdentifierRequest = {};
|
|
72723
|
+
var _setCodeIdentifierResponse = {};
|
|
72724
|
+
var _setNamespaceRequest = {};
|
|
72725
|
+
var _setNamespaceResponse = {};
|
|
72686
72726
|
var _v1App = {
|
|
72687
72727
|
createdDate: "google.protobuf.Timestamp",
|
|
72688
72728
|
updatedDate: "google.protobuf.Timestamp"
|
|
@@ -72828,6 +72868,60 @@ function getApp(payload7) {
|
|
|
72828
72868
|
__getApp.__isAmbassador = true;
|
|
72829
72869
|
return __getApp;
|
|
72830
72870
|
}
|
|
72871
|
+
function setNamespace(payload7) {
|
|
72872
|
+
var _a3 = serializer(_setNamespaceRequest, {}), toReq = _a3.toJSON, fromReq = _a3.fromJSON;
|
|
72873
|
+
var fromRes = serializer(_setNamespaceResponse, {}).fromJSON;
|
|
72874
|
+
function __setNamespace(_a4) {
|
|
72875
|
+
var host = _a4.host;
|
|
72876
|
+
var serializedData = toReq(payload7);
|
|
72877
|
+
var metadata = {
|
|
72878
|
+
entityFqdn: "wix.devcenter.apps.v1.app",
|
|
72879
|
+
method: "PATCH",
|
|
72880
|
+
methodFqn: "wix.devcenter.apps.v1.AppsService.SetNamespace",
|
|
72881
|
+
migrationOptions: {
|
|
72882
|
+
optInTransformResponse: true
|
|
72883
|
+
},
|
|
72884
|
+
url: resolveWixDevcenterAppsV1AppsServiceUrl({
|
|
72885
|
+
protoPath: "/v1/apps/{appId}/set-namespace",
|
|
72886
|
+
data: serializedData,
|
|
72887
|
+
host
|
|
72888
|
+
}),
|
|
72889
|
+
data: serializedData,
|
|
72890
|
+
transformResponse: fromRes
|
|
72891
|
+
};
|
|
72892
|
+
return metadata;
|
|
72893
|
+
}
|
|
72894
|
+
__setNamespace.fromReq = fromReq;
|
|
72895
|
+
__setNamespace.__isAmbassador = true;
|
|
72896
|
+
return __setNamespace;
|
|
72897
|
+
}
|
|
72898
|
+
function setCodeIdentifier(payload7) {
|
|
72899
|
+
var _a3 = serializer(_setCodeIdentifierRequest, {}), toReq = _a3.toJSON, fromReq = _a3.fromJSON;
|
|
72900
|
+
var fromRes = serializer(_setCodeIdentifierResponse, {}).fromJSON;
|
|
72901
|
+
function __setCodeIdentifier(_a4) {
|
|
72902
|
+
var host = _a4.host;
|
|
72903
|
+
var serializedData = toReq(payload7);
|
|
72904
|
+
var metadata = {
|
|
72905
|
+
entityFqdn: "wix.devcenter.apps.v1.app",
|
|
72906
|
+
method: "PATCH",
|
|
72907
|
+
methodFqn: "wix.devcenter.apps.v1.AppsService.SetCodeIdentifier",
|
|
72908
|
+
migrationOptions: {
|
|
72909
|
+
optInTransformResponse: true
|
|
72910
|
+
},
|
|
72911
|
+
url: resolveWixDevcenterAppsV1AppsServiceUrl({
|
|
72912
|
+
protoPath: "/v1/apps/{appId}/set-code-identifier",
|
|
72913
|
+
data: serializedData,
|
|
72914
|
+
host
|
|
72915
|
+
}),
|
|
72916
|
+
data: serializedData,
|
|
72917
|
+
transformResponse: fromRes
|
|
72918
|
+
};
|
|
72919
|
+
return metadata;
|
|
72920
|
+
}
|
|
72921
|
+
__setCodeIdentifier.fromReq = fromReq;
|
|
72922
|
+
__setCodeIdentifier.__isAmbassador = true;
|
|
72923
|
+
return __setCodeIdentifier;
|
|
72924
|
+
}
|
|
72831
72925
|
function queryApp(payload7) {
|
|
72832
72926
|
var _a3 = serializer(_queryAppRequest, {}), toReq = _a3.toJSON, fromReq = _a3.fromJSON;
|
|
72833
72927
|
var fromRes = serializer(_queryAppResponse, { _v1App }).fromJSON;
|
|
@@ -79924,6 +80018,14 @@ var listShareUrlsSchema = external_exports.object({
|
|
|
79924
80018
|
|
|
79925
80019
|
// ../dev-center-client/src/dev-center-client.ts
|
|
79926
80020
|
var EMPTY_SITE_TEMPLATE = "24bafe8a-7c80-4b63-8a71-08752062f246";
|
|
80021
|
+
var SetCodeIdentifierResult = (0, import_variant26.variant)({
|
|
80022
|
+
Success: {},
|
|
80023
|
+
ShouldBeUnique: (0, import_variant26.fields)()
|
|
80024
|
+
});
|
|
80025
|
+
var SetNamespaceResult = (0, import_variant26.variant)({
|
|
80026
|
+
Success: {},
|
|
80027
|
+
ShouldBeUnique: (0, import_variant26.fields)()
|
|
80028
|
+
});
|
|
79927
80029
|
var DevCenterClient = class {
|
|
79928
80030
|
constructor(httpClient) {
|
|
79929
80031
|
this.httpClient = httpClient;
|
|
@@ -79975,6 +80077,41 @@ var DevCenterClient = class {
|
|
|
79975
80077
|
});
|
|
79976
80078
|
}
|
|
79977
80079
|
};
|
|
80080
|
+
setNamespace = async ({ appId, namespace }) => {
|
|
80081
|
+
try {
|
|
80082
|
+
await this.httpClient.request(
|
|
80083
|
+
setNamespace({ appId, appName: namespace })
|
|
80084
|
+
);
|
|
80085
|
+
return SetNamespaceResult.Success();
|
|
80086
|
+
} catch (e2) {
|
|
80087
|
+
if (isHttpError(e2) && e2.response?.status === 409 && isHttpApplicationError(e2) && e2.response.data.details.applicationError.code === "ALREADY_EXISTS") {
|
|
80088
|
+
return SetNamespaceResult.ShouldBeUnique({ namespace });
|
|
80089
|
+
}
|
|
80090
|
+
throw new CliError({
|
|
80091
|
+
code: CliErrorCode.FailedToSetNamespace(),
|
|
80092
|
+
cause: e2
|
|
80093
|
+
});
|
|
80094
|
+
}
|
|
80095
|
+
};
|
|
80096
|
+
setCodeIdentifier = async ({
|
|
80097
|
+
appId,
|
|
80098
|
+
codeIdentifier
|
|
80099
|
+
}) => {
|
|
80100
|
+
try {
|
|
80101
|
+
await this.httpClient.request(
|
|
80102
|
+
setCodeIdentifier({ appId, codeIdentifier })
|
|
80103
|
+
);
|
|
80104
|
+
return SetCodeIdentifierResult.Success();
|
|
80105
|
+
} catch (e2) {
|
|
80106
|
+
if (isHttpError(e2) && e2.response?.status === 409 && isHttpApplicationError(e2) && e2.response.data.details.applicationError.code === "ALREADY_EXISTS") {
|
|
80107
|
+
return SetCodeIdentifierResult.ShouldBeUnique({ codeIdentifier });
|
|
80108
|
+
}
|
|
80109
|
+
throw new CliError({
|
|
80110
|
+
code: CliErrorCode.FailedToSetCodeIdentifier(),
|
|
80111
|
+
cause: e2
|
|
80112
|
+
});
|
|
80113
|
+
}
|
|
80114
|
+
};
|
|
79978
80115
|
createOAuthApp = async (oAuthApp) => {
|
|
79979
80116
|
try {
|
|
79980
80117
|
const { data } = await this.httpClient.request(
|
|
@@ -80369,7 +80506,7 @@ function useDevCenterClient({
|
|
|
80369
80506
|
|
|
80370
80507
|
// ../create-new-packages/app-command/src/parse-command-options.ts
|
|
80371
80508
|
init_esm_shims();
|
|
80372
|
-
var
|
|
80509
|
+
var import_variant28 = __toESM(require_lib(), 1);
|
|
80373
80510
|
var import_kebabCase2 = __toESM(require_kebabCase(), 1);
|
|
80374
80511
|
import { join as join8, resolve as resolve3 } from "node:path";
|
|
80375
80512
|
|
|
@@ -80402,11 +80539,11 @@ var import_validate_npm_package_name = __toESM(require_lib2(), 1);
|
|
|
80402
80539
|
|
|
80403
80540
|
// ../create-new-packages/app-command/src/validations/result.ts
|
|
80404
80541
|
init_esm_shims();
|
|
80405
|
-
var
|
|
80406
|
-
var Result = (0,
|
|
80407
|
-
(0,
|
|
80408
|
-
Error: (0,
|
|
80409
|
-
Ok:
|
|
80542
|
+
var import_variant27 = __toESM(require_lib(), 1);
|
|
80543
|
+
var Result = (0, import_variant27.variant)(
|
|
80544
|
+
(0, import_variant27.onTerms)(({ T }) => ({
|
|
80545
|
+
Error: (0, import_variant27.payload)(T),
|
|
80546
|
+
Ok: import_variant27.nil
|
|
80410
80547
|
}))
|
|
80411
80548
|
);
|
|
80412
80549
|
|
|
@@ -80467,12 +80604,43 @@ function validateAppName(value2) {
|
|
|
80467
80604
|
throw new InvalidArgumentError(result);
|
|
80468
80605
|
}
|
|
80469
80606
|
|
|
80607
|
+
// ../create-new-packages/app-command/src/validations/validate-namespace.ts
|
|
80608
|
+
init_esm_shims();
|
|
80609
|
+
var namespaceSchema = external_exports.string().min(1, "Namespace is required").max(150, "Namespace must be at most 150 characters").regex(
|
|
80610
|
+
/^[a-zA-Z0-9]([a-zA-Z0-9._-]*[a-zA-Z0-9])?$/,
|
|
80611
|
+
"Namespace can only contain letters, numbers, dots, hyphens and underscores"
|
|
80612
|
+
);
|
|
80613
|
+
function validateNamespace(value2) {
|
|
80614
|
+
const result = namespaceSchema.safeParse(value2);
|
|
80615
|
+
if (result.success) {
|
|
80616
|
+
return true;
|
|
80617
|
+
}
|
|
80618
|
+
const first = result.error.errors[0];
|
|
80619
|
+
return first?.message ?? "Invalid namespace";
|
|
80620
|
+
}
|
|
80621
|
+
|
|
80622
|
+
// ../create-new-packages/app-command/src/validations/validate-code-identifier.ts
|
|
80623
|
+
init_esm_shims();
|
|
80624
|
+
var CODE_IDENTIFIER_REGEX = /^(?!\d)[A-Za-z_$][A-Za-z0-9_$]*$/;
|
|
80625
|
+
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(
|
|
80626
|
+
CODE_IDENTIFIER_REGEX,
|
|
80627
|
+
'Code identifier must start with a letter, "_" or "$" and contain only letters, numbers, "_" or "$"'
|
|
80628
|
+
);
|
|
80629
|
+
function validateCodeIdentifier(value2) {
|
|
80630
|
+
const result = codeIdentifierSchema.safeParse(value2);
|
|
80631
|
+
if (result.success) {
|
|
80632
|
+
return true;
|
|
80633
|
+
}
|
|
80634
|
+
const first = result.error.errors[0];
|
|
80635
|
+
return first?.message ?? "Invalid code identifier";
|
|
80636
|
+
}
|
|
80637
|
+
|
|
80470
80638
|
// ../create-new-packages/app-command/src/parse-command-options.ts
|
|
80471
|
-
var TemplateSource = (0,
|
|
80472
|
-
App: (0,
|
|
80473
|
-
GitRepo: (0,
|
|
80474
|
-
Local: (0,
|
|
80475
|
-
Default: (0,
|
|
80639
|
+
var TemplateSource = (0, import_variant28.variant)({
|
|
80640
|
+
App: (0, import_variant28.payload)(),
|
|
80641
|
+
GitRepo: (0, import_variant28.fields)(),
|
|
80642
|
+
Local: (0, import_variant28.fields)(),
|
|
80643
|
+
Default: (0, import_variant28.constant)({ path: resolve3(__dirname, "../templates/app/blank") })
|
|
80476
80644
|
});
|
|
80477
80645
|
async function parseTemplateOptions(options, { devCenterClient }) {
|
|
80478
80646
|
if (options.template) {
|
|
@@ -80505,8 +80673,8 @@ async function parseTemplateOptions(options, { devCenterClient }) {
|
|
|
80505
80673
|
return TemplateSource.Local({ path: options.templatePath });
|
|
80506
80674
|
}
|
|
80507
80675
|
}
|
|
80508
|
-
var AppNameOptions = (0,
|
|
80509
|
-
Provided: (0,
|
|
80676
|
+
var AppNameOptions = (0, import_variant28.variant)({
|
|
80677
|
+
Provided: (0, import_variant28.fields)(),
|
|
80510
80678
|
Missing: {}
|
|
80511
80679
|
});
|
|
80512
80680
|
async function parseAppNameOptions(targetParentFolder2, options) {
|
|
@@ -80522,7 +80690,7 @@ async function parseAppNameOptions(targetParentFolder2, options) {
|
|
|
80522
80690
|
});
|
|
80523
80691
|
}
|
|
80524
80692
|
const npmValidationErrors = await validatePackageName(packageName);
|
|
80525
|
-
if ((0,
|
|
80693
|
+
if ((0, import_variant28.isType)(npmValidationErrors, "Error")) {
|
|
80526
80694
|
throw new CliError({
|
|
80527
80695
|
code: CliErrorCode.AppNameArgumentIsInvalid({
|
|
80528
80696
|
errorMessage: `Invalid package name "${packageName}". Please fix the following issues: ${npmValidationErrors.payload.join(", ")}`
|
|
@@ -80537,7 +80705,7 @@ async function parseAppNameOptions(targetParentFolder2, options) {
|
|
|
80537
80705
|
async function parseCommandOptions(targetParentFolder2, options, clients) {
|
|
80538
80706
|
const template = await parseTemplateOptions(options, clients);
|
|
80539
80707
|
const appNameOptions = await parseAppNameOptions(targetParentFolder2, options);
|
|
80540
|
-
if ((0,
|
|
80708
|
+
if ((0, import_variant28.isType)(appNameOptions, "Provided") && !template) {
|
|
80541
80709
|
throw new CliError({
|
|
80542
80710
|
code: CliErrorCode.AppNameArgumentIsInvalid({
|
|
80543
80711
|
errorMessage: "An application name was provided, but no template was specified. Please specify a template when defining the application name."
|
|
@@ -80550,8 +80718,8 @@ async function parseCommandOptions(targetParentFolder2, options, clients) {
|
|
|
80550
80718
|
|
|
80551
80719
|
// ../create-new-packages/app-command/src/types.ts
|
|
80552
80720
|
init_esm_shims();
|
|
80553
|
-
var
|
|
80554
|
-
var DeveloperAppsStatus = (0,
|
|
80721
|
+
var import_variant29 = __toESM(require_lib(), 1);
|
|
80722
|
+
var DeveloperAppsStatus = (0, import_variant29.variant)({
|
|
80555
80723
|
NoApps: {},
|
|
80556
80724
|
FailedLoadingApps: {},
|
|
80557
80725
|
Available: {}
|
|
@@ -80560,16 +80728,16 @@ var DeveloperAppsStatus = (0, import_variant28.variant)({
|
|
|
80560
80728
|
// ../create-new-packages/app-command/src/components/CreateAppOrExtendExisting.tsx
|
|
80561
80729
|
init_esm_shims();
|
|
80562
80730
|
var import_react106 = __toESM(require_react(), 1);
|
|
80563
|
-
var
|
|
80731
|
+
var import_variant30 = __toESM(require_lib(), 1);
|
|
80564
80732
|
var CreateAppOrExtendExisting = ({
|
|
80565
80733
|
developerAppsStatus,
|
|
80566
80734
|
onStartCreationFlow
|
|
80567
80735
|
}) => {
|
|
80568
80736
|
const { t: t3 } = useTranslation();
|
|
80569
80737
|
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
80570
|
-
const exisitingAvailabilty = (0,
|
|
80738
|
+
const exisitingAvailabilty = (0, import_variant30.match)(
|
|
80571
80739
|
developerAppsStatus,
|
|
80572
|
-
(0,
|
|
80740
|
+
(0, import_variant30.lookup)({
|
|
80573
80741
|
FailedLoadingApps: SelectOptionAvailability.Disabled({
|
|
80574
80742
|
reason: t3("create_app.create_new_or_extend.failed_fetching_apps")
|
|
80575
80743
|
}),
|
|
@@ -80607,17 +80775,530 @@ var CreateAppOrExtendExisting = ({
|
|
|
80607
80775
|
));
|
|
80608
80776
|
};
|
|
80609
80777
|
|
|
80610
|
-
// ../create-new-packages/app-command/src/components/Questions/NewAppFlow.tsx
|
|
80778
|
+
// ../create-new-packages/app-command/src/components/Questions/NewAppFlow/RegularFlow.tsx
|
|
80779
|
+
init_esm_shims();
|
|
80780
|
+
var import_react120 = __toESM(require_react(), 1);
|
|
80781
|
+
var import_variant38 = __toESM(require_lib(), 1);
|
|
80782
|
+
|
|
80783
|
+
// ../create-new-packages/app-command/src/components/ChooseAppName.tsx
|
|
80784
|
+
init_esm_shims();
|
|
80785
|
+
var import_react107 = __toESM(require_react(), 1);
|
|
80786
|
+
var ChooseAppName = ({ onSubmit }) => {
|
|
80787
|
+
const { t: t3 } = useTranslation();
|
|
80788
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
80789
|
+
return /* @__PURE__ */ import_react107.default.createElement(
|
|
80790
|
+
TextInput2,
|
|
80791
|
+
{
|
|
80792
|
+
label: t3("create_app.create_new.name_of_app.label"),
|
|
80793
|
+
placeholder: t3("create_app.create_new.name_of_app.placeholder"),
|
|
80794
|
+
validate: validateAppNameSafe,
|
|
80795
|
+
onSubmit: (appName) => {
|
|
80796
|
+
cliFlowStepAnswered({
|
|
80797
|
+
question: t3("create_app.create_new.name_of_app.label"),
|
|
80798
|
+
questionKey: "create_app.create_new.name_of_app.label",
|
|
80799
|
+
answer: appName
|
|
80800
|
+
});
|
|
80801
|
+
onSubmit(appName);
|
|
80802
|
+
},
|
|
80803
|
+
inCreateFlow: true
|
|
80804
|
+
}
|
|
80805
|
+
);
|
|
80806
|
+
};
|
|
80807
|
+
|
|
80808
|
+
// ../create-new-packages/app-command/src/components/ChoosePackageName.tsx
|
|
80809
|
+
init_esm_shims();
|
|
80810
|
+
var import_react109 = __toESM(require_react(), 1);
|
|
80811
|
+
var import_variant31 = __toESM(require_lib(), 1);
|
|
80812
|
+
import { join as join9, relative } from "node:path";
|
|
80813
|
+
var import_kebabCase3 = __toESM(require_kebabCase(), 1);
|
|
80814
|
+
|
|
80815
|
+
// ../create-new-packages/app-command/src/components/ConfirmPackagePath.tsx
|
|
80816
|
+
init_esm_shims();
|
|
80817
|
+
var import_react108 = __toESM(require_react(), 1);
|
|
80818
|
+
var ConfirmPackagePath = ({
|
|
80819
|
+
path: path4,
|
|
80820
|
+
onSubmit
|
|
80821
|
+
}) => {
|
|
80822
|
+
const { t: t3 } = useTranslation();
|
|
80823
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
80824
|
+
const [cancelled, setCancelled] = (0, import_react108.useState)(false);
|
|
80825
|
+
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(
|
|
80826
|
+
ConfirmInput,
|
|
80827
|
+
{
|
|
80828
|
+
label: t3("create_app.confirm_path_message", {
|
|
80829
|
+
path: path4
|
|
80830
|
+
}),
|
|
80831
|
+
initialValue: true,
|
|
80832
|
+
onSubmit: (confirmation) => {
|
|
80833
|
+
cliFlowStepAnswered({
|
|
80834
|
+
question: t3("create_app.confirm_path.title"),
|
|
80835
|
+
questionKey: "create_app.confirm_path.title",
|
|
80836
|
+
answer: String(confirmation)
|
|
80837
|
+
});
|
|
80838
|
+
onSubmit(confirmation);
|
|
80839
|
+
if (!confirmation) {
|
|
80840
|
+
setCancelled(true);
|
|
80841
|
+
}
|
|
80842
|
+
}
|
|
80843
|
+
}
|
|
80844
|
+
)), cancelled && /* @__PURE__ */ import_react108.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react108.default.createElement(Text2, null, t3("create_app.confirm_path_exit_message"))));
|
|
80845
|
+
};
|
|
80846
|
+
|
|
80847
|
+
// ../create-new-packages/app-command/src/components/ChoosePackageName.tsx
|
|
80848
|
+
var ChoosePackageName = ({
|
|
80849
|
+
appName,
|
|
80850
|
+
targetParentFolder: targetParentFolder2,
|
|
80851
|
+
repoType: repoType2,
|
|
80852
|
+
onSelected
|
|
80853
|
+
}) => {
|
|
80854
|
+
const { t: t3 } = useTranslation();
|
|
80855
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
80856
|
+
const [packageName, setPackageName] = (0, import_react109.useState)();
|
|
80857
|
+
const defaultPackageName = (0, import_react109.useMemo)(() => {
|
|
80858
|
+
return (0, import_kebabCase3.default)(appName);
|
|
80859
|
+
}, [appName]);
|
|
80860
|
+
const isMonorepo = (0, import_variant31.isType)(repoType2, RepoType.Monorepo);
|
|
80861
|
+
async function validate3(packageName2) {
|
|
80862
|
+
if (!await validateDirectory(join9(targetParentFolder2, packageName2))) {
|
|
80863
|
+
return t3("validation_errors.invalid_directory");
|
|
80864
|
+
}
|
|
80865
|
+
const npmValidationErrors = await validatePackageName(packageName2);
|
|
80866
|
+
return (0, import_variant31.match)(npmValidationErrors, {
|
|
80867
|
+
Ok: () => true,
|
|
80868
|
+
Error: ({ payload: payload7 }) => t3("validation_errors.invalid_package_name", {
|
|
80869
|
+
errors: payload7.join(", ")
|
|
80870
|
+
})
|
|
80871
|
+
});
|
|
80872
|
+
}
|
|
80873
|
+
const handlePackageNameSet = (0, import_react109.useCallback)(
|
|
80874
|
+
(packageName2) => {
|
|
80875
|
+
cliFlowStepAnswered({
|
|
80876
|
+
question: t3("create_app.choose_package_name.label"),
|
|
80877
|
+
questionKey: "create_app.choose_package_name.label",
|
|
80878
|
+
answer: packageName2
|
|
80879
|
+
});
|
|
80880
|
+
if (isMonorepo) {
|
|
80881
|
+
setPackageName(packageName2);
|
|
80882
|
+
} else {
|
|
80883
|
+
onSelected(packageName2);
|
|
80884
|
+
}
|
|
80885
|
+
},
|
|
80886
|
+
[cliFlowStepAnswered, setPackageName, onSelected, isMonorepo, t3]
|
|
80887
|
+
);
|
|
80888
|
+
const handlePackagePathConfirm = (0, import_react109.useCallback)(
|
|
80889
|
+
(packageName2, isConfirmed) => {
|
|
80890
|
+
if (isConfirmed) {
|
|
80891
|
+
onSelected(packageName2);
|
|
80892
|
+
}
|
|
80893
|
+
},
|
|
80894
|
+
[onSelected]
|
|
80895
|
+
);
|
|
80896
|
+
return /* @__PURE__ */ import_react109.default.createElement(import_react109.default.Fragment, null, /* @__PURE__ */ import_react109.default.createElement(
|
|
80897
|
+
TextInput2,
|
|
80898
|
+
{
|
|
80899
|
+
label: t3("create_app.choose_package_name.label"),
|
|
80900
|
+
placeholder: defaultPackageName,
|
|
80901
|
+
onSubmit: handlePackageNameSet,
|
|
80902
|
+
validate: validate3,
|
|
80903
|
+
inCreateFlow: true
|
|
80904
|
+
}
|
|
80905
|
+
), packageName && isMonorepo && /* @__PURE__ */ import_react109.default.createElement(
|
|
80906
|
+
ConfirmPackagePath,
|
|
80907
|
+
{
|
|
80908
|
+
path: relative(
|
|
80909
|
+
repoType2.rootDir,
|
|
80910
|
+
join9(targetParentFolder2, packageName)
|
|
80911
|
+
),
|
|
80912
|
+
onSubmit: (confirmed) => handlePackagePathConfirm(packageName, confirmed)
|
|
80913
|
+
}
|
|
80914
|
+
));
|
|
80915
|
+
};
|
|
80916
|
+
|
|
80917
|
+
// ../create-new-packages/app-command/src/components/Questions/ChooseTemplateFlow.tsx
|
|
80918
|
+
init_esm_shims();
|
|
80919
|
+
var import_react112 = __toESM(require_react(), 1);
|
|
80920
|
+
|
|
80921
|
+
// ../create-new-packages/app-command/src/components/ChooseAppCreationSource.tsx
|
|
80922
|
+
init_esm_shims();
|
|
80923
|
+
var import_react110 = __toESM(require_react(), 1);
|
|
80924
|
+
var ChooseAppCreationSource = ({
|
|
80925
|
+
onSelected
|
|
80926
|
+
}) => {
|
|
80927
|
+
const { t: t3 } = useTranslation();
|
|
80928
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
80929
|
+
return /* @__PURE__ */ import_react110.default.createElement(
|
|
80930
|
+
SelectInput2,
|
|
80931
|
+
{
|
|
80932
|
+
label: t3("create_app.choose_app_creation_source.label"),
|
|
80933
|
+
options: [
|
|
80934
|
+
{
|
|
80935
|
+
title: t3("create_app.choose_app_creation_source.basic_app.title"),
|
|
80936
|
+
description: t3(
|
|
80937
|
+
"create_app.choose_app_creation_source.basic_app.description"
|
|
80938
|
+
),
|
|
80939
|
+
value: "basic"
|
|
80940
|
+
},
|
|
80941
|
+
{
|
|
80942
|
+
title: t3("create_app.choose_app_creation_source.template.title"),
|
|
80943
|
+
description: t3(
|
|
80944
|
+
"create_app.choose_app_creation_source.template.description"
|
|
80945
|
+
),
|
|
80946
|
+
value: "template"
|
|
80947
|
+
}
|
|
80948
|
+
],
|
|
80949
|
+
onSubmit: ({ value: value2 }) => {
|
|
80950
|
+
cliFlowStepAnswered({
|
|
80951
|
+
question: t3("create_app.choose_app_creation_source.label"),
|
|
80952
|
+
questionKey: "create_app.choose_app_creation_source.label",
|
|
80953
|
+
answer: value2
|
|
80954
|
+
});
|
|
80955
|
+
onSelected(value2);
|
|
80956
|
+
}
|
|
80957
|
+
}
|
|
80958
|
+
);
|
|
80959
|
+
};
|
|
80960
|
+
|
|
80961
|
+
// ../create-new-packages/app-command/src/components/ChooseTemplate.tsx
|
|
80962
|
+
init_esm_shims();
|
|
80963
|
+
var import_react111 = __toESM(require_react(), 1);
|
|
80964
|
+
var import_variant32 = __toESM(require_lib(), 1);
|
|
80965
|
+
var ChooseTemplate = ({ onSelected }) => {
|
|
80966
|
+
const { t: t3 } = useTranslation();
|
|
80967
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
80968
|
+
const { queryCliAppTemplates } = useDevCenterClient();
|
|
80969
|
+
const [isTemplateSelected, setIsTemplateSelected] = (0, import_react111.useState)(false);
|
|
80970
|
+
const { status } = useAsync2(async () => {
|
|
80971
|
+
const appTemplates = await queryCliAppTemplates();
|
|
80972
|
+
const filteredAppTemplates = appTemplates.filter(
|
|
80973
|
+
(appTemplate) => appTemplate.id !== "a033018e-233a-4ddc-8471-1151d8974866"
|
|
80974
|
+
);
|
|
80975
|
+
return {
|
|
80976
|
+
appTemplatesOptions: filteredAppTemplates.map((appTemplate) => {
|
|
80977
|
+
return {
|
|
80978
|
+
key: appTemplate.id,
|
|
80979
|
+
title: appTemplate.title,
|
|
80980
|
+
description: appTemplate.subtitle,
|
|
80981
|
+
value: appTemplate
|
|
80982
|
+
};
|
|
80983
|
+
})
|
|
80984
|
+
};
|
|
80985
|
+
}, []);
|
|
80986
|
+
return /* @__PURE__ */ import_react111.default.createElement(import_react111.default.Fragment, null, (0, import_variant32.match)(status, {
|
|
80987
|
+
Error: () => null,
|
|
80988
|
+
Loading: () => /* @__PURE__ */ import_react111.default.createElement(Spinner2, null),
|
|
80989
|
+
Success: ({ result: { appTemplatesOptions } }) => /* @__PURE__ */ import_react111.default.createElement(import_react111.default.Fragment, null, /* @__PURE__ */ import_react111.default.createElement(
|
|
80990
|
+
SelectInput2,
|
|
80991
|
+
{
|
|
80992
|
+
label: t3("create_app.choose_template.title"),
|
|
80993
|
+
options: appTemplatesOptions,
|
|
80994
|
+
onSubmit: ({ value: value2 }) => {
|
|
80995
|
+
cliFlowStepAnswered({
|
|
80996
|
+
question: t3("create_app.choose_template.title"),
|
|
80997
|
+
questionKey: "create_app.choose_template.title",
|
|
80998
|
+
answer: value2.title
|
|
80999
|
+
});
|
|
81000
|
+
setIsTemplateSelected(true);
|
|
81001
|
+
onSelected(value2);
|
|
81002
|
+
}
|
|
81003
|
+
}
|
|
81004
|
+
), !isTemplateSelected && /* @__PURE__ */ import_react111.default.createElement(Box_default, { marginTop: 1 }, /* @__PURE__ */ import_react111.default.createElement(
|
|
81005
|
+
Trans2,
|
|
81006
|
+
{
|
|
81007
|
+
i18nKey: "create_app.choose_template.see_templates",
|
|
81008
|
+
components: [
|
|
81009
|
+
/* @__PURE__ */ import_react111.default.createElement(Link, { url: "https://dev.wix.com/apps-templates?filter=cli" })
|
|
81010
|
+
]
|
|
81011
|
+
}
|
|
81012
|
+
)))
|
|
81013
|
+
}));
|
|
81014
|
+
};
|
|
81015
|
+
|
|
81016
|
+
// ../create-new-packages/app-command/src/components/Questions/ChooseTemplateFlow.tsx
|
|
81017
|
+
var ChooseTemplateFlow = ({
|
|
81018
|
+
onTemplateChoose
|
|
81019
|
+
}) => {
|
|
81020
|
+
const [shouldSelectTemplate, setShouldSelectTemplate] = (0, import_react112.useState)(false);
|
|
81021
|
+
return /* @__PURE__ */ import_react112.default.createElement(import_react112.default.Fragment, null, /* @__PURE__ */ import_react112.default.createElement(
|
|
81022
|
+
ChooseAppCreationSource,
|
|
81023
|
+
{
|
|
81024
|
+
onSelected: (source) => {
|
|
81025
|
+
if (source === "basic") {
|
|
81026
|
+
onTemplateChoose(TemplateSource.Default());
|
|
81027
|
+
} else {
|
|
81028
|
+
setShouldSelectTemplate(true);
|
|
81029
|
+
}
|
|
81030
|
+
}
|
|
81031
|
+
}
|
|
81032
|
+
), shouldSelectTemplate && /* @__PURE__ */ import_react112.default.createElement(
|
|
81033
|
+
ChooseTemplate,
|
|
81034
|
+
{
|
|
81035
|
+
onSelected: (template) => {
|
|
81036
|
+
onTemplateChoose(TemplateSource.App(template));
|
|
81037
|
+
}
|
|
81038
|
+
}
|
|
81039
|
+
));
|
|
81040
|
+
};
|
|
81041
|
+
|
|
81042
|
+
// ../create-new-packages/app-command/src/components/RegisteringApp.tsx
|
|
81043
|
+
init_esm_shims();
|
|
81044
|
+
var import_react113 = __toESM(require_react(), 1);
|
|
81045
|
+
var RegisteringApp = () => {
|
|
81046
|
+
const { t: t3 } = useTranslation();
|
|
81047
|
+
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") }));
|
|
81048
|
+
};
|
|
81049
|
+
|
|
81050
|
+
// ../create-new-packages/app-command/src/components/AppRegistered.tsx
|
|
81051
|
+
init_esm_shims();
|
|
81052
|
+
var import_react114 = __toESM(require_react(), 1);
|
|
81053
|
+
var AppRegistered = ({ appName }) => {
|
|
81054
|
+
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(
|
|
81055
|
+
Trans2,
|
|
81056
|
+
{
|
|
81057
|
+
i18nKey: "create_app.create_new.app_registered_successfully",
|
|
81058
|
+
components: [/* @__PURE__ */ import_react114.default.createElement(Text2, { bold: true })],
|
|
81059
|
+
values: { appName }
|
|
81060
|
+
}
|
|
81061
|
+
)));
|
|
81062
|
+
};
|
|
81063
|
+
|
|
81064
|
+
// ../create-new-packages/app-command/src/components/PostAppRegistration.tsx
|
|
80611
81065
|
init_esm_shims();
|
|
80612
81066
|
var import_react117 = __toESM(require_react(), 1);
|
|
81067
|
+
|
|
81068
|
+
// ../create-new-packages/app-command/src/components/ChooseCodeIdentifier.tsx
|
|
81069
|
+
init_esm_shims();
|
|
81070
|
+
var import_react115 = __toESM(require_react(), 1);
|
|
81071
|
+
var import_snakeCase = __toESM(require_snakeCase(), 1);
|
|
81072
|
+
var import_variant33 = __toESM(require_lib(), 1);
|
|
81073
|
+
var ChooseCodeIdentifier = ({
|
|
81074
|
+
onSubmit,
|
|
81075
|
+
appId,
|
|
81076
|
+
packageName
|
|
81077
|
+
}) => {
|
|
81078
|
+
const devCenterClient = useDevCenterClient();
|
|
81079
|
+
const { t: t3 } = useTranslation();
|
|
81080
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81081
|
+
const defaultCodeIdentifier = (0, import_react115.useMemo)(
|
|
81082
|
+
() => (0, import_snakeCase.default)(packageName),
|
|
81083
|
+
[packageName]
|
|
81084
|
+
);
|
|
81085
|
+
const validationFn = useAsyncCallback3(
|
|
81086
|
+
async (_2, submitedCodeIdentifier) => {
|
|
81087
|
+
const isValid = validateCodeIdentifier(submitedCodeIdentifier);
|
|
81088
|
+
if (isValid !== true) {
|
|
81089
|
+
return isValid;
|
|
81090
|
+
}
|
|
81091
|
+
const result = await devCenterClient.setCodeIdentifier({
|
|
81092
|
+
appId,
|
|
81093
|
+
codeIdentifier: submitedCodeIdentifier
|
|
81094
|
+
});
|
|
81095
|
+
if ((0, import_variant33.isType)(result, SetCodeIdentifierResult.ShouldBeUnique)) {
|
|
81096
|
+
return `Code identifier ${submitedCodeIdentifier} is already used. Try another.`;
|
|
81097
|
+
}
|
|
81098
|
+
return true;
|
|
81099
|
+
}
|
|
81100
|
+
);
|
|
81101
|
+
return /* @__PURE__ */ import_react115.default.createElement(
|
|
81102
|
+
TextInput2,
|
|
81103
|
+
{
|
|
81104
|
+
label: t3("create_app.choose_code_identifier.label"),
|
|
81105
|
+
placeholder: t3("create_app.choose_code_identifier.placeholder", {
|
|
81106
|
+
suggested: defaultCodeIdentifier
|
|
81107
|
+
}),
|
|
81108
|
+
validate: (submitedCodeIdentifier) => validationFn.execute(submitedCodeIdentifier),
|
|
81109
|
+
onSubmit: (codeIdentifier) => {
|
|
81110
|
+
cliFlowStepAnswered({
|
|
81111
|
+
question: t3("create_app.choose_code_identifier.label"),
|
|
81112
|
+
questionKey: "create_app.choose_code_identifier.label",
|
|
81113
|
+
answer: codeIdentifier
|
|
81114
|
+
});
|
|
81115
|
+
onSubmit(codeIdentifier);
|
|
81116
|
+
},
|
|
81117
|
+
inCreateFlow: true
|
|
81118
|
+
}
|
|
81119
|
+
);
|
|
81120
|
+
};
|
|
81121
|
+
|
|
81122
|
+
// ../create-new-packages/app-command/src/components/ChooseNamespace.tsx
|
|
81123
|
+
init_esm_shims();
|
|
81124
|
+
var import_react116 = __toESM(require_react(), 1);
|
|
80613
81125
|
var import_variant34 = __toESM(require_lib(), 1);
|
|
81126
|
+
var ChooseNamespace = ({
|
|
81127
|
+
onSubmit,
|
|
81128
|
+
appId,
|
|
81129
|
+
packageName
|
|
81130
|
+
}) => {
|
|
81131
|
+
const { t: t3 } = useTranslation();
|
|
81132
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81133
|
+
const devCenterClient = useDevCenterClient();
|
|
81134
|
+
const validationFn = useAsyncCallback3(
|
|
81135
|
+
async (_2, submitedNamespace) => {
|
|
81136
|
+
const isValid = validateNamespace(submitedNamespace);
|
|
81137
|
+
if (isValid !== true) {
|
|
81138
|
+
return isValid;
|
|
81139
|
+
}
|
|
81140
|
+
const result = await devCenterClient.setNamespace({
|
|
81141
|
+
appId,
|
|
81142
|
+
namespace: submitedNamespace
|
|
81143
|
+
});
|
|
81144
|
+
if ((0, import_variant34.isType)(result, SetNamespaceResult.ShouldBeUnique)) {
|
|
81145
|
+
return `Namespace ${submitedNamespace} is already used. Try another.`;
|
|
81146
|
+
}
|
|
81147
|
+
return true;
|
|
81148
|
+
}
|
|
81149
|
+
);
|
|
81150
|
+
return /* @__PURE__ */ import_react116.default.createElement(
|
|
81151
|
+
TextInput2,
|
|
81152
|
+
{
|
|
81153
|
+
label: t3("create_app.choose_namespace.label"),
|
|
81154
|
+
placeholder: t3("create_app.choose_namespace.placeholder", {
|
|
81155
|
+
suggested: packageName
|
|
81156
|
+
}),
|
|
81157
|
+
validate: (submitedNamespace) => validationFn.execute(submitedNamespace),
|
|
81158
|
+
onSubmit: (namespace) => {
|
|
81159
|
+
cliFlowStepAnswered({
|
|
81160
|
+
question: t3("create_app.choose_namespace.label"),
|
|
81161
|
+
questionKey: "create_app.choose_namespace.label",
|
|
81162
|
+
answer: namespace
|
|
81163
|
+
});
|
|
81164
|
+
onSubmit(namespace);
|
|
81165
|
+
},
|
|
81166
|
+
inCreateFlow: true
|
|
81167
|
+
}
|
|
81168
|
+
);
|
|
81169
|
+
};
|
|
81170
|
+
|
|
81171
|
+
// ../create-new-packages/app-command/src/components/PostAppRegistration.tsx
|
|
81172
|
+
var PostAppRegistration = ({ appId, packageName, onPostRegistrationComplete }) => {
|
|
81173
|
+
const [namespace, setNamespace2] = (0, import_react117.useState)();
|
|
81174
|
+
return /* @__PURE__ */ import_react117.default.createElement(import_react117.default.Fragment, null, /* @__PURE__ */ import_react117.default.createElement(
|
|
81175
|
+
ChooseNamespace,
|
|
81176
|
+
{
|
|
81177
|
+
appId,
|
|
81178
|
+
packageName,
|
|
81179
|
+
onSubmit: setNamespace2
|
|
81180
|
+
}
|
|
81181
|
+
), namespace && /* @__PURE__ */ import_react117.default.createElement(
|
|
81182
|
+
ChooseCodeIdentifier,
|
|
81183
|
+
{
|
|
81184
|
+
appId,
|
|
81185
|
+
packageName,
|
|
81186
|
+
onSubmit: onPostRegistrationComplete
|
|
81187
|
+
}
|
|
81188
|
+
));
|
|
81189
|
+
};
|
|
81190
|
+
|
|
81191
|
+
// ../create-new-packages/app-command/src/components/mcp/ConfigMcp.tsx
|
|
81192
|
+
init_esm_shims();
|
|
81193
|
+
var import_react118 = __toESM(require_react(), 1);
|
|
81194
|
+
var import_variant35 = __toESM(require_lib(), 1);
|
|
81195
|
+
var IdeForMcp = (0, import_variant35.variant)({
|
|
81196
|
+
VsCode: {},
|
|
81197
|
+
Cursor: {},
|
|
81198
|
+
ClaudeCode: {}
|
|
81199
|
+
});
|
|
81200
|
+
var ConfigMcp = ({ onSelected }) => {
|
|
81201
|
+
const { t: t3 } = useTranslation();
|
|
81202
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81203
|
+
return /* @__PURE__ */ import_react118.default.createElement(
|
|
81204
|
+
SelectInput2,
|
|
81205
|
+
{
|
|
81206
|
+
label: t3("create_app.choose_ide_for_mcp.question"),
|
|
81207
|
+
info: /* @__PURE__ */ import_react118.default.createElement(
|
|
81208
|
+
Trans2,
|
|
81209
|
+
{
|
|
81210
|
+
i18nKey: "create_app.choose_ide_for_mcp.description",
|
|
81211
|
+
components: [
|
|
81212
|
+
/* @__PURE__ */ import_react118.default.createElement(Link, { url: "https://www.wix.com/studio/developers/mcp-server" })
|
|
81213
|
+
]
|
|
81214
|
+
}
|
|
81215
|
+
),
|
|
81216
|
+
options: [
|
|
81217
|
+
{
|
|
81218
|
+
title: t3("create_app.choose_ide_for_mcp.answer.cursor"),
|
|
81219
|
+
key: "cursor",
|
|
81220
|
+
value: IdeForMcp.Cursor()
|
|
81221
|
+
},
|
|
81222
|
+
{
|
|
81223
|
+
title: t3("create_app.choose_ide_for_mcp.answer.vscode"),
|
|
81224
|
+
key: "vscode",
|
|
81225
|
+
value: IdeForMcp.VsCode()
|
|
81226
|
+
},
|
|
81227
|
+
{
|
|
81228
|
+
title: t3("create_app.choose_ide_for_mcp.answer.claude_code"),
|
|
81229
|
+
key: "claude_code",
|
|
81230
|
+
value: IdeForMcp.ClaudeCode()
|
|
81231
|
+
},
|
|
81232
|
+
{
|
|
81233
|
+
title: t3("create_app.choose_ide_for_mcp.answer.no"),
|
|
81234
|
+
key: "no",
|
|
81235
|
+
value: void 0
|
|
81236
|
+
}
|
|
81237
|
+
],
|
|
81238
|
+
onSubmit: ({ value: value2 }) => {
|
|
81239
|
+
cliFlowStepAnswered({
|
|
81240
|
+
question: t3("create_app.choose_ide_for_mcp.question"),
|
|
81241
|
+
questionKey: "create_app.choose_ide_for_mcp.question",
|
|
81242
|
+
answer: value2?.type ?? "No"
|
|
81243
|
+
});
|
|
81244
|
+
onSelected(value2);
|
|
81245
|
+
}
|
|
81246
|
+
}
|
|
81247
|
+
);
|
|
81248
|
+
};
|
|
81249
|
+
|
|
81250
|
+
// ../create-new-packages/app-command/src/components/mcp/getMcpResult.ts
|
|
81251
|
+
init_esm_shims();
|
|
81252
|
+
var import_variant36 = __toESM(require_lib(), 1);
|
|
81253
|
+
import { join as join10 } from "node:path";
|
|
81254
|
+
var McpConfigResult = (0, import_variant36.variant)({
|
|
81255
|
+
Created: (0, import_variant36.fields)(),
|
|
81256
|
+
Canceled: {}
|
|
81257
|
+
});
|
|
81258
|
+
var getMcpData = ({
|
|
81259
|
+
ideForMcp,
|
|
81260
|
+
packageFolder
|
|
81261
|
+
}) => {
|
|
81262
|
+
const mcpPath = (0, import_variant36.match)(ideForMcp, {
|
|
81263
|
+
Cursor: () => join10(packageFolder, ".cursor", "mcp.json"),
|
|
81264
|
+
VsCode: () => join10(packageFolder, ".vscode", "mcp.json"),
|
|
81265
|
+
ClaudeCode: () => join10(packageFolder, ".mcp.json")
|
|
81266
|
+
});
|
|
81267
|
+
return McpConfigResult.Created({
|
|
81268
|
+
mcpPath,
|
|
81269
|
+
ideForMcp,
|
|
81270
|
+
docsUrl: (0, import_variant36.match)(
|
|
81271
|
+
ideForMcp,
|
|
81272
|
+
(0, import_variant36.lookup)({
|
|
81273
|
+
Cursor: "https://cursor.com/docs/context/mcp",
|
|
81274
|
+
VsCode: "https://code.visualstudio.com/docs/copilot/chat/mcp-servers",
|
|
81275
|
+
ClaudeCode: "https://docs.anthropic.com/en/docs/claude-code/mcp"
|
|
81276
|
+
})
|
|
81277
|
+
)
|
|
81278
|
+
});
|
|
81279
|
+
};
|
|
81280
|
+
var getMcpResult = ({
|
|
81281
|
+
ideForMcp,
|
|
81282
|
+
targetParentFolder: targetParentFolder2,
|
|
81283
|
+
packageName
|
|
81284
|
+
}) => {
|
|
81285
|
+
const packageFolder = join10(targetParentFolder2, packageName);
|
|
81286
|
+
return ideForMcp ? getMcpData({
|
|
81287
|
+
ideForMcp,
|
|
81288
|
+
packageFolder
|
|
81289
|
+
}) : McpConfigResult.Canceled();
|
|
81290
|
+
};
|
|
81291
|
+
|
|
81292
|
+
// ../create-new-packages/app-command/src/components/Questions/useAppCreation.tsx
|
|
81293
|
+
init_esm_shims();
|
|
81294
|
+
var import_variant37 = __toESM(require_lib(), 1);
|
|
80614
81295
|
|
|
80615
81296
|
// ../backend-as-a-service-client/src/index.ts
|
|
80616
81297
|
init_esm_shims();
|
|
80617
81298
|
|
|
80618
81299
|
// ../backend-as-a-service-client/src/useBackendAsAServiceClient.ts
|
|
80619
81300
|
init_esm_shims();
|
|
80620
|
-
var
|
|
81301
|
+
var import_react119 = __toESM(require_react(), 1);
|
|
80621
81302
|
|
|
80622
81303
|
// ../backend-as-a-service-client/src/backend-as-a-service-client.ts
|
|
80623
81304
|
init_esm_shims();
|
|
@@ -81060,578 +81741,196 @@ var BackendAsAServiceClient = class {
|
|
|
81060
81741
|
});
|
|
81061
81742
|
}
|
|
81062
81743
|
};
|
|
81063
|
-
createAppProject = async ({
|
|
81064
|
-
cloudProvider,
|
|
81065
|
-
...appProjectOptions
|
|
81066
|
-
}) => {
|
|
81067
|
-
try {
|
|
81068
|
-
const { data } = await this.httpClient.request(
|
|
81069
|
-
createAppProject({
|
|
81070
|
-
appProject: {
|
|
81071
|
-
...appProjectOptions,
|
|
81072
|
-
appProjectTypeId: cloudProvider === CloudProvider.KUBERNETES ? APP_PROJECT_TYPE_ID_KUBERNETES : APP_PROJECT_TYPE_ID_CLOUDFLARE,
|
|
81073
|
-
cloudProviderOverride: cloudProvider
|
|
81074
|
-
}
|
|
81075
|
-
})
|
|
81076
|
-
);
|
|
81077
|
-
return CreateAppProjectSchema.parse(data).appProject;
|
|
81078
|
-
} catch (e2) {
|
|
81079
|
-
throw new CliError({
|
|
81080
|
-
code: CliErrorCode.FailedCreatingAppProject(),
|
|
81081
|
-
cause: e2
|
|
81082
|
-
});
|
|
81083
|
-
}
|
|
81084
|
-
};
|
|
81085
|
-
createAppDeployment = async (appId, staticFilesMetadata) => {
|
|
81086
|
-
try {
|
|
81087
|
-
const { data } = await pRetry(
|
|
81088
|
-
() => this.httpClient.request(
|
|
81089
|
-
createAppDeployment({
|
|
81090
|
-
appDeployment: {
|
|
81091
|
-
appProjectId: appId,
|
|
81092
|
-
staticFilesMetadata
|
|
81093
|
-
}
|
|
81094
|
-
})
|
|
81095
|
-
),
|
|
81096
|
-
this.retryOptions
|
|
81097
|
-
);
|
|
81098
|
-
return CreateAppDeploymentSchema.parse(data);
|
|
81099
|
-
} catch (e2) {
|
|
81100
|
-
throw new CliError({
|
|
81101
|
-
code: CliErrorCode.FailedCreatingAppDeployment(),
|
|
81102
|
-
cause: e2
|
|
81103
|
-
});
|
|
81104
|
-
}
|
|
81105
|
-
};
|
|
81106
|
-
completeAppDeployment = async (appDeployment, staticsCompletionToken) => {
|
|
81107
|
-
try {
|
|
81108
|
-
const { data } = await pRetry(
|
|
81109
|
-
() => this.httpClient.request(
|
|
81110
|
-
completeAppDeployment({
|
|
81111
|
-
appDeployment,
|
|
81112
|
-
staticsCompletionToken
|
|
81113
|
-
})
|
|
81114
|
-
),
|
|
81115
|
-
this.retryOptions
|
|
81116
|
-
);
|
|
81117
|
-
return CompleteAppDeploymentSchema.parse(data).appDeployment;
|
|
81118
|
-
} catch (e2) {
|
|
81119
|
-
throw new CliError({
|
|
81120
|
-
code: CliErrorCode.FailedFinalizingAppDeployment(),
|
|
81121
|
-
cause: e2
|
|
81122
|
-
});
|
|
81123
|
-
}
|
|
81124
|
-
};
|
|
81125
|
-
postForm = async (endpointUrl, token2, formData) => {
|
|
81126
|
-
try {
|
|
81127
|
-
const responseJson = await pRetry(
|
|
81128
|
-
async () => {
|
|
81129
|
-
const response = await fetch(endpointUrl, {
|
|
81130
|
-
method: "POST",
|
|
81131
|
-
headers: {
|
|
81132
|
-
Authorization: `Bearer ${token2}`
|
|
81133
|
-
},
|
|
81134
|
-
body: formData
|
|
81135
|
-
});
|
|
81136
|
-
if (!response.ok) {
|
|
81137
|
-
const error = await createHttpErrorFromFetch(response);
|
|
81138
|
-
throw error;
|
|
81139
|
-
}
|
|
81140
|
-
return response.json();
|
|
81141
|
-
},
|
|
81142
|
-
{ retries: 3 }
|
|
81143
|
-
);
|
|
81144
|
-
return StaticFileUploadSchema.parse(responseJson);
|
|
81145
|
-
} catch (e2) {
|
|
81146
|
-
throw new CliError({
|
|
81147
|
-
code: CliErrorCode.FailedToUploadStaticFiles(),
|
|
81148
|
-
cause: e2,
|
|
81149
|
-
info: { endpointUrl }
|
|
81150
|
-
});
|
|
81151
|
-
}
|
|
81152
|
-
};
|
|
81153
|
-
putBinaryFile = async (endpointUrl, fileContent, contentType) => {
|
|
81154
|
-
try {
|
|
81155
|
-
await pRetry(
|
|
81156
|
-
async () => {
|
|
81157
|
-
const response = await fetch(endpointUrl, {
|
|
81158
|
-
method: "PUT",
|
|
81159
|
-
headers: {
|
|
81160
|
-
"Content-Type": contentType
|
|
81161
|
-
},
|
|
81162
|
-
body: fileContent
|
|
81163
|
-
});
|
|
81164
|
-
if (!response.ok) {
|
|
81165
|
-
const error = await createHttpErrorFromFetch(response);
|
|
81166
|
-
throw error;
|
|
81167
|
-
}
|
|
81168
|
-
},
|
|
81169
|
-
{ retries: 3 }
|
|
81170
|
-
);
|
|
81171
|
-
} catch (e2) {
|
|
81172
|
-
throw new CliError({
|
|
81173
|
-
code: CliErrorCode.FailedToUploadStaticFiles(),
|
|
81174
|
-
cause: e2,
|
|
81175
|
-
info: { endpointUrl }
|
|
81176
|
-
});
|
|
81177
|
-
}
|
|
81178
|
-
};
|
|
81179
|
-
// Env management
|
|
81180
|
-
getAppEnvironmentByName = async (appId, environment) => {
|
|
81181
|
-
try {
|
|
81182
|
-
const { data } = await pRetry(
|
|
81183
|
-
() => this.httpClient.request(
|
|
81184
|
-
getAppEnvironmentByName({
|
|
81185
|
-
appProjectId: appId,
|
|
81186
|
-
appEnvironmentName: environment
|
|
81187
|
-
})
|
|
81188
|
-
),
|
|
81189
|
-
this.retryOptions
|
|
81190
|
-
);
|
|
81191
|
-
return AppEnvironmentSchema.parse(data).appEnvironment;
|
|
81192
|
-
} catch (e2) {
|
|
81193
|
-
throw new CliError({
|
|
81194
|
-
code: CliErrorCode.FailedToPullEnvironment(),
|
|
81195
|
-
cause: e2
|
|
81196
|
-
});
|
|
81197
|
-
}
|
|
81198
|
-
};
|
|
81199
|
-
upsertAppEnvironment = async (appId, environment, variables) => {
|
|
81200
|
-
try {
|
|
81201
|
-
const { data } = await this.httpClient.request(
|
|
81202
|
-
upsertAppEnvironment({
|
|
81203
|
-
appEnvironment: {
|
|
81204
|
-
appProjectId: appId,
|
|
81205
|
-
name: environment,
|
|
81206
|
-
variables
|
|
81207
|
-
}
|
|
81208
|
-
})
|
|
81209
|
-
);
|
|
81210
|
-
return AppEnvironmentSchema.parse(data).appEnvironment;
|
|
81211
|
-
} catch (e2) {
|
|
81212
|
-
throw new CliError({
|
|
81213
|
-
code: CliErrorCode.FailedToSetEnvironmentVariable(),
|
|
81214
|
-
cause: e2
|
|
81215
|
-
});
|
|
81216
|
-
}
|
|
81217
|
-
};
|
|
81218
|
-
removeAppEnvironmentVariable = async (appId, environment, variable) => {
|
|
81219
|
-
try {
|
|
81220
|
-
const appEnvironment = await this.getAppEnvironmentByName(
|
|
81221
|
-
appId,
|
|
81222
|
-
environment
|
|
81223
|
-
);
|
|
81224
|
-
const { data } = await pRetry(
|
|
81225
|
-
() => this.httpClient.request(
|
|
81226
|
-
removeAppEnvironmentVariables({
|
|
81227
|
-
appEnvironmentId: appEnvironment.id,
|
|
81228
|
-
appProjectId: appId,
|
|
81229
|
-
variables: [variable]
|
|
81230
|
-
})
|
|
81231
|
-
),
|
|
81232
|
-
this.retryOptions
|
|
81233
|
-
);
|
|
81234
|
-
return AppEnvironmentSchema.parse(data).appEnvironment;
|
|
81235
|
-
} catch (e2) {
|
|
81236
|
-
throw new CliError({
|
|
81237
|
-
code: CliErrorCode.FailedToRemoveEnvironmentVariable(),
|
|
81238
|
-
cause: e2
|
|
81239
|
-
});
|
|
81240
|
-
}
|
|
81241
|
-
};
|
|
81242
|
-
};
|
|
81243
|
-
|
|
81244
|
-
// ../backend-as-a-service-client/src/useBackendAsAServiceClient.ts
|
|
81245
|
-
function useBackendAsAServiceClient() {
|
|
81246
|
-
const httpClient = useHttpClient({ type: "backoffice" });
|
|
81247
|
-
const client2 = (0, import_react107.useMemo)(
|
|
81248
|
-
() => new BackendAsAServiceClient(httpClient),
|
|
81249
|
-
[httpClient]
|
|
81250
|
-
);
|
|
81251
|
-
return usePanoramaMethodLogger(client2);
|
|
81252
|
-
}
|
|
81253
|
-
|
|
81254
|
-
// ../create-new-packages/app-command/src/components/ChooseAppName.tsx
|
|
81255
|
-
init_esm_shims();
|
|
81256
|
-
var import_react108 = __toESM(require_react(), 1);
|
|
81257
|
-
var ChooseAppName = ({ onSubmit }) => {
|
|
81258
|
-
const { t: t3 } = useTranslation();
|
|
81259
|
-
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81260
|
-
return /* @__PURE__ */ import_react108.default.createElement(
|
|
81261
|
-
TextInput2,
|
|
81262
|
-
{
|
|
81263
|
-
label: t3("create_app.create_new.name_of_app.label"),
|
|
81264
|
-
placeholder: t3("create_app.create_new.name_of_app.placeholder"),
|
|
81265
|
-
validate: validateAppNameSafe,
|
|
81266
|
-
onSubmit: (appName) => {
|
|
81267
|
-
cliFlowStepAnswered({
|
|
81268
|
-
question: t3("create_app.create_new.name_of_app.label"),
|
|
81269
|
-
questionKey: "create_app.create_new.name_of_app.label",
|
|
81270
|
-
answer: appName
|
|
81271
|
-
});
|
|
81272
|
-
onSubmit(appName);
|
|
81273
|
-
},
|
|
81274
|
-
inCreateFlow: true
|
|
81275
|
-
}
|
|
81276
|
-
);
|
|
81277
|
-
};
|
|
81278
|
-
|
|
81279
|
-
// ../create-new-packages/app-command/src/components/ChoosePackageName.tsx
|
|
81280
|
-
init_esm_shims();
|
|
81281
|
-
var import_react110 = __toESM(require_react(), 1);
|
|
81282
|
-
var import_variant30 = __toESM(require_lib(), 1);
|
|
81283
|
-
import { join as join9, relative } from "node:path";
|
|
81284
|
-
var import_kebabCase3 = __toESM(require_kebabCase(), 1);
|
|
81285
|
-
|
|
81286
|
-
// ../create-new-packages/app-command/src/components/ConfirmPackagePath.tsx
|
|
81287
|
-
init_esm_shims();
|
|
81288
|
-
var import_react109 = __toESM(require_react(), 1);
|
|
81289
|
-
var ConfirmPackagePath = ({
|
|
81290
|
-
path: path4,
|
|
81291
|
-
onSubmit
|
|
81292
|
-
}) => {
|
|
81293
|
-
const { t: t3 } = useTranslation();
|
|
81294
|
-
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81295
|
-
const [cancelled, setCancelled] = (0, import_react109.useState)(false);
|
|
81296
|
-
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(
|
|
81297
|
-
ConfirmInput,
|
|
81298
|
-
{
|
|
81299
|
-
label: t3("create_app.confirm_path_message", {
|
|
81300
|
-
path: path4
|
|
81301
|
-
}),
|
|
81302
|
-
initialValue: true,
|
|
81303
|
-
onSubmit: (confirmation) => {
|
|
81304
|
-
cliFlowStepAnswered({
|
|
81305
|
-
question: t3("create_app.confirm_path.title"),
|
|
81306
|
-
questionKey: "create_app.confirm_path.title",
|
|
81307
|
-
answer: String(confirmation)
|
|
81308
|
-
});
|
|
81309
|
-
onSubmit(confirmation);
|
|
81310
|
-
if (!confirmation) {
|
|
81311
|
-
setCancelled(true);
|
|
81312
|
-
}
|
|
81313
|
-
}
|
|
81314
|
-
}
|
|
81315
|
-
)), cancelled && /* @__PURE__ */ import_react109.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react109.default.createElement(Text2, null, t3("create_app.confirm_path_exit_message"))));
|
|
81316
|
-
};
|
|
81317
|
-
|
|
81318
|
-
// ../create-new-packages/app-command/src/components/ChoosePackageName.tsx
|
|
81319
|
-
var ChoosePackageName = ({
|
|
81320
|
-
appName,
|
|
81321
|
-
targetParentFolder: targetParentFolder2,
|
|
81322
|
-
repoType: repoType2,
|
|
81323
|
-
onSelected
|
|
81324
|
-
}) => {
|
|
81325
|
-
const { t: t3 } = useTranslation();
|
|
81326
|
-
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81327
|
-
const [packageName, setPackageName] = (0, import_react110.useState)();
|
|
81328
|
-
const defaultPackageName = (0, import_react110.useMemo)(() => {
|
|
81329
|
-
return (0, import_kebabCase3.default)(appName);
|
|
81330
|
-
}, [appName]);
|
|
81331
|
-
const isMonorepo = (0, import_variant30.isType)(repoType2, RepoType.Monorepo);
|
|
81332
|
-
async function validate3(packageName2) {
|
|
81333
|
-
if (!await validateDirectory(join9(targetParentFolder2, packageName2))) {
|
|
81334
|
-
return t3("validation_errors.invalid_directory");
|
|
81335
|
-
}
|
|
81336
|
-
const npmValidationErrors = await validatePackageName(packageName2);
|
|
81337
|
-
return (0, import_variant30.match)(npmValidationErrors, {
|
|
81338
|
-
Ok: () => true,
|
|
81339
|
-
Error: ({ payload: payload7 }) => t3("validation_errors.invalid_package_name", {
|
|
81340
|
-
errors: payload7.join(", ")
|
|
81341
|
-
})
|
|
81342
|
-
});
|
|
81343
|
-
}
|
|
81344
|
-
const handlePackageNameSet = (0, import_react110.useCallback)(
|
|
81345
|
-
(packageName2) => {
|
|
81346
|
-
cliFlowStepAnswered({
|
|
81347
|
-
question: t3("create_app.choose_package_name.label"),
|
|
81348
|
-
questionKey: "create_app.choose_package_name.label",
|
|
81349
|
-
answer: packageName2
|
|
81350
|
-
});
|
|
81351
|
-
if (isMonorepo) {
|
|
81352
|
-
setPackageName(packageName2);
|
|
81353
|
-
} else {
|
|
81354
|
-
onSelected(packageName2);
|
|
81355
|
-
}
|
|
81356
|
-
},
|
|
81357
|
-
[cliFlowStepAnswered, setPackageName, onSelected, isMonorepo, t3]
|
|
81358
|
-
);
|
|
81359
|
-
const handlePackagePathConfirm = (0, import_react110.useCallback)(
|
|
81360
|
-
(packageName2, isConfirmed) => {
|
|
81361
|
-
if (isConfirmed) {
|
|
81362
|
-
onSelected(packageName2);
|
|
81363
|
-
}
|
|
81364
|
-
},
|
|
81365
|
-
[onSelected]
|
|
81366
|
-
);
|
|
81367
|
-
return /* @__PURE__ */ import_react110.default.createElement(import_react110.default.Fragment, null, /* @__PURE__ */ import_react110.default.createElement(
|
|
81368
|
-
TextInput2,
|
|
81369
|
-
{
|
|
81370
|
-
label: t3("create_app.choose_package_name.label"),
|
|
81371
|
-
placeholder: defaultPackageName,
|
|
81372
|
-
onSubmit: handlePackageNameSet,
|
|
81373
|
-
validate: validate3,
|
|
81374
|
-
inCreateFlow: true
|
|
81375
|
-
}
|
|
81376
|
-
), packageName && isMonorepo && /* @__PURE__ */ import_react110.default.createElement(
|
|
81377
|
-
ConfirmPackagePath,
|
|
81378
|
-
{
|
|
81379
|
-
path: relative(
|
|
81380
|
-
repoType2.rootDir,
|
|
81381
|
-
join9(targetParentFolder2, packageName)
|
|
81382
|
-
),
|
|
81383
|
-
onSubmit: (confirmed) => handlePackagePathConfirm(packageName, confirmed)
|
|
81384
|
-
}
|
|
81385
|
-
));
|
|
81386
|
-
};
|
|
81387
|
-
|
|
81388
|
-
// ../create-new-packages/app-command/src/components/Questions/ChooseTemplateFlow.tsx
|
|
81389
|
-
init_esm_shims();
|
|
81390
|
-
var import_react113 = __toESM(require_react(), 1);
|
|
81391
|
-
|
|
81392
|
-
// ../create-new-packages/app-command/src/components/ChooseAppCreationSource.tsx
|
|
81393
|
-
init_esm_shims();
|
|
81394
|
-
var import_react111 = __toESM(require_react(), 1);
|
|
81395
|
-
var ChooseAppCreationSource = ({
|
|
81396
|
-
onSelected
|
|
81397
|
-
}) => {
|
|
81398
|
-
const { t: t3 } = useTranslation();
|
|
81399
|
-
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81400
|
-
return /* @__PURE__ */ import_react111.default.createElement(
|
|
81401
|
-
SelectInput2,
|
|
81402
|
-
{
|
|
81403
|
-
label: t3("create_app.choose_app_creation_source.label"),
|
|
81404
|
-
options: [
|
|
81405
|
-
{
|
|
81406
|
-
title: t3("create_app.choose_app_creation_source.basic_app.title"),
|
|
81407
|
-
description: t3(
|
|
81408
|
-
"create_app.choose_app_creation_source.basic_app.description"
|
|
81409
|
-
),
|
|
81410
|
-
value: "basic"
|
|
81411
|
-
},
|
|
81412
|
-
{
|
|
81413
|
-
title: t3("create_app.choose_app_creation_source.template.title"),
|
|
81414
|
-
description: t3(
|
|
81415
|
-
"create_app.choose_app_creation_source.template.description"
|
|
81416
|
-
),
|
|
81417
|
-
value: "template"
|
|
81418
|
-
}
|
|
81419
|
-
],
|
|
81420
|
-
onSubmit: ({ value: value2 }) => {
|
|
81421
|
-
cliFlowStepAnswered({
|
|
81422
|
-
question: t3("create_app.choose_app_creation_source.label"),
|
|
81423
|
-
questionKey: "create_app.choose_app_creation_source.label",
|
|
81424
|
-
answer: value2
|
|
81425
|
-
});
|
|
81426
|
-
onSelected(value2);
|
|
81427
|
-
}
|
|
81428
|
-
}
|
|
81429
|
-
);
|
|
81430
|
-
};
|
|
81431
|
-
|
|
81432
|
-
// ../create-new-packages/app-command/src/components/ChooseTemplate.tsx
|
|
81433
|
-
init_esm_shims();
|
|
81434
|
-
var import_react112 = __toESM(require_react(), 1);
|
|
81435
|
-
var import_variant31 = __toESM(require_lib(), 1);
|
|
81436
|
-
var ChooseTemplate = ({ onSelected }) => {
|
|
81437
|
-
const { t: t3 } = useTranslation();
|
|
81438
|
-
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81439
|
-
const { queryCliAppTemplates } = useDevCenterClient();
|
|
81440
|
-
const [isTemplateSelected, setIsTemplateSelected] = (0, import_react112.useState)(false);
|
|
81441
|
-
const { status } = useAsync2(async () => {
|
|
81442
|
-
const appTemplates = await queryCliAppTemplates();
|
|
81443
|
-
const filteredAppTemplates = appTemplates.filter(
|
|
81444
|
-
(appTemplate) => appTemplate.id !== "a033018e-233a-4ddc-8471-1151d8974866"
|
|
81445
|
-
);
|
|
81446
|
-
return {
|
|
81447
|
-
appTemplatesOptions: filteredAppTemplates.map((appTemplate) => {
|
|
81448
|
-
return {
|
|
81449
|
-
key: appTemplate.id,
|
|
81450
|
-
title: appTemplate.title,
|
|
81451
|
-
description: appTemplate.subtitle,
|
|
81452
|
-
value: appTemplate
|
|
81453
|
-
};
|
|
81454
|
-
})
|
|
81455
|
-
};
|
|
81456
|
-
}, []);
|
|
81457
|
-
return /* @__PURE__ */ import_react112.default.createElement(import_react112.default.Fragment, null, (0, import_variant31.match)(status, {
|
|
81458
|
-
Error: () => null,
|
|
81459
|
-
Loading: () => /* @__PURE__ */ import_react112.default.createElement(Spinner2, null),
|
|
81460
|
-
Success: ({ result: { appTemplatesOptions } }) => /* @__PURE__ */ import_react112.default.createElement(import_react112.default.Fragment, null, /* @__PURE__ */ import_react112.default.createElement(
|
|
81461
|
-
SelectInput2,
|
|
81462
|
-
{
|
|
81463
|
-
label: t3("create_app.choose_template.title"),
|
|
81464
|
-
options: appTemplatesOptions,
|
|
81465
|
-
onSubmit: ({ value: value2 }) => {
|
|
81466
|
-
cliFlowStepAnswered({
|
|
81467
|
-
question: t3("create_app.choose_template.title"),
|
|
81468
|
-
questionKey: "create_app.choose_template.title",
|
|
81469
|
-
answer: value2.title
|
|
81470
|
-
});
|
|
81471
|
-
setIsTemplateSelected(true);
|
|
81472
|
-
onSelected(value2);
|
|
81473
|
-
}
|
|
81474
|
-
}
|
|
81475
|
-
), !isTemplateSelected && /* @__PURE__ */ import_react112.default.createElement(Box_default, { marginTop: 1 }, /* @__PURE__ */ import_react112.default.createElement(
|
|
81476
|
-
Trans2,
|
|
81477
|
-
{
|
|
81478
|
-
i18nKey: "create_app.choose_template.see_templates",
|
|
81479
|
-
components: [
|
|
81480
|
-
/* @__PURE__ */ import_react112.default.createElement(Link, { url: "https://dev.wix.com/apps-templates?filter=cli" })
|
|
81481
|
-
]
|
|
81482
|
-
}
|
|
81483
|
-
)))
|
|
81484
|
-
}));
|
|
81485
|
-
};
|
|
81486
|
-
|
|
81487
|
-
// ../create-new-packages/app-command/src/components/Questions/ChooseTemplateFlow.tsx
|
|
81488
|
-
var ChooseTemplateFlow = ({
|
|
81489
|
-
onTemplateChoose
|
|
81490
|
-
}) => {
|
|
81491
|
-
const [shouldSelectTemplate, setShouldSelectTemplate] = (0, import_react113.useState)(false);
|
|
81492
|
-
return /* @__PURE__ */ import_react113.default.createElement(import_react113.default.Fragment, null, /* @__PURE__ */ import_react113.default.createElement(
|
|
81493
|
-
ChooseAppCreationSource,
|
|
81494
|
-
{
|
|
81495
|
-
onSelected: (source) => {
|
|
81496
|
-
if (source === "basic") {
|
|
81497
|
-
onTemplateChoose(TemplateSource.Default());
|
|
81498
|
-
} else {
|
|
81499
|
-
setShouldSelectTemplate(true);
|
|
81500
|
-
}
|
|
81501
|
-
}
|
|
81744
|
+
createAppProject = async ({
|
|
81745
|
+
cloudProvider,
|
|
81746
|
+
...appProjectOptions
|
|
81747
|
+
}) => {
|
|
81748
|
+
try {
|
|
81749
|
+
const { data } = await this.httpClient.request(
|
|
81750
|
+
createAppProject({
|
|
81751
|
+
appProject: {
|
|
81752
|
+
...appProjectOptions,
|
|
81753
|
+
appProjectTypeId: cloudProvider === CloudProvider.KUBERNETES ? APP_PROJECT_TYPE_ID_KUBERNETES : APP_PROJECT_TYPE_ID_CLOUDFLARE,
|
|
81754
|
+
cloudProviderOverride: cloudProvider
|
|
81755
|
+
}
|
|
81756
|
+
})
|
|
81757
|
+
);
|
|
81758
|
+
return CreateAppProjectSchema.parse(data).appProject;
|
|
81759
|
+
} catch (e2) {
|
|
81760
|
+
throw new CliError({
|
|
81761
|
+
code: CliErrorCode.FailedCreatingAppProject(),
|
|
81762
|
+
cause: e2
|
|
81763
|
+
});
|
|
81502
81764
|
}
|
|
81503
|
-
|
|
81504
|
-
|
|
81505
|
-
{
|
|
81506
|
-
|
|
81507
|
-
|
|
81508
|
-
|
|
81765
|
+
};
|
|
81766
|
+
createAppDeployment = async (appId, staticFilesMetadata) => {
|
|
81767
|
+
try {
|
|
81768
|
+
const { data } = await pRetry(
|
|
81769
|
+
() => this.httpClient.request(
|
|
81770
|
+
createAppDeployment({
|
|
81771
|
+
appDeployment: {
|
|
81772
|
+
appProjectId: appId,
|
|
81773
|
+
staticFilesMetadata
|
|
81774
|
+
}
|
|
81775
|
+
})
|
|
81776
|
+
),
|
|
81777
|
+
this.retryOptions
|
|
81778
|
+
);
|
|
81779
|
+
return CreateAppDeploymentSchema.parse(data);
|
|
81780
|
+
} catch (e2) {
|
|
81781
|
+
throw new CliError({
|
|
81782
|
+
code: CliErrorCode.FailedCreatingAppDeployment(),
|
|
81783
|
+
cause: e2
|
|
81784
|
+
});
|
|
81509
81785
|
}
|
|
81510
|
-
|
|
81511
|
-
|
|
81512
|
-
|
|
81513
|
-
|
|
81514
|
-
|
|
81515
|
-
|
|
81516
|
-
|
|
81517
|
-
|
|
81518
|
-
|
|
81519
|
-
|
|
81520
|
-
|
|
81521
|
-
|
|
81522
|
-
|
|
81523
|
-
|
|
81524
|
-
|
|
81525
|
-
|
|
81526
|
-
|
|
81527
|
-
|
|
81528
|
-
i18nKey: "create_app.create_new.app_registered_successfully",
|
|
81529
|
-
components: [/* @__PURE__ */ import_react115.default.createElement(Text2, { bold: true })],
|
|
81530
|
-
values: { appName }
|
|
81786
|
+
};
|
|
81787
|
+
completeAppDeployment = async (appDeployment, staticsCompletionToken) => {
|
|
81788
|
+
try {
|
|
81789
|
+
const { data } = await pRetry(
|
|
81790
|
+
() => this.httpClient.request(
|
|
81791
|
+
completeAppDeployment({
|
|
81792
|
+
appDeployment,
|
|
81793
|
+
staticsCompletionToken
|
|
81794
|
+
})
|
|
81795
|
+
),
|
|
81796
|
+
this.retryOptions
|
|
81797
|
+
);
|
|
81798
|
+
return CompleteAppDeploymentSchema.parse(data).appDeployment;
|
|
81799
|
+
} catch (e2) {
|
|
81800
|
+
throw new CliError({
|
|
81801
|
+
code: CliErrorCode.FailedFinalizingAppDeployment(),
|
|
81802
|
+
cause: e2
|
|
81803
|
+
});
|
|
81531
81804
|
}
|
|
81532
|
-
|
|
81533
|
-
|
|
81534
|
-
|
|
81535
|
-
|
|
81536
|
-
|
|
81537
|
-
|
|
81538
|
-
|
|
81539
|
-
|
|
81540
|
-
|
|
81541
|
-
|
|
81542
|
-
|
|
81543
|
-
});
|
|
81544
|
-
|
|
81545
|
-
|
|
81546
|
-
|
|
81547
|
-
|
|
81548
|
-
|
|
81549
|
-
{
|
|
81550
|
-
label: t3("create_app.choose_ide_for_mcp.question"),
|
|
81551
|
-
info: /* @__PURE__ */ import_react116.default.createElement(
|
|
81552
|
-
Trans2,
|
|
81553
|
-
{
|
|
81554
|
-
i18nKey: "create_app.choose_ide_for_mcp.description",
|
|
81555
|
-
components: [
|
|
81556
|
-
/* @__PURE__ */ import_react116.default.createElement(Link, { url: "https://www.wix.com/studio/developers/mcp-server" })
|
|
81557
|
-
]
|
|
81558
|
-
}
|
|
81559
|
-
),
|
|
81560
|
-
options: [
|
|
81561
|
-
{
|
|
81562
|
-
title: t3("create_app.choose_ide_for_mcp.answer.cursor"),
|
|
81563
|
-
key: "cursor",
|
|
81564
|
-
value: IdeForMcp.Cursor()
|
|
81565
|
-
},
|
|
81566
|
-
{
|
|
81567
|
-
title: t3("create_app.choose_ide_for_mcp.answer.vscode"),
|
|
81568
|
-
key: "vscode",
|
|
81569
|
-
value: IdeForMcp.VsCode()
|
|
81805
|
+
};
|
|
81806
|
+
postForm = async (endpointUrl, token2, formData) => {
|
|
81807
|
+
try {
|
|
81808
|
+
const responseJson = await pRetry(
|
|
81809
|
+
async () => {
|
|
81810
|
+
const response = await fetch(endpointUrl, {
|
|
81811
|
+
method: "POST",
|
|
81812
|
+
headers: {
|
|
81813
|
+
Authorization: `Bearer ${token2}`
|
|
81814
|
+
},
|
|
81815
|
+
body: formData
|
|
81816
|
+
});
|
|
81817
|
+
if (!response.ok) {
|
|
81818
|
+
const error = await createHttpErrorFromFetch(response);
|
|
81819
|
+
throw error;
|
|
81820
|
+
}
|
|
81821
|
+
return response.json();
|
|
81570
81822
|
},
|
|
81571
|
-
{
|
|
81572
|
-
|
|
81573
|
-
|
|
81574
|
-
|
|
81823
|
+
{ retries: 3 }
|
|
81824
|
+
);
|
|
81825
|
+
return StaticFileUploadSchema.parse(responseJson);
|
|
81826
|
+
} catch (e2) {
|
|
81827
|
+
throw new CliError({
|
|
81828
|
+
code: CliErrorCode.FailedToUploadStaticFiles(),
|
|
81829
|
+
cause: e2,
|
|
81830
|
+
info: { endpointUrl }
|
|
81831
|
+
});
|
|
81832
|
+
}
|
|
81833
|
+
};
|
|
81834
|
+
putBinaryFile = async (endpointUrl, fileContent, contentType) => {
|
|
81835
|
+
try {
|
|
81836
|
+
await pRetry(
|
|
81837
|
+
async () => {
|
|
81838
|
+
const response = await fetch(endpointUrl, {
|
|
81839
|
+
method: "PUT",
|
|
81840
|
+
headers: {
|
|
81841
|
+
"Content-Type": contentType
|
|
81842
|
+
},
|
|
81843
|
+
body: fileContent
|
|
81844
|
+
});
|
|
81845
|
+
if (!response.ok) {
|
|
81846
|
+
const error = await createHttpErrorFromFetch(response);
|
|
81847
|
+
throw error;
|
|
81848
|
+
}
|
|
81575
81849
|
},
|
|
81576
|
-
{
|
|
81577
|
-
|
|
81578
|
-
|
|
81579
|
-
|
|
81580
|
-
|
|
81581
|
-
|
|
81582
|
-
|
|
81583
|
-
|
|
81584
|
-
question: t3("create_app.choose_ide_for_mcp.question"),
|
|
81585
|
-
questionKey: "create_app.choose_ide_for_mcp.question",
|
|
81586
|
-
answer: value2?.type ?? "No"
|
|
81587
|
-
});
|
|
81588
|
-
onSelected(value2);
|
|
81589
|
-
}
|
|
81850
|
+
{ retries: 3 }
|
|
81851
|
+
);
|
|
81852
|
+
} catch (e2) {
|
|
81853
|
+
throw new CliError({
|
|
81854
|
+
code: CliErrorCode.FailedToUploadStaticFiles(),
|
|
81855
|
+
cause: e2,
|
|
81856
|
+
info: { endpointUrl }
|
|
81857
|
+
});
|
|
81590
81858
|
}
|
|
81591
|
-
|
|
81859
|
+
};
|
|
81860
|
+
// Env management
|
|
81861
|
+
getAppEnvironmentByName = async (appId, environment) => {
|
|
81862
|
+
try {
|
|
81863
|
+
const { data } = await pRetry(
|
|
81864
|
+
() => this.httpClient.request(
|
|
81865
|
+
getAppEnvironmentByName({
|
|
81866
|
+
appProjectId: appId,
|
|
81867
|
+
appEnvironmentName: environment
|
|
81868
|
+
})
|
|
81869
|
+
),
|
|
81870
|
+
this.retryOptions
|
|
81871
|
+
);
|
|
81872
|
+
return AppEnvironmentSchema.parse(data).appEnvironment;
|
|
81873
|
+
} catch (e2) {
|
|
81874
|
+
throw new CliError({
|
|
81875
|
+
code: CliErrorCode.FailedToPullEnvironment(),
|
|
81876
|
+
cause: e2
|
|
81877
|
+
});
|
|
81878
|
+
}
|
|
81879
|
+
};
|
|
81880
|
+
upsertAppEnvironment = async (appId, environment, variables) => {
|
|
81881
|
+
try {
|
|
81882
|
+
const { data } = await this.httpClient.request(
|
|
81883
|
+
upsertAppEnvironment({
|
|
81884
|
+
appEnvironment: {
|
|
81885
|
+
appProjectId: appId,
|
|
81886
|
+
name: environment,
|
|
81887
|
+
variables
|
|
81888
|
+
}
|
|
81889
|
+
})
|
|
81890
|
+
);
|
|
81891
|
+
return AppEnvironmentSchema.parse(data).appEnvironment;
|
|
81892
|
+
} catch (e2) {
|
|
81893
|
+
throw new CliError({
|
|
81894
|
+
code: CliErrorCode.FailedToSetEnvironmentVariable(),
|
|
81895
|
+
cause: e2
|
|
81896
|
+
});
|
|
81897
|
+
}
|
|
81898
|
+
};
|
|
81899
|
+
removeAppEnvironmentVariable = async (appId, environment, variable) => {
|
|
81900
|
+
try {
|
|
81901
|
+
const appEnvironment = await this.getAppEnvironmentByName(
|
|
81902
|
+
appId,
|
|
81903
|
+
environment
|
|
81904
|
+
);
|
|
81905
|
+
const { data } = await pRetry(
|
|
81906
|
+
() => this.httpClient.request(
|
|
81907
|
+
removeAppEnvironmentVariables({
|
|
81908
|
+
appEnvironmentId: appEnvironment.id,
|
|
81909
|
+
appProjectId: appId,
|
|
81910
|
+
variables: [variable]
|
|
81911
|
+
})
|
|
81912
|
+
),
|
|
81913
|
+
this.retryOptions
|
|
81914
|
+
);
|
|
81915
|
+
return AppEnvironmentSchema.parse(data).appEnvironment;
|
|
81916
|
+
} catch (e2) {
|
|
81917
|
+
throw new CliError({
|
|
81918
|
+
code: CliErrorCode.FailedToRemoveEnvironmentVariable(),
|
|
81919
|
+
cause: e2
|
|
81920
|
+
});
|
|
81921
|
+
}
|
|
81922
|
+
};
|
|
81592
81923
|
};
|
|
81593
81924
|
|
|
81594
|
-
// ../
|
|
81595
|
-
|
|
81596
|
-
|
|
81597
|
-
|
|
81598
|
-
|
|
81599
|
-
|
|
81600
|
-
|
|
81601
|
-
|
|
81602
|
-
|
|
81603
|
-
ideForMcp,
|
|
81604
|
-
packageFolder
|
|
81605
|
-
}) => {
|
|
81606
|
-
const mcpPath = (0, import_variant33.match)(ideForMcp, {
|
|
81607
|
-
Cursor: () => join10(packageFolder, ".cursor", "mcp.json"),
|
|
81608
|
-
VsCode: () => join10(packageFolder, ".vscode", "mcp.json"),
|
|
81609
|
-
ClaudeCode: () => join10(packageFolder, ".mcp.json")
|
|
81610
|
-
});
|
|
81611
|
-
return McpConfigResult.Created({
|
|
81612
|
-
mcpPath,
|
|
81613
|
-
ideForMcp,
|
|
81614
|
-
docsUrl: (0, import_variant33.match)(
|
|
81615
|
-
ideForMcp,
|
|
81616
|
-
(0, import_variant33.lookup)({
|
|
81617
|
-
Cursor: "https://cursor.com/docs/context/mcp",
|
|
81618
|
-
VsCode: "https://code.visualstudio.com/docs/copilot/chat/mcp-servers",
|
|
81619
|
-
ClaudeCode: "https://docs.anthropic.com/en/docs/claude-code/mcp"
|
|
81620
|
-
})
|
|
81621
|
-
)
|
|
81622
|
-
});
|
|
81623
|
-
};
|
|
81624
|
-
var getMcpResult = ({
|
|
81625
|
-
ideForMcp,
|
|
81626
|
-
targetParentFolder: targetParentFolder2,
|
|
81627
|
-
packageName
|
|
81628
|
-
}) => {
|
|
81629
|
-
const packageFolder = join10(targetParentFolder2, packageName);
|
|
81630
|
-
return ideForMcp ? getMcpData({
|
|
81631
|
-
ideForMcp,
|
|
81632
|
-
packageFolder
|
|
81633
|
-
}) : McpConfigResult.Canceled();
|
|
81634
|
-
};
|
|
81925
|
+
// ../backend-as-a-service-client/src/useBackendAsAServiceClient.ts
|
|
81926
|
+
function useBackendAsAServiceClient() {
|
|
81927
|
+
const httpClient = useHttpClient({ type: "backoffice" });
|
|
81928
|
+
const client2 = (0, import_react119.useMemo)(
|
|
81929
|
+
() => new BackendAsAServiceClient(httpClient),
|
|
81930
|
+
[httpClient]
|
|
81931
|
+
);
|
|
81932
|
+
return usePanoramaMethodLogger(client2);
|
|
81933
|
+
}
|
|
81635
81934
|
|
|
81636
81935
|
// ../create-new-packages/app-command/src/services/project-setup.ts
|
|
81637
81936
|
init_esm_shims();
|
|
@@ -81676,31 +81975,19 @@ function generateRandomSlug() {
|
|
|
81676
81975
|
return randomBytes(8).toString("hex");
|
|
81677
81976
|
}
|
|
81678
81977
|
|
|
81679
|
-
// ../create-new-packages/app-command/src/components/Questions/
|
|
81680
|
-
var
|
|
81681
|
-
onSubmit,
|
|
81682
|
-
template: templateFromOptions,
|
|
81683
|
-
appName: appNameFromOptions,
|
|
81684
|
-
targetParentFolder: targetParentFolder2,
|
|
81685
|
-
repoType: repoType2,
|
|
81686
|
-
extendAppId
|
|
81687
|
-
}) => {
|
|
81978
|
+
// ../create-new-packages/app-command/src/components/Questions/useAppCreation.tsx
|
|
81979
|
+
var useAppCreation = ({ extendAppId }) => {
|
|
81688
81980
|
const devCenterClient = useDevCenterClient();
|
|
81689
81981
|
const backendAsAServiceClient = useBackendAsAServiceClient();
|
|
81690
81982
|
const biLogger = useBiLogger();
|
|
81691
|
-
const [templateData, setTemplateData] = (0, import_react117.useState)(
|
|
81692
|
-
templateFromOptions
|
|
81693
|
-
);
|
|
81694
|
-
const [appName, setAppName] = (0, import_react117.useState)();
|
|
81695
|
-
const [packageName, setPackageName] = (0, import_react117.useState)();
|
|
81696
81983
|
const createAppCallback = useAsyncCallback3(
|
|
81697
|
-
async (_2, { appName
|
|
81698
|
-
const { id: appId } = await (0,
|
|
81984
|
+
async (_2, { appName, packageName, template, mcpConfigResult }) => {
|
|
81985
|
+
const { id: appId } = await (0, import_variant37.match)(
|
|
81699
81986
|
template,
|
|
81700
|
-
(0,
|
|
81987
|
+
(0, import_variant37.partial)({
|
|
81701
81988
|
App: ({ payload: payload7 }) => devCenterClient.createAppFromTemplate(
|
|
81702
81989
|
{
|
|
81703
|
-
name:
|
|
81990
|
+
name: appName,
|
|
81704
81991
|
templateId: payload7.id
|
|
81705
81992
|
},
|
|
81706
81993
|
payload7
|
|
@@ -81709,70 +81996,106 @@ var NewAppFlow = ({
|
|
|
81709
81996
|
if (extendAppId) {
|
|
81710
81997
|
return { id: extendAppId };
|
|
81711
81998
|
}
|
|
81712
|
-
return devCenterClient.createApp({ name:
|
|
81999
|
+
return devCenterClient.createApp({ name: appName });
|
|
81713
82000
|
}
|
|
81714
82001
|
})
|
|
81715
82002
|
);
|
|
81716
|
-
const { variables } = await createAppProjectAndEnvironment({
|
|
82003
|
+
const { variables: environmentVariables } = await createAppProjectAndEnvironment({
|
|
81717
82004
|
appId,
|
|
81718
|
-
appName
|
|
82005
|
+
appName,
|
|
81719
82006
|
devCenterClient,
|
|
81720
82007
|
backendAsAServiceClient
|
|
81721
82008
|
});
|
|
81722
82009
|
biLogger.updateDefaults({
|
|
81723
82010
|
_appId: appId
|
|
81724
82011
|
});
|
|
81725
|
-
|
|
82012
|
+
const appCreationResult = {
|
|
81726
82013
|
template,
|
|
81727
|
-
appData: { appName
|
|
81728
|
-
packageName
|
|
82014
|
+
appData: { appName, appId },
|
|
82015
|
+
packageName,
|
|
81729
82016
|
mcpConfigResult,
|
|
81730
|
-
environmentVariables
|
|
81731
|
-
});
|
|
81732
|
-
return {
|
|
81733
|
-
appId,
|
|
81734
|
-
appName: appName2
|
|
82017
|
+
environmentVariables
|
|
81735
82018
|
};
|
|
82019
|
+
return appCreationResult;
|
|
81736
82020
|
}
|
|
81737
82021
|
);
|
|
81738
|
-
|
|
81739
|
-
|
|
81740
|
-
|
|
81741
|
-
|
|
81742
|
-
|
|
81743
|
-
|
|
81744
|
-
|
|
81745
|
-
|
|
81746
|
-
|
|
82022
|
+
return createAppCallback;
|
|
82023
|
+
};
|
|
82024
|
+
|
|
82025
|
+
// ../create-new-packages/app-command/src/components/Questions/NewAppFlow/RegularFlow.tsx
|
|
82026
|
+
var NewAppFlow = ({
|
|
82027
|
+
onSubmit,
|
|
82028
|
+
template: templateFromOptions,
|
|
82029
|
+
targetParentFolder: targetParentFolder2,
|
|
82030
|
+
repoType: repoType2,
|
|
82031
|
+
extendAppId
|
|
82032
|
+
}) => {
|
|
82033
|
+
const createApp3 = useAppCreation({ extendAppId });
|
|
82034
|
+
return /* @__PURE__ */ import_react120.default.createElement(import_react120.default.Fragment, null, (0, import_variant38.isType)(repoType2, RepoType.Monorepo) ? /* @__PURE__ */ import_react120.default.createElement(
|
|
82035
|
+
MonorepoFlow,
|
|
82036
|
+
{
|
|
82037
|
+
onSubmit: createApp3.execute,
|
|
82038
|
+
template: templateFromOptions,
|
|
82039
|
+
targetParentFolder: targetParentFolder2,
|
|
82040
|
+
repoType: repoType2
|
|
81747
82041
|
}
|
|
81748
|
-
|
|
81749
|
-
|
|
82042
|
+
) : /* @__PURE__ */ import_react120.default.createElement(
|
|
82043
|
+
GeneralFlow,
|
|
82044
|
+
{
|
|
82045
|
+
onSubmit: createApp3.execute,
|
|
82046
|
+
template: templateFromOptions,
|
|
82047
|
+
targetParentFolder: targetParentFolder2,
|
|
82048
|
+
repoType: repoType2
|
|
82049
|
+
}
|
|
82050
|
+
), (0, import_variant38.match)(createApp3.status, {
|
|
82051
|
+
Error: () => null,
|
|
82052
|
+
Loading: () => /* @__PURE__ */ import_react120.default.createElement(RegisteringApp, null),
|
|
82053
|
+
Success: ({ result: appCreationData }) => {
|
|
82054
|
+
const {
|
|
82055
|
+
appData: { appId, appName },
|
|
82056
|
+
packageName
|
|
82057
|
+
} = appCreationData;
|
|
82058
|
+
return /* @__PURE__ */ import_react120.default.createElement(import_react120.default.Fragment, null, /* @__PURE__ */ import_react120.default.createElement(AppRegistered, { appId, appName }), /* @__PURE__ */ import_react120.default.createElement(
|
|
82059
|
+
PostAppRegistration,
|
|
82060
|
+
{
|
|
82061
|
+
appId,
|
|
82062
|
+
packageName,
|
|
82063
|
+
onPostRegistrationComplete: () => {
|
|
82064
|
+
onSubmit(appCreationData);
|
|
82065
|
+
}
|
|
82066
|
+
}
|
|
82067
|
+
));
|
|
82068
|
+
},
|
|
82069
|
+
NotRequested: () => null
|
|
82070
|
+
}));
|
|
82071
|
+
};
|
|
82072
|
+
var GeneralFlow = ({
|
|
82073
|
+
onSubmit,
|
|
82074
|
+
template: templateFromOptions,
|
|
82075
|
+
targetParentFolder: targetParentFolder2,
|
|
82076
|
+
repoType: repoType2
|
|
82077
|
+
}) => {
|
|
82078
|
+
const [templateData, setTemplateData] = (0, import_react120.useState)(
|
|
82079
|
+
templateFromOptions
|
|
82080
|
+
);
|
|
82081
|
+
const [appName, setAppName] = (0, import_react120.useState)();
|
|
82082
|
+
const [packageName, setPackageName] = (0, import_react120.useState)();
|
|
82083
|
+
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(
|
|
81750
82084
|
ChoosePackageName,
|
|
81751
82085
|
{
|
|
81752
82086
|
appName,
|
|
81753
82087
|
targetParentFolder: targetParentFolder2,
|
|
81754
82088
|
repoType: repoType2,
|
|
81755
|
-
onSelected:
|
|
81756
|
-
if ((0, import_variant34.isType)(repoType2, RepoType.Monorepo)) {
|
|
81757
|
-
void createAppCallback.execute({
|
|
81758
|
-
appName,
|
|
81759
|
-
packageName: userPackageName,
|
|
81760
|
-
template: templateData,
|
|
81761
|
-
mcpConfigResult: McpConfigResult.Canceled()
|
|
81762
|
-
});
|
|
81763
|
-
} else {
|
|
81764
|
-
setPackageName(userPackageName);
|
|
81765
|
-
}
|
|
81766
|
-
}
|
|
82089
|
+
onSelected: setPackageName
|
|
81767
82090
|
}
|
|
81768
|
-
), appName &&
|
|
82091
|
+
), appName && templateData && packageName && /* @__PURE__ */ import_react120.default.createElement(
|
|
81769
82092
|
ConfigMcp,
|
|
81770
82093
|
{
|
|
81771
82094
|
onSelected: (ideForMcp) => {
|
|
81772
|
-
|
|
82095
|
+
onSubmit({
|
|
82096
|
+
template: templateData,
|
|
81773
82097
|
appName,
|
|
81774
82098
|
packageName,
|
|
81775
|
-
template: templateData,
|
|
81776
82099
|
mcpConfigResult: getMcpResult({
|
|
81777
82100
|
ideForMcp,
|
|
81778
82101
|
targetParentFolder: targetParentFolder2,
|
|
@@ -81781,29 +82104,87 @@ var NewAppFlow = ({
|
|
|
81781
82104
|
});
|
|
81782
82105
|
}
|
|
81783
82106
|
}
|
|
81784
|
-
))
|
|
82107
|
+
));
|
|
82108
|
+
};
|
|
82109
|
+
var MonorepoFlow = ({
|
|
82110
|
+
onSubmit,
|
|
82111
|
+
template: templateFromOptions,
|
|
82112
|
+
targetParentFolder: targetParentFolder2,
|
|
82113
|
+
repoType: repoType2
|
|
82114
|
+
}) => {
|
|
82115
|
+
const [templateData, setTemplateData] = (0, import_react120.useState)(
|
|
82116
|
+
templateFromOptions
|
|
82117
|
+
);
|
|
82118
|
+
const [appName, setAppName] = (0, import_react120.useState)();
|
|
82119
|
+
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(
|
|
82120
|
+
ChoosePackageName,
|
|
82121
|
+
{
|
|
82122
|
+
appName,
|
|
82123
|
+
targetParentFolder: targetParentFolder2,
|
|
82124
|
+
repoType: repoType2,
|
|
82125
|
+
onSelected: (packageName) => {
|
|
82126
|
+
onSubmit({
|
|
82127
|
+
template: templateData,
|
|
82128
|
+
appName,
|
|
82129
|
+
packageName,
|
|
82130
|
+
mcpConfigResult: getMcpResult({
|
|
82131
|
+
ideForMcp: void 0,
|
|
82132
|
+
targetParentFolder: targetParentFolder2,
|
|
82133
|
+
packageName
|
|
82134
|
+
})
|
|
82135
|
+
});
|
|
82136
|
+
}
|
|
82137
|
+
}
|
|
82138
|
+
));
|
|
82139
|
+
};
|
|
82140
|
+
|
|
82141
|
+
// ../create-new-packages/app-command/src/components/Questions/NewAppFlow/AutoFlow.tsx
|
|
82142
|
+
init_esm_shims();
|
|
82143
|
+
var import_react121 = __toESM(require_react(), 1);
|
|
82144
|
+
var import_variant39 = __toESM(require_lib(), 1);
|
|
82145
|
+
var NewAppAutoFlow = ({
|
|
82146
|
+
onSubmit,
|
|
82147
|
+
template: templateFromOptions,
|
|
82148
|
+
appName: appNameFromOptions,
|
|
82149
|
+
extendAppId
|
|
82150
|
+
}) => {
|
|
82151
|
+
const createApp3 = useAppCreation({ extendAppId });
|
|
82152
|
+
useAsync2(async () => {
|
|
82153
|
+
const appCreationData = await createApp3.execute({
|
|
82154
|
+
appName: appNameFromOptions.appName,
|
|
82155
|
+
packageName: appNameFromOptions.packageName,
|
|
82156
|
+
template: templateFromOptions,
|
|
82157
|
+
mcpConfigResult: McpConfigResult.Canceled()
|
|
82158
|
+
});
|
|
82159
|
+
onSubmit(appCreationData);
|
|
82160
|
+
}, []);
|
|
82161
|
+
return (0, import_variant39.match)(createApp3.status, {
|
|
81785
82162
|
Error: () => null,
|
|
81786
|
-
Loading: () => /* @__PURE__ */
|
|
81787
|
-
Success: ({
|
|
82163
|
+
Loading: () => /* @__PURE__ */ import_react121.default.createElement(RegisteringApp, null),
|
|
82164
|
+
Success: ({
|
|
82165
|
+
result: {
|
|
82166
|
+
appData: { appId, appName }
|
|
82167
|
+
}
|
|
82168
|
+
}) => /* @__PURE__ */ import_react121.default.createElement(AppRegistered, { appId, appName }),
|
|
81788
82169
|
NotRequested: () => null
|
|
81789
|
-
})
|
|
82170
|
+
});
|
|
81790
82171
|
};
|
|
81791
82172
|
|
|
81792
82173
|
// ../create-new-packages/app-command/src/components/Questions/ExistingAppFlow.tsx
|
|
81793
82174
|
init_esm_shims();
|
|
81794
|
-
var
|
|
81795
|
-
var
|
|
82175
|
+
var import_react123 = __toESM(require_react(), 1);
|
|
82176
|
+
var import_variant40 = __toESM(require_lib(), 1);
|
|
81796
82177
|
|
|
81797
82178
|
// ../create-new-packages/app-command/src/components/ExtendExistingApp.tsx
|
|
81798
82179
|
init_esm_shims();
|
|
81799
|
-
var
|
|
82180
|
+
var import_react122 = __toESM(require_react(), 1);
|
|
81800
82181
|
var ExtendExistingApp = ({
|
|
81801
82182
|
developerApps,
|
|
81802
82183
|
onSelected
|
|
81803
82184
|
}) => {
|
|
81804
82185
|
const { t: t3 } = useTranslation();
|
|
81805
82186
|
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81806
|
-
return /* @__PURE__ */
|
|
82187
|
+
return /* @__PURE__ */ import_react122.default.createElement(
|
|
81807
82188
|
SelectInput2,
|
|
81808
82189
|
{
|
|
81809
82190
|
label: t3("create_app.extend_existing.select_app.label"),
|
|
@@ -81841,7 +82222,7 @@ var ExistingAppFlow = ({
|
|
|
81841
82222
|
const backendAsAServiceClient = useBackendAsAServiceClient();
|
|
81842
82223
|
const biLogger = useBiLogger();
|
|
81843
82224
|
const { t: t3 } = useTranslation();
|
|
81844
|
-
const [appData, setAppData] = (0,
|
|
82225
|
+
const [appData, setAppData] = (0, import_react123.useState)();
|
|
81845
82226
|
const registerAppCallback = useAsyncCallback3(
|
|
81846
82227
|
async (_2, { appData: appData2, packageName }) => {
|
|
81847
82228
|
const { variables } = await createAppProjectAndEnvironment({
|
|
@@ -81859,7 +82240,7 @@ var ExistingAppFlow = ({
|
|
|
81859
82240
|
});
|
|
81860
82241
|
}
|
|
81861
82242
|
);
|
|
81862
|
-
return /* @__PURE__ */
|
|
82243
|
+
return /* @__PURE__ */ import_react123.default.createElement(import_react123.default.Fragment, null, /* @__PURE__ */ import_react123.default.createElement(
|
|
81863
82244
|
ExtendExistingApp,
|
|
81864
82245
|
{
|
|
81865
82246
|
developerApps,
|
|
@@ -81870,7 +82251,7 @@ var ExistingAppFlow = ({
|
|
|
81870
82251
|
setAppData(appData2);
|
|
81871
82252
|
}
|
|
81872
82253
|
}
|
|
81873
|
-
), appData && /* @__PURE__ */
|
|
82254
|
+
), appData && /* @__PURE__ */ import_react123.default.createElement(
|
|
81874
82255
|
ChoosePackageName,
|
|
81875
82256
|
{
|
|
81876
82257
|
appName: appData.appName,
|
|
@@ -81883,9 +82264,9 @@ var ExistingAppFlow = ({
|
|
|
81883
82264
|
});
|
|
81884
82265
|
}
|
|
81885
82266
|
}
|
|
81886
|
-
), (0,
|
|
82267
|
+
), (0, import_variant40.match)(registerAppCallback.status, {
|
|
81887
82268
|
Error: () => null,
|
|
81888
|
-
Loading: () => /* @__PURE__ */
|
|
82269
|
+
Loading: () => /* @__PURE__ */ import_react123.default.createElement(Box_default, { marginTop: 1 }, /* @__PURE__ */ import_react123.default.createElement(Spinner2, { text: t3("create_app.extend_existing.get_project") })),
|
|
81889
82270
|
Success: () => null,
|
|
81890
82271
|
NotRequested: () => null
|
|
81891
82272
|
}));
|
|
@@ -81893,45 +82274,45 @@ var ExistingAppFlow = ({
|
|
|
81893
82274
|
|
|
81894
82275
|
// ../create-new-packages/app-command/src/components/StartFromTemplateMessage.tsx
|
|
81895
82276
|
init_esm_shims();
|
|
81896
|
-
var
|
|
81897
|
-
var
|
|
82277
|
+
var import_react124 = __toESM(require_react(), 1);
|
|
82278
|
+
var import_variant41 = __toESM(require_lib(), 1);
|
|
81898
82279
|
var StartFromTemplateMessage = ({
|
|
81899
82280
|
template
|
|
81900
82281
|
}) => {
|
|
81901
|
-
const messageComponent = (0,
|
|
81902
|
-
App: ({ payload: payload7 }) => /* @__PURE__ */
|
|
82282
|
+
const messageComponent = (0, import_variant41.match)(template, {
|
|
82283
|
+
App: ({ payload: payload7 }) => /* @__PURE__ */ import_react124.default.createElement(
|
|
81903
82284
|
Trans2,
|
|
81904
82285
|
{
|
|
81905
82286
|
i18nKey: "create_app.template_is_set_from_options.template_id",
|
|
81906
82287
|
values: {
|
|
81907
82288
|
templateName: payload7.title
|
|
81908
82289
|
},
|
|
81909
|
-
components: [/* @__PURE__ */
|
|
82290
|
+
components: [/* @__PURE__ */ import_react124.default.createElement(Text2, { bold: true })]
|
|
81910
82291
|
}
|
|
81911
82292
|
),
|
|
81912
|
-
GitRepo: ({ url }) => /* @__PURE__ */
|
|
82293
|
+
GitRepo: ({ url }) => /* @__PURE__ */ import_react124.default.createElement(
|
|
81913
82294
|
Trans2,
|
|
81914
82295
|
{
|
|
81915
82296
|
i18nKey: "create_app.template_is_set_from_options.git_repository",
|
|
81916
82297
|
values: {
|
|
81917
82298
|
templateRepoUrl: url
|
|
81918
82299
|
},
|
|
81919
|
-
components: [/* @__PURE__ */
|
|
82300
|
+
components: [/* @__PURE__ */ import_react124.default.createElement(Text2, { bold: true })]
|
|
81920
82301
|
}
|
|
81921
82302
|
),
|
|
81922
|
-
Local: ({ path: path4 }) => /* @__PURE__ */
|
|
82303
|
+
Local: ({ path: path4 }) => /* @__PURE__ */ import_react124.default.createElement(
|
|
81923
82304
|
Trans2,
|
|
81924
82305
|
{
|
|
81925
82306
|
i18nKey: "create_app.template_is_set_from_options.local",
|
|
81926
82307
|
values: {
|
|
81927
82308
|
templatePath: path4
|
|
81928
82309
|
},
|
|
81929
|
-
components: [/* @__PURE__ */
|
|
82310
|
+
components: [/* @__PURE__ */ import_react124.default.createElement(Text2, { bold: true })]
|
|
81930
82311
|
}
|
|
81931
82312
|
),
|
|
81932
82313
|
Default: () => null
|
|
81933
82314
|
});
|
|
81934
|
-
return /* @__PURE__ */
|
|
82315
|
+
return /* @__PURE__ */ import_react124.default.createElement(Box_default, { marginBottom: 1 }, messageComponent);
|
|
81935
82316
|
};
|
|
81936
82317
|
|
|
81937
82318
|
// ../create-new-packages/app-command/src/components/Questions/Questions.tsx
|
|
@@ -81945,7 +82326,7 @@ var Questions = ({
|
|
|
81945
82326
|
const devCenterClient = useDevCenterClient();
|
|
81946
82327
|
const { reportError: reportError2 } = useErrorReporter();
|
|
81947
82328
|
const { getDeveloperApps } = useDevCenterClient();
|
|
81948
|
-
const [appCreationFlow, setAppCreationFlow] = (0,
|
|
82329
|
+
const [appCreationFlow, setAppCreationFlow] = (0, import_react125.useState)();
|
|
81949
82330
|
const { status } = useAsync2(async () => {
|
|
81950
82331
|
const { template, appName } = await parseCommandOptions(
|
|
81951
82332
|
targetParentFolder2,
|
|
@@ -81976,27 +82357,34 @@ var Questions = ({
|
|
|
81976
82357
|
};
|
|
81977
82358
|
}
|
|
81978
82359
|
}, []);
|
|
81979
|
-
return (0,
|
|
82360
|
+
return (0, import_variant42.match)(status, {
|
|
81980
82361
|
Error: () => null,
|
|
81981
|
-
Loading: () => /* @__PURE__ */
|
|
82362
|
+
Loading: () => /* @__PURE__ */ import_react125.default.createElement(Spinner2, { text: t3("general.loading") }),
|
|
81982
82363
|
Success: ({
|
|
81983
82364
|
result: { template, appName, developerApps, developerAppsStatus }
|
|
81984
82365
|
}) => {
|
|
81985
82366
|
if (template) {
|
|
81986
|
-
return /* @__PURE__ */
|
|
82367
|
+
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(
|
|
82368
|
+
NewAppAutoFlow,
|
|
82369
|
+
{
|
|
82370
|
+
extendAppId: commandOptions.extendAppId,
|
|
82371
|
+
appName,
|
|
82372
|
+
onSubmit,
|
|
82373
|
+
template
|
|
82374
|
+
}
|
|
82375
|
+
) : /* @__PURE__ */ import_react125.default.createElement(
|
|
81987
82376
|
NewAppFlow,
|
|
81988
82377
|
{
|
|
81989
82378
|
onSubmit,
|
|
81990
|
-
template,
|
|
81991
82379
|
extendAppId: commandOptions.extendAppId,
|
|
81992
|
-
|
|
82380
|
+
template,
|
|
81993
82381
|
targetParentFolder: targetParentFolder2,
|
|
81994
82382
|
repoType: repoType2
|
|
81995
82383
|
}
|
|
81996
82384
|
));
|
|
81997
82385
|
}
|
|
81998
|
-
if ((0,
|
|
81999
|
-
return /* @__PURE__ */
|
|
82386
|
+
if ((0, import_variant42.isType)(developerAppsStatus, "NoApps")) {
|
|
82387
|
+
return /* @__PURE__ */ import_react125.default.createElement(
|
|
82000
82388
|
NewAppFlow,
|
|
82001
82389
|
{
|
|
82002
82390
|
onSubmit,
|
|
@@ -82005,20 +82393,20 @@ var Questions = ({
|
|
|
82005
82393
|
}
|
|
82006
82394
|
);
|
|
82007
82395
|
}
|
|
82008
|
-
return /* @__PURE__ */
|
|
82396
|
+
return /* @__PURE__ */ import_react125.default.createElement(import_react125.default.Fragment, null, /* @__PURE__ */ import_react125.default.createElement(
|
|
82009
82397
|
CreateAppOrExtendExisting,
|
|
82010
82398
|
{
|
|
82011
82399
|
developerAppsStatus,
|
|
82012
82400
|
onStartCreationFlow: setAppCreationFlow
|
|
82013
82401
|
}
|
|
82014
|
-
), appCreationFlow === "new" && /* @__PURE__ */
|
|
82402
|
+
), appCreationFlow === "new" && /* @__PURE__ */ import_react125.default.createElement(
|
|
82015
82403
|
NewAppFlow,
|
|
82016
82404
|
{
|
|
82017
82405
|
onSubmit,
|
|
82018
82406
|
targetParentFolder: targetParentFolder2,
|
|
82019
82407
|
repoType: repoType2
|
|
82020
82408
|
}
|
|
82021
|
-
), appCreationFlow === "existing" && /* @__PURE__ */
|
|
82409
|
+
), appCreationFlow === "existing" && /* @__PURE__ */ import_react125.default.createElement(
|
|
82022
82410
|
ExistingAppFlow,
|
|
82023
82411
|
{
|
|
82024
82412
|
developerApps,
|
|
@@ -82033,7 +82421,7 @@ var Questions = ({
|
|
|
82033
82421
|
|
|
82034
82422
|
// ../create-new-packages/app-command/src/tasks.ts
|
|
82035
82423
|
init_esm_shims();
|
|
82036
|
-
var
|
|
82424
|
+
var import_variant43 = __toESM(require_lib(), 1);
|
|
82037
82425
|
import { mkdir } from "node:fs/promises";
|
|
82038
82426
|
import { join as join12 } from "node:path";
|
|
82039
82427
|
|
|
@@ -82114,7 +82502,7 @@ function getTasks({
|
|
|
82114
82502
|
cause: e2
|
|
82115
82503
|
});
|
|
82116
82504
|
}
|
|
82117
|
-
const { generateApp } = await import("./generator-
|
|
82505
|
+
const { generateApp } = await import("./generator-D63KTZEK.js");
|
|
82118
82506
|
await generateApp({
|
|
82119
82507
|
packageName,
|
|
82120
82508
|
packageFolder,
|
|
@@ -82123,7 +82511,7 @@ function getTasks({
|
|
|
82123
82511
|
repoType: repoType2,
|
|
82124
82512
|
template,
|
|
82125
82513
|
templateParams,
|
|
82126
|
-
ideForMcp: (0,
|
|
82514
|
+
ideForMcp: (0, import_variant43.match)(mcpConfigResult, {
|
|
82127
82515
|
Created: ({ ideForMcp }) => ideForMcp,
|
|
82128
82516
|
Canceled: () => {
|
|
82129
82517
|
}
|
|
@@ -82221,7 +82609,7 @@ function getTasks({
|
|
|
82221
82609
|
successText: agentConfigsTaskText.successText
|
|
82222
82610
|
};
|
|
82223
82611
|
const optionalInstallAndAgentsTask = skipInstall ? [] : [installDependenciesTask, addWixSkillsTask, generateAgentConfigsTask];
|
|
82224
|
-
return (0,
|
|
82612
|
+
return (0, import_variant43.match)(repoType2, {
|
|
82225
82613
|
None: () => [
|
|
82226
82614
|
generateProjectTask,
|
|
82227
82615
|
...skipGit ? [] : [initializeGitTask],
|
|
@@ -82235,10 +82623,10 @@ function getTasks({
|
|
|
82235
82623
|
|
|
82236
82624
|
// ../create-new-packages/app-command/src/components/FinishedSuccessfullyMessage.tsx
|
|
82237
82625
|
init_esm_shims();
|
|
82238
|
-
var
|
|
82626
|
+
var import_react126 = __toESM(require_react(), 1);
|
|
82239
82627
|
var FinishedSuccessfullyMessage = ({ packageName, appData: { appName, appId }, packageManager: packageManager2 }) => {
|
|
82240
82628
|
const { t: t3 } = useTranslation();
|
|
82241
|
-
return /* @__PURE__ */
|
|
82629
|
+
return /* @__PURE__ */ import_react126.default.createElement(
|
|
82242
82630
|
Box_default,
|
|
82243
82631
|
{
|
|
82244
82632
|
borderColor: "blue",
|
|
@@ -82250,22 +82638,22 @@ var FinishedSuccessfullyMessage = ({ packageName, appData: { appName, appId }, p
|
|
|
82250
82638
|
marginLeft: -2,
|
|
82251
82639
|
marginBottom: 1
|
|
82252
82640
|
},
|
|
82253
|
-
/* @__PURE__ */
|
|
82254
|
-
/* @__PURE__ */
|
|
82641
|
+
/* @__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"), " ")),
|
|
82642
|
+
/* @__PURE__ */ import_react126.default.createElement(Text2, null, /* @__PURE__ */ import_react126.default.createElement(
|
|
82255
82643
|
Trans2,
|
|
82256
82644
|
{
|
|
82257
82645
|
i18nKey: "create_app.generate_project.finished.ready_to_start",
|
|
82258
|
-
components: [/* @__PURE__ */
|
|
82646
|
+
components: [/* @__PURE__ */ import_react126.default.createElement(Text2, { bold: true })],
|
|
82259
82647
|
values: { appName }
|
|
82260
82648
|
}
|
|
82261
82649
|
)),
|
|
82262
|
-
/* @__PURE__ */
|
|
82263
|
-
/* @__PURE__ */
|
|
82650
|
+
/* @__PURE__ */ import_react126.default.createElement(Text2, { bold: true }, t3("create_app.generate_project.finished.next_steps")),
|
|
82651
|
+
/* @__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(
|
|
82264
82652
|
Trans2,
|
|
82265
82653
|
{
|
|
82266
82654
|
i18nKey: "create_app.create_new.app_on_dev_center",
|
|
82267
82655
|
components: [
|
|
82268
|
-
/* @__PURE__ */
|
|
82656
|
+
/* @__PURE__ */ import_react126.default.createElement(
|
|
82269
82657
|
Link,
|
|
82270
82658
|
{
|
|
82271
82659
|
skin: "info",
|
|
@@ -82274,12 +82662,12 @@ var FinishedSuccessfullyMessage = ({ packageName, appData: { appName, appId }, p
|
|
|
82274
82662
|
)
|
|
82275
82663
|
]
|
|
82276
82664
|
}
|
|
82277
|
-
)), /* @__PURE__ */
|
|
82665
|
+
)), /* @__PURE__ */ import_react126.default.createElement(UnorderedList.Item, { marker: /* @__PURE__ */ import_react126.default.createElement(Learn, null) }, /* @__PURE__ */ import_react126.default.createElement(
|
|
82278
82666
|
Trans2,
|
|
82279
82667
|
{
|
|
82280
82668
|
i18nKey: "create_app.generate_project.finished.visit_docs",
|
|
82281
82669
|
components: [
|
|
82282
|
-
/* @__PURE__ */
|
|
82670
|
+
/* @__PURE__ */ import_react126.default.createElement(
|
|
82283
82671
|
Link,
|
|
82284
82672
|
{
|
|
82285
82673
|
skin: "info",
|
|
@@ -82288,12 +82676,12 @@ var FinishedSuccessfullyMessage = ({ packageName, appData: { appName, appId }, p
|
|
|
82288
82676
|
)
|
|
82289
82677
|
]
|
|
82290
82678
|
}
|
|
82291
|
-
)), /* @__PURE__ */
|
|
82679
|
+
)), /* @__PURE__ */ import_react126.default.createElement(UnorderedList.Item, { marker: "\u{1F4AC}" }, /* @__PURE__ */ import_react126.default.createElement(
|
|
82292
82680
|
Trans2,
|
|
82293
82681
|
{
|
|
82294
82682
|
i18nKey: "create_app.generate_project.finished.join_community",
|
|
82295
82683
|
components: [
|
|
82296
|
-
/* @__PURE__ */
|
|
82684
|
+
/* @__PURE__ */ import_react126.default.createElement(Link, { skin: "info", url: "https://discord.gg/wixstudio" })
|
|
82297
82685
|
]
|
|
82298
82686
|
}
|
|
82299
82687
|
)))
|
|
@@ -82302,23 +82690,23 @@ var FinishedSuccessfullyMessage = ({ packageName, appData: { appName, appId }, p
|
|
|
82302
82690
|
|
|
82303
82691
|
// ../create-new-packages/app-command/src/components/TaskList.tsx
|
|
82304
82692
|
init_esm_shims();
|
|
82305
|
-
var
|
|
82693
|
+
var import_react127 = __toESM(require_react(), 1);
|
|
82306
82694
|
var TaskList = ({ tasks, totalTaskCount }) => {
|
|
82307
|
-
return /* @__PURE__ */
|
|
82695
|
+
return /* @__PURE__ */ import_react127.default.createElement(import_react127.default.Fragment, null, tasks.map((task, index) => {
|
|
82308
82696
|
const stepper = `[${index + 1}/${totalTaskCount}]`;
|
|
82309
82697
|
const fullText = `${stepper} ${task.text}`;
|
|
82310
82698
|
if (task.status === "running") {
|
|
82311
|
-
return /* @__PURE__ */
|
|
82699
|
+
return /* @__PURE__ */ import_react127.default.createElement(Spinner2, { key: index, text: fullText });
|
|
82312
82700
|
}
|
|
82313
|
-
return /* @__PURE__ */
|
|
82701
|
+
return /* @__PURE__ */ import_react127.default.createElement(Alert, { key: index, type: "success" }, fullText);
|
|
82314
82702
|
}));
|
|
82315
82703
|
};
|
|
82316
82704
|
|
|
82317
82705
|
// ../create-new-packages/app-command/src/task-runner.ts
|
|
82318
82706
|
init_esm_shims();
|
|
82319
|
-
var
|
|
82320
|
-
var
|
|
82321
|
-
var TaskRunnerStatus = (0,
|
|
82707
|
+
var import_react128 = __toESM(require_react(), 1);
|
|
82708
|
+
var import_variant44 = __toESM(require_lib(), 1);
|
|
82709
|
+
var TaskRunnerStatus = (0, import_variant44.variant)({
|
|
82322
82710
|
Idle: {},
|
|
82323
82711
|
Running: (runningTasks, totalTaskCount) => {
|
|
82324
82712
|
const taskStatuses = runningTasks.map((task, index) => {
|
|
@@ -82342,7 +82730,7 @@ var TaskRunnerStatus = (0, import_variant39.variant)({
|
|
|
82342
82730
|
}
|
|
82343
82731
|
});
|
|
82344
82732
|
function useTaskRunner() {
|
|
82345
|
-
const [status, setStatus] = (0,
|
|
82733
|
+
const [status, setStatus] = (0, import_react128.useState)(
|
|
82346
82734
|
TaskRunnerStatus.Idle()
|
|
82347
82735
|
);
|
|
82348
82736
|
const { execute } = useAsyncCallback3(async (_2, tasks) => {
|
|
@@ -82362,23 +82750,23 @@ function useTaskRunner() {
|
|
|
82362
82750
|
|
|
82363
82751
|
// ../create-new-packages/app-command/src/components/mcp/McpConfigCreated.tsx
|
|
82364
82752
|
init_esm_shims();
|
|
82365
|
-
var
|
|
82753
|
+
var import_react129 = __toESM(require_react(), 1);
|
|
82366
82754
|
var McpConfigCreated = ({
|
|
82367
82755
|
mcpPath,
|
|
82368
82756
|
docsUrl
|
|
82369
82757
|
}) => {
|
|
82370
|
-
return /* @__PURE__ */
|
|
82758
|
+
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(
|
|
82371
82759
|
Trans2,
|
|
82372
82760
|
{
|
|
82373
82761
|
i18nKey: "create_app.mcp_config_created_1",
|
|
82374
|
-
components: [/* @__PURE__ */
|
|
82762
|
+
components: [/* @__PURE__ */ import_react129.default.createElement(Text2, { bold: true })],
|
|
82375
82763
|
values: { mcpPath }
|
|
82376
82764
|
}
|
|
82377
|
-
)), /* @__PURE__ */
|
|
82765
|
+
)), /* @__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(
|
|
82378
82766
|
Trans2,
|
|
82379
82767
|
{
|
|
82380
82768
|
i18nKey: "create_app.mcp_config_created_3",
|
|
82381
|
-
components: [/* @__PURE__ */
|
|
82769
|
+
components: [/* @__PURE__ */ import_react129.default.createElement(Link, { skin: "info", url: docsUrl })]
|
|
82382
82770
|
}
|
|
82383
82771
|
))));
|
|
82384
82772
|
};
|
|
@@ -82386,7 +82774,7 @@ var McpConfigCreated = ({
|
|
|
82386
82774
|
// ../create-new-packages/app-command/src/components/CreateAppCommand.tsx
|
|
82387
82775
|
var GenerationProgress = ({ tasks, totalTaskCount }) => {
|
|
82388
82776
|
const { t: t3 } = useTranslation();
|
|
82389
|
-
return /* @__PURE__ */
|
|
82777
|
+
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 })));
|
|
82390
82778
|
};
|
|
82391
82779
|
var CreateAppCommand = ({
|
|
82392
82780
|
userInfo: userInfo2,
|
|
@@ -82397,13 +82785,13 @@ var CreateAppCommand = ({
|
|
|
82397
82785
|
}) => {
|
|
82398
82786
|
const { t: t3 } = useTranslation();
|
|
82399
82787
|
const { execute: executeTaskRunner, status: taskRunnerStatus } = useTaskRunner();
|
|
82400
|
-
const [generationData, setGenerationData] = (0,
|
|
82788
|
+
const [generationData, setGenerationData] = (0, import_react130.useState)();
|
|
82401
82789
|
async function runTasks(data) {
|
|
82402
82790
|
setGenerationData(data);
|
|
82403
82791
|
const tasks = getTasks(data, t3);
|
|
82404
82792
|
await executeTaskRunner(tasks);
|
|
82405
82793
|
}
|
|
82406
|
-
return /* @__PURE__ */
|
|
82794
|
+
return /* @__PURE__ */ import_react130.default.createElement(
|
|
82407
82795
|
Box_default,
|
|
82408
82796
|
{
|
|
82409
82797
|
flexDirection: "column",
|
|
@@ -82414,8 +82802,8 @@ var CreateAppCommand = ({
|
|
|
82414
82802
|
borderTop: false,
|
|
82415
82803
|
paddingLeft: 1
|
|
82416
82804
|
},
|
|
82417
|
-
/* @__PURE__ */
|
|
82418
|
-
/* @__PURE__ */
|
|
82805
|
+
/* @__PURE__ */ import_react130.default.createElement(WelcomeMessage, null),
|
|
82806
|
+
/* @__PURE__ */ import_react130.default.createElement(AuthProvider2, { userInfo: userInfo2 }, /* @__PURE__ */ import_react130.default.createElement(
|
|
82419
82807
|
Questions,
|
|
82420
82808
|
{
|
|
82421
82809
|
repoType: repoType2,
|
|
@@ -82432,13 +82820,13 @@ var CreateAppCommand = ({
|
|
|
82432
82820
|
})
|
|
82433
82821
|
}
|
|
82434
82822
|
)),
|
|
82435
|
-
generationData && (0,
|
|
82823
|
+
generationData && (0, import_variant45.match)(taskRunnerStatus, {
|
|
82436
82824
|
Idle: () => null,
|
|
82437
|
-
Running: (status) => /* @__PURE__ */
|
|
82438
|
-
Done: (status) => /* @__PURE__ */
|
|
82439
|
-
Created: ({ mcpPath, docsUrl }) => /* @__PURE__ */
|
|
82825
|
+
Running: (status) => /* @__PURE__ */ import_react130.default.createElement(GenerationProgress, { ...status }),
|
|
82826
|
+
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, {
|
|
82827
|
+
Created: ({ mcpPath, docsUrl }) => /* @__PURE__ */ import_react130.default.createElement(McpConfigCreated, { mcpPath, docsUrl }),
|
|
82440
82828
|
Canceled: () => null
|
|
82441
|
-
}), /* @__PURE__ */
|
|
82829
|
+
}), /* @__PURE__ */ import_react130.default.createElement(
|
|
82442
82830
|
FinishedSuccessfullyMessage,
|
|
82443
82831
|
{
|
|
82444
82832
|
packageName: generationData.packageName,
|
|
@@ -82492,6 +82880,10 @@ var messages_default3 = {
|
|
|
82492
82880
|
"create_app.extend_existing.select_app.label": "Which app would you like to extend?",
|
|
82493
82881
|
"create_app.extend_existing.get_project": "Fetching application data",
|
|
82494
82882
|
"create_app.choose_package_name.label": "Enter a folder name for your project",
|
|
82883
|
+
"create_app.choose_namespace.label": "Enter a namespace for your app",
|
|
82884
|
+
"create_app.choose_namespace.placeholder": "{suggested}",
|
|
82885
|
+
"create_app.choose_code_identifier.label": "Enter a code identifier for your project",
|
|
82886
|
+
"create_app.choose_code_identifier.placeholder": "{suggested}",
|
|
82495
82887
|
"create_app.generate_project.generating_project": "Generating your app...",
|
|
82496
82888
|
"create_app.generate_project.generating_files.loading": "Generating project files...",
|
|
82497
82889
|
"create_app.generate_project.generating_files.done": "Project files generated!",
|
|
@@ -82599,7 +82991,7 @@ var getAppCommand = ({
|
|
|
82599
82991
|
try {
|
|
82600
82992
|
transaction.start();
|
|
82601
82993
|
await render2(
|
|
82602
|
-
/* @__PURE__ */
|
|
82994
|
+
/* @__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(
|
|
82603
82995
|
CreateAppCommand,
|
|
82604
82996
|
{
|
|
82605
82997
|
userInfo: userInfo2,
|
|
@@ -82621,7 +83013,7 @@ var getAppCommand = ({
|
|
|
82621
83013
|
|
|
82622
83014
|
// ../create-new-packages/headless-command/src/index.tsx
|
|
82623
83015
|
init_esm_shims();
|
|
82624
|
-
var
|
|
83016
|
+
var import_react154 = __toESM(require_react(), 1);
|
|
82625
83017
|
|
|
82626
83018
|
// ../create-new-packages/headless-command/src/validations/validate-business-name.ts
|
|
82627
83019
|
init_esm_shims();
|
|
@@ -82648,21 +83040,21 @@ var validateProjectName = (value2) => {
|
|
|
82648
83040
|
|
|
82649
83041
|
// ../create-new-packages/headless-command/src/components/LinkCommand/LinkCommand.tsx
|
|
82650
83042
|
init_esm_shims();
|
|
82651
|
-
var
|
|
82652
|
-
var
|
|
83043
|
+
var import_react142 = __toESM(require_react(), 1);
|
|
83044
|
+
var import_variant50 = __toESM(require_lib(), 1);
|
|
82653
83045
|
|
|
82654
83046
|
// ../create-new-packages/headless-command/src/components/WelcomeMessage.tsx
|
|
82655
83047
|
init_esm_shims();
|
|
82656
|
-
var
|
|
83048
|
+
var import_react132 = __toESM(require_react(), 1);
|
|
82657
83049
|
var WelcomeMessage2 = () => {
|
|
82658
|
-
return /* @__PURE__ */
|
|
83050
|
+
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"));
|
|
82659
83051
|
};
|
|
82660
83052
|
|
|
82661
83053
|
// ../create-new-packages/headless-command/src/components/ChooseBusinessName.tsx
|
|
82662
83054
|
init_esm_shims();
|
|
82663
|
-
var
|
|
83055
|
+
var import_react133 = __toESM(require_react(), 1);
|
|
82664
83056
|
var ChooseBusinessName = ({ onSubmit }) => {
|
|
82665
|
-
const validate3 = (0,
|
|
83057
|
+
const validate3 = (0, import_react133.useCallback)((businessName) => {
|
|
82666
83058
|
try {
|
|
82667
83059
|
validateBusinessName(businessName);
|
|
82668
83060
|
return true;
|
|
@@ -82670,7 +83062,7 @@ var ChooseBusinessName = ({ onSubmit }) => {
|
|
|
82670
83062
|
return e2.message;
|
|
82671
83063
|
}
|
|
82672
83064
|
}, []);
|
|
82673
|
-
return /* @__PURE__ */
|
|
83065
|
+
return /* @__PURE__ */ import_react133.default.createElement(
|
|
82674
83066
|
TextInput2,
|
|
82675
83067
|
{
|
|
82676
83068
|
label: "What's the name of your business?",
|
|
@@ -82683,12 +83075,12 @@ var ChooseBusinessName = ({ onSubmit }) => {
|
|
|
82683
83075
|
|
|
82684
83076
|
// ../create-new-packages/headless-command/src/components/CreateBusiness.tsx
|
|
82685
83077
|
init_esm_shims();
|
|
82686
|
-
var
|
|
82687
|
-
var
|
|
83078
|
+
var import_react135 = __toESM(require_react(), 1);
|
|
83079
|
+
var import_variant46 = __toESM(require_lib(), 1);
|
|
82688
83080
|
|
|
82689
83081
|
// ../create-new-packages/headless-command/src/clients/funnel-projects/useFunnelProjectsClient.ts
|
|
82690
83082
|
init_esm_shims();
|
|
82691
|
-
var
|
|
83083
|
+
var import_react134 = __toESM(require_react(), 1);
|
|
82692
83084
|
|
|
82693
83085
|
// ../create-new-packages/headless-command/src/clients/funnel-projects/funnel-projects-client.ts
|
|
82694
83086
|
init_esm_shims();
|
|
@@ -82794,7 +83186,7 @@ var FunnelProjectsClient = class {
|
|
|
82794
83186
|
// ../create-new-packages/headless-command/src/clients/funnel-projects/useFunnelProjectsClient.ts
|
|
82795
83187
|
function useFunnelProjectsClient() {
|
|
82796
83188
|
const httpClient = useHttpClient({ type: "api" });
|
|
82797
|
-
const client2 = (0,
|
|
83189
|
+
const client2 = (0, import_react134.useMemo)(
|
|
82798
83190
|
() => new FunnelProjectsClient(httpClient),
|
|
82799
83191
|
[httpClient]
|
|
82800
83192
|
);
|
|
@@ -82808,18 +83200,18 @@ var CreateBusiness = ({ businessName, businessTemplateId, onDone }) => {
|
|
|
82808
83200
|
const { project } = await createProject3(businessName, businessTemplateId);
|
|
82809
83201
|
onDone({ businessId: project.metaSiteId });
|
|
82810
83202
|
}, []);
|
|
82811
|
-
return /* @__PURE__ */
|
|
83203
|
+
return /* @__PURE__ */ import_react135.default.createElement(import_react135.default.Fragment, null, (0, import_variant46.match)(status, {
|
|
82812
83204
|
Error: () => null,
|
|
82813
|
-
Loading: () => /* @__PURE__ */
|
|
82814
|
-
Success: () => /* @__PURE__ */
|
|
83205
|
+
Loading: () => /* @__PURE__ */ import_react135.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react135.default.createElement(Spinner2, { text: "Creating your business..." })),
|
|
83206
|
+
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"))),
|
|
82815
83207
|
NotRequested: () => null
|
|
82816
83208
|
}));
|
|
82817
83209
|
};
|
|
82818
83210
|
|
|
82819
83211
|
// ../create-new-packages/headless-command/src/components/CreateProject.tsx
|
|
82820
83212
|
init_esm_shims();
|
|
82821
|
-
var
|
|
82822
|
-
var
|
|
83213
|
+
var import_react137 = __toESM(require_react(), 1);
|
|
83214
|
+
var import_variant47 = __toESM(require_lib(), 1);
|
|
82823
83215
|
|
|
82824
83216
|
// ../create-new-packages/headless-command/src/hooks/create-project.ts
|
|
82825
83217
|
init_esm_shims();
|
|
@@ -82831,7 +83223,7 @@ init_esm_shims();
|
|
|
82831
83223
|
|
|
82832
83224
|
// ../metasite-manager-client/src/useMetasiteManagerClient.ts
|
|
82833
83225
|
init_esm_shims();
|
|
82834
|
-
var
|
|
83226
|
+
var import_react136 = __toESM(require_react(), 1);
|
|
82835
83227
|
|
|
82836
83228
|
// ../metasite-manager-client/src/metasite-manager-client.ts
|
|
82837
83229
|
init_esm_shims();
|
|
@@ -83645,7 +84037,7 @@ function useMetasiteManagerClient({
|
|
|
83645
84037
|
siteId
|
|
83646
84038
|
} = {}) {
|
|
83647
84039
|
const httpClient = useHttpClient({ type: "general", siteId });
|
|
83648
|
-
const client2 = (0,
|
|
84040
|
+
const client2 = (0, import_react136.useMemo)(
|
|
83649
84041
|
() => new MetasiteManagerClient(httpClient),
|
|
83650
84042
|
[httpClient]
|
|
83651
84043
|
);
|
|
@@ -83745,17 +84137,17 @@ var CreateProject = ({
|
|
|
83745
84137
|
cloudProviders
|
|
83746
84138
|
}) => {
|
|
83747
84139
|
const { status, execute } = useCreateProject(businessId);
|
|
83748
|
-
(0,
|
|
83749
|
-
if ((0,
|
|
84140
|
+
(0, import_react137.useEffect)(() => {
|
|
84141
|
+
if ((0, import_variant47.isType)(status, "Success")) {
|
|
83750
84142
|
onSubmit(status.result);
|
|
83751
84143
|
}
|
|
83752
84144
|
}, [status, onSubmit]);
|
|
83753
|
-
(0,
|
|
84145
|
+
(0, import_react137.useEffect)(() => {
|
|
83754
84146
|
if (providedProjectName) {
|
|
83755
84147
|
void execute({ projectName: providedProjectName, cloudProviders });
|
|
83756
84148
|
}
|
|
83757
84149
|
}, [providedProjectName, cloudProviders, execute]);
|
|
83758
|
-
const validate3 = (0,
|
|
84150
|
+
const validate3 = (0, import_react137.useCallback)(async (projectName) => {
|
|
83759
84151
|
try {
|
|
83760
84152
|
validateProjectName(projectName);
|
|
83761
84153
|
return true;
|
|
@@ -83763,7 +84155,7 @@ var CreateProject = ({
|
|
|
83763
84155
|
return e2.message;
|
|
83764
84156
|
}
|
|
83765
84157
|
}, []);
|
|
83766
|
-
return /* @__PURE__ */
|
|
84158
|
+
return /* @__PURE__ */ import_react137.default.createElement(import_react137.default.Fragment, null, !providedProjectName && /* @__PURE__ */ import_react137.default.createElement(
|
|
83767
84159
|
TextInput2,
|
|
83768
84160
|
{
|
|
83769
84161
|
label: "What's the name of your Custom Frontend project?",
|
|
@@ -83771,18 +84163,18 @@ var CreateProject = ({
|
|
|
83771
84163
|
validate: validate3,
|
|
83772
84164
|
inCreateFlow: true
|
|
83773
84165
|
}
|
|
83774
|
-
), (0,
|
|
84166
|
+
), (0, import_variant47.match)(status, {
|
|
83775
84167
|
Error: () => null,
|
|
83776
|
-
Loading: () => /* @__PURE__ */
|
|
83777
|
-
Success: () => /* @__PURE__ */
|
|
84168
|
+
Loading: () => /* @__PURE__ */ import_react137.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react137.default.createElement(Spinner2, { text: "Creating your project..." })),
|
|
84169
|
+
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"))),
|
|
83778
84170
|
NotRequested: () => null
|
|
83779
84171
|
}));
|
|
83780
84172
|
};
|
|
83781
84173
|
|
|
83782
84174
|
// ../create-new-packages/headless-command/src/components/LinkCommand/GenerateProject.tsx
|
|
83783
84175
|
init_esm_shims();
|
|
83784
|
-
var
|
|
83785
|
-
var
|
|
84176
|
+
var import_react140 = __toESM(require_react(), 1);
|
|
84177
|
+
var import_variant49 = __toESM(require_lib(), 1);
|
|
83786
84178
|
|
|
83787
84179
|
// ../cli-project-extender/src/index.ts
|
|
83788
84180
|
init_esm_shims();
|
|
@@ -83944,9 +84336,9 @@ var IdentityType = class extends BaseType {
|
|
|
83944
84336
|
}
|
|
83945
84337
|
};
|
|
83946
84338
|
var ObjectType = class extends BaseType {
|
|
83947
|
-
constructor(
|
|
84339
|
+
constructor(fields12) {
|
|
83948
84340
|
super();
|
|
83949
|
-
this.fields =
|
|
84341
|
+
this.fields = fields12;
|
|
83950
84342
|
__publicField$2(this, "kind", "ObjectType");
|
|
83951
84343
|
}
|
|
83952
84344
|
toString() {
|
|
@@ -89726,17 +90118,17 @@ function genericPrintNoParens(path4, options, print2) {
|
|
|
89726
90118
|
case "ObjectTypeAnnotation": {
|
|
89727
90119
|
const isTypeAnnotation = n3.type === "ObjectTypeAnnotation";
|
|
89728
90120
|
const separator = options.flowObjectCommas ? "," : isTypeAnnotation ? ";" : ",";
|
|
89729
|
-
const
|
|
90121
|
+
const fields12 = [];
|
|
89730
90122
|
let allowBreak = false;
|
|
89731
90123
|
if (isTypeAnnotation) {
|
|
89732
|
-
|
|
90124
|
+
fields12.push("indexers", "callProperties");
|
|
89733
90125
|
if (n3.internalSlots != null) {
|
|
89734
|
-
|
|
90126
|
+
fields12.push("internalSlots");
|
|
89735
90127
|
}
|
|
89736
90128
|
}
|
|
89737
|
-
|
|
90129
|
+
fields12.push("properties");
|
|
89738
90130
|
let len = 0;
|
|
89739
|
-
|
|
90131
|
+
fields12.forEach(function(field) {
|
|
89740
90132
|
len += n3[field].length;
|
|
89741
90133
|
});
|
|
89742
90134
|
const oneLine = isTypeAnnotation && len === 1 || len === 0;
|
|
@@ -89745,7 +90137,7 @@ function genericPrintNoParens(path4, options, print2) {
|
|
|
89745
90137
|
parts.push(oneLine ? leftBrace : leftBrace + "\n");
|
|
89746
90138
|
const leftBraceIndex = parts.length - 1;
|
|
89747
90139
|
let i2 = 0;
|
|
89748
|
-
|
|
90140
|
+
fields12.forEach(function(field) {
|
|
89749
90141
|
path4.each(function(childPath) {
|
|
89750
90142
|
let lines = print2(childPath);
|
|
89751
90143
|
if (!oneLine) {
|
|
@@ -92534,12 +92926,12 @@ function detectCodeFormat(code, userStyles = {}) {
|
|
|
92534
92926
|
}
|
|
92535
92927
|
if (detect.quote || detect.arrowParens) {
|
|
92536
92928
|
const matches = trimmitedLine.matchAll(syntaxDetectRegex);
|
|
92537
|
-
for (const
|
|
92538
|
-
if (!
|
|
92929
|
+
for (const match37 of matches) {
|
|
92930
|
+
if (!match37.groups) {
|
|
92539
92931
|
continue;
|
|
92540
92932
|
}
|
|
92541
92933
|
for (const key in syntaxUsages) {
|
|
92542
|
-
if (
|
|
92934
|
+
if (match37.groups[key]) {
|
|
92543
92935
|
syntaxUsages[key]++;
|
|
92544
92936
|
}
|
|
92545
92937
|
}
|
|
@@ -92835,9 +93227,9 @@ async function extend2(projectFolder) {
|
|
|
92835
93227
|
|
|
92836
93228
|
// ../create-new-packages/headless-command/src/task-runner.ts
|
|
92837
93229
|
init_esm_shims();
|
|
92838
|
-
var
|
|
92839
|
-
var
|
|
92840
|
-
var TaskRunnerStatus2 = (0,
|
|
93230
|
+
var import_react138 = __toESM(require_react(), 1);
|
|
93231
|
+
var import_variant48 = __toESM(require_lib(), 1);
|
|
93232
|
+
var TaskRunnerStatus2 = (0, import_variant48.variant)({
|
|
92841
93233
|
Idle: {},
|
|
92842
93234
|
Running: (runningTasks, totalTaskCount) => {
|
|
92843
93235
|
const taskStatuses = runningTasks.map((task, index) => {
|
|
@@ -92861,7 +93253,7 @@ var TaskRunnerStatus2 = (0, import_variant43.variant)({
|
|
|
92861
93253
|
}
|
|
92862
93254
|
});
|
|
92863
93255
|
function useTaskRunner2() {
|
|
92864
|
-
const [status, setStatus] = (0,
|
|
93256
|
+
const [status, setStatus] = (0, import_react138.useState)(
|
|
92865
93257
|
TaskRunnerStatus2.Idle()
|
|
92866
93258
|
);
|
|
92867
93259
|
const { execute } = useAsyncCallback3(async (_2, tasks) => {
|
|
@@ -92881,25 +93273,25 @@ function useTaskRunner2() {
|
|
|
92881
93273
|
|
|
92882
93274
|
// ../create-new-packages/headless-command/src/components/TaskList.tsx
|
|
92883
93275
|
init_esm_shims();
|
|
92884
|
-
var
|
|
93276
|
+
var import_react139 = __toESM(require_react(), 1);
|
|
92885
93277
|
var TaskList2 = ({ tasks, totalTaskCount }) => {
|
|
92886
|
-
return /* @__PURE__ */
|
|
93278
|
+
return /* @__PURE__ */ import_react139.default.createElement(import_react139.default.Fragment, null, tasks.map((task, index) => {
|
|
92887
93279
|
const stepper = `[${index + 1}/${totalTaskCount}]`;
|
|
92888
93280
|
const fullText = `${stepper} ${task.text}`;
|
|
92889
93281
|
if (task.status === "running") {
|
|
92890
|
-
return /* @__PURE__ */
|
|
93282
|
+
return /* @__PURE__ */ import_react139.default.createElement(Spinner2, { key: index, text: fullText });
|
|
92891
93283
|
}
|
|
92892
|
-
return /* @__PURE__ */
|
|
93284
|
+
return /* @__PURE__ */ import_react139.default.createElement(Alert, { key: index, type: "success" }, fullText);
|
|
92893
93285
|
}));
|
|
92894
93286
|
};
|
|
92895
93287
|
|
|
92896
93288
|
// ../create-new-packages/headless-command/src/components/LinkCommand/GenerateProject.tsx
|
|
92897
93289
|
var GenerationProgress2 = ({ tasks, totalTaskCount }) => {
|
|
92898
|
-
return /* @__PURE__ */
|
|
93290
|
+
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 }));
|
|
92899
93291
|
};
|
|
92900
93292
|
var GenerateProject = ({ projectFolder, businessId, projectData, onDone, packageManager: packageManager2 }) => {
|
|
92901
93293
|
const { execute: executeTaskRunner, status: taskRunnerStatus } = useTaskRunner2();
|
|
92902
|
-
const generateProject = (0,
|
|
93294
|
+
const generateProject = (0, import_react140.useCallback)(async () => {
|
|
92903
93295
|
const wixConfigFilePath = getWixConfigFilePath(projectFolder);
|
|
92904
93296
|
const envFilePath = getEnvFilePath(projectFolder);
|
|
92905
93297
|
await writeJson(
|
|
@@ -92912,10 +93304,10 @@ var GenerateProject = ({ projectFolder, businessId, projectData, onDone, package
|
|
|
92912
93304
|
);
|
|
92913
93305
|
await updateEnvFile(envFilePath, projectData.environmentVariables);
|
|
92914
93306
|
}, [businessId, projectFolder, projectData]);
|
|
92915
|
-
const extendProject = (0,
|
|
93307
|
+
const extendProject = (0, import_react140.useCallback)(async () => {
|
|
92916
93308
|
await extend2(projectFolder);
|
|
92917
93309
|
}, [projectFolder]);
|
|
92918
|
-
const installDependencies = (0,
|
|
93310
|
+
const installDependencies = (0, import_react140.useCallback)(async () => {
|
|
92919
93311
|
try {
|
|
92920
93312
|
await packageManager2.runInstall(projectFolder);
|
|
92921
93313
|
} catch (e2) {
|
|
@@ -92925,7 +93317,7 @@ var GenerateProject = ({ projectFolder, businessId, projectData, onDone, package
|
|
|
92925
93317
|
});
|
|
92926
93318
|
}
|
|
92927
93319
|
}, [projectFolder, packageManager2]);
|
|
92928
|
-
const tasks = (0,
|
|
93320
|
+
const tasks = (0, import_react140.useMemo)(() => {
|
|
92929
93321
|
const result = [
|
|
92930
93322
|
{
|
|
92931
93323
|
action: generateProject,
|
|
@@ -92949,18 +93341,18 @@ var GenerateProject = ({ projectFolder, businessId, projectData, onDone, package
|
|
|
92949
93341
|
await executeTaskRunner(tasks);
|
|
92950
93342
|
onDone(true);
|
|
92951
93343
|
}, []);
|
|
92952
|
-
return (0,
|
|
93344
|
+
return (0, import_variant49.match)(taskRunnerStatus, {
|
|
92953
93345
|
Idle: () => null,
|
|
92954
|
-
Running: (status) => /* @__PURE__ */
|
|
92955
|
-
Done: (status) => /* @__PURE__ */
|
|
93346
|
+
Running: (status) => /* @__PURE__ */ import_react140.default.createElement(GenerationProgress2, { ...status }),
|
|
93347
|
+
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"))))
|
|
92956
93348
|
});
|
|
92957
93349
|
};
|
|
92958
93350
|
|
|
92959
93351
|
// ../create-new-packages/headless-command/src/components/LinkCommand/FinishedSuccessfullyMessage.tsx
|
|
92960
93352
|
init_esm_shims();
|
|
92961
|
-
var
|
|
93353
|
+
var import_react141 = __toESM(require_react(), 1);
|
|
92962
93354
|
var FinishedSuccessfullyMessage2 = ({ packageManager: packageManager2 }) => {
|
|
92963
|
-
return /* @__PURE__ */
|
|
93355
|
+
return /* @__PURE__ */ import_react141.default.createElement(
|
|
92964
93356
|
Box_default,
|
|
92965
93357
|
{
|
|
92966
93358
|
borderColor: "blue",
|
|
@@ -92972,8 +93364,8 @@ var FinishedSuccessfullyMessage2 = ({ packageManager: packageManager2 }) => {
|
|
|
92972
93364
|
marginLeft: -2,
|
|
92973
93365
|
marginTop: 1
|
|
92974
93366
|
},
|
|
92975
|
-
/* @__PURE__ */
|
|
92976
|
-
/* @__PURE__ */
|
|
93367
|
+
/* @__PURE__ */ import_react141.default.createElement(Text2, { bold: true }, "Next Steps:"),
|
|
93368
|
+
/* @__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")))
|
|
92977
93369
|
);
|
|
92978
93370
|
};
|
|
92979
93371
|
|
|
@@ -92994,10 +93386,10 @@ var LinkCommand = ({
|
|
|
92994
93386
|
projectName: preEnteredProjectName,
|
|
92995
93387
|
businessName: preEnteredBusinessName
|
|
92996
93388
|
}) => {
|
|
92997
|
-
const [businessName, setBusinessName] = (0,
|
|
92998
|
-
const [businessId, setBusinessId] = (0,
|
|
92999
|
-
const [projectData, setProjectData] = (0,
|
|
93000
|
-
const [isDone, setIsDone] = (0,
|
|
93389
|
+
const [businessName, setBusinessName] = (0, import_react142.useState)(preEnteredBusinessName);
|
|
93390
|
+
const [businessId, setBusinessId] = (0, import_react142.useState)();
|
|
93391
|
+
const [projectData, setProjectData] = (0, import_react142.useState)();
|
|
93392
|
+
const [isDone, setIsDone] = (0, import_react142.useState)(false);
|
|
93001
93393
|
const { status } = useAsync2(async () => {
|
|
93002
93394
|
const alreadyLinked = await isWixConfigExists(projectFolder);
|
|
93003
93395
|
if (alreadyLinked) {
|
|
@@ -93017,11 +93409,11 @@ var LinkCommand = ({
|
|
|
93017
93409
|
const packageManager2 = await createPackageManager(repoType2);
|
|
93018
93410
|
return { repoType: repoType2, packageManager: packageManager2 };
|
|
93019
93411
|
}, []);
|
|
93020
|
-
return (0,
|
|
93412
|
+
return (0, import_variant50.match)(status, {
|
|
93021
93413
|
Error: () => null,
|
|
93022
|
-
Loading: () => /* @__PURE__ */
|
|
93414
|
+
Loading: () => /* @__PURE__ */ import_react142.default.createElement(Spinner2, { text: "Loading..." }),
|
|
93023
93415
|
Success: ({ result: { packageManager: packageManager2 } }) => {
|
|
93024
|
-
return /* @__PURE__ */
|
|
93416
|
+
return /* @__PURE__ */ import_react142.default.createElement(
|
|
93025
93417
|
Box_default,
|
|
93026
93418
|
{
|
|
93027
93419
|
flexDirection: "column",
|
|
@@ -93032,14 +93424,14 @@ var LinkCommand = ({
|
|
|
93032
93424
|
borderTop: false,
|
|
93033
93425
|
paddingLeft: 1
|
|
93034
93426
|
},
|
|
93035
|
-
/* @__PURE__ */
|
|
93036
|
-
!preEnteredBusinessName && /* @__PURE__ */
|
|
93427
|
+
/* @__PURE__ */ import_react142.default.createElement(WelcomeMessage2, null),
|
|
93428
|
+
!preEnteredBusinessName && /* @__PURE__ */ import_react142.default.createElement(
|
|
93037
93429
|
ChooseBusinessName,
|
|
93038
93430
|
{
|
|
93039
93431
|
onSubmit: ({ businessName: businessName2 }) => setBusinessName(businessName2)
|
|
93040
93432
|
}
|
|
93041
93433
|
),
|
|
93042
|
-
businessName && /* @__PURE__ */
|
|
93434
|
+
businessName && /* @__PURE__ */ import_react142.default.createElement(AuthProvider, null, /* @__PURE__ */ import_react142.default.createElement(
|
|
93043
93435
|
CreateBusiness,
|
|
93044
93436
|
{
|
|
93045
93437
|
businessName,
|
|
@@ -93047,7 +93439,7 @@ var LinkCommand = ({
|
|
|
93047
93439
|
onDone: ({ businessId: businessId2 }) => setBusinessId(businessId2)
|
|
93048
93440
|
}
|
|
93049
93441
|
)),
|
|
93050
|
-
businessName && businessId && /* @__PURE__ */
|
|
93442
|
+
businessName && businessId && /* @__PURE__ */ import_react142.default.createElement(AuthProvider, null, /* @__PURE__ */ import_react142.default.createElement(
|
|
93051
93443
|
CreateProject,
|
|
93052
93444
|
{
|
|
93053
93445
|
businessId,
|
|
@@ -93055,7 +93447,7 @@ var LinkCommand = ({
|
|
|
93055
93447
|
onSubmit: (data) => setProjectData(data)
|
|
93056
93448
|
}
|
|
93057
93449
|
)),
|
|
93058
|
-
businessName && businessId && projectData && /* @__PURE__ */
|
|
93450
|
+
businessName && businessId && projectData && /* @__PURE__ */ import_react142.default.createElement(
|
|
93059
93451
|
GenerateProject,
|
|
93060
93452
|
{
|
|
93061
93453
|
packageManager: packageManager2,
|
|
@@ -93065,7 +93457,7 @@ var LinkCommand = ({
|
|
|
93065
93457
|
onDone: () => setIsDone(true)
|
|
93066
93458
|
}
|
|
93067
93459
|
),
|
|
93068
|
-
businessName && businessId && projectData && isDone && /* @__PURE__ */
|
|
93460
|
+
businessName && businessId && projectData && isDone && /* @__PURE__ */ import_react142.default.createElement(FinishedSuccessfullyMessage2, { packageManager: packageManager2 })
|
|
93069
93461
|
);
|
|
93070
93462
|
}
|
|
93071
93463
|
});
|
|
@@ -93117,12 +93509,12 @@ var validateCloudProvider = (value2) => {
|
|
|
93117
93509
|
|
|
93118
93510
|
// ../create-new-packages/headless-command/src/components/ProcessCommand.tsx
|
|
93119
93511
|
init_esm_shims();
|
|
93120
|
-
var
|
|
93121
|
-
var
|
|
93512
|
+
var import_react153 = __toESM(require_react(), 1);
|
|
93513
|
+
var import_variant60 = __toESM(require_lib(), 1);
|
|
93122
93514
|
|
|
93123
93515
|
// ../create-new-packages/headless-command/src/parse-command-options.ts
|
|
93124
93516
|
init_esm_shims();
|
|
93125
|
-
var
|
|
93517
|
+
var import_variant52 = __toESM(require_lib(), 1);
|
|
93126
93518
|
import { join as join14 } from "node:path";
|
|
93127
93519
|
|
|
93128
93520
|
// ../create-new-packages/headless-command/src/validations/index.ts
|
|
@@ -93141,11 +93533,11 @@ async function validateDirectory2(projectRoot) {
|
|
|
93141
93533
|
// ../create-new-packages/headless-command/src/validations/package-name.ts
|
|
93142
93534
|
init_esm_shims();
|
|
93143
93535
|
var import_validate_npm_package_name2 = __toESM(require_lib2(), 1);
|
|
93144
|
-
var
|
|
93145
|
-
var Result2 = (0,
|
|
93146
|
-
(0,
|
|
93147
|
-
Error: (0,
|
|
93148
|
-
Ok:
|
|
93536
|
+
var import_variant51 = __toESM(require_lib(), 1);
|
|
93537
|
+
var Result2 = (0, import_variant51.variant)(
|
|
93538
|
+
(0, import_variant51.onTerms)(({ T }) => ({
|
|
93539
|
+
Error: (0, import_variant51.payload)(T),
|
|
93540
|
+
Ok: import_variant51.nil
|
|
93149
93541
|
}))
|
|
93150
93542
|
);
|
|
93151
93543
|
async function validatePackageName2(name) {
|
|
@@ -93215,10 +93607,10 @@ var headlessTemplates = [
|
|
|
93215
93607
|
...vibeCompatibleTemplates,
|
|
93216
93608
|
...pureHeadlessTemplates
|
|
93217
93609
|
];
|
|
93218
|
-
var TemplateSource2 = (0,
|
|
93219
|
-
HeadlessApp: (0,
|
|
93220
|
-
GitRepo: (0,
|
|
93221
|
-
Local: (0,
|
|
93610
|
+
var TemplateSource2 = (0, import_variant52.variant)({
|
|
93611
|
+
HeadlessApp: (0, import_variant52.fields)(),
|
|
93612
|
+
GitRepo: (0, import_variant52.fields)(),
|
|
93613
|
+
Local: (0, import_variant52.fields)()
|
|
93222
93614
|
});
|
|
93223
93615
|
function parseProviderString(cloudProvider) {
|
|
93224
93616
|
switch (cloudProvider.trim().toLowerCase()) {
|
|
@@ -93287,7 +93679,7 @@ async function parseProjectNameOptions(targetParentFolder2, options) {
|
|
|
93287
93679
|
});
|
|
93288
93680
|
}
|
|
93289
93681
|
const npmValidationErrors = await validatePackageName2(projectName);
|
|
93290
|
-
if ((0,
|
|
93682
|
+
if ((0, import_variant52.isType)(npmValidationErrors, "Error")) {
|
|
93291
93683
|
throw new CliError({
|
|
93292
93684
|
code: CliErrorCode.ProjectNameArgumentIsInvalid({
|
|
93293
93685
|
errorMessage: `Invalid package name "${projectName}". Please fix the following issues: ${npmValidationErrors.payload.join(", ")}`
|
|
@@ -93342,32 +93734,32 @@ async function parseCommandOptions2(targetParentFolder2, options) {
|
|
|
93342
93734
|
|
|
93343
93735
|
// ../create-new-packages/headless-command/src/components/CreateHeadlessSiteCommand.tsx
|
|
93344
93736
|
init_esm_shims();
|
|
93345
|
-
var
|
|
93346
|
-
var
|
|
93737
|
+
var import_react152 = __toESM(require_react(), 1);
|
|
93738
|
+
var import_variant59 = __toESM(require_lib(), 1);
|
|
93347
93739
|
var import_kebabCase5 = __toESM(require_kebabCase(), 1);
|
|
93348
93740
|
import { join as join19 } from "node:path";
|
|
93349
93741
|
|
|
93350
93742
|
// ../create-new-packages/headless-command/src/components/ChooseFolder.tsx
|
|
93351
93743
|
init_esm_shims();
|
|
93352
|
-
var
|
|
93353
|
-
var
|
|
93744
|
+
var import_react143 = __toESM(require_react(), 1);
|
|
93745
|
+
var import_variant53 = __toESM(require_lib(), 1);
|
|
93354
93746
|
import { join as join15 } from "node:path";
|
|
93355
93747
|
var validateAppDirectory = async (targetParentFolder2, packageName) => {
|
|
93356
93748
|
if (!await validateDirectory2(join15(targetParentFolder2, packageName))) {
|
|
93357
93749
|
return `Provided directory "${packageName}" is not empty`;
|
|
93358
93750
|
}
|
|
93359
93751
|
const npmValidationErrors = await validatePackageName2(packageName);
|
|
93360
|
-
return (0,
|
|
93752
|
+
return (0, import_variant53.match)(npmValidationErrors, {
|
|
93361
93753
|
Ok: () => true,
|
|
93362
93754
|
Error: ({ payload: payload7 }) => `Invalid folder name. Please fix the following issues: ${payload7.join(", ")}`
|
|
93363
93755
|
});
|
|
93364
93756
|
};
|
|
93365
93757
|
var ChooseFolder = ({ initialFolderName, targetParentFolder: targetParentFolder2, onSubmit }) => {
|
|
93366
|
-
const validate3 = (0,
|
|
93758
|
+
const validate3 = (0, import_react143.useCallback)(
|
|
93367
93759
|
async (packageName) => validateAppDirectory(targetParentFolder2, packageName),
|
|
93368
93760
|
[targetParentFolder2]
|
|
93369
93761
|
);
|
|
93370
|
-
return /* @__PURE__ */
|
|
93762
|
+
return /* @__PURE__ */ import_react143.default.createElement(
|
|
93371
93763
|
TextInput2,
|
|
93372
93764
|
{
|
|
93373
93765
|
label: "In which directory do you want to create your application?",
|
|
@@ -93382,8 +93774,8 @@ var ChooseFolder = ({ initialFolderName, targetParentFolder: targetParentFolder2
|
|
|
93382
93774
|
// ../create-new-packages/headless-command/src/components/GenerateProject.tsx
|
|
93383
93775
|
init_esm_shims();
|
|
93384
93776
|
import { mkdir as mkdir2 } from "node:fs/promises";
|
|
93385
|
-
var
|
|
93386
|
-
var
|
|
93777
|
+
var import_react144 = __toESM(require_react(), 1);
|
|
93778
|
+
var import_variant54 = __toESM(require_lib(), 1);
|
|
93387
93779
|
import { join as join17 } from "node:path";
|
|
93388
93780
|
|
|
93389
93781
|
// ../create-new-packages/headless-command/src/services/generator/template-fetcher.ts
|
|
@@ -93430,14 +93822,14 @@ async function resolveTemplateFolder(templatePathOverride, selectedTemplate) {
|
|
|
93430
93822
|
if (templatePathOverride) {
|
|
93431
93823
|
return templatePathOverride;
|
|
93432
93824
|
}
|
|
93433
|
-
return (0,
|
|
93825
|
+
return (0, import_variant54.match)(selectedTemplate, {
|
|
93434
93826
|
HeadlessApp: ({ gitPath }) => fetchTemplate(headlessTemplatesGitUrl, gitPath),
|
|
93435
93827
|
GitRepo: ({ url, path: path4 }) => fetchTemplate(url, path4),
|
|
93436
93828
|
Local: ({ path: path4 }) => path4
|
|
93437
93829
|
});
|
|
93438
93830
|
}
|
|
93439
93831
|
var GenerationProgress3 = ({ tasks, totalTaskCount }) => {
|
|
93440
|
-
return /* @__PURE__ */
|
|
93832
|
+
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 }));
|
|
93441
93833
|
};
|
|
93442
93834
|
var GenerateProject2 = ({
|
|
93443
93835
|
packageManager: packageManager2,
|
|
@@ -93450,11 +93842,11 @@ var GenerateProject2 = ({
|
|
|
93450
93842
|
onDone
|
|
93451
93843
|
}) => {
|
|
93452
93844
|
const { execute: executeTaskRunner, status: taskRunnerStatus } = useTaskRunner2();
|
|
93453
|
-
const packageFolder = (0,
|
|
93845
|
+
const packageFolder = (0, import_react144.useMemo)(
|
|
93454
93846
|
() => join17(targetParentFolder2, folderName),
|
|
93455
93847
|
[folderName, targetParentFolder2]
|
|
93456
93848
|
);
|
|
93457
|
-
const generateProject = (0,
|
|
93849
|
+
const generateProject = (0, import_react144.useCallback)(async () => {
|
|
93458
93850
|
try {
|
|
93459
93851
|
await mkdir2(packageFolder, { recursive: true });
|
|
93460
93852
|
} catch (e2) {
|
|
@@ -93495,10 +93887,10 @@ var GenerateProject2 = ({
|
|
|
93495
93887
|
commandOptions.templateParams,
|
|
93496
93888
|
commandOptions.templatePath
|
|
93497
93889
|
]);
|
|
93498
|
-
const extendProject = (0,
|
|
93890
|
+
const extendProject = (0, import_react144.useCallback)(async () => {
|
|
93499
93891
|
await extend2(packageFolder);
|
|
93500
93892
|
}, [packageFolder]);
|
|
93501
|
-
const initializeGit = (0,
|
|
93893
|
+
const initializeGit = (0, import_react144.useCallback)(async () => {
|
|
93502
93894
|
try {
|
|
93503
93895
|
await gitInit(packageFolder);
|
|
93504
93896
|
} catch (e2) {
|
|
@@ -93508,7 +93900,7 @@ var GenerateProject2 = ({
|
|
|
93508
93900
|
});
|
|
93509
93901
|
}
|
|
93510
93902
|
}, [packageFolder]);
|
|
93511
|
-
const installDependencies = (0,
|
|
93903
|
+
const installDependencies = (0, import_react144.useCallback)(async () => {
|
|
93512
93904
|
try {
|
|
93513
93905
|
await packageManager2.runInstall(packageFolder);
|
|
93514
93906
|
} catch (e2) {
|
|
@@ -93518,7 +93910,7 @@ var GenerateProject2 = ({
|
|
|
93518
93910
|
});
|
|
93519
93911
|
}
|
|
93520
93912
|
}, [packageFolder, packageManager2]);
|
|
93521
|
-
const commitToGit = (0,
|
|
93913
|
+
const commitToGit = (0, import_react144.useCallback)(async () => {
|
|
93522
93914
|
try {
|
|
93523
93915
|
await gitCommit(packageFolder);
|
|
93524
93916
|
} catch (e2) {
|
|
@@ -93528,7 +93920,7 @@ var GenerateProject2 = ({
|
|
|
93528
93920
|
});
|
|
93529
93921
|
}
|
|
93530
93922
|
}, [packageFolder]);
|
|
93531
|
-
const tasks = (0,
|
|
93923
|
+
const tasks = (0, import_react144.useMemo)(() => {
|
|
93532
93924
|
const result = [
|
|
93533
93925
|
{
|
|
93534
93926
|
action: generateProject,
|
|
@@ -93582,18 +93974,18 @@ var GenerateProject2 = ({
|
|
|
93582
93974
|
await executeTaskRunner(tasks);
|
|
93583
93975
|
onDone(true);
|
|
93584
93976
|
}, []);
|
|
93585
|
-
return (0,
|
|
93977
|
+
return (0, import_variant54.match)(taskRunnerStatus, {
|
|
93586
93978
|
Idle: () => null,
|
|
93587
|
-
Running: (status) => /* @__PURE__ */
|
|
93588
|
-
Done: (status) => /* @__PURE__ */
|
|
93979
|
+
Running: (status) => /* @__PURE__ */ import_react144.default.createElement(GenerationProgress3, { ...status }),
|
|
93980
|
+
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"))))
|
|
93589
93981
|
});
|
|
93590
93982
|
};
|
|
93591
93983
|
|
|
93592
93984
|
// ../create-new-packages/headless-command/src/components/ChooseTemplate.tsx
|
|
93593
93985
|
init_esm_shims();
|
|
93594
|
-
var
|
|
93986
|
+
var import_react145 = __toESM(require_react(), 1);
|
|
93595
93987
|
var ChooseTemplate2 = ({ onSubmit }) => {
|
|
93596
|
-
const groups = (0,
|
|
93988
|
+
const groups = (0, import_react145.useMemo)(
|
|
93597
93989
|
() => [
|
|
93598
93990
|
{
|
|
93599
93991
|
title: "Wix Vibe compatible templates",
|
|
@@ -93607,7 +93999,7 @@ var ChooseTemplate2 = ({ onSubmit }) => {
|
|
|
93607
93999
|
{
|
|
93608
94000
|
title: "Standard templates",
|
|
93609
94001
|
// https://dev.wix.com/docs/go-headless/get-started/templates/wix-managed-templates/wix-cli-for-headless-templates
|
|
93610
|
-
description: /* @__PURE__ */
|
|
94002
|
+
description: /* @__PURE__ */ import_react145.default.createElement(Text2, null, "(", /* @__PURE__ */ import_react145.default.createElement(Link, { url: "https://wix.to/zuKh3Fo" }, "Learn more"), ")"),
|
|
93611
94003
|
items: pureHeadlessTemplates.map((template) => ({
|
|
93612
94004
|
key: template.siteTemplateId,
|
|
93613
94005
|
title: template.title,
|
|
@@ -93618,7 +94010,7 @@ var ChooseTemplate2 = ({ onSubmit }) => {
|
|
|
93618
94010
|
],
|
|
93619
94011
|
[]
|
|
93620
94012
|
);
|
|
93621
|
-
return /* @__PURE__ */
|
|
94013
|
+
return /* @__PURE__ */ import_react145.default.createElement(
|
|
93622
94014
|
SelectGroupsInput,
|
|
93623
94015
|
{
|
|
93624
94016
|
label: "Choose an initial template for your business",
|
|
@@ -93630,14 +94022,14 @@ var ChooseTemplate2 = ({ onSubmit }) => {
|
|
|
93630
94022
|
|
|
93631
94023
|
// ../create-new-packages/headless-command/src/components/ReleaseProject.tsx
|
|
93632
94024
|
init_esm_shims();
|
|
93633
|
-
var
|
|
93634
|
-
var
|
|
94025
|
+
var import_react147 = __toESM(require_react(), 1);
|
|
94026
|
+
var import_variant56 = __toESM(require_lib(), 1);
|
|
93635
94027
|
|
|
93636
94028
|
// ../create-new-packages/headless-command/src/components/FinishedSuccessfullyMessage.tsx
|
|
93637
94029
|
init_esm_shims();
|
|
93638
|
-
var
|
|
94030
|
+
var import_react146 = __toESM(require_react(), 1);
|
|
93639
94031
|
var FinishedSuccessfullyMessage3 = ({ packageManager: packageManager2, folderName, projectData, isReleased }) => {
|
|
93640
|
-
return /* @__PURE__ */
|
|
94032
|
+
return /* @__PURE__ */ import_react146.default.createElement(
|
|
93641
94033
|
Box_default,
|
|
93642
94034
|
{
|
|
93643
94035
|
borderColor: "blue",
|
|
@@ -93649,17 +94041,17 @@ var FinishedSuccessfullyMessage3 = ({ packageManager: packageManager2, folderNam
|
|
|
93649
94041
|
marginLeft: -2,
|
|
93650
94042
|
marginTop: 1
|
|
93651
94043
|
},
|
|
93652
|
-
isReleased && /* @__PURE__ */
|
|
93653
|
-
/* @__PURE__ */
|
|
93654
|
-
/* @__PURE__ */
|
|
94044
|
+
isReleased && /* @__PURE__ */ import_react146.default.createElement(Text2, { bold: true }, /* @__PURE__ */ import_react146.default.createElement(Rocket, null), " Visit your site at: ", projectData.baseUrl),
|
|
94045
|
+
/* @__PURE__ */ import_react146.default.createElement(Text2, { bold: true }, "Next Steps:"),
|
|
94046
|
+
/* @__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")))
|
|
93655
94047
|
);
|
|
93656
94048
|
};
|
|
93657
94049
|
|
|
93658
94050
|
// ../create-new-packages/headless-command/src/hooks/release-project.ts
|
|
93659
94051
|
init_esm_shims();
|
|
93660
|
-
var
|
|
94052
|
+
var import_variant55 = __toESM(require_lib(), 1);
|
|
93661
94053
|
import { join as join18 } from "node:path";
|
|
93662
|
-
var ReleaseStateVariant = (0,
|
|
94054
|
+
var ReleaseStateVariant = (0, import_variant55.variant)({
|
|
93663
94055
|
Success: {},
|
|
93664
94056
|
Skipped: {},
|
|
93665
94057
|
Error: {}
|
|
@@ -93707,7 +94099,7 @@ var ReleaseProject = ({
|
|
|
93707
94099
|
releaseNonInteractive
|
|
93708
94100
|
}) => {
|
|
93709
94101
|
const { status, execute } = useReleaseProject();
|
|
93710
|
-
(0,
|
|
94102
|
+
(0, import_react147.useEffect)(() => {
|
|
93711
94103
|
if (releaseNonInteractive != null) {
|
|
93712
94104
|
void execute({
|
|
93713
94105
|
confirmed: releaseNonInteractive,
|
|
@@ -93717,7 +94109,7 @@ var ReleaseProject = ({
|
|
|
93717
94109
|
});
|
|
93718
94110
|
}
|
|
93719
94111
|
}, []);
|
|
93720
|
-
return /* @__PURE__ */
|
|
94112
|
+
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(
|
|
93721
94113
|
ConfirmInput,
|
|
93722
94114
|
{
|
|
93723
94115
|
label: "Would you like to publish your site now?",
|
|
@@ -93731,42 +94123,42 @@ var ReleaseProject = ({
|
|
|
93731
94123
|
});
|
|
93732
94124
|
}
|
|
93733
94125
|
}
|
|
93734
|
-
)), (0,
|
|
94126
|
+
)), (0, import_variant56.match)(status, {
|
|
93735
94127
|
NotRequested: () => null,
|
|
93736
94128
|
Success: ({ result }) => {
|
|
93737
|
-
return /* @__PURE__ */
|
|
93738
|
-
Success: () => /* @__PURE__ */
|
|
93739
|
-
Skipped: () => /* @__PURE__ */
|
|
93740
|
-
Error: () => /* @__PURE__ */
|
|
93741
|
-
}), /* @__PURE__ */
|
|
94129
|
+
return /* @__PURE__ */ import_react147.default.createElement(import_react147.default.Fragment, null, (0, import_variant56.match)(result, {
|
|
94130
|
+
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"))),
|
|
94131
|
+
Skipped: () => /* @__PURE__ */ import_react147.default.createElement(Text2, null, `No worries, you can publish your site later by running ${packageManager2.getRunCmd()} release`),
|
|
94132
|
+
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`))
|
|
94133
|
+
}), /* @__PURE__ */ import_react147.default.createElement(
|
|
93742
94134
|
FinishedSuccessfullyMessage3,
|
|
93743
94135
|
{
|
|
93744
94136
|
packageManager: packageManager2,
|
|
93745
94137
|
folderName,
|
|
93746
94138
|
projectData,
|
|
93747
|
-
isReleased: (0,
|
|
94139
|
+
isReleased: (0, import_variant56.isType)(result, "Success")
|
|
93748
94140
|
}
|
|
93749
94141
|
));
|
|
93750
94142
|
},
|
|
93751
94143
|
Error: () => null,
|
|
93752
|
-
Loading: () => /* @__PURE__ */
|
|
94144
|
+
Loading: () => /* @__PURE__ */ import_react147.default.createElement(Spinner2, { text: "Publishing your site..." })
|
|
93753
94145
|
}));
|
|
93754
94146
|
};
|
|
93755
94147
|
|
|
93756
94148
|
// ../create-new-packages/headless-command/src/components/ChooseVibeSetup.tsx
|
|
93757
94149
|
init_esm_shims();
|
|
93758
|
-
var
|
|
93759
|
-
var
|
|
93760
|
-
var VibeSetupChoice = (0,
|
|
94150
|
+
var import_react148 = __toESM(require_react(), 1);
|
|
94151
|
+
var import_variant57 = __toESM(require_lib(), 1);
|
|
94152
|
+
var VibeSetupChoice = (0, import_variant57.variant)({
|
|
93761
94153
|
SetupVibe: {},
|
|
93762
94154
|
Skip: {}
|
|
93763
94155
|
});
|
|
93764
94156
|
var ChooseVibeSetup = ({ onSubmit }) => {
|
|
93765
|
-
return /* @__PURE__ */
|
|
94157
|
+
return /* @__PURE__ */ import_react148.default.createElement(
|
|
93766
94158
|
SelectInput2,
|
|
93767
94159
|
{
|
|
93768
94160
|
label: "Would you like to set up your project for editing in Wix Vibe?",
|
|
93769
|
-
info: /* @__PURE__ */
|
|
94161
|
+
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"))),
|
|
93770
94162
|
options: [
|
|
93771
94163
|
{
|
|
93772
94164
|
key: "setup-vibe",
|
|
@@ -93788,8 +94180,8 @@ var ChooseVibeSetup = ({ onSubmit }) => {
|
|
|
93788
94180
|
|
|
93789
94181
|
// ../create-new-packages/headless-command/src/components/VibeRepositorySetupPolling.tsx
|
|
93790
94182
|
init_esm_shims();
|
|
93791
|
-
var
|
|
93792
|
-
var
|
|
94183
|
+
var import_react151 = __toESM(require_react(), 1);
|
|
94184
|
+
var import_variant58 = __toESM(require_lib(), 1);
|
|
93793
94185
|
|
|
93794
94186
|
// ../velo-client/src/index.ts
|
|
93795
94187
|
init_esm_shims();
|
|
@@ -94524,10 +94916,10 @@ var VeloClient = class {
|
|
|
94524
94916
|
|
|
94525
94917
|
// ../velo-client/src/useVeloClient.ts
|
|
94526
94918
|
init_esm_shims();
|
|
94527
|
-
var
|
|
94919
|
+
var import_react149 = __toESM(require_react(), 1);
|
|
94528
94920
|
function useVeloClient() {
|
|
94529
94921
|
const httpClient = useHttpClient({ type: "code" });
|
|
94530
|
-
const client2 = (0,
|
|
94922
|
+
const client2 = (0, import_react149.useMemo)(() => new VeloClient(httpClient), [httpClient]);
|
|
94531
94923
|
return usePanoramaMethodLogger(client2);
|
|
94532
94924
|
}
|
|
94533
94925
|
|
|
@@ -94536,7 +94928,7 @@ init_esm_shims();
|
|
|
94536
94928
|
|
|
94537
94929
|
// ../codestore-client/src/useCodestoreClient.ts
|
|
94538
94930
|
init_esm_shims();
|
|
94539
|
-
var
|
|
94931
|
+
var import_react150 = __toESM(require_react(), 1);
|
|
94540
94932
|
|
|
94541
94933
|
// ../codestore-client/src/codestore-client.ts
|
|
94542
94934
|
init_esm_shims();
|
|
@@ -94700,13 +95092,13 @@ var CodestoreClient = class {
|
|
|
94700
95092
|
// ../codestore-client/src/useCodestoreClient.ts
|
|
94701
95093
|
function useCodestoreClient() {
|
|
94702
95094
|
const httpClient = useHttpClient({ type: "backoffice" });
|
|
94703
|
-
const client2 = (0,
|
|
95095
|
+
const client2 = (0, import_react150.useMemo)(() => new CodestoreClient(httpClient), [httpClient]);
|
|
94704
95096
|
return usePanoramaMethodLogger(client2);
|
|
94705
95097
|
}
|
|
94706
95098
|
|
|
94707
95099
|
// ../create-new-packages/headless-command/src/components/VibeRepositorySetupPolling.tsx
|
|
94708
|
-
var VibeSetupResult = (0,
|
|
94709
|
-
Success: (0,
|
|
95100
|
+
var VibeSetupResult = (0, import_variant58.variant)({
|
|
95101
|
+
Success: (0, import_variant58.fields)(),
|
|
94710
95102
|
Canceled: {},
|
|
94711
95103
|
Failed: {}
|
|
94712
95104
|
});
|
|
@@ -94768,7 +95160,7 @@ var VibeRepositorySetupPolling = ({
|
|
|
94768
95160
|
[projectFolder, projectId],
|
|
94769
95161
|
{
|
|
94770
95162
|
onSuccess: (result) => {
|
|
94771
|
-
if ((0,
|
|
95163
|
+
if ((0, import_variant58.isType)(result, VibeSetupResult.Success)) {
|
|
94772
95164
|
onSubmit?.();
|
|
94773
95165
|
}
|
|
94774
95166
|
},
|
|
@@ -94779,11 +95171,11 @@ var VibeRepositorySetupPolling = ({
|
|
|
94779
95171
|
}
|
|
94780
95172
|
}
|
|
94781
95173
|
);
|
|
94782
|
-
return (0,
|
|
94783
|
-
Error: () => /* @__PURE__ */
|
|
94784
|
-
Loading: () => /* @__PURE__ */
|
|
94785
|
-
Success: ({ result }) => (0,
|
|
94786
|
-
Success: ({ repoName, htmlUrl }) => /* @__PURE__ */
|
|
95174
|
+
return (0, import_variant58.match)(status, {
|
|
95175
|
+
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")),
|
|
95176
|
+
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...")),
|
|
95177
|
+
Success: ({ result }) => (0, import_variant58.match)(result, {
|
|
95178
|
+
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.")))),
|
|
94787
95179
|
Canceled: () => null
|
|
94788
95180
|
})
|
|
94789
95181
|
});
|
|
@@ -94799,19 +95191,19 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94799
95191
|
businessName: defaultBusinessName,
|
|
94800
95192
|
cloudProviders
|
|
94801
95193
|
}) => {
|
|
94802
|
-
const [businessName, setBusinessName] = (0,
|
|
95194
|
+
const [businessName, setBusinessName] = (0, import_react152.useState)(
|
|
94803
95195
|
defaultBusinessName
|
|
94804
95196
|
);
|
|
94805
|
-
const [selectedTemplate, setSelectedTemplate] = (0,
|
|
94806
|
-
const [folderName, setFolderName] = (0,
|
|
95197
|
+
const [selectedTemplate, setSelectedTemplate] = (0, import_react152.useState)(defaultTemplate);
|
|
95198
|
+
const [folderName, setFolderName] = (0, import_react152.useState)(
|
|
94807
95199
|
defaultProjectName
|
|
94808
95200
|
);
|
|
94809
|
-
const [businessId, setBusinessId] = (0,
|
|
94810
|
-
const [projectData, setProjectData] = (0,
|
|
94811
|
-
const [generationDone, setGenerationDone] = (0,
|
|
94812
|
-
const [vibeSetupChoice, setVibeSetupChoice] = (0,
|
|
94813
|
-
const [vibeSetupDone, setVibeSetupDone] = (0,
|
|
94814
|
-
const projectFolder = (0,
|
|
95201
|
+
const [businessId, setBusinessId] = (0, import_react152.useState)();
|
|
95202
|
+
const [projectData, setProjectData] = (0, import_react152.useState)();
|
|
95203
|
+
const [generationDone, setGenerationDone] = (0, import_react152.useState)(false);
|
|
95204
|
+
const [vibeSetupChoice, setVibeSetupChoice] = (0, import_react152.useState)();
|
|
95205
|
+
const [vibeSetupDone, setVibeSetupDone] = (0, import_react152.useState)(false);
|
|
95206
|
+
const projectFolder = (0, import_react152.useMemo)(
|
|
94815
95207
|
() => folderName ? join19(targetParentFolder2, folderName) : void 0,
|
|
94816
95208
|
[targetParentFolder2, folderName]
|
|
94817
95209
|
);
|
|
@@ -94820,15 +95212,15 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94820
95212
|
const packageManager2 = await createPackageManager(repoType2);
|
|
94821
95213
|
return { packageManager: packageManager2 };
|
|
94822
95214
|
}, []);
|
|
94823
|
-
const isVibeCompatible = (0,
|
|
94824
|
-
() => (0,
|
|
95215
|
+
const isVibeCompatible = (0, import_react152.useMemo)(
|
|
95216
|
+
() => (0, import_variant59.isType)(selectedTemplate, "HeadlessApp") && selectedTemplate.vibeCompatible,
|
|
94825
95217
|
[selectedTemplate]
|
|
94826
95218
|
);
|
|
94827
|
-
return (0,
|
|
95219
|
+
return (0, import_variant59.match)(status, {
|
|
94828
95220
|
Error: () => null,
|
|
94829
|
-
Loading: () => /* @__PURE__ */
|
|
95221
|
+
Loading: () => /* @__PURE__ */ import_react152.default.createElement(Spinner2, { text: "Loading..." }),
|
|
94830
95222
|
Success: ({ result: { packageManager: packageManager2 } }) => {
|
|
94831
|
-
return /* @__PURE__ */
|
|
95223
|
+
return /* @__PURE__ */ import_react152.default.createElement(
|
|
94832
95224
|
Box_default,
|
|
94833
95225
|
{
|
|
94834
95226
|
flexDirection: "column",
|
|
@@ -94839,14 +95231,14 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94839
95231
|
borderTop: false,
|
|
94840
95232
|
paddingLeft: 1
|
|
94841
95233
|
},
|
|
94842
|
-
/* @__PURE__ */
|
|
94843
|
-
!defaultBusinessName && /* @__PURE__ */
|
|
95234
|
+
/* @__PURE__ */ import_react152.default.createElement(WelcomeMessage2, null),
|
|
95235
|
+
!defaultBusinessName && /* @__PURE__ */ import_react152.default.createElement(
|
|
94844
95236
|
ChooseBusinessName,
|
|
94845
95237
|
{
|
|
94846
95238
|
onSubmit: ({ businessName: businessName2 }) => setBusinessName(businessName2)
|
|
94847
95239
|
}
|
|
94848
95240
|
),
|
|
94849
|
-
!defaultTemplate && businessName && /* @__PURE__ */
|
|
95241
|
+
!defaultTemplate && businessName && /* @__PURE__ */ import_react152.default.createElement(
|
|
94850
95242
|
ChooseTemplate2,
|
|
94851
95243
|
{
|
|
94852
95244
|
onSubmit: ({ template }) => {
|
|
@@ -94854,7 +95246,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94854
95246
|
}
|
|
94855
95247
|
}
|
|
94856
95248
|
),
|
|
94857
|
-
businessName && selectedTemplate && /* @__PURE__ */
|
|
95249
|
+
businessName && selectedTemplate && /* @__PURE__ */ import_react152.default.createElement(AuthProvider, null, /* @__PURE__ */ import_react152.default.createElement(
|
|
94858
95250
|
CreateBusiness,
|
|
94859
95251
|
{
|
|
94860
95252
|
businessName,
|
|
@@ -94862,7 +95254,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94862
95254
|
onDone: ({ businessId: businessId2 }) => setBusinessId(businessId2)
|
|
94863
95255
|
}
|
|
94864
95256
|
)),
|
|
94865
|
-
!defaultProjectName && businessName && selectedTemplate && businessId && /* @__PURE__ */
|
|
95257
|
+
!defaultProjectName && businessName && selectedTemplate && businessId && /* @__PURE__ */ import_react152.default.createElement(
|
|
94866
95258
|
ChooseFolder,
|
|
94867
95259
|
{
|
|
94868
95260
|
initialFolderName: (0, import_kebabCase5.default)(businessName),
|
|
@@ -94870,7 +95262,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94870
95262
|
onSubmit: ({ folderName: folderName2 }) => setFolderName(folderName2)
|
|
94871
95263
|
}
|
|
94872
95264
|
),
|
|
94873
|
-
businessName && selectedTemplate && businessId && folderName && /* @__PURE__ */
|
|
95265
|
+
businessName && selectedTemplate && businessId && folderName && /* @__PURE__ */ import_react152.default.createElement(AuthProvider, null, /* @__PURE__ */ import_react152.default.createElement(
|
|
94874
95266
|
CreateProject,
|
|
94875
95267
|
{
|
|
94876
95268
|
businessId,
|
|
@@ -94879,7 +95271,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94879
95271
|
onSubmit: (data) => setProjectData(data)
|
|
94880
95272
|
}
|
|
94881
95273
|
)),
|
|
94882
|
-
businessName && selectedTemplate && businessId && projectData && folderName && /* @__PURE__ */
|
|
95274
|
+
businessName && selectedTemplate && businessId && projectData && folderName && /* @__PURE__ */ import_react152.default.createElement(
|
|
94883
95275
|
GenerateProject2,
|
|
94884
95276
|
{
|
|
94885
95277
|
folderName,
|
|
@@ -94892,13 +95284,13 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94892
95284
|
onDone: (isDone) => setGenerationDone(isDone)
|
|
94893
95285
|
}
|
|
94894
95286
|
),
|
|
94895
|
-
businessName && selectedTemplate && businessId && projectData && folderName && generationDone && !vibeSetupChoice && isVibeCompatible && /* @__PURE__ */
|
|
95287
|
+
businessName && selectedTemplate && businessId && projectData && folderName && generationDone && !vibeSetupChoice && isVibeCompatible && /* @__PURE__ */ import_react152.default.createElement(
|
|
94896
95288
|
ChooseVibeSetup,
|
|
94897
95289
|
{
|
|
94898
95290
|
onSubmit: (choice) => setVibeSetupChoice(choice)
|
|
94899
95291
|
}
|
|
94900
95292
|
),
|
|
94901
|
-
businessName && selectedTemplate && businessId && projectData && projectFolder && generationDone && isVibeCompatible && (0,
|
|
95293
|
+
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(
|
|
94902
95294
|
VibeRepositorySetupPolling,
|
|
94903
95295
|
{
|
|
94904
95296
|
projectId: projectData.projectId,
|
|
@@ -94906,7 +95298,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94906
95298
|
onSubmit: () => setVibeSetupDone(true)
|
|
94907
95299
|
}
|
|
94908
95300
|
)),
|
|
94909
|
-
businessName && selectedTemplate && businessId && projectData && folderName && generationDone && (vibeSetupDone || (0,
|
|
95301
|
+
businessName && selectedTemplate && businessId && projectData && folderName && generationDone && (vibeSetupDone || (0, import_variant59.isType)(vibeSetupChoice, "Skip") || !isVibeCompatible) && /* @__PURE__ */ import_react152.default.createElement(
|
|
94910
95302
|
ReleaseProject,
|
|
94911
95303
|
{
|
|
94912
95304
|
folderName,
|
|
@@ -94944,13 +95336,13 @@ var ProcessCommand = ({ targetParentFolder: targetParentFolder2, commandOptions
|
|
|
94944
95336
|
}
|
|
94945
95337
|
return result;
|
|
94946
95338
|
}, []);
|
|
94947
|
-
return (0,
|
|
95339
|
+
return (0, import_variant60.match)(status, {
|
|
94948
95340
|
Error: () => null,
|
|
94949
|
-
Loading: () => /* @__PURE__ */
|
|
95341
|
+
Loading: () => /* @__PURE__ */ import_react153.default.createElement(Spinner2, { text: "Loading..." }),
|
|
94950
95342
|
Success: ({
|
|
94951
95343
|
result: { template, projectName, businessName, cloudProviders, publish }
|
|
94952
95344
|
}) => {
|
|
94953
|
-
return /* @__PURE__ */
|
|
95345
|
+
return /* @__PURE__ */ import_react153.default.createElement(
|
|
94954
95346
|
CreateHeadlessSiteCommand,
|
|
94955
95347
|
{
|
|
94956
95348
|
targetParentFolder: targetParentFolder2,
|
|
@@ -95059,7 +95451,7 @@ var getHeadlessCommand = ({
|
|
|
95059
95451
|
try {
|
|
95060
95452
|
transaction.start();
|
|
95061
95453
|
await render2(
|
|
95062
|
-
/* @__PURE__ */
|
|
95454
|
+
/* @__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(
|
|
95063
95455
|
LinkCommand,
|
|
95064
95456
|
{
|
|
95065
95457
|
projectName: options.projectName,
|
|
@@ -95145,7 +95537,7 @@ var getHeadlessCommand = ({
|
|
|
95145
95537
|
try {
|
|
95146
95538
|
transaction.start();
|
|
95147
95539
|
await render2(
|
|
95148
|
-
/* @__PURE__ */
|
|
95540
|
+
/* @__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(
|
|
95149
95541
|
ProcessCommand,
|
|
95150
95542
|
{
|
|
95151
95543
|
targetParentFolder: targetParentFolder2,
|
|
@@ -95170,7 +95562,7 @@ import { randomUUID as randomUUID2 } from "node:crypto";
|
|
|
95170
95562
|
var package_default = {
|
|
95171
95563
|
name: "@wix/create-new",
|
|
95172
95564
|
description: "General entry point for creating Wix projects",
|
|
95173
|
-
version: "0.0.
|
|
95565
|
+
version: "0.0.41",
|
|
95174
95566
|
bin: "bin/index.cjs",
|
|
95175
95567
|
devDependencies: {
|
|
95176
95568
|
"@commander-js/extra-typings": "^13.0.0",
|