@wix/create-new 0.0.39 → 0.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{chunk-OZM7WZ4W.js → chunk-CEXXL22E.js} +3 -1
- package/build/{chunk-OZM7WZ4W.js.map → chunk-CEXXL22E.js.map} +1 -1
- package/build/{generator-LMHXVMXT.js → generator-D63KTZEK.js} +2 -2
- package/build/index.js +1559 -1170
- package/build/index.js.map +1 -1
- package/package.json +2 -2
- /package/build/{generator-LMHXVMXT.js.map → generator-D63KTZEK.js.map} +0 -0
package/build/index.js
CHANGED
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
writeJson,
|
|
113
113
|
writePackageJson,
|
|
114
114
|
zod_default
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-CEXXL22E.js";
|
|
116
116
|
import {
|
|
117
117
|
__commonJS,
|
|
118
118
|
__dirname,
|
|
@@ -3374,20 +3374,20 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
3374
3374
|
let debugOption;
|
|
3375
3375
|
let debugHost = "127.0.0.1";
|
|
3376
3376
|
let debugPort = "9229";
|
|
3377
|
-
let
|
|
3378
|
-
if ((
|
|
3379
|
-
debugOption =
|
|
3380
|
-
} else if ((
|
|
3381
|
-
debugOption =
|
|
3382
|
-
if (/^\d+$/.test(
|
|
3383
|
-
debugPort =
|
|
3377
|
+
let match37;
|
|
3378
|
+
if ((match37 = arg.match(/^(--inspect(-brk)?)$/)) !== null) {
|
|
3379
|
+
debugOption = match37[1];
|
|
3380
|
+
} else if ((match37 = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null) {
|
|
3381
|
+
debugOption = match37[1];
|
|
3382
|
+
if (/^\d+$/.test(match37[3])) {
|
|
3383
|
+
debugPort = match37[3];
|
|
3384
3384
|
} else {
|
|
3385
|
-
debugHost =
|
|
3385
|
+
debugHost = match37[3];
|
|
3386
3386
|
}
|
|
3387
|
-
} else if ((
|
|
3388
|
-
debugOption =
|
|
3389
|
-
debugHost =
|
|
3390
|
-
debugPort =
|
|
3387
|
+
} else if ((match37 = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/)) !== null) {
|
|
3388
|
+
debugOption = match37[1];
|
|
3389
|
+
debugHost = match37[3];
|
|
3390
|
+
debugPort = match37[4];
|
|
3391
3391
|
}
|
|
3392
3392
|
if (debugOption && debugPort !== "0") {
|
|
3393
3393
|
return `${debugOption}=${debugHost}:${parseInt(debugPort) + 1}`;
|
|
@@ -5254,14 +5254,14 @@ var require_ms = __commonJS({
|
|
|
5254
5254
|
if (str.length > 100) {
|
|
5255
5255
|
return;
|
|
5256
5256
|
}
|
|
5257
|
-
var
|
|
5257
|
+
var match37 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
|
5258
5258
|
str
|
|
5259
5259
|
);
|
|
5260
|
-
if (!
|
|
5260
|
+
if (!match37) {
|
|
5261
5261
|
return;
|
|
5262
5262
|
}
|
|
5263
|
-
var n3 = parseFloat(
|
|
5264
|
-
var type = (
|
|
5263
|
+
var n3 = parseFloat(match37[1]);
|
|
5264
|
+
var type = (match37[2] || "ms").toLowerCase();
|
|
5265
5265
|
switch (type) {
|
|
5266
5266
|
case "years":
|
|
5267
5267
|
case "year":
|
|
@@ -5394,19 +5394,19 @@ var require_common = __commonJS({
|
|
|
5394
5394
|
args.unshift("%O");
|
|
5395
5395
|
}
|
|
5396
5396
|
let index = 0;
|
|
5397
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, (
|
|
5398
|
-
if (
|
|
5397
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match37, format2) => {
|
|
5398
|
+
if (match37 === "%%") {
|
|
5399
5399
|
return "%";
|
|
5400
5400
|
}
|
|
5401
5401
|
index++;
|
|
5402
5402
|
const formatter = createDebug.formatters[format2];
|
|
5403
5403
|
if (typeof formatter === "function") {
|
|
5404
5404
|
const val = args[index];
|
|
5405
|
-
|
|
5405
|
+
match37 = formatter.call(self2, val);
|
|
5406
5406
|
args.splice(index, 1);
|
|
5407
5407
|
index--;
|
|
5408
5408
|
}
|
|
5409
|
-
return
|
|
5409
|
+
return match37;
|
|
5410
5410
|
});
|
|
5411
5411
|
createDebug.formatArgs.call(self2, args);
|
|
5412
5412
|
const logFn = self2.log || createDebug.log;
|
|
@@ -5643,12 +5643,12 @@ var require_browser = __commonJS({
|
|
|
5643
5643
|
args.splice(1, 0, c2, "color: inherit");
|
|
5644
5644
|
let index = 0;
|
|
5645
5645
|
let lastC = 0;
|
|
5646
|
-
args[0].replace(/%[a-zA-Z%]/g, (
|
|
5647
|
-
if (
|
|
5646
|
+
args[0].replace(/%[a-zA-Z%]/g, (match37) => {
|
|
5647
|
+
if (match37 === "%%") {
|
|
5648
5648
|
return;
|
|
5649
5649
|
}
|
|
5650
5650
|
index++;
|
|
5651
|
-
if (
|
|
5651
|
+
if (match37 === "%c") {
|
|
5652
5652
|
lastC = index;
|
|
5653
5653
|
}
|
|
5654
5654
|
});
|
|
@@ -6951,8 +6951,8 @@ var require_cookies = __commonJS({
|
|
|
6951
6951
|
document.cookie = cookie.join("; ");
|
|
6952
6952
|
},
|
|
6953
6953
|
read: function read(name) {
|
|
6954
|
-
var
|
|
6955
|
-
return
|
|
6954
|
+
var match37 = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
|
|
6955
|
+
return match37 ? decodeURIComponent(match37[3]) : null;
|
|
6956
6956
|
},
|
|
6957
6957
|
remove: function remove(name) {
|
|
6958
6958
|
this.write(name, "", Date.now() - 864e5);
|
|
@@ -14911,21 +14911,21 @@ var require_stack_utils = __commonJS({
|
|
|
14911
14911
|
return res;
|
|
14912
14912
|
}
|
|
14913
14913
|
parseLine(line) {
|
|
14914
|
-
const
|
|
14915
|
-
if (!
|
|
14914
|
+
const match37 = line && line.match(re);
|
|
14915
|
+
if (!match37) {
|
|
14916
14916
|
return null;
|
|
14917
14917
|
}
|
|
14918
|
-
const ctor =
|
|
14919
|
-
let fname =
|
|
14920
|
-
const evalOrigin =
|
|
14921
|
-
const evalFile =
|
|
14922
|
-
const evalLine = Number(
|
|
14923
|
-
const evalCol = Number(
|
|
14924
|
-
let file =
|
|
14925
|
-
const lnum =
|
|
14926
|
-
const col =
|
|
14927
|
-
const native =
|
|
14928
|
-
const closeParen =
|
|
14918
|
+
const ctor = match37[1] === "new";
|
|
14919
|
+
let fname = match37[2];
|
|
14920
|
+
const evalOrigin = match37[3];
|
|
14921
|
+
const evalFile = match37[4];
|
|
14922
|
+
const evalLine = Number(match37[5]);
|
|
14923
|
+
const evalCol = Number(match37[6]);
|
|
14924
|
+
let file = match37[7];
|
|
14925
|
+
const lnum = match37[8];
|
|
14926
|
+
const col = match37[9];
|
|
14927
|
+
const native = match37[10] === "native";
|
|
14928
|
+
const closeParen = match37[11] === ")";
|
|
14929
14929
|
let method;
|
|
14930
14930
|
const res = {};
|
|
14931
14931
|
if (lnum) {
|
|
@@ -15349,12 +15349,12 @@ var require_lodash = __commonJS({
|
|
|
15349
15349
|
Stack.prototype.has = stackHas;
|
|
15350
15350
|
Stack.prototype.set = stackSet;
|
|
15351
15351
|
function arrayLikeKeys(value2, inherited) {
|
|
15352
|
-
var isArr = isArray3(value2), isArg = !isArr && isArguments(value2), isBuff = !isArr && !isArg && isBuffer(value2),
|
|
15352
|
+
var isArr = isArray3(value2), isArg = !isArr && isArguments(value2), isBuff = !isArr && !isArg && isBuffer(value2), isType24 = !isArr && !isArg && !isBuff && isTypedArray(value2), skipIndexes = isArr || isArg || isBuff || isType24, result = skipIndexes ? baseTimes(value2.length, String) : [], length = result.length;
|
|
15353
15353
|
for (var key in value2) {
|
|
15354
15354
|
if ((inherited || hasOwnProperty3.call(value2, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
15355
15355
|
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
15356
15356
|
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
15357
|
-
|
|
15357
|
+
isType24 && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
|
|
15358
15358
|
isIndex(key, length)))) {
|
|
15359
15359
|
result.push(key);
|
|
15360
15360
|
}
|
|
@@ -15726,89 +15726,6 @@ var require_arr_rotate = __commonJS({
|
|
|
15726
15726
|
}
|
|
15727
15727
|
});
|
|
15728
15728
|
|
|
15729
|
-
// ../../node_modules/supports-hyperlinks/index.js
|
|
15730
|
-
var require_supports_hyperlinks = __commonJS({
|
|
15731
|
-
"../../node_modules/supports-hyperlinks/index.js"(exports, module2) {
|
|
15732
|
-
"use strict";
|
|
15733
|
-
init_esm_shims();
|
|
15734
|
-
var supportsColor2 = require_supports_color();
|
|
15735
|
-
var hasFlag2 = require_has_flag();
|
|
15736
|
-
function parseVersion(versionString) {
|
|
15737
|
-
if (/^\d{3,4}$/.test(versionString)) {
|
|
15738
|
-
const m = /(\d{1,2})(\d{2})/.exec(versionString);
|
|
15739
|
-
return {
|
|
15740
|
-
major: 0,
|
|
15741
|
-
minor: parseInt(m[1], 10),
|
|
15742
|
-
patch: parseInt(m[2], 10)
|
|
15743
|
-
};
|
|
15744
|
-
}
|
|
15745
|
-
const versions = (versionString || "").split(".").map((n3) => parseInt(n3, 10));
|
|
15746
|
-
return {
|
|
15747
|
-
major: versions[0],
|
|
15748
|
-
minor: versions[1],
|
|
15749
|
-
patch: versions[2]
|
|
15750
|
-
};
|
|
15751
|
-
}
|
|
15752
|
-
function supportsHyperlink(stream) {
|
|
15753
|
-
const { env: env2 } = process;
|
|
15754
|
-
if ("FORCE_HYPERLINK" in env2) {
|
|
15755
|
-
return !(env2.FORCE_HYPERLINK.length > 0 && parseInt(env2.FORCE_HYPERLINK, 10) === 0);
|
|
15756
|
-
}
|
|
15757
|
-
if (hasFlag2("no-hyperlink") || hasFlag2("no-hyperlinks") || hasFlag2("hyperlink=false") || hasFlag2("hyperlink=never")) {
|
|
15758
|
-
return false;
|
|
15759
|
-
}
|
|
15760
|
-
if (hasFlag2("hyperlink=true") || hasFlag2("hyperlink=always")) {
|
|
15761
|
-
return true;
|
|
15762
|
-
}
|
|
15763
|
-
if ("NETLIFY" in env2) {
|
|
15764
|
-
return true;
|
|
15765
|
-
}
|
|
15766
|
-
if (!supportsColor2.supportsColor(stream)) {
|
|
15767
|
-
return false;
|
|
15768
|
-
}
|
|
15769
|
-
if (stream && !stream.isTTY) {
|
|
15770
|
-
return false;
|
|
15771
|
-
}
|
|
15772
|
-
if (process.platform === "win32") {
|
|
15773
|
-
return false;
|
|
15774
|
-
}
|
|
15775
|
-
if ("CI" in env2) {
|
|
15776
|
-
return false;
|
|
15777
|
-
}
|
|
15778
|
-
if ("TEAMCITY_VERSION" in env2) {
|
|
15779
|
-
return false;
|
|
15780
|
-
}
|
|
15781
|
-
if ("TERM_PROGRAM" in env2) {
|
|
15782
|
-
const version = parseVersion(env2.TERM_PROGRAM_VERSION);
|
|
15783
|
-
switch (env2.TERM_PROGRAM) {
|
|
15784
|
-
case "iTerm.app":
|
|
15785
|
-
if (version.major === 3) {
|
|
15786
|
-
return version.minor >= 1;
|
|
15787
|
-
}
|
|
15788
|
-
return version.major > 3;
|
|
15789
|
-
case "WezTerm":
|
|
15790
|
-
return version.major >= 20200620;
|
|
15791
|
-
case "vscode":
|
|
15792
|
-
return version.major > 1 || version.major === 1 && version.minor >= 72;
|
|
15793
|
-
}
|
|
15794
|
-
}
|
|
15795
|
-
if ("VTE_VERSION" in env2) {
|
|
15796
|
-
if (env2.VTE_VERSION === "0.50.0") {
|
|
15797
|
-
return false;
|
|
15798
|
-
}
|
|
15799
|
-
const version = parseVersion(env2.VTE_VERSION);
|
|
15800
|
-
return version.major > 0 || version.minor >= 50;
|
|
15801
|
-
}
|
|
15802
|
-
return false;
|
|
15803
|
-
}
|
|
15804
|
-
module2.exports = {
|
|
15805
|
-
supportsHyperlink,
|
|
15806
|
-
stdout: supportsHyperlink(process.stdout),
|
|
15807
|
-
stderr: supportsHyperlink(process.stderr)
|
|
15808
|
-
};
|
|
15809
|
-
}
|
|
15810
|
-
});
|
|
15811
|
-
|
|
15812
15729
|
// ../../node_modules/cli-spinners/spinners.json
|
|
15813
15730
|
var require_spinners = __commonJS({
|
|
15814
15731
|
"../../node_modules/cli-spinners/spinners.json"(exports, module2) {
|
|
@@ -17455,6 +17372,89 @@ var require_cli_spinners = __commonJS({
|
|
|
17455
17372
|
}
|
|
17456
17373
|
});
|
|
17457
17374
|
|
|
17375
|
+
// ../../node_modules/supports-hyperlinks/index.js
|
|
17376
|
+
var require_supports_hyperlinks = __commonJS({
|
|
17377
|
+
"../../node_modules/supports-hyperlinks/index.js"(exports, module2) {
|
|
17378
|
+
"use strict";
|
|
17379
|
+
init_esm_shims();
|
|
17380
|
+
var supportsColor2 = require_supports_color();
|
|
17381
|
+
var hasFlag2 = require_has_flag();
|
|
17382
|
+
function parseVersion(versionString) {
|
|
17383
|
+
if (/^\d{3,4}$/.test(versionString)) {
|
|
17384
|
+
const m = /(\d{1,2})(\d{2})/.exec(versionString);
|
|
17385
|
+
return {
|
|
17386
|
+
major: 0,
|
|
17387
|
+
minor: parseInt(m[1], 10),
|
|
17388
|
+
patch: parseInt(m[2], 10)
|
|
17389
|
+
};
|
|
17390
|
+
}
|
|
17391
|
+
const versions = (versionString || "").split(".").map((n3) => parseInt(n3, 10));
|
|
17392
|
+
return {
|
|
17393
|
+
major: versions[0],
|
|
17394
|
+
minor: versions[1],
|
|
17395
|
+
patch: versions[2]
|
|
17396
|
+
};
|
|
17397
|
+
}
|
|
17398
|
+
function supportsHyperlink(stream) {
|
|
17399
|
+
const { env: env2 } = process;
|
|
17400
|
+
if ("FORCE_HYPERLINK" in env2) {
|
|
17401
|
+
return !(env2.FORCE_HYPERLINK.length > 0 && parseInt(env2.FORCE_HYPERLINK, 10) === 0);
|
|
17402
|
+
}
|
|
17403
|
+
if (hasFlag2("no-hyperlink") || hasFlag2("no-hyperlinks") || hasFlag2("hyperlink=false") || hasFlag2("hyperlink=never")) {
|
|
17404
|
+
return false;
|
|
17405
|
+
}
|
|
17406
|
+
if (hasFlag2("hyperlink=true") || hasFlag2("hyperlink=always")) {
|
|
17407
|
+
return true;
|
|
17408
|
+
}
|
|
17409
|
+
if ("NETLIFY" in env2) {
|
|
17410
|
+
return true;
|
|
17411
|
+
}
|
|
17412
|
+
if (!supportsColor2.supportsColor(stream)) {
|
|
17413
|
+
return false;
|
|
17414
|
+
}
|
|
17415
|
+
if (stream && !stream.isTTY) {
|
|
17416
|
+
return false;
|
|
17417
|
+
}
|
|
17418
|
+
if (process.platform === "win32") {
|
|
17419
|
+
return false;
|
|
17420
|
+
}
|
|
17421
|
+
if ("CI" in env2) {
|
|
17422
|
+
return false;
|
|
17423
|
+
}
|
|
17424
|
+
if ("TEAMCITY_VERSION" in env2) {
|
|
17425
|
+
return false;
|
|
17426
|
+
}
|
|
17427
|
+
if ("TERM_PROGRAM" in env2) {
|
|
17428
|
+
const version = parseVersion(env2.TERM_PROGRAM_VERSION);
|
|
17429
|
+
switch (env2.TERM_PROGRAM) {
|
|
17430
|
+
case "iTerm.app":
|
|
17431
|
+
if (version.major === 3) {
|
|
17432
|
+
return version.minor >= 1;
|
|
17433
|
+
}
|
|
17434
|
+
return version.major > 3;
|
|
17435
|
+
case "WezTerm":
|
|
17436
|
+
return version.major >= 20200620;
|
|
17437
|
+
case "vscode":
|
|
17438
|
+
return version.major > 1 || version.major === 1 && version.minor >= 72;
|
|
17439
|
+
}
|
|
17440
|
+
}
|
|
17441
|
+
if ("VTE_VERSION" in env2) {
|
|
17442
|
+
if (env2.VTE_VERSION === "0.50.0") {
|
|
17443
|
+
return false;
|
|
17444
|
+
}
|
|
17445
|
+
const version = parseVersion(env2.VTE_VERSION);
|
|
17446
|
+
return version.major > 0 || version.minor >= 50;
|
|
17447
|
+
}
|
|
17448
|
+
return false;
|
|
17449
|
+
}
|
|
17450
|
+
module2.exports = {
|
|
17451
|
+
supportsHyperlink,
|
|
17452
|
+
stdout: supportsHyperlink(process.stdout),
|
|
17453
|
+
stderr: supportsHyperlink(process.stderr)
|
|
17454
|
+
};
|
|
17455
|
+
}
|
|
17456
|
+
});
|
|
17457
|
+
|
|
17458
17458
|
// ../../node_modules/void-elements/index.js
|
|
17459
17459
|
var require_void_elements = __commonJS({
|
|
17460
17460
|
"../../node_modules/void-elements/index.js"(exports, module2) {
|
|
@@ -18973,15 +18973,15 @@ var init_TraceState = __esm({
|
|
|
18973
18973
|
|
|
18974
18974
|
// ../../node_modules/@opentelemetry/core/build/esm/trace/W3CTraceContextPropagator.js
|
|
18975
18975
|
function parseTraceParent(traceParent) {
|
|
18976
|
-
var
|
|
18977
|
-
if (!
|
|
18976
|
+
var match37 = TRACE_PARENT_REGEX.exec(traceParent);
|
|
18977
|
+
if (!match37)
|
|
18978
18978
|
return null;
|
|
18979
|
-
if (
|
|
18979
|
+
if (match37[1] === "00" && match37[5])
|
|
18980
18980
|
return null;
|
|
18981
18981
|
return {
|
|
18982
|
-
traceId:
|
|
18983
|
-
spanId:
|
|
18984
|
-
traceFlags: parseInt(
|
|
18982
|
+
traceId: match37[2],
|
|
18983
|
+
spanId: match37[3],
|
|
18984
|
+
traceFlags: parseInt(match37[4], 16)
|
|
18985
18985
|
};
|
|
18986
18986
|
}
|
|
18987
18987
|
var TRACE_PARENT_HEADER, TRACE_STATE_HEADER, VERSION2, VERSION_PART, TRACE_ID_PART, PARENT_ID_PART, FLAGS_PART, TRACE_PARENT_REGEX, W3CTraceContextPropagator;
|
|
@@ -20083,8 +20083,8 @@ var require_semver = __commonJS({
|
|
|
20083
20083
|
}
|
|
20084
20084
|
if (identifier) {
|
|
20085
20085
|
const r2 = new RegExp(`^${this.options.loose ? src[t3.PRERELEASELOOSE] : src[t3.PRERELEASE]}$`);
|
|
20086
|
-
const
|
|
20087
|
-
if (!
|
|
20086
|
+
const match37 = `-${identifier}`.match(r2);
|
|
20087
|
+
if (!match37 || match37[1] !== identifier) {
|
|
20088
20088
|
throw new Error(`invalid identifier: ${identifier}`);
|
|
20089
20089
|
}
|
|
20090
20090
|
}
|
|
@@ -20567,28 +20567,28 @@ var require_coerce = __commonJS({
|
|
|
20567
20567
|
return null;
|
|
20568
20568
|
}
|
|
20569
20569
|
options = options || {};
|
|
20570
|
-
let
|
|
20570
|
+
let match37 = null;
|
|
20571
20571
|
if (!options.rtl) {
|
|
20572
|
-
|
|
20572
|
+
match37 = version.match(options.includePrerelease ? re[t3.COERCEFULL] : re[t3.COERCE]);
|
|
20573
20573
|
} else {
|
|
20574
20574
|
const coerceRtlRegex = options.includePrerelease ? re[t3.COERCERTLFULL] : re[t3.COERCERTL];
|
|
20575
20575
|
let next;
|
|
20576
|
-
while ((next = coerceRtlRegex.exec(version)) && (!
|
|
20577
|
-
if (!
|
|
20578
|
-
|
|
20576
|
+
while ((next = coerceRtlRegex.exec(version)) && (!match37 || match37.index + match37[0].length !== version.length)) {
|
|
20577
|
+
if (!match37 || next.index + next[0].length !== match37.index + match37[0].length) {
|
|
20578
|
+
match37 = next;
|
|
20579
20579
|
}
|
|
20580
20580
|
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
20581
20581
|
}
|
|
20582
20582
|
coerceRtlRegex.lastIndex = -1;
|
|
20583
20583
|
}
|
|
20584
|
-
if (
|
|
20584
|
+
if (match37 === null) {
|
|
20585
20585
|
return null;
|
|
20586
20586
|
}
|
|
20587
|
-
const major =
|
|
20588
|
-
const minor =
|
|
20589
|
-
const patch =
|
|
20590
|
-
const prerelease = options.includePrerelease &&
|
|
20591
|
-
const build = options.includePrerelease &&
|
|
20587
|
+
const major = match37[2];
|
|
20588
|
+
const minor = match37[3] || "0";
|
|
20589
|
+
const patch = match37[4] || "0";
|
|
20590
|
+
const prerelease = options.includePrerelease && match37[5] ? `-${match37[5]}` : "";
|
|
20591
|
+
const build = options.includePrerelease && match37[6] ? `+${match37[6]}` : "";
|
|
20592
20592
|
return parse4(`${major}.${minor}.${patch}${prerelease}${build}`, options);
|
|
20593
20593
|
};
|
|
20594
20594
|
module2.exports = coerce;
|
|
@@ -26589,10 +26589,10 @@ var require_utils6 = __commonJS({
|
|
|
26589
26589
|
if (!type || typeof type.getFields !== "function" || type[symbols_1.OTEL_PATCHED_SYMBOL]) {
|
|
26590
26590
|
return;
|
|
26591
26591
|
}
|
|
26592
|
-
const
|
|
26592
|
+
const fields12 = type.getFields();
|
|
26593
26593
|
type[symbols_1.OTEL_PATCHED_SYMBOL] = true;
|
|
26594
|
-
Object.keys(
|
|
26595
|
-
const field =
|
|
26594
|
+
Object.keys(fields12).forEach((key) => {
|
|
26595
|
+
const field = fields12[key];
|
|
26596
26596
|
if (!field) {
|
|
26597
26597
|
return;
|
|
26598
26598
|
}
|
|
@@ -28293,7 +28293,7 @@ var require_instrumentation5 = __commonJS({
|
|
|
28293
28293
|
}
|
|
28294
28294
|
_patchCallbackQuery(span, parentContext) {
|
|
28295
28295
|
return (originalCallback) => {
|
|
28296
|
-
return function(err, results,
|
|
28296
|
+
return function(err, results, fields12) {
|
|
28297
28297
|
if (err) {
|
|
28298
28298
|
span.setStatus({
|
|
28299
28299
|
code: api_1.SpanStatusCode.ERROR,
|
|
@@ -28606,7 +28606,7 @@ var require_instrumentation6 = __commonJS({
|
|
|
28606
28606
|
}
|
|
28607
28607
|
_patchCallbackQuery(endSpan) {
|
|
28608
28608
|
return (originalCallback) => {
|
|
28609
|
-
return function(err, results,
|
|
28609
|
+
return function(err, results, fields12) {
|
|
28610
28610
|
endSpan(err, results);
|
|
28611
28611
|
return originalCallback(...arguments);
|
|
28612
28612
|
};
|
|
@@ -31802,7 +31802,7 @@ var require_batch_queue = __commonJS({
|
|
|
31802
31802
|
var fieldCounts = {};
|
|
31803
31803
|
var batchLen = batch.e.length;
|
|
31804
31804
|
var events = batch.e.map(function(event) {
|
|
31805
|
-
var
|
|
31805
|
+
var fields12 = Object.keys(event.f).map(function(field) {
|
|
31806
31806
|
var value2 = event.f[field];
|
|
31807
31807
|
var key = field + "|" + value2;
|
|
31808
31808
|
fieldCounts[key] = fieldCounts[key] || 0;
|
|
@@ -31810,12 +31810,12 @@ var require_batch_queue = __commonJS({
|
|
|
31810
31810
|
return [field, value2, key];
|
|
31811
31811
|
});
|
|
31812
31812
|
return _extends2({}, event, {
|
|
31813
|
-
f:
|
|
31813
|
+
f: fields12
|
|
31814
31814
|
});
|
|
31815
31815
|
});
|
|
31816
31816
|
var globalFields = {};
|
|
31817
31817
|
events = events.map(function(event) {
|
|
31818
|
-
var
|
|
31818
|
+
var fields12 = event.f.reduce(function(res, _ref) {
|
|
31819
31819
|
var _ref2 = _slicedToArray(_ref, 3), field = _ref2[0], value2 = _ref2[1], key = _ref2[2];
|
|
31820
31820
|
if (fieldCounts[key] === batchLen) {
|
|
31821
31821
|
globalFields[field] = value2;
|
|
@@ -31825,7 +31825,7 @@ var require_batch_queue = __commonJS({
|
|
|
31825
31825
|
return res;
|
|
31826
31826
|
}, {});
|
|
31827
31827
|
return _extends2({}, event, {
|
|
31828
|
-
f:
|
|
31828
|
+
f: fields12
|
|
31829
31829
|
});
|
|
31830
31830
|
});
|
|
31831
31831
|
return _extends2({}, batch, {
|
|
@@ -32642,6 +32642,19 @@ var require_lib2 = __commonJS({
|
|
|
32642
32642
|
}
|
|
32643
32643
|
});
|
|
32644
32644
|
|
|
32645
|
+
// ../../node_modules/lodash/snakeCase.js
|
|
32646
|
+
var require_snakeCase = __commonJS({
|
|
32647
|
+
"../../node_modules/lodash/snakeCase.js"(exports, module2) {
|
|
32648
|
+
"use strict";
|
|
32649
|
+
init_esm_shims();
|
|
32650
|
+
var createCompounder = require_createCompounder();
|
|
32651
|
+
var snakeCase2 = createCompounder(function(result, word, index) {
|
|
32652
|
+
return result + (index ? "_" : "") + word.toLowerCase();
|
|
32653
|
+
});
|
|
32654
|
+
module2.exports = snakeCase2;
|
|
32655
|
+
}
|
|
32656
|
+
});
|
|
32657
|
+
|
|
32645
32658
|
// ../../node_modules/source-map-js/lib/base64.js
|
|
32646
32659
|
var require_base642 = __commonJS({
|
|
32647
32660
|
"../../node_modules/source-map-js/lib/base64.js"(exports) {
|
|
@@ -32759,16 +32772,16 @@ var require_util = __commonJS({
|
|
|
32759
32772
|
var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
|
|
32760
32773
|
var dataUrlRegexp = /^data:.+\,.+$/;
|
|
32761
32774
|
function urlParse(aUrl) {
|
|
32762
|
-
var
|
|
32763
|
-
if (!
|
|
32775
|
+
var match37 = aUrl.match(urlRegexp);
|
|
32776
|
+
if (!match37) {
|
|
32764
32777
|
return null;
|
|
32765
32778
|
}
|
|
32766
32779
|
return {
|
|
32767
|
-
scheme:
|
|
32768
|
-
auth:
|
|
32769
|
-
host:
|
|
32770
|
-
port:
|
|
32771
|
-
path:
|
|
32780
|
+
scheme: match37[1],
|
|
32781
|
+
auth: match37[2],
|
|
32782
|
+
host: match37[3],
|
|
32783
|
+
port: match37[4],
|
|
32784
|
+
path: match37[5]
|
|
32772
32785
|
};
|
|
32773
32786
|
}
|
|
32774
32787
|
exports.urlParse = urlParse;
|
|
@@ -40083,8 +40096,8 @@ var require_lib3 = __commonJS({
|
|
|
40083
40096
|
default:
|
|
40084
40097
|
if (ch >= 48 && ch <= 55) {
|
|
40085
40098
|
const startPos = pos - 1;
|
|
40086
|
-
const
|
|
40087
|
-
let octalStr =
|
|
40099
|
+
const match37 = /^[0-7]+/.exec(input.slice(startPos, pos + 2));
|
|
40100
|
+
let octalStr = match37[0];
|
|
40088
40101
|
let octal = parseInt(octalStr, 8);
|
|
40089
40102
|
if (octal > 255) {
|
|
40090
40103
|
octalStr = octalStr.slice(0, -1);
|
|
@@ -51371,12 +51384,12 @@ var getAllProperties = (object) => {
|
|
|
51371
51384
|
};
|
|
51372
51385
|
function autoBind(self2, { include, exclude } = {}) {
|
|
51373
51386
|
const filter = (key) => {
|
|
51374
|
-
const
|
|
51387
|
+
const match37 = (pattern) => typeof pattern === "string" ? key === pattern : pattern.test(key);
|
|
51375
51388
|
if (include) {
|
|
51376
|
-
return include.some(
|
|
51389
|
+
return include.some(match37);
|
|
51377
51390
|
}
|
|
51378
51391
|
if (exclude) {
|
|
51379
|
-
return !exclude.some(
|
|
51392
|
+
return !exclude.some(match37);
|
|
51380
51393
|
}
|
|
51381
51394
|
return true;
|
|
51382
51395
|
};
|
|
@@ -56952,6 +56965,7 @@ var Input2 = ({
|
|
|
56952
56965
|
},
|
|
56953
56966
|
onSubmit: () => {
|
|
56954
56967
|
if (!currentValue && placeholder) {
|
|
56968
|
+
setCurrentValue(placeholder);
|
|
56955
56969
|
onSubmit?.(placeholder);
|
|
56956
56970
|
} else {
|
|
56957
56971
|
onSubmit?.(currentValue);
|
|
@@ -57126,9 +57140,9 @@ var Highlighter = ({ pattern, text }) => {
|
|
|
57126
57140
|
}
|
|
57127
57141
|
const matches = text.matchAll(pattern);
|
|
57128
57142
|
const hightlightMap = new Array(text.length).fill(0);
|
|
57129
|
-
for (const
|
|
57130
|
-
const start =
|
|
57131
|
-
const end =
|
|
57143
|
+
for (const match37 of matches) {
|
|
57144
|
+
const start = match37.index;
|
|
57145
|
+
const end = match37.index + match37[0].length;
|
|
57132
57146
|
for (let i2 = start; i2 < end; i2++) {
|
|
57133
57147
|
hightlightMap[i2] = 1;
|
|
57134
57148
|
}
|
|
@@ -57430,8 +57444,45 @@ init_esm_shims();
|
|
|
57430
57444
|
|
|
57431
57445
|
// ../cli-ui-kit/src/components/TextInput/TextInput.tsx
|
|
57432
57446
|
init_esm_shims();
|
|
57433
|
-
var
|
|
57447
|
+
var import_react57 = __toESM(require_react(), 1);
|
|
57434
57448
|
var import_variant15 = __toESM(require_lib(), 1);
|
|
57449
|
+
|
|
57450
|
+
// ../cli-ui-kit/src/components/Spinner.tsx
|
|
57451
|
+
init_esm_shims();
|
|
57452
|
+
var import_react56 = __toESM(require_react(), 1);
|
|
57453
|
+
|
|
57454
|
+
// ../../node_modules/ink-spinner/build/index.js
|
|
57455
|
+
init_esm_shims();
|
|
57456
|
+
var import_react55 = __toESM(require_react(), 1);
|
|
57457
|
+
var import_cli_spinners = __toESM(require_cli_spinners(), 1);
|
|
57458
|
+
function Spinner({ type = "dots" }) {
|
|
57459
|
+
const [frame, setFrame] = (0, import_react55.useState)(0);
|
|
57460
|
+
const spinner = import_cli_spinners.default[type];
|
|
57461
|
+
(0, import_react55.useEffect)(() => {
|
|
57462
|
+
const timer = setInterval(() => {
|
|
57463
|
+
setFrame((previousFrame) => {
|
|
57464
|
+
const isLastFrame = previousFrame === spinner.frames.length - 1;
|
|
57465
|
+
return isLastFrame ? 0 : previousFrame + 1;
|
|
57466
|
+
});
|
|
57467
|
+
}, spinner.interval);
|
|
57468
|
+
return () => {
|
|
57469
|
+
clearInterval(timer);
|
|
57470
|
+
};
|
|
57471
|
+
}, [spinner]);
|
|
57472
|
+
return import_react55.default.createElement(Text, null, spinner.frames[frame]);
|
|
57473
|
+
}
|
|
57474
|
+
var build_default2 = Spinner;
|
|
57475
|
+
|
|
57476
|
+
// ../cli-ui-kit/src/components/Spinner.tsx
|
|
57477
|
+
var Spinner2 = ({ text }) => {
|
|
57478
|
+
const spinnerNode = /* @__PURE__ */ import_react56.default.createElement(Text2, { skin: "info" }, /* @__PURE__ */ import_react56.default.createElement(build_default2, { type: "dots" }));
|
|
57479
|
+
if (text) {
|
|
57480
|
+
return /* @__PURE__ */ import_react56.default.createElement(Box_default, { gap: 1 }, spinnerNode, typeof text === "string" ? /* @__PURE__ */ import_react56.default.createElement(Text2, null, text) : text);
|
|
57481
|
+
}
|
|
57482
|
+
return spinnerNode;
|
|
57483
|
+
};
|
|
57484
|
+
|
|
57485
|
+
// ../cli-ui-kit/src/components/TextInput/TextInput.tsx
|
|
57435
57486
|
var TextInput2 = ({
|
|
57436
57487
|
label,
|
|
57437
57488
|
isActive,
|
|
@@ -57440,38 +57491,48 @@ var TextInput2 = ({
|
|
|
57440
57491
|
validate: validate3 = () => true,
|
|
57441
57492
|
inCreateFlow = false
|
|
57442
57493
|
}) => {
|
|
57443
|
-
const [inputState, setInputState] = (0,
|
|
57494
|
+
const [inputState, setInputState] = (0, import_react57.useState)(
|
|
57444
57495
|
() => InputState.NotSubmitted(placeholder)
|
|
57445
57496
|
);
|
|
57446
|
-
const [isDirty, setIsDirty] = (0,
|
|
57447
|
-
const [
|
|
57448
|
-
const
|
|
57497
|
+
const [isDirty, setIsDirty] = (0, import_react57.useState)(false);
|
|
57498
|
+
const [showSpinner, setShowSpinner] = (0, import_react57.useState)(false);
|
|
57499
|
+
const [validationError, setValidationError] = (0, import_react57.useState)();
|
|
57500
|
+
const handleSubmit = (0, import_react57.useCallback)(
|
|
57449
57501
|
async (value2) => {
|
|
57502
|
+
setValidationError(void 0);
|
|
57450
57503
|
setIsDirty(false);
|
|
57451
|
-
const
|
|
57452
|
-
|
|
57453
|
-
|
|
57454
|
-
|
|
57455
|
-
|
|
57456
|
-
|
|
57457
|
-
|
|
57504
|
+
const validatingTimer = setTimeout(() => {
|
|
57505
|
+
setShowSpinner(true);
|
|
57506
|
+
}, 300);
|
|
57507
|
+
try {
|
|
57508
|
+
const validationResult = await validate3(value2);
|
|
57509
|
+
if (validationResult !== true) {
|
|
57510
|
+
setValidationError(validationResult);
|
|
57511
|
+
} else {
|
|
57512
|
+
setValidationError(void 0);
|
|
57513
|
+
setInputState(InputState.Submitted(value2));
|
|
57514
|
+
onSubmit(value2);
|
|
57515
|
+
}
|
|
57516
|
+
} finally {
|
|
57517
|
+
clearTimeout(validatingTimer);
|
|
57518
|
+
setShowSpinner(false);
|
|
57458
57519
|
}
|
|
57459
57520
|
},
|
|
57460
57521
|
[onSubmit, validate3]
|
|
57461
57522
|
);
|
|
57462
57523
|
const afterValidationError = Boolean(validationError && !isDirty);
|
|
57463
|
-
(0,
|
|
57524
|
+
(0, import_react57.useEffect)(() => {
|
|
57464
57525
|
if (isActive) {
|
|
57465
57526
|
setInputState(InputState.NotSubmitted(inputState.value));
|
|
57466
57527
|
}
|
|
57467
57528
|
}, [isActive]);
|
|
57468
|
-
return /* @__PURE__ */
|
|
57529
|
+
return /* @__PURE__ */ import_react57.default.createElement(import_react57.default.Fragment, null, /* @__PURE__ */ import_react57.default.createElement(Box_default, { marginBottom: 1, marginLeft: inCreateFlow ? -2 : 0 }, /* @__PURE__ */ import_react57.default.createElement(Text2, null, /* @__PURE__ */ import_react57.default.createElement(
|
|
57469
57530
|
InputLabel,
|
|
57470
57531
|
{
|
|
57471
|
-
icon: /* @__PURE__ */
|
|
57532
|
+
icon: /* @__PURE__ */ import_react57.default.createElement(Text2, { skin: "question" }, /* @__PURE__ */ import_react57.default.createElement(PointerIcon, { appearance: "triangle" }))
|
|
57472
57533
|
},
|
|
57473
57534
|
label
|
|
57474
|
-
), (0, import_variant15.isType)(inputState, InputState.NotSubmitted) && /* @__PURE__ */
|
|
57535
|
+
), (0, import_variant15.isType)(inputState, InputState.NotSubmitted) && /* @__PURE__ */ import_react57.default.createElement(import_react57.default.Fragment, null, " ", /* @__PURE__ */ import_react57.default.createElement(Text2, { skin: afterValidationError ? "error" : "standard" }, /* @__PURE__ */ import_react57.default.createElement(
|
|
57475
57536
|
Input2,
|
|
57476
57537
|
{
|
|
57477
57538
|
placeholder: inputState.value,
|
|
@@ -57479,52 +57540,52 @@ var TextInput2 = ({
|
|
|
57479
57540
|
onChange: () => setIsDirty(true),
|
|
57480
57541
|
showCursor: afterValidationError
|
|
57481
57542
|
}
|
|
57482
|
-
))))), (0, import_variant15.isType)(inputState, InputState.Submitted) && /* @__PURE__ */
|
|
57543
|
+
))))), (0, import_variant15.isType)(inputState, InputState.Submitted) && /* @__PURE__ */ import_react57.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react57.default.createElement(Text2, { skin: "secondary" }, /* @__PURE__ */ import_react57.default.createElement(SuccessIcon, null), " ", inputState.value)), validationError && /* @__PURE__ */ import_react57.default.createElement(Box_default, { columnGap: 1 }, /* @__PURE__ */ import_react57.default.createElement(Text2, { skin: "error" }, /* @__PURE__ */ import_react57.default.createElement(PointerIcon, { appearance: "exclamation" })), /* @__PURE__ */ import_react57.default.createElement(Text2, { skin: "error" }, validationError)), showSpinner && /* @__PURE__ */ import_react57.default.createElement(Box_default, { columnGap: 1 }, /* @__PURE__ */ import_react57.default.createElement(Text2, { skin: "secondary" }, /* @__PURE__ */ import_react57.default.createElement(Spinner2, null), " ", "Validating...")));
|
|
57483
57544
|
};
|
|
57484
57545
|
|
|
57485
57546
|
// ../cli-ui-kit/src/components/Alert.tsx
|
|
57486
57547
|
init_esm_shims();
|
|
57487
|
-
var
|
|
57548
|
+
var import_react58 = __toESM(require_react(), 1);
|
|
57488
57549
|
var import_variant16 = __toESM(require_lib(), 1);
|
|
57489
57550
|
var Alert = ({ type, children }) => {
|
|
57490
57551
|
const icon = (0, import_variant16.match)(type, {
|
|
57491
57552
|
error: (0, import_variant16.constant)(
|
|
57492
|
-
/* @__PURE__ */
|
|
57553
|
+
/* @__PURE__ */ import_react58.default.createElement(Text2, { skin: "error" }, /* @__PURE__ */ import_react58.default.createElement(ErrorIcon, null))
|
|
57493
57554
|
),
|
|
57494
57555
|
warning: (0, import_variant16.constant)(
|
|
57495
|
-
/* @__PURE__ */
|
|
57556
|
+
/* @__PURE__ */ import_react58.default.createElement(Text2, { skin: "warning" }, /* @__PURE__ */ import_react58.default.createElement(WarningIcon, null))
|
|
57496
57557
|
),
|
|
57497
57558
|
success: (0, import_variant16.constant)(
|
|
57498
|
-
/* @__PURE__ */
|
|
57559
|
+
/* @__PURE__ */ import_react58.default.createElement(Text2, { skin: "success" }, /* @__PURE__ */ import_react58.default.createElement(SuccessIcon, null))
|
|
57499
57560
|
),
|
|
57500
|
-
insight: (0, import_variant16.constant)(/* @__PURE__ */
|
|
57561
|
+
insight: (0, import_variant16.constant)(/* @__PURE__ */ import_react58.default.createElement(InsightIcon, null))
|
|
57501
57562
|
});
|
|
57502
|
-
return /* @__PURE__ */
|
|
57563
|
+
return /* @__PURE__ */ import_react58.default.createElement(Text2, null, icon, " ", children);
|
|
57503
57564
|
};
|
|
57504
57565
|
|
|
57505
57566
|
// ../cli-ui-kit/src/components/Badge.tsx
|
|
57506
57567
|
init_esm_shims();
|
|
57507
|
-
var
|
|
57568
|
+
var import_react59 = __toESM(require_react(), 1);
|
|
57508
57569
|
var skins2 = {
|
|
57509
57570
|
success: { backgroundColor: "green" }
|
|
57510
57571
|
};
|
|
57511
57572
|
var Badge = ({ children, skin }) => {
|
|
57512
|
-
return /* @__PURE__ */
|
|
57573
|
+
return /* @__PURE__ */ import_react59.default.createElement(Text, { ...skins2[skin] }, " ", children, " ");
|
|
57513
57574
|
};
|
|
57514
57575
|
|
|
57515
57576
|
// ../cli-ui-kit/src/components/Key.tsx
|
|
57516
57577
|
init_esm_shims();
|
|
57517
|
-
var
|
|
57578
|
+
var import_react60 = __toESM(require_react(), 1);
|
|
57518
57579
|
var Key = ({ value: value2, skin }) => {
|
|
57519
57580
|
if (skin === "secondary") {
|
|
57520
|
-
return /* @__PURE__ */
|
|
57581
|
+
return /* @__PURE__ */ import_react60.default.createElement(Text, null, /* @__PURE__ */ import_react60.default.createElement(Text, { inverse: true }, " ", value2, " "), /* @__PURE__ */ import_react60.default.createElement(Text, null, "\u2591"));
|
|
57521
57582
|
}
|
|
57522
|
-
return /* @__PURE__ */
|
|
57583
|
+
return /* @__PURE__ */ import_react60.default.createElement(Text, null, /* @__PURE__ */ import_react60.default.createElement(Text, { backgroundColor: "blueBright" }, " ", value2, " "), /* @__PURE__ */ import_react60.default.createElement(Text, { color: "blueBright" }, "\u2591"));
|
|
57523
57584
|
};
|
|
57524
57585
|
|
|
57525
57586
|
// ../cli-ui-kit/src/components/Link.tsx
|
|
57526
57587
|
init_esm_shims();
|
|
57527
|
-
var
|
|
57588
|
+
var import_react61 = __toESM(require_react(), 1);
|
|
57528
57589
|
|
|
57529
57590
|
// ../../node_modules/terminal-link/index.js
|
|
57530
57591
|
init_esm_shims();
|
|
@@ -57671,52 +57732,17 @@ terminalLink.stderr.isSupported = import_supports_hyperlinks.default.stderr;
|
|
|
57671
57732
|
var Link = ({ skin, children, url }) => {
|
|
57672
57733
|
if (children) {
|
|
57673
57734
|
if (terminalLink.isSupported) {
|
|
57674
|
-
return /* @__PURE__ */
|
|
57735
|
+
return /* @__PURE__ */ import_react61.default.createElement(
|
|
57675
57736
|
Transform,
|
|
57676
57737
|
{
|
|
57677
57738
|
transform: (childrenAsString) => terminalLink(childrenAsString, url, { fallback: false })
|
|
57678
57739
|
},
|
|
57679
|
-
/* @__PURE__ */
|
|
57740
|
+
/* @__PURE__ */ import_react61.default.createElement(Text2, { skin }, children)
|
|
57680
57741
|
);
|
|
57681
57742
|
}
|
|
57682
|
-
return /* @__PURE__ */
|
|
57743
|
+
return /* @__PURE__ */ import_react61.default.createElement(Text2, null, /* @__PURE__ */ import_react61.default.createElement(Text2, { skin }, children), " (", url, ")");
|
|
57683
57744
|
}
|
|
57684
|
-
return /* @__PURE__ */
|
|
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);
|
|
57718
|
-
}
|
|
57719
|
-
return spinnerNode;
|
|
57745
|
+
return /* @__PURE__ */ import_react61.default.createElement(Text2, { skin: "info" }, url);
|
|
57720
57746
|
};
|
|
57721
57747
|
|
|
57722
57748
|
// ../cli-ui-kit/src/components/ErrorDetails.tsx
|
|
@@ -59140,9 +59166,9 @@ init_esm_shims();
|
|
|
59140
59166
|
var DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
|
|
59141
59167
|
function parseDateTimeSkeleton(skeleton) {
|
|
59142
59168
|
var result = {};
|
|
59143
|
-
skeleton.replace(DATE_TIME_REGEX, function(
|
|
59144
|
-
var len =
|
|
59145
|
-
switch (
|
|
59169
|
+
skeleton.replace(DATE_TIME_REGEX, function(match37) {
|
|
59170
|
+
var len = match37.length;
|
|
59171
|
+
switch (match37[0]) {
|
|
59146
59172
|
// Era
|
|
59147
59173
|
case "G":
|
|
59148
59174
|
result.era = len === 4 ? "long" : len === 5 ? "narrow" : "short";
|
|
@@ -61152,21 +61178,21 @@ if (REGEX_SUPPORTS_U_AND_Y) {
|
|
|
61152
61178
|
matchIdentifierAtIndex = function matchIdentifierAtIndex2(s2, index) {
|
|
61153
61179
|
var _a3;
|
|
61154
61180
|
IDENTIFIER_PREFIX_RE_1.lastIndex = index;
|
|
61155
|
-
var
|
|
61156
|
-
return (_a3 =
|
|
61181
|
+
var match37 = IDENTIFIER_PREFIX_RE_1.exec(s2);
|
|
61182
|
+
return (_a3 = match37[1]) !== null && _a3 !== void 0 ? _a3 : "";
|
|
61157
61183
|
};
|
|
61158
61184
|
} else {
|
|
61159
61185
|
matchIdentifierAtIndex = function matchIdentifierAtIndex2(s2, index) {
|
|
61160
|
-
var
|
|
61186
|
+
var match37 = [];
|
|
61161
61187
|
while (true) {
|
|
61162
61188
|
var c2 = codePointAt(s2, index);
|
|
61163
61189
|
if (c2 === void 0 || _isWhiteSpace(c2) || _isPatternSyntax(c2)) {
|
|
61164
61190
|
break;
|
|
61165
61191
|
}
|
|
61166
|
-
|
|
61192
|
+
match37.push(c2);
|
|
61167
61193
|
index += c2 >= 65536 ? 2 : 1;
|
|
61168
61194
|
}
|
|
61169
|
-
return fromCodePoint.apply(void 0,
|
|
61195
|
+
return fromCodePoint.apply(void 0, match37);
|
|
61170
61196
|
};
|
|
61171
61197
|
}
|
|
61172
61198
|
var IDENTIFIER_PREFIX_RE_1;
|
|
@@ -63589,7 +63615,7 @@ var Interpolator = class {
|
|
|
63589
63615
|
this.nestingRegexp = getOrResetRegExp(this.nestingRegexp, `${this.nestingPrefix}(.+?)${this.nestingSuffix}`);
|
|
63590
63616
|
}
|
|
63591
63617
|
interpolate(str, data, lng, options) {
|
|
63592
|
-
let
|
|
63618
|
+
let match37;
|
|
63593
63619
|
let value2;
|
|
63594
63620
|
let replaces;
|
|
63595
63621
|
const defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
|
|
@@ -63623,17 +63649,17 @@ var Interpolator = class {
|
|
|
63623
63649
|
}];
|
|
63624
63650
|
todos.forEach((todo) => {
|
|
63625
63651
|
replaces = 0;
|
|
63626
|
-
while (
|
|
63627
|
-
const matchedVar =
|
|
63652
|
+
while (match37 = todo.regex.exec(str)) {
|
|
63653
|
+
const matchedVar = match37[1].trim();
|
|
63628
63654
|
value2 = handleFormat(matchedVar);
|
|
63629
63655
|
if (value2 === void 0) {
|
|
63630
63656
|
if (typeof missingInterpolationHandler === "function") {
|
|
63631
|
-
const temp = missingInterpolationHandler(str,
|
|
63657
|
+
const temp = missingInterpolationHandler(str, match37, options);
|
|
63632
63658
|
value2 = isString2(temp) ? temp : "";
|
|
63633
63659
|
} else if (options && Object.prototype.hasOwnProperty.call(options, matchedVar)) {
|
|
63634
63660
|
value2 = "";
|
|
63635
63661
|
} else if (skipOnVariables) {
|
|
63636
|
-
value2 =
|
|
63662
|
+
value2 = match37[0];
|
|
63637
63663
|
continue;
|
|
63638
63664
|
} else {
|
|
63639
63665
|
this.logger.warn(`missed to pass in variable ${matchedVar} for interpolating ${str}`);
|
|
@@ -63643,10 +63669,10 @@ var Interpolator = class {
|
|
|
63643
63669
|
value2 = makeString(value2);
|
|
63644
63670
|
}
|
|
63645
63671
|
const safeValue = todo.safeValue(value2);
|
|
63646
|
-
str = str.replace(
|
|
63672
|
+
str = str.replace(match37[0], safeValue);
|
|
63647
63673
|
if (skipOnVariables) {
|
|
63648
63674
|
todo.regex.lastIndex += value2.length;
|
|
63649
|
-
todo.regex.lastIndex -=
|
|
63675
|
+
todo.regex.lastIndex -= match37[0].length;
|
|
63650
63676
|
} else {
|
|
63651
63677
|
todo.regex.lastIndex = 0;
|
|
63652
63678
|
}
|
|
@@ -63660,7 +63686,7 @@ var Interpolator = class {
|
|
|
63660
63686
|
}
|
|
63661
63687
|
nest(str, fc) {
|
|
63662
63688
|
let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
63663
|
-
let
|
|
63689
|
+
let match37;
|
|
63664
63690
|
let value2;
|
|
63665
63691
|
let clonedOptions;
|
|
63666
63692
|
const handleHasOptions = (key, inheritedOptions) => {
|
|
@@ -63688,7 +63714,7 @@ var Interpolator = class {
|
|
|
63688
63714
|
if (clonedOptions.defaultValue && clonedOptions.defaultValue.indexOf(this.prefix) > -1) delete clonedOptions.defaultValue;
|
|
63689
63715
|
return key;
|
|
63690
63716
|
};
|
|
63691
|
-
while (
|
|
63717
|
+
while (match37 = this.nestingRegexp.exec(str)) {
|
|
63692
63718
|
let formatters = [];
|
|
63693
63719
|
clonedOptions = {
|
|
63694
63720
|
...options
|
|
@@ -63697,26 +63723,26 @@ var Interpolator = class {
|
|
|
63697
63723
|
clonedOptions.applyPostProcessor = false;
|
|
63698
63724
|
delete clonedOptions.defaultValue;
|
|
63699
63725
|
let doReduce = false;
|
|
63700
|
-
if (
|
|
63701
|
-
const r2 =
|
|
63702
|
-
|
|
63726
|
+
if (match37[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(match37[1])) {
|
|
63727
|
+
const r2 = match37[1].split(this.formatSeparator).map((elem) => elem.trim());
|
|
63728
|
+
match37[1] = r2.shift();
|
|
63703
63729
|
formatters = r2;
|
|
63704
63730
|
doReduce = true;
|
|
63705
63731
|
}
|
|
63706
|
-
value2 = fc(handleHasOptions.call(this,
|
|
63707
|
-
if (value2 &&
|
|
63732
|
+
value2 = fc(handleHasOptions.call(this, match37[1].trim(), clonedOptions), clonedOptions);
|
|
63733
|
+
if (value2 && match37[0] === str && !isString2(value2)) return value2;
|
|
63708
63734
|
if (!isString2(value2)) value2 = makeString(value2);
|
|
63709
63735
|
if (!value2) {
|
|
63710
|
-
this.logger.warn(`missed to resolve ${
|
|
63736
|
+
this.logger.warn(`missed to resolve ${match37[1]} for nesting ${str}`);
|
|
63711
63737
|
value2 = "";
|
|
63712
63738
|
}
|
|
63713
63739
|
if (doReduce) {
|
|
63714
63740
|
value2 = formatters.reduce((v, f) => this.format(v, f, options.lng, {
|
|
63715
63741
|
...options,
|
|
63716
|
-
interpolationkey:
|
|
63742
|
+
interpolationkey: match37[1].trim()
|
|
63717
63743
|
}), value2.trim());
|
|
63718
63744
|
}
|
|
63719
|
-
str = str.replace(
|
|
63745
|
+
str = str.replace(match37[0], value2);
|
|
63720
63746
|
this.regexp.lastIndex = 0;
|
|
63721
63747
|
}
|
|
63722
63748
|
return str;
|
|
@@ -64839,8 +64865,8 @@ async function defaultBrowserId() {
|
|
|
64839
64865
|
throw new Error("macOS only");
|
|
64840
64866
|
}
|
|
64841
64867
|
const { stdout } = await execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]);
|
|
64842
|
-
const
|
|
64843
|
-
return
|
|
64868
|
+
const match37 = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
|
|
64869
|
+
return match37?.groups.id ?? "com.apple.Safari";
|
|
64844
64870
|
}
|
|
64845
64871
|
|
|
64846
64872
|
// ../../node_modules/bundle-name/index.js
|
|
@@ -64894,11 +64920,11 @@ async function defaultBrowser(_execFileAsync = execFileAsync3) {
|
|
|
64894
64920
|
"/v",
|
|
64895
64921
|
"ProgId"
|
|
64896
64922
|
]);
|
|
64897
|
-
const
|
|
64898
|
-
if (!
|
|
64923
|
+
const match37 = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
|
|
64924
|
+
if (!match37) {
|
|
64899
64925
|
throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
|
|
64900
64926
|
}
|
|
64901
|
-
const { id } =
|
|
64927
|
+
const { id } = match37.groups;
|
|
64902
64928
|
const browser = windowsBrowserProgIds[id];
|
|
64903
64929
|
if (!browser) {
|
|
64904
64930
|
throw new UnknownBrowserError(`Unknown browser ID: ${id}`);
|
|
@@ -65333,9 +65359,9 @@ var reDetectIndentation = /(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/;
|
|
|
65333
65359
|
var reOnlyWhitespaceWithAtLeastOneNewline = /^[ \t]*[\r\n][ \t\r\n]*$/;
|
|
65334
65360
|
function _outdentArray(strings, firstInterpolatedValueSetsIndentationLevel, options) {
|
|
65335
65361
|
var indentationLevel = 0;
|
|
65336
|
-
var
|
|
65337
|
-
if (
|
|
65338
|
-
indentationLevel =
|
|
65362
|
+
var match37 = strings[0].match(reDetectIndentation);
|
|
65363
|
+
if (match37) {
|
|
65364
|
+
indentationLevel = match37[1].length;
|
|
65339
65365
|
}
|
|
65340
65366
|
var reSource = "(\\r\\n|\\r|\\n).{0," + indentationLevel + "}";
|
|
65341
65367
|
var reMatchIndent = new RegExp(reSource, "g");
|
|
@@ -67087,6 +67113,12 @@ ${errorMessage2}`
|
|
|
67087
67113
|
message: "The development command failed to execute. Please review the output log above for details."
|
|
67088
67114
|
}
|
|
67089
67115
|
);
|
|
67116
|
+
},
|
|
67117
|
+
FailedToSetCodeIdentifier: () => {
|
|
67118
|
+
return () => /* @__PURE__ */ import_react82.default.createElement(ErrorMessage, { cause, message: "Failed to set code identifier." });
|
|
67119
|
+
},
|
|
67120
|
+
FailedToSetNamespace: () => {
|
|
67121
|
+
return () => /* @__PURE__ */ import_react82.default.createElement(ErrorMessage, { cause, message: "Failed to set namespace." });
|
|
67090
67122
|
}
|
|
67091
67123
|
});
|
|
67092
67124
|
}
|
|
@@ -67736,8 +67768,8 @@ var LINUX_VERSIONS = {
|
|
|
67736
67768
|
ubuntu: (content) => matchFirst(/distrib_release=(.*)/, content)
|
|
67737
67769
|
};
|
|
67738
67770
|
function matchFirst(regex2, text) {
|
|
67739
|
-
const
|
|
67740
|
-
return
|
|
67771
|
+
const match37 = regex2.exec(text);
|
|
67772
|
+
return match37 ? match37[1] : void 0;
|
|
67741
67773
|
}
|
|
67742
67774
|
async function getDarwinInfo() {
|
|
67743
67775
|
const darwinInfo = {
|
|
@@ -70403,7 +70435,7 @@ function getErrorLogFilePath(cwd3) {
|
|
|
70403
70435
|
|
|
70404
70436
|
// ../create-new-packages/app-command/src/index.tsx
|
|
70405
70437
|
init_esm_shims();
|
|
70406
|
-
var
|
|
70438
|
+
var import_react131 = __toESM(require_react(), 1);
|
|
70407
70439
|
|
|
70408
70440
|
// ../cli-http-client-react/src/index.ts
|
|
70409
70441
|
init_esm_shims();
|
|
@@ -71927,8 +71959,8 @@ var createBiLogger2 = async ({
|
|
|
71927
71959
|
|
|
71928
71960
|
// ../create-new-packages/app-command/src/components/CreateAppCommand.tsx
|
|
71929
71961
|
init_esm_shims();
|
|
71930
|
-
var
|
|
71931
|
-
var
|
|
71962
|
+
var import_react130 = __toESM(require_react(), 1);
|
|
71963
|
+
var import_variant45 = __toESM(require_lib(), 1);
|
|
71932
71964
|
|
|
71933
71965
|
// ../create-new-packages/app-command/src/components/WelcomeMessage.tsx
|
|
71934
71966
|
init_esm_shims();
|
|
@@ -71966,14 +71998,15 @@ var AuthProvider2 = ({ userInfo: userInfo2, children }) => {
|
|
|
71966
71998
|
|
|
71967
71999
|
// ../create-new-packages/app-command/src/components/Questions/Questions.tsx
|
|
71968
72000
|
init_esm_shims();
|
|
71969
|
-
var
|
|
71970
|
-
var
|
|
72001
|
+
var import_react125 = __toESM(require_react(), 1);
|
|
72002
|
+
var import_variant42 = __toESM(require_lib(), 1);
|
|
71971
72003
|
|
|
71972
72004
|
// ../dev-center-client/src/index.ts
|
|
71973
72005
|
init_esm_shims();
|
|
71974
72006
|
|
|
71975
72007
|
// ../dev-center-client/src/dev-center-client.ts
|
|
71976
72008
|
init_esm_shims();
|
|
72009
|
+
var import_variant26 = __toESM(require_lib(), 1);
|
|
71977
72010
|
|
|
71978
72011
|
// ../../node_modules/@wix/ambassador-devcenter-apps-v1-app-old/es/build/http.impl.js
|
|
71979
72012
|
init_esm_shims();
|
|
@@ -72679,10 +72712,14 @@ function getAppByVersion(payload7) {
|
|
|
72679
72712
|
return __getAppByVersion;
|
|
72680
72713
|
}
|
|
72681
72714
|
|
|
72682
|
-
// ../../node_modules/@wix/ambassador-devcenter-apps-v1-app/build/
|
|
72715
|
+
// ../../node_modules/@wix/ambassador-devcenter-apps-v1-app/es/build/http.impl.js
|
|
72683
72716
|
init_esm_shims();
|
|
72684
72717
|
var _queryAppRequest = {};
|
|
72685
72718
|
var _queryAppResponse = { apps: "_v1App" };
|
|
72719
|
+
var _setCodeIdentifierRequest = {};
|
|
72720
|
+
var _setCodeIdentifierResponse = {};
|
|
72721
|
+
var _setNamespaceRequest = {};
|
|
72722
|
+
var _setNamespaceResponse = {};
|
|
72686
72723
|
var _v1App = {
|
|
72687
72724
|
createdDate: "google.protobuf.Timestamp",
|
|
72688
72725
|
updatedDate: "google.protobuf.Timestamp"
|
|
@@ -72828,6 +72865,60 @@ function getApp(payload7) {
|
|
|
72828
72865
|
__getApp.__isAmbassador = true;
|
|
72829
72866
|
return __getApp;
|
|
72830
72867
|
}
|
|
72868
|
+
function setNamespace(payload7) {
|
|
72869
|
+
var _a3 = serializer(_setNamespaceRequest, {}), toReq = _a3.toJSON, fromReq = _a3.fromJSON;
|
|
72870
|
+
var fromRes = serializer(_setNamespaceResponse, {}).fromJSON;
|
|
72871
|
+
function __setNamespace(_a4) {
|
|
72872
|
+
var host = _a4.host;
|
|
72873
|
+
var serializedData = toReq(payload7);
|
|
72874
|
+
var metadata = {
|
|
72875
|
+
entityFqdn: "wix.devcenter.apps.v1.app",
|
|
72876
|
+
method: "PATCH",
|
|
72877
|
+
methodFqn: "wix.devcenter.apps.v1.AppsService.SetNamespace",
|
|
72878
|
+
migrationOptions: {
|
|
72879
|
+
optInTransformResponse: true
|
|
72880
|
+
},
|
|
72881
|
+
url: resolveWixDevcenterAppsV1AppsServiceUrl({
|
|
72882
|
+
protoPath: "/v1/apps/{appId}/set-namespace",
|
|
72883
|
+
data: serializedData,
|
|
72884
|
+
host
|
|
72885
|
+
}),
|
|
72886
|
+
data: serializedData,
|
|
72887
|
+
transformResponse: fromRes
|
|
72888
|
+
};
|
|
72889
|
+
return metadata;
|
|
72890
|
+
}
|
|
72891
|
+
__setNamespace.fromReq = fromReq;
|
|
72892
|
+
__setNamespace.__isAmbassador = true;
|
|
72893
|
+
return __setNamespace;
|
|
72894
|
+
}
|
|
72895
|
+
function setCodeIdentifier(payload7) {
|
|
72896
|
+
var _a3 = serializer(_setCodeIdentifierRequest, {}), toReq = _a3.toJSON, fromReq = _a3.fromJSON;
|
|
72897
|
+
var fromRes = serializer(_setCodeIdentifierResponse, {}).fromJSON;
|
|
72898
|
+
function __setCodeIdentifier(_a4) {
|
|
72899
|
+
var host = _a4.host;
|
|
72900
|
+
var serializedData = toReq(payload7);
|
|
72901
|
+
var metadata = {
|
|
72902
|
+
entityFqdn: "wix.devcenter.apps.v1.app",
|
|
72903
|
+
method: "PATCH",
|
|
72904
|
+
methodFqn: "wix.devcenter.apps.v1.AppsService.SetCodeIdentifier",
|
|
72905
|
+
migrationOptions: {
|
|
72906
|
+
optInTransformResponse: true
|
|
72907
|
+
},
|
|
72908
|
+
url: resolveWixDevcenterAppsV1AppsServiceUrl({
|
|
72909
|
+
protoPath: "/v1/apps/{appId}/set-code-identifier",
|
|
72910
|
+
data: serializedData,
|
|
72911
|
+
host
|
|
72912
|
+
}),
|
|
72913
|
+
data: serializedData,
|
|
72914
|
+
transformResponse: fromRes
|
|
72915
|
+
};
|
|
72916
|
+
return metadata;
|
|
72917
|
+
}
|
|
72918
|
+
__setCodeIdentifier.fromReq = fromReq;
|
|
72919
|
+
__setCodeIdentifier.__isAmbassador = true;
|
|
72920
|
+
return __setCodeIdentifier;
|
|
72921
|
+
}
|
|
72831
72922
|
function queryApp(payload7) {
|
|
72832
72923
|
var _a3 = serializer(_queryAppRequest, {}), toReq = _a3.toJSON, fromReq = _a3.fromJSON;
|
|
72833
72924
|
var fromRes = serializer(_queryAppResponse, { _v1App }).fromJSON;
|
|
@@ -79924,6 +80015,14 @@ var listShareUrlsSchema = external_exports.object({
|
|
|
79924
80015
|
|
|
79925
80016
|
// ../dev-center-client/src/dev-center-client.ts
|
|
79926
80017
|
var EMPTY_SITE_TEMPLATE = "24bafe8a-7c80-4b63-8a71-08752062f246";
|
|
80018
|
+
var SetCodeIdentifierResult = (0, import_variant26.variant)({
|
|
80019
|
+
Success: {},
|
|
80020
|
+
ShouldBeUnique: (0, import_variant26.fields)()
|
|
80021
|
+
});
|
|
80022
|
+
var SetNamespaceResult = (0, import_variant26.variant)({
|
|
80023
|
+
Success: {},
|
|
80024
|
+
ShouldBeUnique: (0, import_variant26.fields)()
|
|
80025
|
+
});
|
|
79927
80026
|
var DevCenterClient = class {
|
|
79928
80027
|
constructor(httpClient) {
|
|
79929
80028
|
this.httpClient = httpClient;
|
|
@@ -79975,6 +80074,41 @@ var DevCenterClient = class {
|
|
|
79975
80074
|
});
|
|
79976
80075
|
}
|
|
79977
80076
|
};
|
|
80077
|
+
setNamespace = async ({ appId, namespace }) => {
|
|
80078
|
+
try {
|
|
80079
|
+
await this.httpClient.request(
|
|
80080
|
+
setNamespace({ appId, appName: namespace })
|
|
80081
|
+
);
|
|
80082
|
+
return SetNamespaceResult.Success();
|
|
80083
|
+
} catch (e2) {
|
|
80084
|
+
if (isHttpError(e2) && e2.response?.status === 409 && isHttpApplicationError(e2) && e2.response.data.details.applicationError.code === "ALREADY_EXISTS") {
|
|
80085
|
+
return SetNamespaceResult.ShouldBeUnique({ namespace });
|
|
80086
|
+
}
|
|
80087
|
+
throw new CliError({
|
|
80088
|
+
code: CliErrorCode.FailedToSetNamespace(),
|
|
80089
|
+
cause: e2
|
|
80090
|
+
});
|
|
80091
|
+
}
|
|
80092
|
+
};
|
|
80093
|
+
setCodeIdentifier = async ({
|
|
80094
|
+
appId,
|
|
80095
|
+
codeIdentifier
|
|
80096
|
+
}) => {
|
|
80097
|
+
try {
|
|
80098
|
+
await this.httpClient.request(
|
|
80099
|
+
setCodeIdentifier({ appId, codeIdentifier })
|
|
80100
|
+
);
|
|
80101
|
+
return SetCodeIdentifierResult.Success();
|
|
80102
|
+
} catch (e2) {
|
|
80103
|
+
if (isHttpError(e2) && e2.response?.status === 409 && isHttpApplicationError(e2) && e2.response.data.details.applicationError.code === "ALREADY_EXISTS") {
|
|
80104
|
+
return SetCodeIdentifierResult.ShouldBeUnique({ codeIdentifier });
|
|
80105
|
+
}
|
|
80106
|
+
throw new CliError({
|
|
80107
|
+
code: CliErrorCode.FailedToSetCodeIdentifier(),
|
|
80108
|
+
cause: e2
|
|
80109
|
+
});
|
|
80110
|
+
}
|
|
80111
|
+
};
|
|
79978
80112
|
createOAuthApp = async (oAuthApp) => {
|
|
79979
80113
|
try {
|
|
79980
80114
|
const { data } = await this.httpClient.request(
|
|
@@ -80369,7 +80503,7 @@ function useDevCenterClient({
|
|
|
80369
80503
|
|
|
80370
80504
|
// ../create-new-packages/app-command/src/parse-command-options.ts
|
|
80371
80505
|
init_esm_shims();
|
|
80372
|
-
var
|
|
80506
|
+
var import_variant28 = __toESM(require_lib(), 1);
|
|
80373
80507
|
var import_kebabCase2 = __toESM(require_kebabCase(), 1);
|
|
80374
80508
|
import { join as join8, resolve as resolve3 } from "node:path";
|
|
80375
80509
|
|
|
@@ -80402,11 +80536,11 @@ var import_validate_npm_package_name = __toESM(require_lib2(), 1);
|
|
|
80402
80536
|
|
|
80403
80537
|
// ../create-new-packages/app-command/src/validations/result.ts
|
|
80404
80538
|
init_esm_shims();
|
|
80405
|
-
var
|
|
80406
|
-
var Result = (0,
|
|
80407
|
-
(0,
|
|
80408
|
-
Error: (0,
|
|
80409
|
-
Ok:
|
|
80539
|
+
var import_variant27 = __toESM(require_lib(), 1);
|
|
80540
|
+
var Result = (0, import_variant27.variant)(
|
|
80541
|
+
(0, import_variant27.onTerms)(({ T }) => ({
|
|
80542
|
+
Error: (0, import_variant27.payload)(T),
|
|
80543
|
+
Ok: import_variant27.nil
|
|
80410
80544
|
}))
|
|
80411
80545
|
);
|
|
80412
80546
|
|
|
@@ -80467,12 +80601,43 @@ function validateAppName(value2) {
|
|
|
80467
80601
|
throw new InvalidArgumentError(result);
|
|
80468
80602
|
}
|
|
80469
80603
|
|
|
80604
|
+
// ../create-new-packages/app-command/src/validations/validate-namespace.ts
|
|
80605
|
+
init_esm_shims();
|
|
80606
|
+
var namespaceSchema = external_exports.string().min(1, "Namespace is required").max(150, "Namespace must be at most 150 characters").regex(
|
|
80607
|
+
/^[a-zA-Z0-9]([a-zA-Z0-9._-]*[a-zA-Z0-9])?$/,
|
|
80608
|
+
"Namespace can only contain letters, numbers, dots, hyphens and underscores"
|
|
80609
|
+
);
|
|
80610
|
+
function validateNamespace(value2) {
|
|
80611
|
+
const result = namespaceSchema.safeParse(value2);
|
|
80612
|
+
if (result.success) {
|
|
80613
|
+
return true;
|
|
80614
|
+
}
|
|
80615
|
+
const first = result.error.errors[0];
|
|
80616
|
+
return first?.message ?? "Invalid namespace";
|
|
80617
|
+
}
|
|
80618
|
+
|
|
80619
|
+
// ../create-new-packages/app-command/src/validations/validate-code-identifier.ts
|
|
80620
|
+
init_esm_shims();
|
|
80621
|
+
var CODE_IDENTIFIER_REGEX = /^(?!\d)[A-Za-z_$][A-Za-z0-9_$]*$/;
|
|
80622
|
+
var codeIdentifierSchema = external_exports.string().min(3, "Code identifier must be at least 3 characters").max(150, "Code identifier must be at most 150 characters").regex(
|
|
80623
|
+
CODE_IDENTIFIER_REGEX,
|
|
80624
|
+
'Code identifier must start with a letter, "_" or "$" and contain only letters, numbers, "_" or "$"'
|
|
80625
|
+
);
|
|
80626
|
+
function validateCodeIdentifier(value2) {
|
|
80627
|
+
const result = codeIdentifierSchema.safeParse(value2);
|
|
80628
|
+
if (result.success) {
|
|
80629
|
+
return true;
|
|
80630
|
+
}
|
|
80631
|
+
const first = result.error.errors[0];
|
|
80632
|
+
return first?.message ?? "Invalid code identifier";
|
|
80633
|
+
}
|
|
80634
|
+
|
|
80470
80635
|
// ../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,
|
|
80636
|
+
var TemplateSource = (0, import_variant28.variant)({
|
|
80637
|
+
App: (0, import_variant28.payload)(),
|
|
80638
|
+
GitRepo: (0, import_variant28.fields)(),
|
|
80639
|
+
Local: (0, import_variant28.fields)(),
|
|
80640
|
+
Default: (0, import_variant28.constant)({ path: resolve3(__dirname, "../templates/app/blank") })
|
|
80476
80641
|
});
|
|
80477
80642
|
async function parseTemplateOptions(options, { devCenterClient }) {
|
|
80478
80643
|
if (options.template) {
|
|
@@ -80505,8 +80670,8 @@ async function parseTemplateOptions(options, { devCenterClient }) {
|
|
|
80505
80670
|
return TemplateSource.Local({ path: options.templatePath });
|
|
80506
80671
|
}
|
|
80507
80672
|
}
|
|
80508
|
-
var AppNameOptions = (0,
|
|
80509
|
-
Provided: (0,
|
|
80673
|
+
var AppNameOptions = (0, import_variant28.variant)({
|
|
80674
|
+
Provided: (0, import_variant28.fields)(),
|
|
80510
80675
|
Missing: {}
|
|
80511
80676
|
});
|
|
80512
80677
|
async function parseAppNameOptions(targetParentFolder2, options) {
|
|
@@ -80522,7 +80687,7 @@ async function parseAppNameOptions(targetParentFolder2, options) {
|
|
|
80522
80687
|
});
|
|
80523
80688
|
}
|
|
80524
80689
|
const npmValidationErrors = await validatePackageName(packageName);
|
|
80525
|
-
if ((0,
|
|
80690
|
+
if ((0, import_variant28.isType)(npmValidationErrors, "Error")) {
|
|
80526
80691
|
throw new CliError({
|
|
80527
80692
|
code: CliErrorCode.AppNameArgumentIsInvalid({
|
|
80528
80693
|
errorMessage: `Invalid package name "${packageName}". Please fix the following issues: ${npmValidationErrors.payload.join(", ")}`
|
|
@@ -80537,7 +80702,7 @@ async function parseAppNameOptions(targetParentFolder2, options) {
|
|
|
80537
80702
|
async function parseCommandOptions(targetParentFolder2, options, clients) {
|
|
80538
80703
|
const template = await parseTemplateOptions(options, clients);
|
|
80539
80704
|
const appNameOptions = await parseAppNameOptions(targetParentFolder2, options);
|
|
80540
|
-
if ((0,
|
|
80705
|
+
if ((0, import_variant28.isType)(appNameOptions, "Provided") && !template) {
|
|
80541
80706
|
throw new CliError({
|
|
80542
80707
|
code: CliErrorCode.AppNameArgumentIsInvalid({
|
|
80543
80708
|
errorMessage: "An application name was provided, but no template was specified. Please specify a template when defining the application name."
|
|
@@ -80550,8 +80715,8 @@ async function parseCommandOptions(targetParentFolder2, options, clients) {
|
|
|
80550
80715
|
|
|
80551
80716
|
// ../create-new-packages/app-command/src/types.ts
|
|
80552
80717
|
init_esm_shims();
|
|
80553
|
-
var
|
|
80554
|
-
var DeveloperAppsStatus = (0,
|
|
80718
|
+
var import_variant29 = __toESM(require_lib(), 1);
|
|
80719
|
+
var DeveloperAppsStatus = (0, import_variant29.variant)({
|
|
80555
80720
|
NoApps: {},
|
|
80556
80721
|
FailedLoadingApps: {},
|
|
80557
80722
|
Available: {}
|
|
@@ -80560,16 +80725,16 @@ var DeveloperAppsStatus = (0, import_variant28.variant)({
|
|
|
80560
80725
|
// ../create-new-packages/app-command/src/components/CreateAppOrExtendExisting.tsx
|
|
80561
80726
|
init_esm_shims();
|
|
80562
80727
|
var import_react106 = __toESM(require_react(), 1);
|
|
80563
|
-
var
|
|
80728
|
+
var import_variant30 = __toESM(require_lib(), 1);
|
|
80564
80729
|
var CreateAppOrExtendExisting = ({
|
|
80565
80730
|
developerAppsStatus,
|
|
80566
80731
|
onStartCreationFlow
|
|
80567
80732
|
}) => {
|
|
80568
80733
|
const { t: t3 } = useTranslation();
|
|
80569
80734
|
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
80570
|
-
const exisitingAvailabilty = (0,
|
|
80735
|
+
const exisitingAvailabilty = (0, import_variant30.match)(
|
|
80571
80736
|
developerAppsStatus,
|
|
80572
|
-
(0,
|
|
80737
|
+
(0, import_variant30.lookup)({
|
|
80573
80738
|
FailedLoadingApps: SelectOptionAvailability.Disabled({
|
|
80574
80739
|
reason: t3("create_app.create_new_or_extend.failed_fetching_apps")
|
|
80575
80740
|
}),
|
|
@@ -80607,17 +80772,530 @@ var CreateAppOrExtendExisting = ({
|
|
|
80607
80772
|
));
|
|
80608
80773
|
};
|
|
80609
80774
|
|
|
80610
|
-
// ../create-new-packages/app-command/src/components/Questions/NewAppFlow.tsx
|
|
80775
|
+
// ../create-new-packages/app-command/src/components/Questions/NewAppFlow/RegularFlow.tsx
|
|
80776
|
+
init_esm_shims();
|
|
80777
|
+
var import_react120 = __toESM(require_react(), 1);
|
|
80778
|
+
var import_variant38 = __toESM(require_lib(), 1);
|
|
80779
|
+
|
|
80780
|
+
// ../create-new-packages/app-command/src/components/ChooseAppName.tsx
|
|
80781
|
+
init_esm_shims();
|
|
80782
|
+
var import_react107 = __toESM(require_react(), 1);
|
|
80783
|
+
var ChooseAppName = ({ onSubmit }) => {
|
|
80784
|
+
const { t: t3 } = useTranslation();
|
|
80785
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
80786
|
+
return /* @__PURE__ */ import_react107.default.createElement(
|
|
80787
|
+
TextInput2,
|
|
80788
|
+
{
|
|
80789
|
+
label: t3("create_app.create_new.name_of_app.label"),
|
|
80790
|
+
placeholder: t3("create_app.create_new.name_of_app.placeholder"),
|
|
80791
|
+
validate: validateAppNameSafe,
|
|
80792
|
+
onSubmit: (appName) => {
|
|
80793
|
+
cliFlowStepAnswered({
|
|
80794
|
+
question: t3("create_app.create_new.name_of_app.label"),
|
|
80795
|
+
questionKey: "create_app.create_new.name_of_app.label",
|
|
80796
|
+
answer: appName
|
|
80797
|
+
});
|
|
80798
|
+
onSubmit(appName);
|
|
80799
|
+
},
|
|
80800
|
+
inCreateFlow: true
|
|
80801
|
+
}
|
|
80802
|
+
);
|
|
80803
|
+
};
|
|
80804
|
+
|
|
80805
|
+
// ../create-new-packages/app-command/src/components/ChoosePackageName.tsx
|
|
80806
|
+
init_esm_shims();
|
|
80807
|
+
var import_react109 = __toESM(require_react(), 1);
|
|
80808
|
+
var import_variant31 = __toESM(require_lib(), 1);
|
|
80809
|
+
import { join as join9, relative } from "node:path";
|
|
80810
|
+
var import_kebabCase3 = __toESM(require_kebabCase(), 1);
|
|
80811
|
+
|
|
80812
|
+
// ../create-new-packages/app-command/src/components/ConfirmPackagePath.tsx
|
|
80813
|
+
init_esm_shims();
|
|
80814
|
+
var import_react108 = __toESM(require_react(), 1);
|
|
80815
|
+
var ConfirmPackagePath = ({
|
|
80816
|
+
path: path4,
|
|
80817
|
+
onSubmit
|
|
80818
|
+
}) => {
|
|
80819
|
+
const { t: t3 } = useTranslation();
|
|
80820
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
80821
|
+
const [cancelled, setCancelled] = (0, import_react108.useState)(false);
|
|
80822
|
+
return /* @__PURE__ */ import_react108.default.createElement(import_react108.default.Fragment, null, /* @__PURE__ */ import_react108.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react108.default.createElement(
|
|
80823
|
+
ConfirmInput,
|
|
80824
|
+
{
|
|
80825
|
+
label: t3("create_app.confirm_path_message", {
|
|
80826
|
+
path: path4
|
|
80827
|
+
}),
|
|
80828
|
+
initialValue: true,
|
|
80829
|
+
onSubmit: (confirmation) => {
|
|
80830
|
+
cliFlowStepAnswered({
|
|
80831
|
+
question: t3("create_app.confirm_path.title"),
|
|
80832
|
+
questionKey: "create_app.confirm_path.title",
|
|
80833
|
+
answer: String(confirmation)
|
|
80834
|
+
});
|
|
80835
|
+
onSubmit(confirmation);
|
|
80836
|
+
if (!confirmation) {
|
|
80837
|
+
setCancelled(true);
|
|
80838
|
+
}
|
|
80839
|
+
}
|
|
80840
|
+
}
|
|
80841
|
+
)), cancelled && /* @__PURE__ */ import_react108.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react108.default.createElement(Text2, null, t3("create_app.confirm_path_exit_message"))));
|
|
80842
|
+
};
|
|
80843
|
+
|
|
80844
|
+
// ../create-new-packages/app-command/src/components/ChoosePackageName.tsx
|
|
80845
|
+
var ChoosePackageName = ({
|
|
80846
|
+
appName,
|
|
80847
|
+
targetParentFolder: targetParentFolder2,
|
|
80848
|
+
repoType: repoType2,
|
|
80849
|
+
onSelected
|
|
80850
|
+
}) => {
|
|
80851
|
+
const { t: t3 } = useTranslation();
|
|
80852
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
80853
|
+
const [packageName, setPackageName] = (0, import_react109.useState)();
|
|
80854
|
+
const defaultPackageName = (0, import_react109.useMemo)(() => {
|
|
80855
|
+
return (0, import_kebabCase3.default)(appName);
|
|
80856
|
+
}, [appName]);
|
|
80857
|
+
const isMonorepo = (0, import_variant31.isType)(repoType2, RepoType.Monorepo);
|
|
80858
|
+
async function validate3(packageName2) {
|
|
80859
|
+
if (!await validateDirectory(join9(targetParentFolder2, packageName2))) {
|
|
80860
|
+
return t3("validation_errors.invalid_directory");
|
|
80861
|
+
}
|
|
80862
|
+
const npmValidationErrors = await validatePackageName(packageName2);
|
|
80863
|
+
return (0, import_variant31.match)(npmValidationErrors, {
|
|
80864
|
+
Ok: () => true,
|
|
80865
|
+
Error: ({ payload: payload7 }) => t3("validation_errors.invalid_package_name", {
|
|
80866
|
+
errors: payload7.join(", ")
|
|
80867
|
+
})
|
|
80868
|
+
});
|
|
80869
|
+
}
|
|
80870
|
+
const handlePackageNameSet = (0, import_react109.useCallback)(
|
|
80871
|
+
(packageName2) => {
|
|
80872
|
+
cliFlowStepAnswered({
|
|
80873
|
+
question: t3("create_app.choose_package_name.label"),
|
|
80874
|
+
questionKey: "create_app.choose_package_name.label",
|
|
80875
|
+
answer: packageName2
|
|
80876
|
+
});
|
|
80877
|
+
if (isMonorepo) {
|
|
80878
|
+
setPackageName(packageName2);
|
|
80879
|
+
} else {
|
|
80880
|
+
onSelected(packageName2);
|
|
80881
|
+
}
|
|
80882
|
+
},
|
|
80883
|
+
[cliFlowStepAnswered, setPackageName, onSelected, isMonorepo, t3]
|
|
80884
|
+
);
|
|
80885
|
+
const handlePackagePathConfirm = (0, import_react109.useCallback)(
|
|
80886
|
+
(packageName2, isConfirmed) => {
|
|
80887
|
+
if (isConfirmed) {
|
|
80888
|
+
onSelected(packageName2);
|
|
80889
|
+
}
|
|
80890
|
+
},
|
|
80891
|
+
[onSelected]
|
|
80892
|
+
);
|
|
80893
|
+
return /* @__PURE__ */ import_react109.default.createElement(import_react109.default.Fragment, null, /* @__PURE__ */ import_react109.default.createElement(
|
|
80894
|
+
TextInput2,
|
|
80895
|
+
{
|
|
80896
|
+
label: t3("create_app.choose_package_name.label"),
|
|
80897
|
+
placeholder: defaultPackageName,
|
|
80898
|
+
onSubmit: handlePackageNameSet,
|
|
80899
|
+
validate: validate3,
|
|
80900
|
+
inCreateFlow: true
|
|
80901
|
+
}
|
|
80902
|
+
), packageName && isMonorepo && /* @__PURE__ */ import_react109.default.createElement(
|
|
80903
|
+
ConfirmPackagePath,
|
|
80904
|
+
{
|
|
80905
|
+
path: relative(
|
|
80906
|
+
repoType2.rootDir,
|
|
80907
|
+
join9(targetParentFolder2, packageName)
|
|
80908
|
+
),
|
|
80909
|
+
onSubmit: (confirmed) => handlePackagePathConfirm(packageName, confirmed)
|
|
80910
|
+
}
|
|
80911
|
+
));
|
|
80912
|
+
};
|
|
80913
|
+
|
|
80914
|
+
// ../create-new-packages/app-command/src/components/Questions/ChooseTemplateFlow.tsx
|
|
80915
|
+
init_esm_shims();
|
|
80916
|
+
var import_react112 = __toESM(require_react(), 1);
|
|
80917
|
+
|
|
80918
|
+
// ../create-new-packages/app-command/src/components/ChooseAppCreationSource.tsx
|
|
80919
|
+
init_esm_shims();
|
|
80920
|
+
var import_react110 = __toESM(require_react(), 1);
|
|
80921
|
+
var ChooseAppCreationSource = ({
|
|
80922
|
+
onSelected
|
|
80923
|
+
}) => {
|
|
80924
|
+
const { t: t3 } = useTranslation();
|
|
80925
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
80926
|
+
return /* @__PURE__ */ import_react110.default.createElement(
|
|
80927
|
+
SelectInput2,
|
|
80928
|
+
{
|
|
80929
|
+
label: t3("create_app.choose_app_creation_source.label"),
|
|
80930
|
+
options: [
|
|
80931
|
+
{
|
|
80932
|
+
title: t3("create_app.choose_app_creation_source.basic_app.title"),
|
|
80933
|
+
description: t3(
|
|
80934
|
+
"create_app.choose_app_creation_source.basic_app.description"
|
|
80935
|
+
),
|
|
80936
|
+
value: "basic"
|
|
80937
|
+
},
|
|
80938
|
+
{
|
|
80939
|
+
title: t3("create_app.choose_app_creation_source.template.title"),
|
|
80940
|
+
description: t3(
|
|
80941
|
+
"create_app.choose_app_creation_source.template.description"
|
|
80942
|
+
),
|
|
80943
|
+
value: "template"
|
|
80944
|
+
}
|
|
80945
|
+
],
|
|
80946
|
+
onSubmit: ({ value: value2 }) => {
|
|
80947
|
+
cliFlowStepAnswered({
|
|
80948
|
+
question: t3("create_app.choose_app_creation_source.label"),
|
|
80949
|
+
questionKey: "create_app.choose_app_creation_source.label",
|
|
80950
|
+
answer: value2
|
|
80951
|
+
});
|
|
80952
|
+
onSelected(value2);
|
|
80953
|
+
}
|
|
80954
|
+
}
|
|
80955
|
+
);
|
|
80956
|
+
};
|
|
80957
|
+
|
|
80958
|
+
// ../create-new-packages/app-command/src/components/ChooseTemplate.tsx
|
|
80959
|
+
init_esm_shims();
|
|
80960
|
+
var import_react111 = __toESM(require_react(), 1);
|
|
80961
|
+
var import_variant32 = __toESM(require_lib(), 1);
|
|
80962
|
+
var ChooseTemplate = ({ onSelected }) => {
|
|
80963
|
+
const { t: t3 } = useTranslation();
|
|
80964
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
80965
|
+
const { queryCliAppTemplates } = useDevCenterClient();
|
|
80966
|
+
const [isTemplateSelected, setIsTemplateSelected] = (0, import_react111.useState)(false);
|
|
80967
|
+
const { status } = useAsync2(async () => {
|
|
80968
|
+
const appTemplates = await queryCliAppTemplates();
|
|
80969
|
+
const filteredAppTemplates = appTemplates.filter(
|
|
80970
|
+
(appTemplate) => appTemplate.id !== "a033018e-233a-4ddc-8471-1151d8974866"
|
|
80971
|
+
);
|
|
80972
|
+
return {
|
|
80973
|
+
appTemplatesOptions: filteredAppTemplates.map((appTemplate) => {
|
|
80974
|
+
return {
|
|
80975
|
+
key: appTemplate.id,
|
|
80976
|
+
title: appTemplate.title,
|
|
80977
|
+
description: appTemplate.subtitle,
|
|
80978
|
+
value: appTemplate
|
|
80979
|
+
};
|
|
80980
|
+
})
|
|
80981
|
+
};
|
|
80982
|
+
}, []);
|
|
80983
|
+
return /* @__PURE__ */ import_react111.default.createElement(import_react111.default.Fragment, null, (0, import_variant32.match)(status, {
|
|
80984
|
+
Error: () => null,
|
|
80985
|
+
Loading: () => /* @__PURE__ */ import_react111.default.createElement(Spinner2, null),
|
|
80986
|
+
Success: ({ result: { appTemplatesOptions } }) => /* @__PURE__ */ import_react111.default.createElement(import_react111.default.Fragment, null, /* @__PURE__ */ import_react111.default.createElement(
|
|
80987
|
+
SelectInput2,
|
|
80988
|
+
{
|
|
80989
|
+
label: t3("create_app.choose_template.title"),
|
|
80990
|
+
options: appTemplatesOptions,
|
|
80991
|
+
onSubmit: ({ value: value2 }) => {
|
|
80992
|
+
cliFlowStepAnswered({
|
|
80993
|
+
question: t3("create_app.choose_template.title"),
|
|
80994
|
+
questionKey: "create_app.choose_template.title",
|
|
80995
|
+
answer: value2.title
|
|
80996
|
+
});
|
|
80997
|
+
setIsTemplateSelected(true);
|
|
80998
|
+
onSelected(value2);
|
|
80999
|
+
}
|
|
81000
|
+
}
|
|
81001
|
+
), !isTemplateSelected && /* @__PURE__ */ import_react111.default.createElement(Box_default, { marginTop: 1 }, /* @__PURE__ */ import_react111.default.createElement(
|
|
81002
|
+
Trans2,
|
|
81003
|
+
{
|
|
81004
|
+
i18nKey: "create_app.choose_template.see_templates",
|
|
81005
|
+
components: [
|
|
81006
|
+
/* @__PURE__ */ import_react111.default.createElement(Link, { url: "https://dev.wix.com/apps-templates?filter=cli" })
|
|
81007
|
+
]
|
|
81008
|
+
}
|
|
81009
|
+
)))
|
|
81010
|
+
}));
|
|
81011
|
+
};
|
|
81012
|
+
|
|
81013
|
+
// ../create-new-packages/app-command/src/components/Questions/ChooseTemplateFlow.tsx
|
|
81014
|
+
var ChooseTemplateFlow = ({
|
|
81015
|
+
onTemplateChoose
|
|
81016
|
+
}) => {
|
|
81017
|
+
const [shouldSelectTemplate, setShouldSelectTemplate] = (0, import_react112.useState)(false);
|
|
81018
|
+
return /* @__PURE__ */ import_react112.default.createElement(import_react112.default.Fragment, null, /* @__PURE__ */ import_react112.default.createElement(
|
|
81019
|
+
ChooseAppCreationSource,
|
|
81020
|
+
{
|
|
81021
|
+
onSelected: (source) => {
|
|
81022
|
+
if (source === "basic") {
|
|
81023
|
+
onTemplateChoose(TemplateSource.Default());
|
|
81024
|
+
} else {
|
|
81025
|
+
setShouldSelectTemplate(true);
|
|
81026
|
+
}
|
|
81027
|
+
}
|
|
81028
|
+
}
|
|
81029
|
+
), shouldSelectTemplate && /* @__PURE__ */ import_react112.default.createElement(
|
|
81030
|
+
ChooseTemplate,
|
|
81031
|
+
{
|
|
81032
|
+
onSelected: (template) => {
|
|
81033
|
+
onTemplateChoose(TemplateSource.App(template));
|
|
81034
|
+
}
|
|
81035
|
+
}
|
|
81036
|
+
));
|
|
81037
|
+
};
|
|
81038
|
+
|
|
81039
|
+
// ../create-new-packages/app-command/src/components/RegisteringApp.tsx
|
|
81040
|
+
init_esm_shims();
|
|
81041
|
+
var import_react113 = __toESM(require_react(), 1);
|
|
81042
|
+
var RegisteringApp = () => {
|
|
81043
|
+
const { t: t3 } = useTranslation();
|
|
81044
|
+
return /* @__PURE__ */ import_react113.default.createElement(Box_default, { marginTop: 1 }, /* @__PURE__ */ import_react113.default.createElement(Spinner2, { text: t3("create_app.create_new.registering_your_app") }));
|
|
81045
|
+
};
|
|
81046
|
+
|
|
81047
|
+
// ../create-new-packages/app-command/src/components/AppRegistered.tsx
|
|
81048
|
+
init_esm_shims();
|
|
81049
|
+
var import_react114 = __toESM(require_react(), 1);
|
|
81050
|
+
var AppRegistered = ({ appName }) => {
|
|
81051
|
+
return /* @__PURE__ */ import_react114.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react114.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react114.default.createElement(Badge, { skin: "success" }, /* @__PURE__ */ import_react114.default.createElement(Trans2, { i18nKey: "create_app.success" })), " ", /* @__PURE__ */ import_react114.default.createElement(
|
|
81052
|
+
Trans2,
|
|
81053
|
+
{
|
|
81054
|
+
i18nKey: "create_app.create_new.app_registered_successfully",
|
|
81055
|
+
components: [/* @__PURE__ */ import_react114.default.createElement(Text2, { bold: true })],
|
|
81056
|
+
values: { appName }
|
|
81057
|
+
}
|
|
81058
|
+
)));
|
|
81059
|
+
};
|
|
81060
|
+
|
|
81061
|
+
// ../create-new-packages/app-command/src/components/PostAppRegistration.tsx
|
|
80611
81062
|
init_esm_shims();
|
|
80612
81063
|
var import_react117 = __toESM(require_react(), 1);
|
|
81064
|
+
|
|
81065
|
+
// ../create-new-packages/app-command/src/components/ChooseCodeIdentifier.tsx
|
|
81066
|
+
init_esm_shims();
|
|
81067
|
+
var import_react115 = __toESM(require_react(), 1);
|
|
81068
|
+
var import_snakeCase = __toESM(require_snakeCase(), 1);
|
|
81069
|
+
var import_variant33 = __toESM(require_lib(), 1);
|
|
81070
|
+
var ChooseCodeIdentifier = ({
|
|
81071
|
+
onSubmit,
|
|
81072
|
+
appId,
|
|
81073
|
+
packageName
|
|
81074
|
+
}) => {
|
|
81075
|
+
const devCenterClient = useDevCenterClient();
|
|
81076
|
+
const { t: t3 } = useTranslation();
|
|
81077
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81078
|
+
const defaultCodeIdentifier = (0, import_react115.useMemo)(
|
|
81079
|
+
() => (0, import_snakeCase.default)(packageName),
|
|
81080
|
+
[packageName]
|
|
81081
|
+
);
|
|
81082
|
+
const validationFn = useAsyncCallback3(
|
|
81083
|
+
async (_2, submitedCodeIdentifier) => {
|
|
81084
|
+
const isValid = validateCodeIdentifier(submitedCodeIdentifier);
|
|
81085
|
+
if (isValid !== true) {
|
|
81086
|
+
return isValid;
|
|
81087
|
+
}
|
|
81088
|
+
const result = await devCenterClient.setCodeIdentifier({
|
|
81089
|
+
appId,
|
|
81090
|
+
codeIdentifier: submitedCodeIdentifier
|
|
81091
|
+
});
|
|
81092
|
+
if ((0, import_variant33.isType)(result, SetCodeIdentifierResult.ShouldBeUnique)) {
|
|
81093
|
+
return `Code identifier ${submitedCodeIdentifier} is already used. Try another.`;
|
|
81094
|
+
}
|
|
81095
|
+
return true;
|
|
81096
|
+
}
|
|
81097
|
+
);
|
|
81098
|
+
return /* @__PURE__ */ import_react115.default.createElement(
|
|
81099
|
+
TextInput2,
|
|
81100
|
+
{
|
|
81101
|
+
label: t3("create_app.choose_code_identifier.label"),
|
|
81102
|
+
placeholder: t3("create_app.choose_code_identifier.placeholder", {
|
|
81103
|
+
suggested: defaultCodeIdentifier
|
|
81104
|
+
}),
|
|
81105
|
+
validate: (submitedCodeIdentifier) => validationFn.execute(submitedCodeIdentifier),
|
|
81106
|
+
onSubmit: (codeIdentifier) => {
|
|
81107
|
+
cliFlowStepAnswered({
|
|
81108
|
+
question: t3("create_app.choose_code_identifier.label"),
|
|
81109
|
+
questionKey: "create_app.choose_code_identifier.label",
|
|
81110
|
+
answer: codeIdentifier
|
|
81111
|
+
});
|
|
81112
|
+
onSubmit(codeIdentifier);
|
|
81113
|
+
},
|
|
81114
|
+
inCreateFlow: true
|
|
81115
|
+
}
|
|
81116
|
+
);
|
|
81117
|
+
};
|
|
81118
|
+
|
|
81119
|
+
// ../create-new-packages/app-command/src/components/ChooseNamespace.tsx
|
|
81120
|
+
init_esm_shims();
|
|
81121
|
+
var import_react116 = __toESM(require_react(), 1);
|
|
80613
81122
|
var import_variant34 = __toESM(require_lib(), 1);
|
|
81123
|
+
var ChooseNamespace = ({
|
|
81124
|
+
onSubmit,
|
|
81125
|
+
appId,
|
|
81126
|
+
packageName
|
|
81127
|
+
}) => {
|
|
81128
|
+
const { t: t3 } = useTranslation();
|
|
81129
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81130
|
+
const devCenterClient = useDevCenterClient();
|
|
81131
|
+
const validationFn = useAsyncCallback3(
|
|
81132
|
+
async (_2, submitedNamespace) => {
|
|
81133
|
+
const isValid = validateNamespace(submitedNamespace);
|
|
81134
|
+
if (isValid !== true) {
|
|
81135
|
+
return isValid;
|
|
81136
|
+
}
|
|
81137
|
+
const result = await devCenterClient.setNamespace({
|
|
81138
|
+
appId,
|
|
81139
|
+
namespace: submitedNamespace
|
|
81140
|
+
});
|
|
81141
|
+
if ((0, import_variant34.isType)(result, SetNamespaceResult.ShouldBeUnique)) {
|
|
81142
|
+
return `Namespace ${submitedNamespace} is already used. Try another.`;
|
|
81143
|
+
}
|
|
81144
|
+
return true;
|
|
81145
|
+
}
|
|
81146
|
+
);
|
|
81147
|
+
return /* @__PURE__ */ import_react116.default.createElement(
|
|
81148
|
+
TextInput2,
|
|
81149
|
+
{
|
|
81150
|
+
label: t3("create_app.choose_namespace.label"),
|
|
81151
|
+
placeholder: t3("create_app.choose_namespace.placeholder", {
|
|
81152
|
+
suggested: packageName
|
|
81153
|
+
}),
|
|
81154
|
+
validate: (submitedNamespace) => validationFn.execute(submitedNamespace),
|
|
81155
|
+
onSubmit: (namespace) => {
|
|
81156
|
+
cliFlowStepAnswered({
|
|
81157
|
+
question: t3("create_app.choose_namespace.label"),
|
|
81158
|
+
questionKey: "create_app.choose_namespace.label",
|
|
81159
|
+
answer: namespace
|
|
81160
|
+
});
|
|
81161
|
+
onSubmit(namespace);
|
|
81162
|
+
},
|
|
81163
|
+
inCreateFlow: true
|
|
81164
|
+
}
|
|
81165
|
+
);
|
|
81166
|
+
};
|
|
81167
|
+
|
|
81168
|
+
// ../create-new-packages/app-command/src/components/PostAppRegistration.tsx
|
|
81169
|
+
var PostAppRegistration = ({ appId, packageName, onPostRegistrationComplete }) => {
|
|
81170
|
+
const [namespace, setNamespace2] = (0, import_react117.useState)();
|
|
81171
|
+
return /* @__PURE__ */ import_react117.default.createElement(import_react117.default.Fragment, null, /* @__PURE__ */ import_react117.default.createElement(
|
|
81172
|
+
ChooseNamespace,
|
|
81173
|
+
{
|
|
81174
|
+
appId,
|
|
81175
|
+
packageName,
|
|
81176
|
+
onSubmit: setNamespace2
|
|
81177
|
+
}
|
|
81178
|
+
), namespace && /* @__PURE__ */ import_react117.default.createElement(
|
|
81179
|
+
ChooseCodeIdentifier,
|
|
81180
|
+
{
|
|
81181
|
+
appId,
|
|
81182
|
+
packageName,
|
|
81183
|
+
onSubmit: onPostRegistrationComplete
|
|
81184
|
+
}
|
|
81185
|
+
));
|
|
81186
|
+
};
|
|
81187
|
+
|
|
81188
|
+
// ../create-new-packages/app-command/src/components/mcp/ConfigMcp.tsx
|
|
81189
|
+
init_esm_shims();
|
|
81190
|
+
var import_react118 = __toESM(require_react(), 1);
|
|
81191
|
+
var import_variant35 = __toESM(require_lib(), 1);
|
|
81192
|
+
var IdeForMcp = (0, import_variant35.variant)({
|
|
81193
|
+
VsCode: {},
|
|
81194
|
+
Cursor: {},
|
|
81195
|
+
ClaudeCode: {}
|
|
81196
|
+
});
|
|
81197
|
+
var ConfigMcp = ({ onSelected }) => {
|
|
81198
|
+
const { t: t3 } = useTranslation();
|
|
81199
|
+
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81200
|
+
return /* @__PURE__ */ import_react118.default.createElement(
|
|
81201
|
+
SelectInput2,
|
|
81202
|
+
{
|
|
81203
|
+
label: t3("create_app.choose_ide_for_mcp.question"),
|
|
81204
|
+
info: /* @__PURE__ */ import_react118.default.createElement(
|
|
81205
|
+
Trans2,
|
|
81206
|
+
{
|
|
81207
|
+
i18nKey: "create_app.choose_ide_for_mcp.description",
|
|
81208
|
+
components: [
|
|
81209
|
+
/* @__PURE__ */ import_react118.default.createElement(Link, { url: "https://www.wix.com/studio/developers/mcp-server" })
|
|
81210
|
+
]
|
|
81211
|
+
}
|
|
81212
|
+
),
|
|
81213
|
+
options: [
|
|
81214
|
+
{
|
|
81215
|
+
title: t3("create_app.choose_ide_for_mcp.answer.cursor"),
|
|
81216
|
+
key: "cursor",
|
|
81217
|
+
value: IdeForMcp.Cursor()
|
|
81218
|
+
},
|
|
81219
|
+
{
|
|
81220
|
+
title: t3("create_app.choose_ide_for_mcp.answer.vscode"),
|
|
81221
|
+
key: "vscode",
|
|
81222
|
+
value: IdeForMcp.VsCode()
|
|
81223
|
+
},
|
|
81224
|
+
{
|
|
81225
|
+
title: t3("create_app.choose_ide_for_mcp.answer.claude_code"),
|
|
81226
|
+
key: "claude_code",
|
|
81227
|
+
value: IdeForMcp.ClaudeCode()
|
|
81228
|
+
},
|
|
81229
|
+
{
|
|
81230
|
+
title: t3("create_app.choose_ide_for_mcp.answer.no"),
|
|
81231
|
+
key: "no",
|
|
81232
|
+
value: void 0
|
|
81233
|
+
}
|
|
81234
|
+
],
|
|
81235
|
+
onSubmit: ({ value: value2 }) => {
|
|
81236
|
+
cliFlowStepAnswered({
|
|
81237
|
+
question: t3("create_app.choose_ide_for_mcp.question"),
|
|
81238
|
+
questionKey: "create_app.choose_ide_for_mcp.question",
|
|
81239
|
+
answer: value2?.type ?? "No"
|
|
81240
|
+
});
|
|
81241
|
+
onSelected(value2);
|
|
81242
|
+
}
|
|
81243
|
+
}
|
|
81244
|
+
);
|
|
81245
|
+
};
|
|
81246
|
+
|
|
81247
|
+
// ../create-new-packages/app-command/src/components/mcp/getMcpResult.ts
|
|
81248
|
+
init_esm_shims();
|
|
81249
|
+
var import_variant36 = __toESM(require_lib(), 1);
|
|
81250
|
+
import { join as join10 } from "node:path";
|
|
81251
|
+
var McpConfigResult = (0, import_variant36.variant)({
|
|
81252
|
+
Created: (0, import_variant36.fields)(),
|
|
81253
|
+
Canceled: {}
|
|
81254
|
+
});
|
|
81255
|
+
var getMcpData = ({
|
|
81256
|
+
ideForMcp,
|
|
81257
|
+
packageFolder
|
|
81258
|
+
}) => {
|
|
81259
|
+
const mcpPath = (0, import_variant36.match)(ideForMcp, {
|
|
81260
|
+
Cursor: () => join10(packageFolder, ".cursor", "mcp.json"),
|
|
81261
|
+
VsCode: () => join10(packageFolder, ".vscode", "mcp.json"),
|
|
81262
|
+
ClaudeCode: () => join10(packageFolder, ".mcp.json")
|
|
81263
|
+
});
|
|
81264
|
+
return McpConfigResult.Created({
|
|
81265
|
+
mcpPath,
|
|
81266
|
+
ideForMcp,
|
|
81267
|
+
docsUrl: (0, import_variant36.match)(
|
|
81268
|
+
ideForMcp,
|
|
81269
|
+
(0, import_variant36.lookup)({
|
|
81270
|
+
Cursor: "https://cursor.com/docs/context/mcp",
|
|
81271
|
+
VsCode: "https://code.visualstudio.com/docs/copilot/chat/mcp-servers",
|
|
81272
|
+
ClaudeCode: "https://docs.anthropic.com/en/docs/claude-code/mcp"
|
|
81273
|
+
})
|
|
81274
|
+
)
|
|
81275
|
+
});
|
|
81276
|
+
};
|
|
81277
|
+
var getMcpResult = ({
|
|
81278
|
+
ideForMcp,
|
|
81279
|
+
targetParentFolder: targetParentFolder2,
|
|
81280
|
+
packageName
|
|
81281
|
+
}) => {
|
|
81282
|
+
const packageFolder = join10(targetParentFolder2, packageName);
|
|
81283
|
+
return ideForMcp ? getMcpData({
|
|
81284
|
+
ideForMcp,
|
|
81285
|
+
packageFolder
|
|
81286
|
+
}) : McpConfigResult.Canceled();
|
|
81287
|
+
};
|
|
81288
|
+
|
|
81289
|
+
// ../create-new-packages/app-command/src/components/Questions/useAppCreation.tsx
|
|
81290
|
+
init_esm_shims();
|
|
81291
|
+
var import_variant37 = __toESM(require_lib(), 1);
|
|
80614
81292
|
|
|
80615
81293
|
// ../backend-as-a-service-client/src/index.ts
|
|
80616
81294
|
init_esm_shims();
|
|
80617
81295
|
|
|
80618
81296
|
// ../backend-as-a-service-client/src/useBackendAsAServiceClient.ts
|
|
80619
81297
|
init_esm_shims();
|
|
80620
|
-
var
|
|
81298
|
+
var import_react119 = __toESM(require_react(), 1);
|
|
80621
81299
|
|
|
80622
81300
|
// ../backend-as-a-service-client/src/backend-as-a-service-client.ts
|
|
80623
81301
|
init_esm_shims();
|
|
@@ -81060,578 +81738,196 @@ var BackendAsAServiceClient = class {
|
|
|
81060
81738
|
});
|
|
81061
81739
|
}
|
|
81062
81740
|
};
|
|
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
|
-
}
|
|
81741
|
+
createAppProject = async ({
|
|
81742
|
+
cloudProvider,
|
|
81743
|
+
...appProjectOptions
|
|
81744
|
+
}) => {
|
|
81745
|
+
try {
|
|
81746
|
+
const { data } = await this.httpClient.request(
|
|
81747
|
+
createAppProject({
|
|
81748
|
+
appProject: {
|
|
81749
|
+
...appProjectOptions,
|
|
81750
|
+
appProjectTypeId: cloudProvider === CloudProvider.KUBERNETES ? APP_PROJECT_TYPE_ID_KUBERNETES : APP_PROJECT_TYPE_ID_CLOUDFLARE,
|
|
81751
|
+
cloudProviderOverride: cloudProvider
|
|
81752
|
+
}
|
|
81753
|
+
})
|
|
81754
|
+
);
|
|
81755
|
+
return CreateAppProjectSchema.parse(data).appProject;
|
|
81756
|
+
} catch (e2) {
|
|
81757
|
+
throw new CliError({
|
|
81758
|
+
code: CliErrorCode.FailedCreatingAppProject(),
|
|
81759
|
+
cause: e2
|
|
81760
|
+
});
|
|
81502
81761
|
}
|
|
81503
|
-
|
|
81504
|
-
|
|
81505
|
-
{
|
|
81506
|
-
|
|
81507
|
-
|
|
81508
|
-
|
|
81762
|
+
};
|
|
81763
|
+
createAppDeployment = async (appId, staticFilesMetadata) => {
|
|
81764
|
+
try {
|
|
81765
|
+
const { data } = await pRetry(
|
|
81766
|
+
() => this.httpClient.request(
|
|
81767
|
+
createAppDeployment({
|
|
81768
|
+
appDeployment: {
|
|
81769
|
+
appProjectId: appId,
|
|
81770
|
+
staticFilesMetadata
|
|
81771
|
+
}
|
|
81772
|
+
})
|
|
81773
|
+
),
|
|
81774
|
+
this.retryOptions
|
|
81775
|
+
);
|
|
81776
|
+
return CreateAppDeploymentSchema.parse(data);
|
|
81777
|
+
} catch (e2) {
|
|
81778
|
+
throw new CliError({
|
|
81779
|
+
code: CliErrorCode.FailedCreatingAppDeployment(),
|
|
81780
|
+
cause: e2
|
|
81781
|
+
});
|
|
81509
81782
|
}
|
|
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 }
|
|
81783
|
+
};
|
|
81784
|
+
completeAppDeployment = async (appDeployment, staticsCompletionToken) => {
|
|
81785
|
+
try {
|
|
81786
|
+
const { data } = await pRetry(
|
|
81787
|
+
() => this.httpClient.request(
|
|
81788
|
+
completeAppDeployment({
|
|
81789
|
+
appDeployment,
|
|
81790
|
+
staticsCompletionToken
|
|
81791
|
+
})
|
|
81792
|
+
),
|
|
81793
|
+
this.retryOptions
|
|
81794
|
+
);
|
|
81795
|
+
return CompleteAppDeploymentSchema.parse(data).appDeployment;
|
|
81796
|
+
} catch (e2) {
|
|
81797
|
+
throw new CliError({
|
|
81798
|
+
code: CliErrorCode.FailedFinalizingAppDeployment(),
|
|
81799
|
+
cause: e2
|
|
81800
|
+
});
|
|
81531
81801
|
}
|
|
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()
|
|
81802
|
+
};
|
|
81803
|
+
postForm = async (endpointUrl, token2, formData) => {
|
|
81804
|
+
try {
|
|
81805
|
+
const responseJson = await pRetry(
|
|
81806
|
+
async () => {
|
|
81807
|
+
const response = await fetch(endpointUrl, {
|
|
81808
|
+
method: "POST",
|
|
81809
|
+
headers: {
|
|
81810
|
+
Authorization: `Bearer ${token2}`
|
|
81811
|
+
},
|
|
81812
|
+
body: formData
|
|
81813
|
+
});
|
|
81814
|
+
if (!response.ok) {
|
|
81815
|
+
const error = await createHttpErrorFromFetch(response);
|
|
81816
|
+
throw error;
|
|
81817
|
+
}
|
|
81818
|
+
return response.json();
|
|
81570
81819
|
},
|
|
81571
|
-
{
|
|
81572
|
-
|
|
81573
|
-
|
|
81574
|
-
|
|
81820
|
+
{ retries: 3 }
|
|
81821
|
+
);
|
|
81822
|
+
return StaticFileUploadSchema.parse(responseJson);
|
|
81823
|
+
} catch (e2) {
|
|
81824
|
+
throw new CliError({
|
|
81825
|
+
code: CliErrorCode.FailedToUploadStaticFiles(),
|
|
81826
|
+
cause: e2,
|
|
81827
|
+
info: { endpointUrl }
|
|
81828
|
+
});
|
|
81829
|
+
}
|
|
81830
|
+
};
|
|
81831
|
+
putBinaryFile = async (endpointUrl, fileContent, contentType) => {
|
|
81832
|
+
try {
|
|
81833
|
+
await pRetry(
|
|
81834
|
+
async () => {
|
|
81835
|
+
const response = await fetch(endpointUrl, {
|
|
81836
|
+
method: "PUT",
|
|
81837
|
+
headers: {
|
|
81838
|
+
"Content-Type": contentType
|
|
81839
|
+
},
|
|
81840
|
+
body: fileContent
|
|
81841
|
+
});
|
|
81842
|
+
if (!response.ok) {
|
|
81843
|
+
const error = await createHttpErrorFromFetch(response);
|
|
81844
|
+
throw error;
|
|
81845
|
+
}
|
|
81575
81846
|
},
|
|
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
|
-
}
|
|
81847
|
+
{ retries: 3 }
|
|
81848
|
+
);
|
|
81849
|
+
} catch (e2) {
|
|
81850
|
+
throw new CliError({
|
|
81851
|
+
code: CliErrorCode.FailedToUploadStaticFiles(),
|
|
81852
|
+
cause: e2,
|
|
81853
|
+
info: { endpointUrl }
|
|
81854
|
+
});
|
|
81590
81855
|
}
|
|
81591
|
-
|
|
81856
|
+
};
|
|
81857
|
+
// Env management
|
|
81858
|
+
getAppEnvironmentByName = async (appId, environment) => {
|
|
81859
|
+
try {
|
|
81860
|
+
const { data } = await pRetry(
|
|
81861
|
+
() => this.httpClient.request(
|
|
81862
|
+
getAppEnvironmentByName({
|
|
81863
|
+
appProjectId: appId,
|
|
81864
|
+
appEnvironmentName: environment
|
|
81865
|
+
})
|
|
81866
|
+
),
|
|
81867
|
+
this.retryOptions
|
|
81868
|
+
);
|
|
81869
|
+
return AppEnvironmentSchema.parse(data).appEnvironment;
|
|
81870
|
+
} catch (e2) {
|
|
81871
|
+
throw new CliError({
|
|
81872
|
+
code: CliErrorCode.FailedToPullEnvironment(),
|
|
81873
|
+
cause: e2
|
|
81874
|
+
});
|
|
81875
|
+
}
|
|
81876
|
+
};
|
|
81877
|
+
upsertAppEnvironment = async (appId, environment, variables) => {
|
|
81878
|
+
try {
|
|
81879
|
+
const { data } = await this.httpClient.request(
|
|
81880
|
+
upsertAppEnvironment({
|
|
81881
|
+
appEnvironment: {
|
|
81882
|
+
appProjectId: appId,
|
|
81883
|
+
name: environment,
|
|
81884
|
+
variables
|
|
81885
|
+
}
|
|
81886
|
+
})
|
|
81887
|
+
);
|
|
81888
|
+
return AppEnvironmentSchema.parse(data).appEnvironment;
|
|
81889
|
+
} catch (e2) {
|
|
81890
|
+
throw new CliError({
|
|
81891
|
+
code: CliErrorCode.FailedToSetEnvironmentVariable(),
|
|
81892
|
+
cause: e2
|
|
81893
|
+
});
|
|
81894
|
+
}
|
|
81895
|
+
};
|
|
81896
|
+
removeAppEnvironmentVariable = async (appId, environment, variable) => {
|
|
81897
|
+
try {
|
|
81898
|
+
const appEnvironment = await this.getAppEnvironmentByName(
|
|
81899
|
+
appId,
|
|
81900
|
+
environment
|
|
81901
|
+
);
|
|
81902
|
+
const { data } = await pRetry(
|
|
81903
|
+
() => this.httpClient.request(
|
|
81904
|
+
removeAppEnvironmentVariables({
|
|
81905
|
+
appEnvironmentId: appEnvironment.id,
|
|
81906
|
+
appProjectId: appId,
|
|
81907
|
+
variables: [variable]
|
|
81908
|
+
})
|
|
81909
|
+
),
|
|
81910
|
+
this.retryOptions
|
|
81911
|
+
);
|
|
81912
|
+
return AppEnvironmentSchema.parse(data).appEnvironment;
|
|
81913
|
+
} catch (e2) {
|
|
81914
|
+
throw new CliError({
|
|
81915
|
+
code: CliErrorCode.FailedToRemoveEnvironmentVariable(),
|
|
81916
|
+
cause: e2
|
|
81917
|
+
});
|
|
81918
|
+
}
|
|
81919
|
+
};
|
|
81592
81920
|
};
|
|
81593
81921
|
|
|
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
|
-
};
|
|
81922
|
+
// ../backend-as-a-service-client/src/useBackendAsAServiceClient.ts
|
|
81923
|
+
function useBackendAsAServiceClient() {
|
|
81924
|
+
const httpClient = useHttpClient({ type: "backoffice" });
|
|
81925
|
+
const client2 = (0, import_react119.useMemo)(
|
|
81926
|
+
() => new BackendAsAServiceClient(httpClient),
|
|
81927
|
+
[httpClient]
|
|
81928
|
+
);
|
|
81929
|
+
return usePanoramaMethodLogger(client2);
|
|
81930
|
+
}
|
|
81635
81931
|
|
|
81636
81932
|
// ../create-new-packages/app-command/src/services/project-setup.ts
|
|
81637
81933
|
init_esm_shims();
|
|
@@ -81676,31 +81972,19 @@ function generateRandomSlug() {
|
|
|
81676
81972
|
return randomBytes(8).toString("hex");
|
|
81677
81973
|
}
|
|
81678
81974
|
|
|
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
|
-
}) => {
|
|
81975
|
+
// ../create-new-packages/app-command/src/components/Questions/useAppCreation.tsx
|
|
81976
|
+
var useAppCreation = ({ extendAppId }) => {
|
|
81688
81977
|
const devCenterClient = useDevCenterClient();
|
|
81689
81978
|
const backendAsAServiceClient = useBackendAsAServiceClient();
|
|
81690
81979
|
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
81980
|
const createAppCallback = useAsyncCallback3(
|
|
81697
|
-
async (_2, { appName
|
|
81698
|
-
const { id: appId } = await (0,
|
|
81981
|
+
async (_2, { appName, packageName, template, mcpConfigResult }) => {
|
|
81982
|
+
const { id: appId } = await (0, import_variant37.match)(
|
|
81699
81983
|
template,
|
|
81700
|
-
(0,
|
|
81984
|
+
(0, import_variant37.partial)({
|
|
81701
81985
|
App: ({ payload: payload7 }) => devCenterClient.createAppFromTemplate(
|
|
81702
81986
|
{
|
|
81703
|
-
name:
|
|
81987
|
+
name: appName,
|
|
81704
81988
|
templateId: payload7.id
|
|
81705
81989
|
},
|
|
81706
81990
|
payload7
|
|
@@ -81709,70 +81993,106 @@ var NewAppFlow = ({
|
|
|
81709
81993
|
if (extendAppId) {
|
|
81710
81994
|
return { id: extendAppId };
|
|
81711
81995
|
}
|
|
81712
|
-
return devCenterClient.createApp({ name:
|
|
81996
|
+
return devCenterClient.createApp({ name: appName });
|
|
81713
81997
|
}
|
|
81714
81998
|
})
|
|
81715
81999
|
);
|
|
81716
|
-
const { variables } = await createAppProjectAndEnvironment({
|
|
82000
|
+
const { variables: environmentVariables } = await createAppProjectAndEnvironment({
|
|
81717
82001
|
appId,
|
|
81718
|
-
appName
|
|
82002
|
+
appName,
|
|
81719
82003
|
devCenterClient,
|
|
81720
82004
|
backendAsAServiceClient
|
|
81721
82005
|
});
|
|
81722
82006
|
biLogger.updateDefaults({
|
|
81723
82007
|
_appId: appId
|
|
81724
82008
|
});
|
|
81725
|
-
|
|
82009
|
+
const appCreationResult = {
|
|
81726
82010
|
template,
|
|
81727
|
-
appData: { appName
|
|
81728
|
-
packageName
|
|
82011
|
+
appData: { appName, appId },
|
|
82012
|
+
packageName,
|
|
81729
82013
|
mcpConfigResult,
|
|
81730
|
-
environmentVariables
|
|
81731
|
-
});
|
|
81732
|
-
return {
|
|
81733
|
-
appId,
|
|
81734
|
-
appName: appName2
|
|
82014
|
+
environmentVariables
|
|
81735
82015
|
};
|
|
82016
|
+
return appCreationResult;
|
|
81736
82017
|
}
|
|
81737
82018
|
);
|
|
81738
|
-
|
|
81739
|
-
|
|
81740
|
-
|
|
81741
|
-
|
|
81742
|
-
|
|
81743
|
-
|
|
81744
|
-
|
|
81745
|
-
|
|
81746
|
-
|
|
82019
|
+
return createAppCallback;
|
|
82020
|
+
};
|
|
82021
|
+
|
|
82022
|
+
// ../create-new-packages/app-command/src/components/Questions/NewAppFlow/RegularFlow.tsx
|
|
82023
|
+
var NewAppFlow = ({
|
|
82024
|
+
onSubmit,
|
|
82025
|
+
template: templateFromOptions,
|
|
82026
|
+
targetParentFolder: targetParentFolder2,
|
|
82027
|
+
repoType: repoType2,
|
|
82028
|
+
extendAppId
|
|
82029
|
+
}) => {
|
|
82030
|
+
const createApp3 = useAppCreation({ extendAppId });
|
|
82031
|
+
return /* @__PURE__ */ import_react120.default.createElement(import_react120.default.Fragment, null, (0, import_variant38.isType)(repoType2, RepoType.Monorepo) ? /* @__PURE__ */ import_react120.default.createElement(
|
|
82032
|
+
MonorepoFlow,
|
|
82033
|
+
{
|
|
82034
|
+
onSubmit: createApp3.execute,
|
|
82035
|
+
template: templateFromOptions,
|
|
82036
|
+
targetParentFolder: targetParentFolder2,
|
|
82037
|
+
repoType: repoType2
|
|
81747
82038
|
}
|
|
81748
|
-
|
|
81749
|
-
|
|
82039
|
+
) : /* @__PURE__ */ import_react120.default.createElement(
|
|
82040
|
+
GeneralFlow,
|
|
82041
|
+
{
|
|
82042
|
+
onSubmit: createApp3.execute,
|
|
82043
|
+
template: templateFromOptions,
|
|
82044
|
+
targetParentFolder: targetParentFolder2,
|
|
82045
|
+
repoType: repoType2
|
|
82046
|
+
}
|
|
82047
|
+
), (0, import_variant38.match)(createApp3.status, {
|
|
82048
|
+
Error: () => null,
|
|
82049
|
+
Loading: () => /* @__PURE__ */ import_react120.default.createElement(RegisteringApp, null),
|
|
82050
|
+
Success: ({ result: appCreationData }) => {
|
|
82051
|
+
const {
|
|
82052
|
+
appData: { appId, appName },
|
|
82053
|
+
packageName
|
|
82054
|
+
} = appCreationData;
|
|
82055
|
+
return /* @__PURE__ */ import_react120.default.createElement(import_react120.default.Fragment, null, /* @__PURE__ */ import_react120.default.createElement(AppRegistered, { appId, appName }), /* @__PURE__ */ import_react120.default.createElement(
|
|
82056
|
+
PostAppRegistration,
|
|
82057
|
+
{
|
|
82058
|
+
appId,
|
|
82059
|
+
packageName,
|
|
82060
|
+
onPostRegistrationComplete: () => {
|
|
82061
|
+
onSubmit(appCreationData);
|
|
82062
|
+
}
|
|
82063
|
+
}
|
|
82064
|
+
));
|
|
82065
|
+
},
|
|
82066
|
+
NotRequested: () => null
|
|
82067
|
+
}));
|
|
82068
|
+
};
|
|
82069
|
+
var GeneralFlow = ({
|
|
82070
|
+
onSubmit,
|
|
82071
|
+
template: templateFromOptions,
|
|
82072
|
+
targetParentFolder: targetParentFolder2,
|
|
82073
|
+
repoType: repoType2
|
|
82074
|
+
}) => {
|
|
82075
|
+
const [templateData, setTemplateData] = (0, import_react120.useState)(
|
|
82076
|
+
templateFromOptions
|
|
82077
|
+
);
|
|
82078
|
+
const [appName, setAppName] = (0, import_react120.useState)();
|
|
82079
|
+
const [packageName, setPackageName] = (0, import_react120.useState)();
|
|
82080
|
+
return /* @__PURE__ */ import_react120.default.createElement(import_react120.default.Fragment, null, !templateFromOptions && /* @__PURE__ */ import_react120.default.createElement(ChooseTemplateFlow, { onTemplateChoose: setTemplateData }), templateData && /* @__PURE__ */ import_react120.default.createElement(ChooseAppName, { onSubmit: setAppName }), appName && templateData && /* @__PURE__ */ import_react120.default.createElement(
|
|
81750
82081
|
ChoosePackageName,
|
|
81751
82082
|
{
|
|
81752
82083
|
appName,
|
|
81753
82084
|
targetParentFolder: targetParentFolder2,
|
|
81754
82085
|
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
|
-
}
|
|
82086
|
+
onSelected: setPackageName
|
|
81767
82087
|
}
|
|
81768
|
-
), appName &&
|
|
82088
|
+
), appName && templateData && packageName && /* @__PURE__ */ import_react120.default.createElement(
|
|
81769
82089
|
ConfigMcp,
|
|
81770
82090
|
{
|
|
81771
82091
|
onSelected: (ideForMcp) => {
|
|
81772
|
-
|
|
82092
|
+
onSubmit({
|
|
82093
|
+
template: templateData,
|
|
81773
82094
|
appName,
|
|
81774
82095
|
packageName,
|
|
81775
|
-
template: templateData,
|
|
81776
82096
|
mcpConfigResult: getMcpResult({
|
|
81777
82097
|
ideForMcp,
|
|
81778
82098
|
targetParentFolder: targetParentFolder2,
|
|
@@ -81781,29 +82101,87 @@ var NewAppFlow = ({
|
|
|
81781
82101
|
});
|
|
81782
82102
|
}
|
|
81783
82103
|
}
|
|
81784
|
-
))
|
|
82104
|
+
));
|
|
82105
|
+
};
|
|
82106
|
+
var MonorepoFlow = ({
|
|
82107
|
+
onSubmit,
|
|
82108
|
+
template: templateFromOptions,
|
|
82109
|
+
targetParentFolder: targetParentFolder2,
|
|
82110
|
+
repoType: repoType2
|
|
82111
|
+
}) => {
|
|
82112
|
+
const [templateData, setTemplateData] = (0, import_react120.useState)(
|
|
82113
|
+
templateFromOptions
|
|
82114
|
+
);
|
|
82115
|
+
const [appName, setAppName] = (0, import_react120.useState)();
|
|
82116
|
+
return /* @__PURE__ */ import_react120.default.createElement(import_react120.default.Fragment, null, !templateFromOptions && /* @__PURE__ */ import_react120.default.createElement(ChooseTemplateFlow, { onTemplateChoose: setTemplateData }), templateData && /* @__PURE__ */ import_react120.default.createElement(ChooseAppName, { onSubmit: setAppName }), appName && templateData && /* @__PURE__ */ import_react120.default.createElement(
|
|
82117
|
+
ChoosePackageName,
|
|
82118
|
+
{
|
|
82119
|
+
appName,
|
|
82120
|
+
targetParentFolder: targetParentFolder2,
|
|
82121
|
+
repoType: repoType2,
|
|
82122
|
+
onSelected: (packageName) => {
|
|
82123
|
+
onSubmit({
|
|
82124
|
+
template: templateData,
|
|
82125
|
+
appName,
|
|
82126
|
+
packageName,
|
|
82127
|
+
mcpConfigResult: getMcpResult({
|
|
82128
|
+
ideForMcp: void 0,
|
|
82129
|
+
targetParentFolder: targetParentFolder2,
|
|
82130
|
+
packageName
|
|
82131
|
+
})
|
|
82132
|
+
});
|
|
82133
|
+
}
|
|
82134
|
+
}
|
|
82135
|
+
));
|
|
82136
|
+
};
|
|
82137
|
+
|
|
82138
|
+
// ../create-new-packages/app-command/src/components/Questions/NewAppFlow/AutoFlow.tsx
|
|
82139
|
+
init_esm_shims();
|
|
82140
|
+
var import_react121 = __toESM(require_react(), 1);
|
|
82141
|
+
var import_variant39 = __toESM(require_lib(), 1);
|
|
82142
|
+
var NewAppAutoFlow = ({
|
|
82143
|
+
onSubmit,
|
|
82144
|
+
template: templateFromOptions,
|
|
82145
|
+
appName: appNameFromOptions,
|
|
82146
|
+
extendAppId
|
|
82147
|
+
}) => {
|
|
82148
|
+
const createApp3 = useAppCreation({ extendAppId });
|
|
82149
|
+
useAsync2(async () => {
|
|
82150
|
+
const appCreationData = await createApp3.execute({
|
|
82151
|
+
appName: appNameFromOptions.appName,
|
|
82152
|
+
packageName: appNameFromOptions.packageName,
|
|
82153
|
+
template: templateFromOptions,
|
|
82154
|
+
mcpConfigResult: McpConfigResult.Canceled()
|
|
82155
|
+
});
|
|
82156
|
+
onSubmit(appCreationData);
|
|
82157
|
+
}, []);
|
|
82158
|
+
return (0, import_variant39.match)(createApp3.status, {
|
|
81785
82159
|
Error: () => null,
|
|
81786
|
-
Loading: () => /* @__PURE__ */
|
|
81787
|
-
Success: ({
|
|
82160
|
+
Loading: () => /* @__PURE__ */ import_react121.default.createElement(RegisteringApp, null),
|
|
82161
|
+
Success: ({
|
|
82162
|
+
result: {
|
|
82163
|
+
appData: { appId, appName }
|
|
82164
|
+
}
|
|
82165
|
+
}) => /* @__PURE__ */ import_react121.default.createElement(AppRegistered, { appId, appName }),
|
|
81788
82166
|
NotRequested: () => null
|
|
81789
|
-
})
|
|
82167
|
+
});
|
|
81790
82168
|
};
|
|
81791
82169
|
|
|
81792
82170
|
// ../create-new-packages/app-command/src/components/Questions/ExistingAppFlow.tsx
|
|
81793
82171
|
init_esm_shims();
|
|
81794
|
-
var
|
|
81795
|
-
var
|
|
82172
|
+
var import_react123 = __toESM(require_react(), 1);
|
|
82173
|
+
var import_variant40 = __toESM(require_lib(), 1);
|
|
81796
82174
|
|
|
81797
82175
|
// ../create-new-packages/app-command/src/components/ExtendExistingApp.tsx
|
|
81798
82176
|
init_esm_shims();
|
|
81799
|
-
var
|
|
82177
|
+
var import_react122 = __toESM(require_react(), 1);
|
|
81800
82178
|
var ExtendExistingApp = ({
|
|
81801
82179
|
developerApps,
|
|
81802
82180
|
onSelected
|
|
81803
82181
|
}) => {
|
|
81804
82182
|
const { t: t3 } = useTranslation();
|
|
81805
82183
|
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
81806
|
-
return /* @__PURE__ */
|
|
82184
|
+
return /* @__PURE__ */ import_react122.default.createElement(
|
|
81807
82185
|
SelectInput2,
|
|
81808
82186
|
{
|
|
81809
82187
|
label: t3("create_app.extend_existing.select_app.label"),
|
|
@@ -81841,7 +82219,7 @@ var ExistingAppFlow = ({
|
|
|
81841
82219
|
const backendAsAServiceClient = useBackendAsAServiceClient();
|
|
81842
82220
|
const biLogger = useBiLogger();
|
|
81843
82221
|
const { t: t3 } = useTranslation();
|
|
81844
|
-
const [appData, setAppData] = (0,
|
|
82222
|
+
const [appData, setAppData] = (0, import_react123.useState)();
|
|
81845
82223
|
const registerAppCallback = useAsyncCallback3(
|
|
81846
82224
|
async (_2, { appData: appData2, packageName }) => {
|
|
81847
82225
|
const { variables } = await createAppProjectAndEnvironment({
|
|
@@ -81859,7 +82237,7 @@ var ExistingAppFlow = ({
|
|
|
81859
82237
|
});
|
|
81860
82238
|
}
|
|
81861
82239
|
);
|
|
81862
|
-
return /* @__PURE__ */
|
|
82240
|
+
return /* @__PURE__ */ import_react123.default.createElement(import_react123.default.Fragment, null, /* @__PURE__ */ import_react123.default.createElement(
|
|
81863
82241
|
ExtendExistingApp,
|
|
81864
82242
|
{
|
|
81865
82243
|
developerApps,
|
|
@@ -81870,7 +82248,7 @@ var ExistingAppFlow = ({
|
|
|
81870
82248
|
setAppData(appData2);
|
|
81871
82249
|
}
|
|
81872
82250
|
}
|
|
81873
|
-
), appData && /* @__PURE__ */
|
|
82251
|
+
), appData && /* @__PURE__ */ import_react123.default.createElement(
|
|
81874
82252
|
ChoosePackageName,
|
|
81875
82253
|
{
|
|
81876
82254
|
appName: appData.appName,
|
|
@@ -81883,9 +82261,9 @@ var ExistingAppFlow = ({
|
|
|
81883
82261
|
});
|
|
81884
82262
|
}
|
|
81885
82263
|
}
|
|
81886
|
-
), (0,
|
|
82264
|
+
), (0, import_variant40.match)(registerAppCallback.status, {
|
|
81887
82265
|
Error: () => null,
|
|
81888
|
-
Loading: () => /* @__PURE__ */
|
|
82266
|
+
Loading: () => /* @__PURE__ */ import_react123.default.createElement(Box_default, { marginTop: 1 }, /* @__PURE__ */ import_react123.default.createElement(Spinner2, { text: t3("create_app.extend_existing.get_project") })),
|
|
81889
82267
|
Success: () => null,
|
|
81890
82268
|
NotRequested: () => null
|
|
81891
82269
|
}));
|
|
@@ -81893,45 +82271,45 @@ var ExistingAppFlow = ({
|
|
|
81893
82271
|
|
|
81894
82272
|
// ../create-new-packages/app-command/src/components/StartFromTemplateMessage.tsx
|
|
81895
82273
|
init_esm_shims();
|
|
81896
|
-
var
|
|
81897
|
-
var
|
|
82274
|
+
var import_react124 = __toESM(require_react(), 1);
|
|
82275
|
+
var import_variant41 = __toESM(require_lib(), 1);
|
|
81898
82276
|
var StartFromTemplateMessage = ({
|
|
81899
82277
|
template
|
|
81900
82278
|
}) => {
|
|
81901
|
-
const messageComponent = (0,
|
|
81902
|
-
App: ({ payload: payload7 }) => /* @__PURE__ */
|
|
82279
|
+
const messageComponent = (0, import_variant41.match)(template, {
|
|
82280
|
+
App: ({ payload: payload7 }) => /* @__PURE__ */ import_react124.default.createElement(
|
|
81903
82281
|
Trans2,
|
|
81904
82282
|
{
|
|
81905
82283
|
i18nKey: "create_app.template_is_set_from_options.template_id",
|
|
81906
82284
|
values: {
|
|
81907
82285
|
templateName: payload7.title
|
|
81908
82286
|
},
|
|
81909
|
-
components: [/* @__PURE__ */
|
|
82287
|
+
components: [/* @__PURE__ */ import_react124.default.createElement(Text2, { bold: true })]
|
|
81910
82288
|
}
|
|
81911
82289
|
),
|
|
81912
|
-
GitRepo: ({ url }) => /* @__PURE__ */
|
|
82290
|
+
GitRepo: ({ url }) => /* @__PURE__ */ import_react124.default.createElement(
|
|
81913
82291
|
Trans2,
|
|
81914
82292
|
{
|
|
81915
82293
|
i18nKey: "create_app.template_is_set_from_options.git_repository",
|
|
81916
82294
|
values: {
|
|
81917
82295
|
templateRepoUrl: url
|
|
81918
82296
|
},
|
|
81919
|
-
components: [/* @__PURE__ */
|
|
82297
|
+
components: [/* @__PURE__ */ import_react124.default.createElement(Text2, { bold: true })]
|
|
81920
82298
|
}
|
|
81921
82299
|
),
|
|
81922
|
-
Local: ({ path: path4 }) => /* @__PURE__ */
|
|
82300
|
+
Local: ({ path: path4 }) => /* @__PURE__ */ import_react124.default.createElement(
|
|
81923
82301
|
Trans2,
|
|
81924
82302
|
{
|
|
81925
82303
|
i18nKey: "create_app.template_is_set_from_options.local",
|
|
81926
82304
|
values: {
|
|
81927
82305
|
templatePath: path4
|
|
81928
82306
|
},
|
|
81929
|
-
components: [/* @__PURE__ */
|
|
82307
|
+
components: [/* @__PURE__ */ import_react124.default.createElement(Text2, { bold: true })]
|
|
81930
82308
|
}
|
|
81931
82309
|
),
|
|
81932
82310
|
Default: () => null
|
|
81933
82311
|
});
|
|
81934
|
-
return /* @__PURE__ */
|
|
82312
|
+
return /* @__PURE__ */ import_react124.default.createElement(Box_default, { marginBottom: 1 }, messageComponent);
|
|
81935
82313
|
};
|
|
81936
82314
|
|
|
81937
82315
|
// ../create-new-packages/app-command/src/components/Questions/Questions.tsx
|
|
@@ -81945,7 +82323,7 @@ var Questions = ({
|
|
|
81945
82323
|
const devCenterClient = useDevCenterClient();
|
|
81946
82324
|
const { reportError: reportError2 } = useErrorReporter();
|
|
81947
82325
|
const { getDeveloperApps } = useDevCenterClient();
|
|
81948
|
-
const [appCreationFlow, setAppCreationFlow] = (0,
|
|
82326
|
+
const [appCreationFlow, setAppCreationFlow] = (0, import_react125.useState)();
|
|
81949
82327
|
const { status } = useAsync2(async () => {
|
|
81950
82328
|
const { template, appName } = await parseCommandOptions(
|
|
81951
82329
|
targetParentFolder2,
|
|
@@ -81976,27 +82354,34 @@ var Questions = ({
|
|
|
81976
82354
|
};
|
|
81977
82355
|
}
|
|
81978
82356
|
}, []);
|
|
81979
|
-
return (0,
|
|
82357
|
+
return (0, import_variant42.match)(status, {
|
|
81980
82358
|
Error: () => null,
|
|
81981
|
-
Loading: () => /* @__PURE__ */
|
|
82359
|
+
Loading: () => /* @__PURE__ */ import_react125.default.createElement(Spinner2, { text: t3("general.loading") }),
|
|
81982
82360
|
Success: ({
|
|
81983
82361
|
result: { template, appName, developerApps, developerAppsStatus }
|
|
81984
82362
|
}) => {
|
|
81985
82363
|
if (template) {
|
|
81986
|
-
return /* @__PURE__ */
|
|
82364
|
+
return /* @__PURE__ */ import_react125.default.createElement(import_react125.default.Fragment, null, /* @__PURE__ */ import_react125.default.createElement(StartFromTemplateMessage, { template }), (0, import_variant42.isType)(appName, AppNameOptions.Provided) ? /* @__PURE__ */ import_react125.default.createElement(
|
|
82365
|
+
NewAppAutoFlow,
|
|
82366
|
+
{
|
|
82367
|
+
extendAppId: commandOptions.extendAppId,
|
|
82368
|
+
appName,
|
|
82369
|
+
onSubmit,
|
|
82370
|
+
template
|
|
82371
|
+
}
|
|
82372
|
+
) : /* @__PURE__ */ import_react125.default.createElement(
|
|
81987
82373
|
NewAppFlow,
|
|
81988
82374
|
{
|
|
81989
82375
|
onSubmit,
|
|
81990
|
-
template,
|
|
81991
82376
|
extendAppId: commandOptions.extendAppId,
|
|
81992
|
-
|
|
82377
|
+
template,
|
|
81993
82378
|
targetParentFolder: targetParentFolder2,
|
|
81994
82379
|
repoType: repoType2
|
|
81995
82380
|
}
|
|
81996
82381
|
));
|
|
81997
82382
|
}
|
|
81998
|
-
if ((0,
|
|
81999
|
-
return /* @__PURE__ */
|
|
82383
|
+
if ((0, import_variant42.isType)(developerAppsStatus, "NoApps")) {
|
|
82384
|
+
return /* @__PURE__ */ import_react125.default.createElement(
|
|
82000
82385
|
NewAppFlow,
|
|
82001
82386
|
{
|
|
82002
82387
|
onSubmit,
|
|
@@ -82005,20 +82390,20 @@ var Questions = ({
|
|
|
82005
82390
|
}
|
|
82006
82391
|
);
|
|
82007
82392
|
}
|
|
82008
|
-
return /* @__PURE__ */
|
|
82393
|
+
return /* @__PURE__ */ import_react125.default.createElement(import_react125.default.Fragment, null, /* @__PURE__ */ import_react125.default.createElement(
|
|
82009
82394
|
CreateAppOrExtendExisting,
|
|
82010
82395
|
{
|
|
82011
82396
|
developerAppsStatus,
|
|
82012
82397
|
onStartCreationFlow: setAppCreationFlow
|
|
82013
82398
|
}
|
|
82014
|
-
), appCreationFlow === "new" && /* @__PURE__ */
|
|
82399
|
+
), appCreationFlow === "new" && /* @__PURE__ */ import_react125.default.createElement(
|
|
82015
82400
|
NewAppFlow,
|
|
82016
82401
|
{
|
|
82017
82402
|
onSubmit,
|
|
82018
82403
|
targetParentFolder: targetParentFolder2,
|
|
82019
82404
|
repoType: repoType2
|
|
82020
82405
|
}
|
|
82021
|
-
), appCreationFlow === "existing" && /* @__PURE__ */
|
|
82406
|
+
), appCreationFlow === "existing" && /* @__PURE__ */ import_react125.default.createElement(
|
|
82022
82407
|
ExistingAppFlow,
|
|
82023
82408
|
{
|
|
82024
82409
|
developerApps,
|
|
@@ -82033,7 +82418,7 @@ var Questions = ({
|
|
|
82033
82418
|
|
|
82034
82419
|
// ../create-new-packages/app-command/src/tasks.ts
|
|
82035
82420
|
init_esm_shims();
|
|
82036
|
-
var
|
|
82421
|
+
var import_variant43 = __toESM(require_lib(), 1);
|
|
82037
82422
|
import { mkdir } from "node:fs/promises";
|
|
82038
82423
|
import { join as join12 } from "node:path";
|
|
82039
82424
|
|
|
@@ -82114,7 +82499,7 @@ function getTasks({
|
|
|
82114
82499
|
cause: e2
|
|
82115
82500
|
});
|
|
82116
82501
|
}
|
|
82117
|
-
const { generateApp } = await import("./generator-
|
|
82502
|
+
const { generateApp } = await import("./generator-D63KTZEK.js");
|
|
82118
82503
|
await generateApp({
|
|
82119
82504
|
packageName,
|
|
82120
82505
|
packageFolder,
|
|
@@ -82123,7 +82508,7 @@ function getTasks({
|
|
|
82123
82508
|
repoType: repoType2,
|
|
82124
82509
|
template,
|
|
82125
82510
|
templateParams,
|
|
82126
|
-
ideForMcp: (0,
|
|
82511
|
+
ideForMcp: (0, import_variant43.match)(mcpConfigResult, {
|
|
82127
82512
|
Created: ({ ideForMcp }) => ideForMcp,
|
|
82128
82513
|
Canceled: () => {
|
|
82129
82514
|
}
|
|
@@ -82221,7 +82606,7 @@ function getTasks({
|
|
|
82221
82606
|
successText: agentConfigsTaskText.successText
|
|
82222
82607
|
};
|
|
82223
82608
|
const optionalInstallAndAgentsTask = skipInstall ? [] : [installDependenciesTask, addWixSkillsTask, generateAgentConfigsTask];
|
|
82224
|
-
return (0,
|
|
82609
|
+
return (0, import_variant43.match)(repoType2, {
|
|
82225
82610
|
None: () => [
|
|
82226
82611
|
generateProjectTask,
|
|
82227
82612
|
...skipGit ? [] : [initializeGitTask],
|
|
@@ -82235,10 +82620,10 @@ function getTasks({
|
|
|
82235
82620
|
|
|
82236
82621
|
// ../create-new-packages/app-command/src/components/FinishedSuccessfullyMessage.tsx
|
|
82237
82622
|
init_esm_shims();
|
|
82238
|
-
var
|
|
82623
|
+
var import_react126 = __toESM(require_react(), 1);
|
|
82239
82624
|
var FinishedSuccessfullyMessage = ({ packageName, appData: { appName, appId }, packageManager: packageManager2 }) => {
|
|
82240
82625
|
const { t: t3 } = useTranslation();
|
|
82241
|
-
return /* @__PURE__ */
|
|
82626
|
+
return /* @__PURE__ */ import_react126.default.createElement(
|
|
82242
82627
|
Box_default,
|
|
82243
82628
|
{
|
|
82244
82629
|
borderColor: "blue",
|
|
@@ -82250,22 +82635,22 @@ var FinishedSuccessfullyMessage = ({ packageName, appData: { appName, appId }, p
|
|
|
82250
82635
|
marginLeft: -2,
|
|
82251
82636
|
marginBottom: 1
|
|
82252
82637
|
},
|
|
82253
|
-
/* @__PURE__ */
|
|
82254
|
-
/* @__PURE__ */
|
|
82638
|
+
/* @__PURE__ */ import_react126.default.createElement(Box_default, { marginTop: -2, marginLeft: -4 }, /* @__PURE__ */ import_react126.default.createElement(Text2, { skin: "question", bold: true }, t3("create_app.results"), " ")),
|
|
82639
|
+
/* @__PURE__ */ import_react126.default.createElement(Text2, null, /* @__PURE__ */ import_react126.default.createElement(
|
|
82255
82640
|
Trans2,
|
|
82256
82641
|
{
|
|
82257
82642
|
i18nKey: "create_app.generate_project.finished.ready_to_start",
|
|
82258
|
-
components: [/* @__PURE__ */
|
|
82643
|
+
components: [/* @__PURE__ */ import_react126.default.createElement(Text2, { bold: true })],
|
|
82259
82644
|
values: { appName }
|
|
82260
82645
|
}
|
|
82261
82646
|
)),
|
|
82262
|
-
/* @__PURE__ */
|
|
82263
|
-
/* @__PURE__ */
|
|
82647
|
+
/* @__PURE__ */ import_react126.default.createElement(Text2, { bold: true }, t3("create_app.generate_project.finished.next_steps")),
|
|
82648
|
+
/* @__PURE__ */ import_react126.default.createElement(UnorderedList, { gap: 1 }, /* @__PURE__ */ import_react126.default.createElement(UnorderedList.Item, { marker: "\u{1F45F}" }, /* @__PURE__ */ import_react126.default.createElement(Text2, null, t3("create_app.generate_project.finished.run_local_development")), /* @__PURE__ */ import_react126.default.createElement(Text2, { skin: "info" }, `cd ${packageName}`), /* @__PURE__ */ import_react126.default.createElement(Text2, { skin: "info" }, `${packageManager2.getRunCmd()} dev`)), /* @__PURE__ */ import_react126.default.createElement(UnorderedList.Item, { marker: "\u{1F3AF}" }, /* @__PURE__ */ import_react126.default.createElement(Text2, null, t3("create_app.generate_project.finished.generate_extensions")), /* @__PURE__ */ import_react126.default.createElement(Text2, { skin: "info" }, `${packageManager2.getRunCmd()} generate`)), /* @__PURE__ */ import_react126.default.createElement(UnorderedList.Item, { marker: "\u{1F91D}" }, /* @__PURE__ */ import_react126.default.createElement(
|
|
82264
82649
|
Trans2,
|
|
82265
82650
|
{
|
|
82266
82651
|
i18nKey: "create_app.create_new.app_on_dev_center",
|
|
82267
82652
|
components: [
|
|
82268
|
-
/* @__PURE__ */
|
|
82653
|
+
/* @__PURE__ */ import_react126.default.createElement(
|
|
82269
82654
|
Link,
|
|
82270
82655
|
{
|
|
82271
82656
|
skin: "info",
|
|
@@ -82274,12 +82659,12 @@ var FinishedSuccessfullyMessage = ({ packageName, appData: { appName, appId }, p
|
|
|
82274
82659
|
)
|
|
82275
82660
|
]
|
|
82276
82661
|
}
|
|
82277
|
-
)), /* @__PURE__ */
|
|
82662
|
+
)), /* @__PURE__ */ import_react126.default.createElement(UnorderedList.Item, { marker: /* @__PURE__ */ import_react126.default.createElement(Learn, null) }, /* @__PURE__ */ import_react126.default.createElement(
|
|
82278
82663
|
Trans2,
|
|
82279
82664
|
{
|
|
82280
82665
|
i18nKey: "create_app.generate_project.finished.visit_docs",
|
|
82281
82666
|
components: [
|
|
82282
|
-
/* @__PURE__ */
|
|
82667
|
+
/* @__PURE__ */ import_react126.default.createElement(
|
|
82283
82668
|
Link,
|
|
82284
82669
|
{
|
|
82285
82670
|
skin: "info",
|
|
@@ -82288,12 +82673,12 @@ var FinishedSuccessfullyMessage = ({ packageName, appData: { appName, appId }, p
|
|
|
82288
82673
|
)
|
|
82289
82674
|
]
|
|
82290
82675
|
}
|
|
82291
|
-
)), /* @__PURE__ */
|
|
82676
|
+
)), /* @__PURE__ */ import_react126.default.createElement(UnorderedList.Item, { marker: "\u{1F4AC}" }, /* @__PURE__ */ import_react126.default.createElement(
|
|
82292
82677
|
Trans2,
|
|
82293
82678
|
{
|
|
82294
82679
|
i18nKey: "create_app.generate_project.finished.join_community",
|
|
82295
82680
|
components: [
|
|
82296
|
-
/* @__PURE__ */
|
|
82681
|
+
/* @__PURE__ */ import_react126.default.createElement(Link, { skin: "info", url: "https://discord.gg/wixstudio" })
|
|
82297
82682
|
]
|
|
82298
82683
|
}
|
|
82299
82684
|
)))
|
|
@@ -82302,23 +82687,23 @@ var FinishedSuccessfullyMessage = ({ packageName, appData: { appName, appId }, p
|
|
|
82302
82687
|
|
|
82303
82688
|
// ../create-new-packages/app-command/src/components/TaskList.tsx
|
|
82304
82689
|
init_esm_shims();
|
|
82305
|
-
var
|
|
82690
|
+
var import_react127 = __toESM(require_react(), 1);
|
|
82306
82691
|
var TaskList = ({ tasks, totalTaskCount }) => {
|
|
82307
|
-
return /* @__PURE__ */
|
|
82692
|
+
return /* @__PURE__ */ import_react127.default.createElement(import_react127.default.Fragment, null, tasks.map((task, index) => {
|
|
82308
82693
|
const stepper = `[${index + 1}/${totalTaskCount}]`;
|
|
82309
82694
|
const fullText = `${stepper} ${task.text}`;
|
|
82310
82695
|
if (task.status === "running") {
|
|
82311
|
-
return /* @__PURE__ */
|
|
82696
|
+
return /* @__PURE__ */ import_react127.default.createElement(Spinner2, { key: index, text: fullText });
|
|
82312
82697
|
}
|
|
82313
|
-
return /* @__PURE__ */
|
|
82698
|
+
return /* @__PURE__ */ import_react127.default.createElement(Alert, { key: index, type: "success" }, fullText);
|
|
82314
82699
|
}));
|
|
82315
82700
|
};
|
|
82316
82701
|
|
|
82317
82702
|
// ../create-new-packages/app-command/src/task-runner.ts
|
|
82318
82703
|
init_esm_shims();
|
|
82319
|
-
var
|
|
82320
|
-
var
|
|
82321
|
-
var TaskRunnerStatus = (0,
|
|
82704
|
+
var import_react128 = __toESM(require_react(), 1);
|
|
82705
|
+
var import_variant44 = __toESM(require_lib(), 1);
|
|
82706
|
+
var TaskRunnerStatus = (0, import_variant44.variant)({
|
|
82322
82707
|
Idle: {},
|
|
82323
82708
|
Running: (runningTasks, totalTaskCount) => {
|
|
82324
82709
|
const taskStatuses = runningTasks.map((task, index) => {
|
|
@@ -82342,7 +82727,7 @@ var TaskRunnerStatus = (0, import_variant39.variant)({
|
|
|
82342
82727
|
}
|
|
82343
82728
|
});
|
|
82344
82729
|
function useTaskRunner() {
|
|
82345
|
-
const [status, setStatus] = (0,
|
|
82730
|
+
const [status, setStatus] = (0, import_react128.useState)(
|
|
82346
82731
|
TaskRunnerStatus.Idle()
|
|
82347
82732
|
);
|
|
82348
82733
|
const { execute } = useAsyncCallback3(async (_2, tasks) => {
|
|
@@ -82362,23 +82747,23 @@ function useTaskRunner() {
|
|
|
82362
82747
|
|
|
82363
82748
|
// ../create-new-packages/app-command/src/components/mcp/McpConfigCreated.tsx
|
|
82364
82749
|
init_esm_shims();
|
|
82365
|
-
var
|
|
82750
|
+
var import_react129 = __toESM(require_react(), 1);
|
|
82366
82751
|
var McpConfigCreated = ({
|
|
82367
82752
|
mcpPath,
|
|
82368
82753
|
docsUrl
|
|
82369
82754
|
}) => {
|
|
82370
|
-
return /* @__PURE__ */
|
|
82755
|
+
return /* @__PURE__ */ import_react129.default.createElement(Box_default, { flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ import_react129.default.createElement(Box_default, { marginLeft: -2 }, /* @__PURE__ */ import_react129.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react129.default.createElement(Badge, { skin: "success" }, /* @__PURE__ */ import_react129.default.createElement(Trans2, { i18nKey: "create_app.mcp_config_created_badge" })), " ")), /* @__PURE__ */ import_react129.default.createElement(Box_default, { marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ import_react129.default.createElement(Text2, null, /* @__PURE__ */ import_react129.default.createElement(
|
|
82371
82756
|
Trans2,
|
|
82372
82757
|
{
|
|
82373
82758
|
i18nKey: "create_app.mcp_config_created_1",
|
|
82374
|
-
components: [/* @__PURE__ */
|
|
82759
|
+
components: [/* @__PURE__ */ import_react129.default.createElement(Text2, { bold: true })],
|
|
82375
82760
|
values: { mcpPath }
|
|
82376
82761
|
}
|
|
82377
|
-
)), /* @__PURE__ */
|
|
82762
|
+
)), /* @__PURE__ */ import_react129.default.createElement(Text2, null, /* @__PURE__ */ import_react129.default.createElement(Trans2, { i18nKey: "create_app.mcp_config_created_2" })), /* @__PURE__ */ import_react129.default.createElement(Text2, null, /* @__PURE__ */ import_react129.default.createElement(
|
|
82378
82763
|
Trans2,
|
|
82379
82764
|
{
|
|
82380
82765
|
i18nKey: "create_app.mcp_config_created_3",
|
|
82381
|
-
components: [/* @__PURE__ */
|
|
82766
|
+
components: [/* @__PURE__ */ import_react129.default.createElement(Link, { skin: "info", url: docsUrl })]
|
|
82382
82767
|
}
|
|
82383
82768
|
))));
|
|
82384
82769
|
};
|
|
@@ -82386,7 +82771,7 @@ var McpConfigCreated = ({
|
|
|
82386
82771
|
// ../create-new-packages/app-command/src/components/CreateAppCommand.tsx
|
|
82387
82772
|
var GenerationProgress = ({ tasks, totalTaskCount }) => {
|
|
82388
82773
|
const { t: t3 } = useTranslation();
|
|
82389
|
-
return /* @__PURE__ */
|
|
82774
|
+
return /* @__PURE__ */ import_react130.default.createElement(import_react130.default.Fragment, null, /* @__PURE__ */ import_react130.default.createElement(Box_default, { marginBottom: 1, marginTop: 1 }, /* @__PURE__ */ import_react130.default.createElement(Text2, null, t3("create_app.generate_project.generating_project"))), /* @__PURE__ */ import_react130.default.createElement(Box_default, { marginBottom: 1, flexDirection: "column" }, /* @__PURE__ */ import_react130.default.createElement(TaskList, { tasks, totalTaskCount })));
|
|
82390
82775
|
};
|
|
82391
82776
|
var CreateAppCommand = ({
|
|
82392
82777
|
userInfo: userInfo2,
|
|
@@ -82397,13 +82782,13 @@ var CreateAppCommand = ({
|
|
|
82397
82782
|
}) => {
|
|
82398
82783
|
const { t: t3 } = useTranslation();
|
|
82399
82784
|
const { execute: executeTaskRunner, status: taskRunnerStatus } = useTaskRunner();
|
|
82400
|
-
const [generationData, setGenerationData] = (0,
|
|
82785
|
+
const [generationData, setGenerationData] = (0, import_react130.useState)();
|
|
82401
82786
|
async function runTasks(data) {
|
|
82402
82787
|
setGenerationData(data);
|
|
82403
82788
|
const tasks = getTasks(data, t3);
|
|
82404
82789
|
await executeTaskRunner(tasks);
|
|
82405
82790
|
}
|
|
82406
|
-
return /* @__PURE__ */
|
|
82791
|
+
return /* @__PURE__ */ import_react130.default.createElement(
|
|
82407
82792
|
Box_default,
|
|
82408
82793
|
{
|
|
82409
82794
|
flexDirection: "column",
|
|
@@ -82414,8 +82799,8 @@ var CreateAppCommand = ({
|
|
|
82414
82799
|
borderTop: false,
|
|
82415
82800
|
paddingLeft: 1
|
|
82416
82801
|
},
|
|
82417
|
-
/* @__PURE__ */
|
|
82418
|
-
/* @__PURE__ */
|
|
82802
|
+
/* @__PURE__ */ import_react130.default.createElement(WelcomeMessage, null),
|
|
82803
|
+
/* @__PURE__ */ import_react130.default.createElement(AuthProvider2, { userInfo: userInfo2 }, /* @__PURE__ */ import_react130.default.createElement(
|
|
82419
82804
|
Questions,
|
|
82420
82805
|
{
|
|
82421
82806
|
repoType: repoType2,
|
|
@@ -82432,13 +82817,13 @@ var CreateAppCommand = ({
|
|
|
82432
82817
|
})
|
|
82433
82818
|
}
|
|
82434
82819
|
)),
|
|
82435
|
-
generationData && (0,
|
|
82820
|
+
generationData && (0, import_variant45.match)(taskRunnerStatus, {
|
|
82436
82821
|
Idle: () => null,
|
|
82437
|
-
Running: (status) => /* @__PURE__ */
|
|
82438
|
-
Done: (status) => /* @__PURE__ */
|
|
82439
|
-
Created: ({ mcpPath, docsUrl }) => /* @__PURE__ */
|
|
82822
|
+
Running: (status) => /* @__PURE__ */ import_react130.default.createElement(GenerationProgress, { ...status }),
|
|
82823
|
+
Done: (status) => /* @__PURE__ */ import_react130.default.createElement(import_react130.default.Fragment, null, /* @__PURE__ */ import_react130.default.createElement(GenerationProgress, { ...status }), (0, import_variant45.match)(generationData.mcpConfigResult, {
|
|
82824
|
+
Created: ({ mcpPath, docsUrl }) => /* @__PURE__ */ import_react130.default.createElement(McpConfigCreated, { mcpPath, docsUrl }),
|
|
82440
82825
|
Canceled: () => null
|
|
82441
|
-
}), /* @__PURE__ */
|
|
82826
|
+
}), /* @__PURE__ */ import_react130.default.createElement(
|
|
82442
82827
|
FinishedSuccessfullyMessage,
|
|
82443
82828
|
{
|
|
82444
82829
|
packageName: generationData.packageName,
|
|
@@ -82492,6 +82877,10 @@ var messages_default3 = {
|
|
|
82492
82877
|
"create_app.extend_existing.select_app.label": "Which app would you like to extend?",
|
|
82493
82878
|
"create_app.extend_existing.get_project": "Fetching application data",
|
|
82494
82879
|
"create_app.choose_package_name.label": "Enter a folder name for your project",
|
|
82880
|
+
"create_app.choose_namespace.label": "Enter a namespace for your app",
|
|
82881
|
+
"create_app.choose_namespace.placeholder": "{suggested}",
|
|
82882
|
+
"create_app.choose_code_identifier.label": "Enter a code identifier for your project",
|
|
82883
|
+
"create_app.choose_code_identifier.placeholder": "{suggested}",
|
|
82495
82884
|
"create_app.generate_project.generating_project": "Generating your app...",
|
|
82496
82885
|
"create_app.generate_project.generating_files.loading": "Generating project files...",
|
|
82497
82886
|
"create_app.generate_project.generating_files.done": "Project files generated!",
|
|
@@ -82599,7 +82988,7 @@ var getAppCommand = ({
|
|
|
82599
82988
|
try {
|
|
82600
82989
|
transaction.start();
|
|
82601
82990
|
await render2(
|
|
82602
|
-
/* @__PURE__ */
|
|
82991
|
+
/* @__PURE__ */ import_react131.default.createElement(BiProvider, { value: biLogger }, /* @__PURE__ */ import_react131.default.createElement(ErrorReporterProvider, { value: errorReporter2 }, /* @__PURE__ */ import_react131.default.createElement(PanoramaProvider, { value: panorama2 }, /* @__PURE__ */ import_react131.default.createElement(HttpClientProvider, { headers }, /* @__PURE__ */ import_react131.default.createElement(I18nProvider, { messages: messages_default3 }, /* @__PURE__ */ import_react131.default.createElement(
|
|
82603
82992
|
CreateAppCommand,
|
|
82604
82993
|
{
|
|
82605
82994
|
userInfo: userInfo2,
|
|
@@ -82621,7 +83010,7 @@ var getAppCommand = ({
|
|
|
82621
83010
|
|
|
82622
83011
|
// ../create-new-packages/headless-command/src/index.tsx
|
|
82623
83012
|
init_esm_shims();
|
|
82624
|
-
var
|
|
83013
|
+
var import_react154 = __toESM(require_react(), 1);
|
|
82625
83014
|
|
|
82626
83015
|
// ../create-new-packages/headless-command/src/validations/validate-business-name.ts
|
|
82627
83016
|
init_esm_shims();
|
|
@@ -82648,21 +83037,21 @@ var validateProjectName = (value2) => {
|
|
|
82648
83037
|
|
|
82649
83038
|
// ../create-new-packages/headless-command/src/components/LinkCommand/LinkCommand.tsx
|
|
82650
83039
|
init_esm_shims();
|
|
82651
|
-
var
|
|
82652
|
-
var
|
|
83040
|
+
var import_react142 = __toESM(require_react(), 1);
|
|
83041
|
+
var import_variant50 = __toESM(require_lib(), 1);
|
|
82653
83042
|
|
|
82654
83043
|
// ../create-new-packages/headless-command/src/components/WelcomeMessage.tsx
|
|
82655
83044
|
init_esm_shims();
|
|
82656
|
-
var
|
|
83045
|
+
var import_react132 = __toESM(require_react(), 1);
|
|
82657
83046
|
var WelcomeMessage2 = () => {
|
|
82658
|
-
return /* @__PURE__ */
|
|
83047
|
+
return /* @__PURE__ */ import_react132.default.createElement(Box_default, { flexDirection: "column", marginBottom: 1, paddingTop: 1 }, /* @__PURE__ */ import_react132.default.createElement(Text2, { bold: true }, "Create Headless Site"));
|
|
82659
83048
|
};
|
|
82660
83049
|
|
|
82661
83050
|
// ../create-new-packages/headless-command/src/components/ChooseBusinessName.tsx
|
|
82662
83051
|
init_esm_shims();
|
|
82663
|
-
var
|
|
83052
|
+
var import_react133 = __toESM(require_react(), 1);
|
|
82664
83053
|
var ChooseBusinessName = ({ onSubmit }) => {
|
|
82665
|
-
const validate3 = (0,
|
|
83054
|
+
const validate3 = (0, import_react133.useCallback)((businessName) => {
|
|
82666
83055
|
try {
|
|
82667
83056
|
validateBusinessName(businessName);
|
|
82668
83057
|
return true;
|
|
@@ -82670,7 +83059,7 @@ var ChooseBusinessName = ({ onSubmit }) => {
|
|
|
82670
83059
|
return e2.message;
|
|
82671
83060
|
}
|
|
82672
83061
|
}, []);
|
|
82673
|
-
return /* @__PURE__ */
|
|
83062
|
+
return /* @__PURE__ */ import_react133.default.createElement(
|
|
82674
83063
|
TextInput2,
|
|
82675
83064
|
{
|
|
82676
83065
|
label: "What's the name of your business?",
|
|
@@ -82683,12 +83072,12 @@ var ChooseBusinessName = ({ onSubmit }) => {
|
|
|
82683
83072
|
|
|
82684
83073
|
// ../create-new-packages/headless-command/src/components/CreateBusiness.tsx
|
|
82685
83074
|
init_esm_shims();
|
|
82686
|
-
var
|
|
82687
|
-
var
|
|
83075
|
+
var import_react135 = __toESM(require_react(), 1);
|
|
83076
|
+
var import_variant46 = __toESM(require_lib(), 1);
|
|
82688
83077
|
|
|
82689
83078
|
// ../create-new-packages/headless-command/src/clients/funnel-projects/useFunnelProjectsClient.ts
|
|
82690
83079
|
init_esm_shims();
|
|
82691
|
-
var
|
|
83080
|
+
var import_react134 = __toESM(require_react(), 1);
|
|
82692
83081
|
|
|
82693
83082
|
// ../create-new-packages/headless-command/src/clients/funnel-projects/funnel-projects-client.ts
|
|
82694
83083
|
init_esm_shims();
|
|
@@ -82794,7 +83183,7 @@ var FunnelProjectsClient = class {
|
|
|
82794
83183
|
// ../create-new-packages/headless-command/src/clients/funnel-projects/useFunnelProjectsClient.ts
|
|
82795
83184
|
function useFunnelProjectsClient() {
|
|
82796
83185
|
const httpClient = useHttpClient({ type: "api" });
|
|
82797
|
-
const client2 = (0,
|
|
83186
|
+
const client2 = (0, import_react134.useMemo)(
|
|
82798
83187
|
() => new FunnelProjectsClient(httpClient),
|
|
82799
83188
|
[httpClient]
|
|
82800
83189
|
);
|
|
@@ -82808,18 +83197,18 @@ var CreateBusiness = ({ businessName, businessTemplateId, onDone }) => {
|
|
|
82808
83197
|
const { project } = await createProject3(businessName, businessTemplateId);
|
|
82809
83198
|
onDone({ businessId: project.metaSiteId });
|
|
82810
83199
|
}, []);
|
|
82811
|
-
return /* @__PURE__ */
|
|
83200
|
+
return /* @__PURE__ */ import_react135.default.createElement(import_react135.default.Fragment, null, (0, import_variant46.match)(status, {
|
|
82812
83201
|
Error: () => null,
|
|
82813
|
-
Loading: () => /* @__PURE__ */
|
|
82814
|
-
Success: () => /* @__PURE__ */
|
|
83202
|
+
Loading: () => /* @__PURE__ */ import_react135.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react135.default.createElement(Spinner2, { text: "Creating your business..." })),
|
|
83203
|
+
Success: () => /* @__PURE__ */ import_react135.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react135.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react135.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react135.default.createElement(Text2, null, "Business created successfully"))),
|
|
82815
83204
|
NotRequested: () => null
|
|
82816
83205
|
}));
|
|
82817
83206
|
};
|
|
82818
83207
|
|
|
82819
83208
|
// ../create-new-packages/headless-command/src/components/CreateProject.tsx
|
|
82820
83209
|
init_esm_shims();
|
|
82821
|
-
var
|
|
82822
|
-
var
|
|
83210
|
+
var import_react137 = __toESM(require_react(), 1);
|
|
83211
|
+
var import_variant47 = __toESM(require_lib(), 1);
|
|
82823
83212
|
|
|
82824
83213
|
// ../create-new-packages/headless-command/src/hooks/create-project.ts
|
|
82825
83214
|
init_esm_shims();
|
|
@@ -82831,7 +83220,7 @@ init_esm_shims();
|
|
|
82831
83220
|
|
|
82832
83221
|
// ../metasite-manager-client/src/useMetasiteManagerClient.ts
|
|
82833
83222
|
init_esm_shims();
|
|
82834
|
-
var
|
|
83223
|
+
var import_react136 = __toESM(require_react(), 1);
|
|
82835
83224
|
|
|
82836
83225
|
// ../metasite-manager-client/src/metasite-manager-client.ts
|
|
82837
83226
|
init_esm_shims();
|
|
@@ -83645,7 +84034,7 @@ function useMetasiteManagerClient({
|
|
|
83645
84034
|
siteId
|
|
83646
84035
|
} = {}) {
|
|
83647
84036
|
const httpClient = useHttpClient({ type: "general", siteId });
|
|
83648
|
-
const client2 = (0,
|
|
84037
|
+
const client2 = (0, import_react136.useMemo)(
|
|
83649
84038
|
() => new MetasiteManagerClient(httpClient),
|
|
83650
84039
|
[httpClient]
|
|
83651
84040
|
);
|
|
@@ -83745,17 +84134,17 @@ var CreateProject = ({
|
|
|
83745
84134
|
cloudProviders
|
|
83746
84135
|
}) => {
|
|
83747
84136
|
const { status, execute } = useCreateProject(businessId);
|
|
83748
|
-
(0,
|
|
83749
|
-
if ((0,
|
|
84137
|
+
(0, import_react137.useEffect)(() => {
|
|
84138
|
+
if ((0, import_variant47.isType)(status, "Success")) {
|
|
83750
84139
|
onSubmit(status.result);
|
|
83751
84140
|
}
|
|
83752
84141
|
}, [status, onSubmit]);
|
|
83753
|
-
(0,
|
|
84142
|
+
(0, import_react137.useEffect)(() => {
|
|
83754
84143
|
if (providedProjectName) {
|
|
83755
84144
|
void execute({ projectName: providedProjectName, cloudProviders });
|
|
83756
84145
|
}
|
|
83757
84146
|
}, [providedProjectName, cloudProviders, execute]);
|
|
83758
|
-
const validate3 = (0,
|
|
84147
|
+
const validate3 = (0, import_react137.useCallback)(async (projectName) => {
|
|
83759
84148
|
try {
|
|
83760
84149
|
validateProjectName(projectName);
|
|
83761
84150
|
return true;
|
|
@@ -83763,7 +84152,7 @@ var CreateProject = ({
|
|
|
83763
84152
|
return e2.message;
|
|
83764
84153
|
}
|
|
83765
84154
|
}, []);
|
|
83766
|
-
return /* @__PURE__ */
|
|
84155
|
+
return /* @__PURE__ */ import_react137.default.createElement(import_react137.default.Fragment, null, !providedProjectName && /* @__PURE__ */ import_react137.default.createElement(
|
|
83767
84156
|
TextInput2,
|
|
83768
84157
|
{
|
|
83769
84158
|
label: "What's the name of your Custom Frontend project?",
|
|
@@ -83771,18 +84160,18 @@ var CreateProject = ({
|
|
|
83771
84160
|
validate: validate3,
|
|
83772
84161
|
inCreateFlow: true
|
|
83773
84162
|
}
|
|
83774
|
-
), (0,
|
|
84163
|
+
), (0, import_variant47.match)(status, {
|
|
83775
84164
|
Error: () => null,
|
|
83776
|
-
Loading: () => /* @__PURE__ */
|
|
83777
|
-
Success: () => /* @__PURE__ */
|
|
84165
|
+
Loading: () => /* @__PURE__ */ import_react137.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react137.default.createElement(Spinner2, { text: "Creating your project..." })),
|
|
84166
|
+
Success: () => /* @__PURE__ */ import_react137.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react137.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react137.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react137.default.createElement(Text2, null, "Project created successfully"))),
|
|
83778
84167
|
NotRequested: () => null
|
|
83779
84168
|
}));
|
|
83780
84169
|
};
|
|
83781
84170
|
|
|
83782
84171
|
// ../create-new-packages/headless-command/src/components/LinkCommand/GenerateProject.tsx
|
|
83783
84172
|
init_esm_shims();
|
|
83784
|
-
var
|
|
83785
|
-
var
|
|
84173
|
+
var import_react140 = __toESM(require_react(), 1);
|
|
84174
|
+
var import_variant49 = __toESM(require_lib(), 1);
|
|
83786
84175
|
|
|
83787
84176
|
// ../cli-project-extender/src/index.ts
|
|
83788
84177
|
init_esm_shims();
|
|
@@ -83944,9 +84333,9 @@ var IdentityType = class extends BaseType {
|
|
|
83944
84333
|
}
|
|
83945
84334
|
};
|
|
83946
84335
|
var ObjectType = class extends BaseType {
|
|
83947
|
-
constructor(
|
|
84336
|
+
constructor(fields12) {
|
|
83948
84337
|
super();
|
|
83949
|
-
this.fields =
|
|
84338
|
+
this.fields = fields12;
|
|
83950
84339
|
__publicField$2(this, "kind", "ObjectType");
|
|
83951
84340
|
}
|
|
83952
84341
|
toString() {
|
|
@@ -89726,17 +90115,17 @@ function genericPrintNoParens(path4, options, print2) {
|
|
|
89726
90115
|
case "ObjectTypeAnnotation": {
|
|
89727
90116
|
const isTypeAnnotation = n3.type === "ObjectTypeAnnotation";
|
|
89728
90117
|
const separator = options.flowObjectCommas ? "," : isTypeAnnotation ? ";" : ",";
|
|
89729
|
-
const
|
|
90118
|
+
const fields12 = [];
|
|
89730
90119
|
let allowBreak = false;
|
|
89731
90120
|
if (isTypeAnnotation) {
|
|
89732
|
-
|
|
90121
|
+
fields12.push("indexers", "callProperties");
|
|
89733
90122
|
if (n3.internalSlots != null) {
|
|
89734
|
-
|
|
90123
|
+
fields12.push("internalSlots");
|
|
89735
90124
|
}
|
|
89736
90125
|
}
|
|
89737
|
-
|
|
90126
|
+
fields12.push("properties");
|
|
89738
90127
|
let len = 0;
|
|
89739
|
-
|
|
90128
|
+
fields12.forEach(function(field) {
|
|
89740
90129
|
len += n3[field].length;
|
|
89741
90130
|
});
|
|
89742
90131
|
const oneLine = isTypeAnnotation && len === 1 || len === 0;
|
|
@@ -89745,7 +90134,7 @@ function genericPrintNoParens(path4, options, print2) {
|
|
|
89745
90134
|
parts.push(oneLine ? leftBrace : leftBrace + "\n");
|
|
89746
90135
|
const leftBraceIndex = parts.length - 1;
|
|
89747
90136
|
let i2 = 0;
|
|
89748
|
-
|
|
90137
|
+
fields12.forEach(function(field) {
|
|
89749
90138
|
path4.each(function(childPath) {
|
|
89750
90139
|
let lines = print2(childPath);
|
|
89751
90140
|
if (!oneLine) {
|
|
@@ -92534,12 +92923,12 @@ function detectCodeFormat(code, userStyles = {}) {
|
|
|
92534
92923
|
}
|
|
92535
92924
|
if (detect.quote || detect.arrowParens) {
|
|
92536
92925
|
const matches = trimmitedLine.matchAll(syntaxDetectRegex);
|
|
92537
|
-
for (const
|
|
92538
|
-
if (!
|
|
92926
|
+
for (const match37 of matches) {
|
|
92927
|
+
if (!match37.groups) {
|
|
92539
92928
|
continue;
|
|
92540
92929
|
}
|
|
92541
92930
|
for (const key in syntaxUsages) {
|
|
92542
|
-
if (
|
|
92931
|
+
if (match37.groups[key]) {
|
|
92543
92932
|
syntaxUsages[key]++;
|
|
92544
92933
|
}
|
|
92545
92934
|
}
|
|
@@ -92835,9 +93224,9 @@ async function extend2(projectFolder) {
|
|
|
92835
93224
|
|
|
92836
93225
|
// ../create-new-packages/headless-command/src/task-runner.ts
|
|
92837
93226
|
init_esm_shims();
|
|
92838
|
-
var
|
|
92839
|
-
var
|
|
92840
|
-
var TaskRunnerStatus2 = (0,
|
|
93227
|
+
var import_react138 = __toESM(require_react(), 1);
|
|
93228
|
+
var import_variant48 = __toESM(require_lib(), 1);
|
|
93229
|
+
var TaskRunnerStatus2 = (0, import_variant48.variant)({
|
|
92841
93230
|
Idle: {},
|
|
92842
93231
|
Running: (runningTasks, totalTaskCount) => {
|
|
92843
93232
|
const taskStatuses = runningTasks.map((task, index) => {
|
|
@@ -92861,7 +93250,7 @@ var TaskRunnerStatus2 = (0, import_variant43.variant)({
|
|
|
92861
93250
|
}
|
|
92862
93251
|
});
|
|
92863
93252
|
function useTaskRunner2() {
|
|
92864
|
-
const [status, setStatus] = (0,
|
|
93253
|
+
const [status, setStatus] = (0, import_react138.useState)(
|
|
92865
93254
|
TaskRunnerStatus2.Idle()
|
|
92866
93255
|
);
|
|
92867
93256
|
const { execute } = useAsyncCallback3(async (_2, tasks) => {
|
|
@@ -92881,25 +93270,25 @@ function useTaskRunner2() {
|
|
|
92881
93270
|
|
|
92882
93271
|
// ../create-new-packages/headless-command/src/components/TaskList.tsx
|
|
92883
93272
|
init_esm_shims();
|
|
92884
|
-
var
|
|
93273
|
+
var import_react139 = __toESM(require_react(), 1);
|
|
92885
93274
|
var TaskList2 = ({ tasks, totalTaskCount }) => {
|
|
92886
|
-
return /* @__PURE__ */
|
|
93275
|
+
return /* @__PURE__ */ import_react139.default.createElement(import_react139.default.Fragment, null, tasks.map((task, index) => {
|
|
92887
93276
|
const stepper = `[${index + 1}/${totalTaskCount}]`;
|
|
92888
93277
|
const fullText = `${stepper} ${task.text}`;
|
|
92889
93278
|
if (task.status === "running") {
|
|
92890
|
-
return /* @__PURE__ */
|
|
93279
|
+
return /* @__PURE__ */ import_react139.default.createElement(Spinner2, { key: index, text: fullText });
|
|
92891
93280
|
}
|
|
92892
|
-
return /* @__PURE__ */
|
|
93281
|
+
return /* @__PURE__ */ import_react139.default.createElement(Alert, { key: index, type: "success" }, fullText);
|
|
92893
93282
|
}));
|
|
92894
93283
|
};
|
|
92895
93284
|
|
|
92896
93285
|
// ../create-new-packages/headless-command/src/components/LinkCommand/GenerateProject.tsx
|
|
92897
93286
|
var GenerationProgress2 = ({ tasks, totalTaskCount }) => {
|
|
92898
|
-
return /* @__PURE__ */
|
|
93287
|
+
return /* @__PURE__ */ import_react140.default.createElement(import_react140.default.Fragment, null, /* @__PURE__ */ import_react140.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react140.default.createElement(Text2, null, "Generating your headless site...")), /* @__PURE__ */ import_react140.default.createElement(TaskList2, { tasks, totalTaskCount }));
|
|
92899
93288
|
};
|
|
92900
93289
|
var GenerateProject = ({ projectFolder, businessId, projectData, onDone, packageManager: packageManager2 }) => {
|
|
92901
93290
|
const { execute: executeTaskRunner, status: taskRunnerStatus } = useTaskRunner2();
|
|
92902
|
-
const generateProject = (0,
|
|
93291
|
+
const generateProject = (0, import_react140.useCallback)(async () => {
|
|
92903
93292
|
const wixConfigFilePath = getWixConfigFilePath(projectFolder);
|
|
92904
93293
|
const envFilePath = getEnvFilePath(projectFolder);
|
|
92905
93294
|
await writeJson(
|
|
@@ -92912,10 +93301,10 @@ var GenerateProject = ({ projectFolder, businessId, projectData, onDone, package
|
|
|
92912
93301
|
);
|
|
92913
93302
|
await updateEnvFile(envFilePath, projectData.environmentVariables);
|
|
92914
93303
|
}, [businessId, projectFolder, projectData]);
|
|
92915
|
-
const extendProject = (0,
|
|
93304
|
+
const extendProject = (0, import_react140.useCallback)(async () => {
|
|
92916
93305
|
await extend2(projectFolder);
|
|
92917
93306
|
}, [projectFolder]);
|
|
92918
|
-
const installDependencies = (0,
|
|
93307
|
+
const installDependencies = (0, import_react140.useCallback)(async () => {
|
|
92919
93308
|
try {
|
|
92920
93309
|
await packageManager2.runInstall(projectFolder);
|
|
92921
93310
|
} catch (e2) {
|
|
@@ -92925,7 +93314,7 @@ var GenerateProject = ({ projectFolder, businessId, projectData, onDone, package
|
|
|
92925
93314
|
});
|
|
92926
93315
|
}
|
|
92927
93316
|
}, [projectFolder, packageManager2]);
|
|
92928
|
-
const tasks = (0,
|
|
93317
|
+
const tasks = (0, import_react140.useMemo)(() => {
|
|
92929
93318
|
const result = [
|
|
92930
93319
|
{
|
|
92931
93320
|
action: generateProject,
|
|
@@ -92949,18 +93338,18 @@ var GenerateProject = ({ projectFolder, businessId, projectData, onDone, package
|
|
|
92949
93338
|
await executeTaskRunner(tasks);
|
|
92950
93339
|
onDone(true);
|
|
92951
93340
|
}, []);
|
|
92952
|
-
return (0,
|
|
93341
|
+
return (0, import_variant49.match)(taskRunnerStatus, {
|
|
92953
93342
|
Idle: () => null,
|
|
92954
|
-
Running: (status) => /* @__PURE__ */
|
|
92955
|
-
Done: (status) => /* @__PURE__ */
|
|
93343
|
+
Running: (status) => /* @__PURE__ */ import_react140.default.createElement(GenerationProgress2, { ...status }),
|
|
93344
|
+
Done: (status) => /* @__PURE__ */ import_react140.default.createElement(Box_default, { flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ import_react140.default.createElement(GenerationProgress2, { ...status }), /* @__PURE__ */ import_react140.default.createElement(Box_default, { marginLeft: -2, marginTop: 1 }, /* @__PURE__ */ import_react140.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react140.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react140.default.createElement(Text2, null, "Project set up successfully"))))
|
|
92956
93345
|
});
|
|
92957
93346
|
};
|
|
92958
93347
|
|
|
92959
93348
|
// ../create-new-packages/headless-command/src/components/LinkCommand/FinishedSuccessfullyMessage.tsx
|
|
92960
93349
|
init_esm_shims();
|
|
92961
|
-
var
|
|
93350
|
+
var import_react141 = __toESM(require_react(), 1);
|
|
92962
93351
|
var FinishedSuccessfullyMessage2 = ({ packageManager: packageManager2 }) => {
|
|
92963
|
-
return /* @__PURE__ */
|
|
93352
|
+
return /* @__PURE__ */ import_react141.default.createElement(
|
|
92964
93353
|
Box_default,
|
|
92965
93354
|
{
|
|
92966
93355
|
borderColor: "blue",
|
|
@@ -92972,8 +93361,8 @@ var FinishedSuccessfullyMessage2 = ({ packageManager: packageManager2 }) => {
|
|
|
92972
93361
|
marginLeft: -2,
|
|
92973
93362
|
marginTop: 1
|
|
92974
93363
|
},
|
|
92975
|
-
/* @__PURE__ */
|
|
92976
|
-
/* @__PURE__ */
|
|
93364
|
+
/* @__PURE__ */ import_react141.default.createElement(Text2, { bold: true }, "Next Steps:"),
|
|
93365
|
+
/* @__PURE__ */ import_react141.default.createElement(UnorderedList, { gap: 1 }, /* @__PURE__ */ import_react141.default.createElement(UnorderedList.Item, { marker: "\u{1F45F}" }, /* @__PURE__ */ import_react141.default.createElement(Text2, null, "Start developing"), /* @__PURE__ */ import_react141.default.createElement(Text2, { skin: "info" }, `${packageManager2.getRunCmd()} dev`)), /* @__PURE__ */ import_react141.default.createElement(UnorderedList.Item, { marker: /* @__PURE__ */ import_react141.default.createElement(Learn, null) }, /* @__PURE__ */ import_react141.default.createElement(Text2, null, "For guides and API references visit our"), /* @__PURE__ */ import_react141.default.createElement(Link, { skin: "info", url: "https://dev.wix.com/docs/go-headless" }, "documentation")), /* @__PURE__ */ import_react141.default.createElement(UnorderedList.Item, { marker: "\u{1F4AC}" }, /* @__PURE__ */ import_react141.default.createElement(Text2, null, "Join our"), /* @__PURE__ */ import_react141.default.createElement(Link, { skin: "info", url: "https://discord.gg/wixstudio" }, "Discord community")))
|
|
92977
93366
|
);
|
|
92978
93367
|
};
|
|
92979
93368
|
|
|
@@ -92994,10 +93383,10 @@ var LinkCommand = ({
|
|
|
92994
93383
|
projectName: preEnteredProjectName,
|
|
92995
93384
|
businessName: preEnteredBusinessName
|
|
92996
93385
|
}) => {
|
|
92997
|
-
const [businessName, setBusinessName] = (0,
|
|
92998
|
-
const [businessId, setBusinessId] = (0,
|
|
92999
|
-
const [projectData, setProjectData] = (0,
|
|
93000
|
-
const [isDone, setIsDone] = (0,
|
|
93386
|
+
const [businessName, setBusinessName] = (0, import_react142.useState)(preEnteredBusinessName);
|
|
93387
|
+
const [businessId, setBusinessId] = (0, import_react142.useState)();
|
|
93388
|
+
const [projectData, setProjectData] = (0, import_react142.useState)();
|
|
93389
|
+
const [isDone, setIsDone] = (0, import_react142.useState)(false);
|
|
93001
93390
|
const { status } = useAsync2(async () => {
|
|
93002
93391
|
const alreadyLinked = await isWixConfigExists(projectFolder);
|
|
93003
93392
|
if (alreadyLinked) {
|
|
@@ -93017,11 +93406,11 @@ var LinkCommand = ({
|
|
|
93017
93406
|
const packageManager2 = await createPackageManager(repoType2);
|
|
93018
93407
|
return { repoType: repoType2, packageManager: packageManager2 };
|
|
93019
93408
|
}, []);
|
|
93020
|
-
return (0,
|
|
93409
|
+
return (0, import_variant50.match)(status, {
|
|
93021
93410
|
Error: () => null,
|
|
93022
|
-
Loading: () => /* @__PURE__ */
|
|
93411
|
+
Loading: () => /* @__PURE__ */ import_react142.default.createElement(Spinner2, { text: "Loading..." }),
|
|
93023
93412
|
Success: ({ result: { packageManager: packageManager2 } }) => {
|
|
93024
|
-
return /* @__PURE__ */
|
|
93413
|
+
return /* @__PURE__ */ import_react142.default.createElement(
|
|
93025
93414
|
Box_default,
|
|
93026
93415
|
{
|
|
93027
93416
|
flexDirection: "column",
|
|
@@ -93032,14 +93421,14 @@ var LinkCommand = ({
|
|
|
93032
93421
|
borderTop: false,
|
|
93033
93422
|
paddingLeft: 1
|
|
93034
93423
|
},
|
|
93035
|
-
/* @__PURE__ */
|
|
93036
|
-
!preEnteredBusinessName && /* @__PURE__ */
|
|
93424
|
+
/* @__PURE__ */ import_react142.default.createElement(WelcomeMessage2, null),
|
|
93425
|
+
!preEnteredBusinessName && /* @__PURE__ */ import_react142.default.createElement(
|
|
93037
93426
|
ChooseBusinessName,
|
|
93038
93427
|
{
|
|
93039
93428
|
onSubmit: ({ businessName: businessName2 }) => setBusinessName(businessName2)
|
|
93040
93429
|
}
|
|
93041
93430
|
),
|
|
93042
|
-
businessName && /* @__PURE__ */
|
|
93431
|
+
businessName && /* @__PURE__ */ import_react142.default.createElement(AuthProvider, null, /* @__PURE__ */ import_react142.default.createElement(
|
|
93043
93432
|
CreateBusiness,
|
|
93044
93433
|
{
|
|
93045
93434
|
businessName,
|
|
@@ -93047,7 +93436,7 @@ var LinkCommand = ({
|
|
|
93047
93436
|
onDone: ({ businessId: businessId2 }) => setBusinessId(businessId2)
|
|
93048
93437
|
}
|
|
93049
93438
|
)),
|
|
93050
|
-
businessName && businessId && /* @__PURE__ */
|
|
93439
|
+
businessName && businessId && /* @__PURE__ */ import_react142.default.createElement(AuthProvider, null, /* @__PURE__ */ import_react142.default.createElement(
|
|
93051
93440
|
CreateProject,
|
|
93052
93441
|
{
|
|
93053
93442
|
businessId,
|
|
@@ -93055,7 +93444,7 @@ var LinkCommand = ({
|
|
|
93055
93444
|
onSubmit: (data) => setProjectData(data)
|
|
93056
93445
|
}
|
|
93057
93446
|
)),
|
|
93058
|
-
businessName && businessId && projectData && /* @__PURE__ */
|
|
93447
|
+
businessName && businessId && projectData && /* @__PURE__ */ import_react142.default.createElement(
|
|
93059
93448
|
GenerateProject,
|
|
93060
93449
|
{
|
|
93061
93450
|
packageManager: packageManager2,
|
|
@@ -93065,7 +93454,7 @@ var LinkCommand = ({
|
|
|
93065
93454
|
onDone: () => setIsDone(true)
|
|
93066
93455
|
}
|
|
93067
93456
|
),
|
|
93068
|
-
businessName && businessId && projectData && isDone && /* @__PURE__ */
|
|
93457
|
+
businessName && businessId && projectData && isDone && /* @__PURE__ */ import_react142.default.createElement(FinishedSuccessfullyMessage2, { packageManager: packageManager2 })
|
|
93069
93458
|
);
|
|
93070
93459
|
}
|
|
93071
93460
|
});
|
|
@@ -93117,12 +93506,12 @@ var validateCloudProvider = (value2) => {
|
|
|
93117
93506
|
|
|
93118
93507
|
// ../create-new-packages/headless-command/src/components/ProcessCommand.tsx
|
|
93119
93508
|
init_esm_shims();
|
|
93120
|
-
var
|
|
93121
|
-
var
|
|
93509
|
+
var import_react153 = __toESM(require_react(), 1);
|
|
93510
|
+
var import_variant60 = __toESM(require_lib(), 1);
|
|
93122
93511
|
|
|
93123
93512
|
// ../create-new-packages/headless-command/src/parse-command-options.ts
|
|
93124
93513
|
init_esm_shims();
|
|
93125
|
-
var
|
|
93514
|
+
var import_variant52 = __toESM(require_lib(), 1);
|
|
93126
93515
|
import { join as join14 } from "node:path";
|
|
93127
93516
|
|
|
93128
93517
|
// ../create-new-packages/headless-command/src/validations/index.ts
|
|
@@ -93141,11 +93530,11 @@ async function validateDirectory2(projectRoot) {
|
|
|
93141
93530
|
// ../create-new-packages/headless-command/src/validations/package-name.ts
|
|
93142
93531
|
init_esm_shims();
|
|
93143
93532
|
var import_validate_npm_package_name2 = __toESM(require_lib2(), 1);
|
|
93144
|
-
var
|
|
93145
|
-
var Result2 = (0,
|
|
93146
|
-
(0,
|
|
93147
|
-
Error: (0,
|
|
93148
|
-
Ok:
|
|
93533
|
+
var import_variant51 = __toESM(require_lib(), 1);
|
|
93534
|
+
var Result2 = (0, import_variant51.variant)(
|
|
93535
|
+
(0, import_variant51.onTerms)(({ T }) => ({
|
|
93536
|
+
Error: (0, import_variant51.payload)(T),
|
|
93537
|
+
Ok: import_variant51.nil
|
|
93149
93538
|
}))
|
|
93150
93539
|
);
|
|
93151
93540
|
async function validatePackageName2(name) {
|
|
@@ -93215,10 +93604,10 @@ var headlessTemplates = [
|
|
|
93215
93604
|
...vibeCompatibleTemplates,
|
|
93216
93605
|
...pureHeadlessTemplates
|
|
93217
93606
|
];
|
|
93218
|
-
var TemplateSource2 = (0,
|
|
93219
|
-
HeadlessApp: (0,
|
|
93220
|
-
GitRepo: (0,
|
|
93221
|
-
Local: (0,
|
|
93607
|
+
var TemplateSource2 = (0, import_variant52.variant)({
|
|
93608
|
+
HeadlessApp: (0, import_variant52.fields)(),
|
|
93609
|
+
GitRepo: (0, import_variant52.fields)(),
|
|
93610
|
+
Local: (0, import_variant52.fields)()
|
|
93222
93611
|
});
|
|
93223
93612
|
function parseProviderString(cloudProvider) {
|
|
93224
93613
|
switch (cloudProvider.trim().toLowerCase()) {
|
|
@@ -93287,7 +93676,7 @@ async function parseProjectNameOptions(targetParentFolder2, options) {
|
|
|
93287
93676
|
});
|
|
93288
93677
|
}
|
|
93289
93678
|
const npmValidationErrors = await validatePackageName2(projectName);
|
|
93290
|
-
if ((0,
|
|
93679
|
+
if ((0, import_variant52.isType)(npmValidationErrors, "Error")) {
|
|
93291
93680
|
throw new CliError({
|
|
93292
93681
|
code: CliErrorCode.ProjectNameArgumentIsInvalid({
|
|
93293
93682
|
errorMessage: `Invalid package name "${projectName}". Please fix the following issues: ${npmValidationErrors.payload.join(", ")}`
|
|
@@ -93342,32 +93731,32 @@ async function parseCommandOptions2(targetParentFolder2, options) {
|
|
|
93342
93731
|
|
|
93343
93732
|
// ../create-new-packages/headless-command/src/components/CreateHeadlessSiteCommand.tsx
|
|
93344
93733
|
init_esm_shims();
|
|
93345
|
-
var
|
|
93346
|
-
var
|
|
93734
|
+
var import_react152 = __toESM(require_react(), 1);
|
|
93735
|
+
var import_variant59 = __toESM(require_lib(), 1);
|
|
93347
93736
|
var import_kebabCase5 = __toESM(require_kebabCase(), 1);
|
|
93348
93737
|
import { join as join19 } from "node:path";
|
|
93349
93738
|
|
|
93350
93739
|
// ../create-new-packages/headless-command/src/components/ChooseFolder.tsx
|
|
93351
93740
|
init_esm_shims();
|
|
93352
|
-
var
|
|
93353
|
-
var
|
|
93741
|
+
var import_react143 = __toESM(require_react(), 1);
|
|
93742
|
+
var import_variant53 = __toESM(require_lib(), 1);
|
|
93354
93743
|
import { join as join15 } from "node:path";
|
|
93355
93744
|
var validateAppDirectory = async (targetParentFolder2, packageName) => {
|
|
93356
93745
|
if (!await validateDirectory2(join15(targetParentFolder2, packageName))) {
|
|
93357
93746
|
return `Provided directory "${packageName}" is not empty`;
|
|
93358
93747
|
}
|
|
93359
93748
|
const npmValidationErrors = await validatePackageName2(packageName);
|
|
93360
|
-
return (0,
|
|
93749
|
+
return (0, import_variant53.match)(npmValidationErrors, {
|
|
93361
93750
|
Ok: () => true,
|
|
93362
93751
|
Error: ({ payload: payload7 }) => `Invalid folder name. Please fix the following issues: ${payload7.join(", ")}`
|
|
93363
93752
|
});
|
|
93364
93753
|
};
|
|
93365
93754
|
var ChooseFolder = ({ initialFolderName, targetParentFolder: targetParentFolder2, onSubmit }) => {
|
|
93366
|
-
const validate3 = (0,
|
|
93755
|
+
const validate3 = (0, import_react143.useCallback)(
|
|
93367
93756
|
async (packageName) => validateAppDirectory(targetParentFolder2, packageName),
|
|
93368
93757
|
[targetParentFolder2]
|
|
93369
93758
|
);
|
|
93370
|
-
return /* @__PURE__ */
|
|
93759
|
+
return /* @__PURE__ */ import_react143.default.createElement(
|
|
93371
93760
|
TextInput2,
|
|
93372
93761
|
{
|
|
93373
93762
|
label: "In which directory do you want to create your application?",
|
|
@@ -93382,8 +93771,8 @@ var ChooseFolder = ({ initialFolderName, targetParentFolder: targetParentFolder2
|
|
|
93382
93771
|
// ../create-new-packages/headless-command/src/components/GenerateProject.tsx
|
|
93383
93772
|
init_esm_shims();
|
|
93384
93773
|
import { mkdir as mkdir2 } from "node:fs/promises";
|
|
93385
|
-
var
|
|
93386
|
-
var
|
|
93774
|
+
var import_react144 = __toESM(require_react(), 1);
|
|
93775
|
+
var import_variant54 = __toESM(require_lib(), 1);
|
|
93387
93776
|
import { join as join17 } from "node:path";
|
|
93388
93777
|
|
|
93389
93778
|
// ../create-new-packages/headless-command/src/services/generator/template-fetcher.ts
|
|
@@ -93430,14 +93819,14 @@ async function resolveTemplateFolder(templatePathOverride, selectedTemplate) {
|
|
|
93430
93819
|
if (templatePathOverride) {
|
|
93431
93820
|
return templatePathOverride;
|
|
93432
93821
|
}
|
|
93433
|
-
return (0,
|
|
93822
|
+
return (0, import_variant54.match)(selectedTemplate, {
|
|
93434
93823
|
HeadlessApp: ({ gitPath }) => fetchTemplate(headlessTemplatesGitUrl, gitPath),
|
|
93435
93824
|
GitRepo: ({ url, path: path4 }) => fetchTemplate(url, path4),
|
|
93436
93825
|
Local: ({ path: path4 }) => path4
|
|
93437
93826
|
});
|
|
93438
93827
|
}
|
|
93439
93828
|
var GenerationProgress3 = ({ tasks, totalTaskCount }) => {
|
|
93440
|
-
return /* @__PURE__ */
|
|
93829
|
+
return /* @__PURE__ */ import_react144.default.createElement(import_react144.default.Fragment, null, /* @__PURE__ */ import_react144.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react144.default.createElement(Text2, null, "Generating your headless site...")), /* @__PURE__ */ import_react144.default.createElement(TaskList2, { tasks, totalTaskCount }));
|
|
93441
93830
|
};
|
|
93442
93831
|
var GenerateProject2 = ({
|
|
93443
93832
|
packageManager: packageManager2,
|
|
@@ -93450,11 +93839,11 @@ var GenerateProject2 = ({
|
|
|
93450
93839
|
onDone
|
|
93451
93840
|
}) => {
|
|
93452
93841
|
const { execute: executeTaskRunner, status: taskRunnerStatus } = useTaskRunner2();
|
|
93453
|
-
const packageFolder = (0,
|
|
93842
|
+
const packageFolder = (0, import_react144.useMemo)(
|
|
93454
93843
|
() => join17(targetParentFolder2, folderName),
|
|
93455
93844
|
[folderName, targetParentFolder2]
|
|
93456
93845
|
);
|
|
93457
|
-
const generateProject = (0,
|
|
93846
|
+
const generateProject = (0, import_react144.useCallback)(async () => {
|
|
93458
93847
|
try {
|
|
93459
93848
|
await mkdir2(packageFolder, { recursive: true });
|
|
93460
93849
|
} catch (e2) {
|
|
@@ -93495,10 +93884,10 @@ var GenerateProject2 = ({
|
|
|
93495
93884
|
commandOptions.templateParams,
|
|
93496
93885
|
commandOptions.templatePath
|
|
93497
93886
|
]);
|
|
93498
|
-
const extendProject = (0,
|
|
93887
|
+
const extendProject = (0, import_react144.useCallback)(async () => {
|
|
93499
93888
|
await extend2(packageFolder);
|
|
93500
93889
|
}, [packageFolder]);
|
|
93501
|
-
const initializeGit = (0,
|
|
93890
|
+
const initializeGit = (0, import_react144.useCallback)(async () => {
|
|
93502
93891
|
try {
|
|
93503
93892
|
await gitInit(packageFolder);
|
|
93504
93893
|
} catch (e2) {
|
|
@@ -93508,7 +93897,7 @@ var GenerateProject2 = ({
|
|
|
93508
93897
|
});
|
|
93509
93898
|
}
|
|
93510
93899
|
}, [packageFolder]);
|
|
93511
|
-
const installDependencies = (0,
|
|
93900
|
+
const installDependencies = (0, import_react144.useCallback)(async () => {
|
|
93512
93901
|
try {
|
|
93513
93902
|
await packageManager2.runInstall(packageFolder);
|
|
93514
93903
|
} catch (e2) {
|
|
@@ -93518,7 +93907,7 @@ var GenerateProject2 = ({
|
|
|
93518
93907
|
});
|
|
93519
93908
|
}
|
|
93520
93909
|
}, [packageFolder, packageManager2]);
|
|
93521
|
-
const commitToGit = (0,
|
|
93910
|
+
const commitToGit = (0, import_react144.useCallback)(async () => {
|
|
93522
93911
|
try {
|
|
93523
93912
|
await gitCommit(packageFolder);
|
|
93524
93913
|
} catch (e2) {
|
|
@@ -93528,7 +93917,7 @@ var GenerateProject2 = ({
|
|
|
93528
93917
|
});
|
|
93529
93918
|
}
|
|
93530
93919
|
}, [packageFolder]);
|
|
93531
|
-
const tasks = (0,
|
|
93920
|
+
const tasks = (0, import_react144.useMemo)(() => {
|
|
93532
93921
|
const result = [
|
|
93533
93922
|
{
|
|
93534
93923
|
action: generateProject,
|
|
@@ -93582,18 +93971,18 @@ var GenerateProject2 = ({
|
|
|
93582
93971
|
await executeTaskRunner(tasks);
|
|
93583
93972
|
onDone(true);
|
|
93584
93973
|
}, []);
|
|
93585
|
-
return (0,
|
|
93974
|
+
return (0, import_variant54.match)(taskRunnerStatus, {
|
|
93586
93975
|
Idle: () => null,
|
|
93587
|
-
Running: (status) => /* @__PURE__ */
|
|
93588
|
-
Done: (status) => /* @__PURE__ */
|
|
93976
|
+
Running: (status) => /* @__PURE__ */ import_react144.default.createElement(GenerationProgress3, { ...status }),
|
|
93977
|
+
Done: (status) => /* @__PURE__ */ import_react144.default.createElement(Box_default, { flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ import_react144.default.createElement(GenerationProgress3, { ...status }), /* @__PURE__ */ import_react144.default.createElement(Box_default, { marginLeft: -2, marginTop: 1 }, /* @__PURE__ */ import_react144.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react144.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react144.default.createElement(Text2, null, "Project set up successfully"))))
|
|
93589
93978
|
});
|
|
93590
93979
|
};
|
|
93591
93980
|
|
|
93592
93981
|
// ../create-new-packages/headless-command/src/components/ChooseTemplate.tsx
|
|
93593
93982
|
init_esm_shims();
|
|
93594
|
-
var
|
|
93983
|
+
var import_react145 = __toESM(require_react(), 1);
|
|
93595
93984
|
var ChooseTemplate2 = ({ onSubmit }) => {
|
|
93596
|
-
const groups = (0,
|
|
93985
|
+
const groups = (0, import_react145.useMemo)(
|
|
93597
93986
|
() => [
|
|
93598
93987
|
{
|
|
93599
93988
|
title: "Wix Vibe compatible templates",
|
|
@@ -93607,7 +93996,7 @@ var ChooseTemplate2 = ({ onSubmit }) => {
|
|
|
93607
93996
|
{
|
|
93608
93997
|
title: "Standard templates",
|
|
93609
93998
|
// https://dev.wix.com/docs/go-headless/get-started/templates/wix-managed-templates/wix-cli-for-headless-templates
|
|
93610
|
-
description: /* @__PURE__ */
|
|
93999
|
+
description: /* @__PURE__ */ import_react145.default.createElement(Text2, null, "(", /* @__PURE__ */ import_react145.default.createElement(Link, { url: "https://wix.to/zuKh3Fo" }, "Learn more"), ")"),
|
|
93611
94000
|
items: pureHeadlessTemplates.map((template) => ({
|
|
93612
94001
|
key: template.siteTemplateId,
|
|
93613
94002
|
title: template.title,
|
|
@@ -93618,7 +94007,7 @@ var ChooseTemplate2 = ({ onSubmit }) => {
|
|
|
93618
94007
|
],
|
|
93619
94008
|
[]
|
|
93620
94009
|
);
|
|
93621
|
-
return /* @__PURE__ */
|
|
94010
|
+
return /* @__PURE__ */ import_react145.default.createElement(
|
|
93622
94011
|
SelectGroupsInput,
|
|
93623
94012
|
{
|
|
93624
94013
|
label: "Choose an initial template for your business",
|
|
@@ -93630,14 +94019,14 @@ var ChooseTemplate2 = ({ onSubmit }) => {
|
|
|
93630
94019
|
|
|
93631
94020
|
// ../create-new-packages/headless-command/src/components/ReleaseProject.tsx
|
|
93632
94021
|
init_esm_shims();
|
|
93633
|
-
var
|
|
93634
|
-
var
|
|
94022
|
+
var import_react147 = __toESM(require_react(), 1);
|
|
94023
|
+
var import_variant56 = __toESM(require_lib(), 1);
|
|
93635
94024
|
|
|
93636
94025
|
// ../create-new-packages/headless-command/src/components/FinishedSuccessfullyMessage.tsx
|
|
93637
94026
|
init_esm_shims();
|
|
93638
|
-
var
|
|
94027
|
+
var import_react146 = __toESM(require_react(), 1);
|
|
93639
94028
|
var FinishedSuccessfullyMessage3 = ({ packageManager: packageManager2, folderName, projectData, isReleased }) => {
|
|
93640
|
-
return /* @__PURE__ */
|
|
94029
|
+
return /* @__PURE__ */ import_react146.default.createElement(
|
|
93641
94030
|
Box_default,
|
|
93642
94031
|
{
|
|
93643
94032
|
borderColor: "blue",
|
|
@@ -93649,17 +94038,17 @@ var FinishedSuccessfullyMessage3 = ({ packageManager: packageManager2, folderNam
|
|
|
93649
94038
|
marginLeft: -2,
|
|
93650
94039
|
marginTop: 1
|
|
93651
94040
|
},
|
|
93652
|
-
isReleased && /* @__PURE__ */
|
|
93653
|
-
/* @__PURE__ */
|
|
93654
|
-
/* @__PURE__ */
|
|
94041
|
+
isReleased && /* @__PURE__ */ import_react146.default.createElement(Text2, { bold: true }, /* @__PURE__ */ import_react146.default.createElement(Rocket, null), " Visit your site at: ", projectData.baseUrl),
|
|
94042
|
+
/* @__PURE__ */ import_react146.default.createElement(Text2, { bold: true }, "Next Steps:"),
|
|
94043
|
+
/* @__PURE__ */ import_react146.default.createElement(UnorderedList, { gap: 1 }, /* @__PURE__ */ import_react146.default.createElement(UnorderedList.Item, { marker: "\u{1F45F}" }, /* @__PURE__ */ import_react146.default.createElement(Text2, null, "Start developing"), /* @__PURE__ */ import_react146.default.createElement(Text2, { skin: "info" }, `cd ${folderName}`), /* @__PURE__ */ import_react146.default.createElement(Text2, { skin: "info" }, `${packageManager2.getRunCmd()} dev`)), /* @__PURE__ */ import_react146.default.createElement(UnorderedList.Item, { marker: /* @__PURE__ */ import_react146.default.createElement(Learn, null) }, /* @__PURE__ */ import_react146.default.createElement(Text2, null, "For guides and API references visit our"), /* @__PURE__ */ import_react146.default.createElement(Link, { skin: "info", url: "https://dev.wix.com/docs/go-headless" }, "documentation")), /* @__PURE__ */ import_react146.default.createElement(UnorderedList.Item, { marker: "\u{1F4AC}" }, /* @__PURE__ */ import_react146.default.createElement(Text2, null, "Join our"), /* @__PURE__ */ import_react146.default.createElement(Link, { skin: "info", url: "https://discord.gg/wixstudio" }, "Discord community")))
|
|
93655
94044
|
);
|
|
93656
94045
|
};
|
|
93657
94046
|
|
|
93658
94047
|
// ../create-new-packages/headless-command/src/hooks/release-project.ts
|
|
93659
94048
|
init_esm_shims();
|
|
93660
|
-
var
|
|
94049
|
+
var import_variant55 = __toESM(require_lib(), 1);
|
|
93661
94050
|
import { join as join18 } from "node:path";
|
|
93662
|
-
var ReleaseStateVariant = (0,
|
|
94051
|
+
var ReleaseStateVariant = (0, import_variant55.variant)({
|
|
93663
94052
|
Success: {},
|
|
93664
94053
|
Skipped: {},
|
|
93665
94054
|
Error: {}
|
|
@@ -93707,7 +94096,7 @@ var ReleaseProject = ({
|
|
|
93707
94096
|
releaseNonInteractive
|
|
93708
94097
|
}) => {
|
|
93709
94098
|
const { status, execute } = useReleaseProject();
|
|
93710
|
-
(0,
|
|
94099
|
+
(0, import_react147.useEffect)(() => {
|
|
93711
94100
|
if (releaseNonInteractive != null) {
|
|
93712
94101
|
void execute({
|
|
93713
94102
|
confirmed: releaseNonInteractive,
|
|
@@ -93717,7 +94106,7 @@ var ReleaseProject = ({
|
|
|
93717
94106
|
});
|
|
93718
94107
|
}
|
|
93719
94108
|
}, []);
|
|
93720
|
-
return /* @__PURE__ */
|
|
94109
|
+
return /* @__PURE__ */ import_react147.default.createElement(import_react147.default.Fragment, null, releaseNonInteractive == null && /* @__PURE__ */ import_react147.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react147.default.createElement(
|
|
93721
94110
|
ConfirmInput,
|
|
93722
94111
|
{
|
|
93723
94112
|
label: "Would you like to publish your site now?",
|
|
@@ -93731,42 +94120,42 @@ var ReleaseProject = ({
|
|
|
93731
94120
|
});
|
|
93732
94121
|
}
|
|
93733
94122
|
}
|
|
93734
|
-
)), (0,
|
|
94123
|
+
)), (0, import_variant56.match)(status, {
|
|
93735
94124
|
NotRequested: () => null,
|
|
93736
94125
|
Success: ({ result }) => {
|
|
93737
|
-
return /* @__PURE__ */
|
|
93738
|
-
Success: () => /* @__PURE__ */
|
|
93739
|
-
Skipped: () => /* @__PURE__ */
|
|
93740
|
-
Error: () => /* @__PURE__ */
|
|
93741
|
-
}), /* @__PURE__ */
|
|
94126
|
+
return /* @__PURE__ */ import_react147.default.createElement(import_react147.default.Fragment, null, (0, import_variant56.match)(result, {
|
|
94127
|
+
Success: () => /* @__PURE__ */ import_react147.default.createElement(Box_default, { marginLeft: -2 }, /* @__PURE__ */ import_react147.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react147.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react147.default.createElement(Text2, null, "Site published successfully"))),
|
|
94128
|
+
Skipped: () => /* @__PURE__ */ import_react147.default.createElement(Text2, null, `No worries, you can publish your site later by running ${packageManager2.getRunCmd()} release`),
|
|
94129
|
+
Error: () => /* @__PURE__ */ import_react147.default.createElement(Box_default, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ import_react147.default.createElement(Alert, { type: "error" }, "Failed to publish your site"), /* @__PURE__ */ import_react147.default.createElement(Text2, null, `No worries, you can publish your site later by running ${packageManager2.getRunCmd()} release`))
|
|
94130
|
+
}), /* @__PURE__ */ import_react147.default.createElement(
|
|
93742
94131
|
FinishedSuccessfullyMessage3,
|
|
93743
94132
|
{
|
|
93744
94133
|
packageManager: packageManager2,
|
|
93745
94134
|
folderName,
|
|
93746
94135
|
projectData,
|
|
93747
|
-
isReleased: (0,
|
|
94136
|
+
isReleased: (0, import_variant56.isType)(result, "Success")
|
|
93748
94137
|
}
|
|
93749
94138
|
));
|
|
93750
94139
|
},
|
|
93751
94140
|
Error: () => null,
|
|
93752
|
-
Loading: () => /* @__PURE__ */
|
|
94141
|
+
Loading: () => /* @__PURE__ */ import_react147.default.createElement(Spinner2, { text: "Publishing your site..." })
|
|
93753
94142
|
}));
|
|
93754
94143
|
};
|
|
93755
94144
|
|
|
93756
94145
|
// ../create-new-packages/headless-command/src/components/ChooseVibeSetup.tsx
|
|
93757
94146
|
init_esm_shims();
|
|
93758
|
-
var
|
|
93759
|
-
var
|
|
93760
|
-
var VibeSetupChoice = (0,
|
|
94147
|
+
var import_react148 = __toESM(require_react(), 1);
|
|
94148
|
+
var import_variant57 = __toESM(require_lib(), 1);
|
|
94149
|
+
var VibeSetupChoice = (0, import_variant57.variant)({
|
|
93761
94150
|
SetupVibe: {},
|
|
93762
94151
|
Skip: {}
|
|
93763
94152
|
});
|
|
93764
94153
|
var ChooseVibeSetup = ({ onSubmit }) => {
|
|
93765
|
-
return /* @__PURE__ */
|
|
94154
|
+
return /* @__PURE__ */ import_react148.default.createElement(
|
|
93766
94155
|
SelectInput2,
|
|
93767
94156
|
{
|
|
93768
94157
|
label: "Would you like to set up your project for editing in Wix Vibe?",
|
|
93769
|
-
info: /* @__PURE__ */
|
|
94158
|
+
info: /* @__PURE__ */ import_react148.default.createElement(import_react148.default.Fragment, null, "Use vibe coding with a drag-and-drop editor and an IDE. Requires using GitHub to sync your project.", " ", /* @__PURE__ */ import_react148.default.createElement(Link, { url: "https://support.wix.com/en/using-wix-vibe" }, /* @__PURE__ */ import_react148.default.createElement(Text2, { underline: true }, "Learn more"))),
|
|
93770
94159
|
options: [
|
|
93771
94160
|
{
|
|
93772
94161
|
key: "setup-vibe",
|
|
@@ -93788,8 +94177,8 @@ var ChooseVibeSetup = ({ onSubmit }) => {
|
|
|
93788
94177
|
|
|
93789
94178
|
// ../create-new-packages/headless-command/src/components/VibeRepositorySetupPolling.tsx
|
|
93790
94179
|
init_esm_shims();
|
|
93791
|
-
var
|
|
93792
|
-
var
|
|
94180
|
+
var import_react151 = __toESM(require_react(), 1);
|
|
94181
|
+
var import_variant58 = __toESM(require_lib(), 1);
|
|
93793
94182
|
|
|
93794
94183
|
// ../velo-client/src/index.ts
|
|
93795
94184
|
init_esm_shims();
|
|
@@ -94524,10 +94913,10 @@ var VeloClient = class {
|
|
|
94524
94913
|
|
|
94525
94914
|
// ../velo-client/src/useVeloClient.ts
|
|
94526
94915
|
init_esm_shims();
|
|
94527
|
-
var
|
|
94916
|
+
var import_react149 = __toESM(require_react(), 1);
|
|
94528
94917
|
function useVeloClient() {
|
|
94529
94918
|
const httpClient = useHttpClient({ type: "code" });
|
|
94530
|
-
const client2 = (0,
|
|
94919
|
+
const client2 = (0, import_react149.useMemo)(() => new VeloClient(httpClient), [httpClient]);
|
|
94531
94920
|
return usePanoramaMethodLogger(client2);
|
|
94532
94921
|
}
|
|
94533
94922
|
|
|
@@ -94536,7 +94925,7 @@ init_esm_shims();
|
|
|
94536
94925
|
|
|
94537
94926
|
// ../codestore-client/src/useCodestoreClient.ts
|
|
94538
94927
|
init_esm_shims();
|
|
94539
|
-
var
|
|
94928
|
+
var import_react150 = __toESM(require_react(), 1);
|
|
94540
94929
|
|
|
94541
94930
|
// ../codestore-client/src/codestore-client.ts
|
|
94542
94931
|
init_esm_shims();
|
|
@@ -94700,13 +95089,13 @@ var CodestoreClient = class {
|
|
|
94700
95089
|
// ../codestore-client/src/useCodestoreClient.ts
|
|
94701
95090
|
function useCodestoreClient() {
|
|
94702
95091
|
const httpClient = useHttpClient({ type: "backoffice" });
|
|
94703
|
-
const client2 = (0,
|
|
95092
|
+
const client2 = (0, import_react150.useMemo)(() => new CodestoreClient(httpClient), [httpClient]);
|
|
94704
95093
|
return usePanoramaMethodLogger(client2);
|
|
94705
95094
|
}
|
|
94706
95095
|
|
|
94707
95096
|
// ../create-new-packages/headless-command/src/components/VibeRepositorySetupPolling.tsx
|
|
94708
|
-
var VibeSetupResult = (0,
|
|
94709
|
-
Success: (0,
|
|
95097
|
+
var VibeSetupResult = (0, import_variant58.variant)({
|
|
95098
|
+
Success: (0, import_variant58.fields)(),
|
|
94710
95099
|
Canceled: {},
|
|
94711
95100
|
Failed: {}
|
|
94712
95101
|
});
|
|
@@ -94768,7 +95157,7 @@ var VibeRepositorySetupPolling = ({
|
|
|
94768
95157
|
[projectFolder, projectId],
|
|
94769
95158
|
{
|
|
94770
95159
|
onSuccess: (result) => {
|
|
94771
|
-
if ((0,
|
|
95160
|
+
if ((0, import_variant58.isType)(result, VibeSetupResult.Success)) {
|
|
94772
95161
|
onSubmit?.();
|
|
94773
95162
|
}
|
|
94774
95163
|
},
|
|
@@ -94779,11 +95168,11 @@ var VibeRepositorySetupPolling = ({
|
|
|
94779
95168
|
}
|
|
94780
95169
|
}
|
|
94781
95170
|
);
|
|
94782
|
-
return (0,
|
|
94783
|
-
Error: () => /* @__PURE__ */
|
|
94784
|
-
Loading: () => /* @__PURE__ */
|
|
94785
|
-
Success: ({ result }) => (0,
|
|
94786
|
-
Success: ({ repoName, htmlUrl }) => /* @__PURE__ */
|
|
95171
|
+
return (0, import_variant58.match)(status, {
|
|
95172
|
+
Error: () => /* @__PURE__ */ import_react151.default.createElement(Box_default, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ import_react151.default.createElement(Text2, { skin: "error" }, "Failed to connect to Wix Vibe")),
|
|
95173
|
+
Loading: () => /* @__PURE__ */ import_react151.default.createElement(Box_default, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ import_react151.default.createElement(Spinner2, { text: "Opening browser for Wix Vibe setup..." }), /* @__PURE__ */ import_react151.default.createElement(Text2, { skin: "secondary" }, "Complete the setup in your browser. We're waiting for you to finish...")),
|
|
95174
|
+
Success: ({ result }) => (0, import_variant58.match)(result, {
|
|
95175
|
+
Success: ({ repoName, htmlUrl }) => /* @__PURE__ */ import_react151.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react151.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react151.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react151.default.createElement(Text2, null, "GitHub repository '", repoName, "' created and Synced.", " ", /* @__PURE__ */ import_react151.default.createElement(Link, { url: htmlUrl }, "View Repository.")))),
|
|
94787
95176
|
Canceled: () => null
|
|
94788
95177
|
})
|
|
94789
95178
|
});
|
|
@@ -94799,19 +95188,19 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94799
95188
|
businessName: defaultBusinessName,
|
|
94800
95189
|
cloudProviders
|
|
94801
95190
|
}) => {
|
|
94802
|
-
const [businessName, setBusinessName] = (0,
|
|
95191
|
+
const [businessName, setBusinessName] = (0, import_react152.useState)(
|
|
94803
95192
|
defaultBusinessName
|
|
94804
95193
|
);
|
|
94805
|
-
const [selectedTemplate, setSelectedTemplate] = (0,
|
|
94806
|
-
const [folderName, setFolderName] = (0,
|
|
95194
|
+
const [selectedTemplate, setSelectedTemplate] = (0, import_react152.useState)(defaultTemplate);
|
|
95195
|
+
const [folderName, setFolderName] = (0, import_react152.useState)(
|
|
94807
95196
|
defaultProjectName
|
|
94808
95197
|
);
|
|
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,
|
|
95198
|
+
const [businessId, setBusinessId] = (0, import_react152.useState)();
|
|
95199
|
+
const [projectData, setProjectData] = (0, import_react152.useState)();
|
|
95200
|
+
const [generationDone, setGenerationDone] = (0, import_react152.useState)(false);
|
|
95201
|
+
const [vibeSetupChoice, setVibeSetupChoice] = (0, import_react152.useState)();
|
|
95202
|
+
const [vibeSetupDone, setVibeSetupDone] = (0, import_react152.useState)(false);
|
|
95203
|
+
const projectFolder = (0, import_react152.useMemo)(
|
|
94815
95204
|
() => folderName ? join19(targetParentFolder2, folderName) : void 0,
|
|
94816
95205
|
[targetParentFolder2, folderName]
|
|
94817
95206
|
);
|
|
@@ -94820,15 +95209,15 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94820
95209
|
const packageManager2 = await createPackageManager(repoType2);
|
|
94821
95210
|
return { packageManager: packageManager2 };
|
|
94822
95211
|
}, []);
|
|
94823
|
-
const isVibeCompatible = (0,
|
|
94824
|
-
() => (0,
|
|
95212
|
+
const isVibeCompatible = (0, import_react152.useMemo)(
|
|
95213
|
+
() => (0, import_variant59.isType)(selectedTemplate, "HeadlessApp") && selectedTemplate.vibeCompatible,
|
|
94825
95214
|
[selectedTemplate]
|
|
94826
95215
|
);
|
|
94827
|
-
return (0,
|
|
95216
|
+
return (0, import_variant59.match)(status, {
|
|
94828
95217
|
Error: () => null,
|
|
94829
|
-
Loading: () => /* @__PURE__ */
|
|
95218
|
+
Loading: () => /* @__PURE__ */ import_react152.default.createElement(Spinner2, { text: "Loading..." }),
|
|
94830
95219
|
Success: ({ result: { packageManager: packageManager2 } }) => {
|
|
94831
|
-
return /* @__PURE__ */
|
|
95220
|
+
return /* @__PURE__ */ import_react152.default.createElement(
|
|
94832
95221
|
Box_default,
|
|
94833
95222
|
{
|
|
94834
95223
|
flexDirection: "column",
|
|
@@ -94839,14 +95228,14 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94839
95228
|
borderTop: false,
|
|
94840
95229
|
paddingLeft: 1
|
|
94841
95230
|
},
|
|
94842
|
-
/* @__PURE__ */
|
|
94843
|
-
!defaultBusinessName && /* @__PURE__ */
|
|
95231
|
+
/* @__PURE__ */ import_react152.default.createElement(WelcomeMessage2, null),
|
|
95232
|
+
!defaultBusinessName && /* @__PURE__ */ import_react152.default.createElement(
|
|
94844
95233
|
ChooseBusinessName,
|
|
94845
95234
|
{
|
|
94846
95235
|
onSubmit: ({ businessName: businessName2 }) => setBusinessName(businessName2)
|
|
94847
95236
|
}
|
|
94848
95237
|
),
|
|
94849
|
-
!defaultTemplate && businessName && /* @__PURE__ */
|
|
95238
|
+
!defaultTemplate && businessName && /* @__PURE__ */ import_react152.default.createElement(
|
|
94850
95239
|
ChooseTemplate2,
|
|
94851
95240
|
{
|
|
94852
95241
|
onSubmit: ({ template }) => {
|
|
@@ -94854,7 +95243,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94854
95243
|
}
|
|
94855
95244
|
}
|
|
94856
95245
|
),
|
|
94857
|
-
businessName && selectedTemplate && /* @__PURE__ */
|
|
95246
|
+
businessName && selectedTemplate && /* @__PURE__ */ import_react152.default.createElement(AuthProvider, null, /* @__PURE__ */ import_react152.default.createElement(
|
|
94858
95247
|
CreateBusiness,
|
|
94859
95248
|
{
|
|
94860
95249
|
businessName,
|
|
@@ -94862,7 +95251,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94862
95251
|
onDone: ({ businessId: businessId2 }) => setBusinessId(businessId2)
|
|
94863
95252
|
}
|
|
94864
95253
|
)),
|
|
94865
|
-
!defaultProjectName && businessName && selectedTemplate && businessId && /* @__PURE__ */
|
|
95254
|
+
!defaultProjectName && businessName && selectedTemplate && businessId && /* @__PURE__ */ import_react152.default.createElement(
|
|
94866
95255
|
ChooseFolder,
|
|
94867
95256
|
{
|
|
94868
95257
|
initialFolderName: (0, import_kebabCase5.default)(businessName),
|
|
@@ -94870,7 +95259,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94870
95259
|
onSubmit: ({ folderName: folderName2 }) => setFolderName(folderName2)
|
|
94871
95260
|
}
|
|
94872
95261
|
),
|
|
94873
|
-
businessName && selectedTemplate && businessId && folderName && /* @__PURE__ */
|
|
95262
|
+
businessName && selectedTemplate && businessId && folderName && /* @__PURE__ */ import_react152.default.createElement(AuthProvider, null, /* @__PURE__ */ import_react152.default.createElement(
|
|
94874
95263
|
CreateProject,
|
|
94875
95264
|
{
|
|
94876
95265
|
businessId,
|
|
@@ -94879,7 +95268,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94879
95268
|
onSubmit: (data) => setProjectData(data)
|
|
94880
95269
|
}
|
|
94881
95270
|
)),
|
|
94882
|
-
businessName && selectedTemplate && businessId && projectData && folderName && /* @__PURE__ */
|
|
95271
|
+
businessName && selectedTemplate && businessId && projectData && folderName && /* @__PURE__ */ import_react152.default.createElement(
|
|
94883
95272
|
GenerateProject2,
|
|
94884
95273
|
{
|
|
94885
95274
|
folderName,
|
|
@@ -94892,13 +95281,13 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94892
95281
|
onDone: (isDone) => setGenerationDone(isDone)
|
|
94893
95282
|
}
|
|
94894
95283
|
),
|
|
94895
|
-
businessName && selectedTemplate && businessId && projectData && folderName && generationDone && !vibeSetupChoice && isVibeCompatible && /* @__PURE__ */
|
|
95284
|
+
businessName && selectedTemplate && businessId && projectData && folderName && generationDone && !vibeSetupChoice && isVibeCompatible && /* @__PURE__ */ import_react152.default.createElement(
|
|
94896
95285
|
ChooseVibeSetup,
|
|
94897
95286
|
{
|
|
94898
95287
|
onSubmit: (choice) => setVibeSetupChoice(choice)
|
|
94899
95288
|
}
|
|
94900
95289
|
),
|
|
94901
|
-
businessName && selectedTemplate && businessId && projectData && projectFolder && generationDone && isVibeCompatible && (0,
|
|
95290
|
+
businessName && selectedTemplate && businessId && projectData && projectFolder && generationDone && isVibeCompatible && (0, import_variant59.isType)(vibeSetupChoice, "SetupVibe") && /* @__PURE__ */ import_react152.default.createElement(AuthProvider, null, /* @__PURE__ */ import_react152.default.createElement(
|
|
94902
95291
|
VibeRepositorySetupPolling,
|
|
94903
95292
|
{
|
|
94904
95293
|
projectId: projectData.projectId,
|
|
@@ -94906,7 +95295,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94906
95295
|
onSubmit: () => setVibeSetupDone(true)
|
|
94907
95296
|
}
|
|
94908
95297
|
)),
|
|
94909
|
-
businessName && selectedTemplate && businessId && projectData && folderName && generationDone && (vibeSetupDone || (0,
|
|
95298
|
+
businessName && selectedTemplate && businessId && projectData && folderName && generationDone && (vibeSetupDone || (0, import_variant59.isType)(vibeSetupChoice, "Skip") || !isVibeCompatible) && /* @__PURE__ */ import_react152.default.createElement(
|
|
94910
95299
|
ReleaseProject,
|
|
94911
95300
|
{
|
|
94912
95301
|
folderName,
|
|
@@ -94944,13 +95333,13 @@ var ProcessCommand = ({ targetParentFolder: targetParentFolder2, commandOptions
|
|
|
94944
95333
|
}
|
|
94945
95334
|
return result;
|
|
94946
95335
|
}, []);
|
|
94947
|
-
return (0,
|
|
95336
|
+
return (0, import_variant60.match)(status, {
|
|
94948
95337
|
Error: () => null,
|
|
94949
|
-
Loading: () => /* @__PURE__ */
|
|
95338
|
+
Loading: () => /* @__PURE__ */ import_react153.default.createElement(Spinner2, { text: "Loading..." }),
|
|
94950
95339
|
Success: ({
|
|
94951
95340
|
result: { template, projectName, businessName, cloudProviders, publish }
|
|
94952
95341
|
}) => {
|
|
94953
|
-
return /* @__PURE__ */
|
|
95342
|
+
return /* @__PURE__ */ import_react153.default.createElement(
|
|
94954
95343
|
CreateHeadlessSiteCommand,
|
|
94955
95344
|
{
|
|
94956
95345
|
targetParentFolder: targetParentFolder2,
|
|
@@ -95059,7 +95448,7 @@ var getHeadlessCommand = ({
|
|
|
95059
95448
|
try {
|
|
95060
95449
|
transaction.start();
|
|
95061
95450
|
await render2(
|
|
95062
|
-
/* @__PURE__ */
|
|
95451
|
+
/* @__PURE__ */ import_react154.default.createElement(BiProvider, { value: biLogger }, /* @__PURE__ */ import_react154.default.createElement(ErrorReporterProvider, { value: errorReporter2 }, /* @__PURE__ */ import_react154.default.createElement(PanoramaProvider, { value: panorama2 }, /* @__PURE__ */ import_react154.default.createElement(
|
|
95063
95452
|
LinkCommand,
|
|
95064
95453
|
{
|
|
95065
95454
|
projectName: options.projectName,
|
|
@@ -95145,7 +95534,7 @@ var getHeadlessCommand = ({
|
|
|
95145
95534
|
try {
|
|
95146
95535
|
transaction.start();
|
|
95147
95536
|
await render2(
|
|
95148
|
-
/* @__PURE__ */
|
|
95537
|
+
/* @__PURE__ */ import_react154.default.createElement(BiProvider, { value: biLogger }, /* @__PURE__ */ import_react154.default.createElement(ErrorReporterProvider, { value: errorReporter2 }, /* @__PURE__ */ import_react154.default.createElement(PanoramaProvider, { value: panorama2 }, /* @__PURE__ */ import_react154.default.createElement(
|
|
95149
95538
|
ProcessCommand,
|
|
95150
95539
|
{
|
|
95151
95540
|
targetParentFolder: targetParentFolder2,
|
|
@@ -95170,7 +95559,7 @@ import { randomUUID as randomUUID2 } from "node:crypto";
|
|
|
95170
95559
|
var package_default = {
|
|
95171
95560
|
name: "@wix/create-new",
|
|
95172
95561
|
description: "General entry point for creating Wix projects",
|
|
95173
|
-
version: "0.0.
|
|
95562
|
+
version: "0.0.40",
|
|
95174
95563
|
bin: "bin/index.cjs",
|
|
95175
95564
|
devDependencies: {
|
|
95176
95565
|
"@commander-js/extra-typings": "^13.0.0",
|