@wix/create-new 0.0.38 → 0.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +126 -113
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -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), isType22 = !isArr && !isArg && !isBuff && isTypedArray(value2), skipIndexes = isArr || isArg || isBuff || isType22, 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
|
+
isType22 && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
|
|
15358
15358
|
isIndex(key, length)))) {
|
|
15359
15359
|
result.push(key);
|
|
15360
15360
|
}
|
|
@@ -70517,6 +70517,8 @@ function usePanoramaMethodLogger(target) {
|
|
|
70517
70517
|
|
|
70518
70518
|
// ../cli-panorama/src/createPanorama.ts
|
|
70519
70519
|
init_esm_shims();
|
|
70520
|
+
var import_verror5 = __toESM(require_verror(), 1);
|
|
70521
|
+
var import_variant25 = __toESM(require_lib(), 1);
|
|
70520
70522
|
|
|
70521
70523
|
// ../../node_modules/@wix/panorama-client-node/dist/esm/index.js
|
|
70522
70524
|
init_esm_shims();
|
|
@@ -71576,14 +71578,25 @@ async function createPanorama(options) {
|
|
|
71576
71578
|
}).withGlobalConfig(globalConfig).setMuted(!userConfig.telemetry);
|
|
71577
71579
|
const panorama2 = createPanoramaWrapper(factory);
|
|
71578
71580
|
if (errorReporter2) {
|
|
71579
|
-
errorReporter2.on("errorReported", (
|
|
71581
|
+
errorReporter2.on("errorReported", (cliError) => {
|
|
71580
71582
|
const panoramaClient2 = panorama2.client({
|
|
71581
71583
|
baseParams: {
|
|
71582
71584
|
componentId: "error-reporter"
|
|
71583
71585
|
}
|
|
71584
71586
|
});
|
|
71585
71587
|
const errorMonitor = panoramaClient2.errorMonitor();
|
|
71586
|
-
|
|
71588
|
+
const error = (0, import_variant25.isType)(cliError.cliCode, CliSystemErrorCode.UnknownFailure) && cliError.cliCode.error instanceof Error ? cliError.cliCode.error : cliError;
|
|
71589
|
+
const errorToReport = new Error(error.message);
|
|
71590
|
+
errorToReport.name = error.name;
|
|
71591
|
+
errorToReport.stack = import_verror5.default.fullStack(error);
|
|
71592
|
+
const httpError = extractHttpError(cliError);
|
|
71593
|
+
if (httpError) {
|
|
71594
|
+
errorToReport.cause = httpError;
|
|
71595
|
+
}
|
|
71596
|
+
errorMonitor.reportError(errorToReport, {
|
|
71597
|
+
// panorama by default uses constructor.name for errorName
|
|
71598
|
+
errorName: cliError.name
|
|
71599
|
+
});
|
|
71587
71600
|
});
|
|
71588
71601
|
}
|
|
71589
71602
|
return panorama2;
|
|
@@ -71593,17 +71606,17 @@ async function createPanorama(options) {
|
|
|
71593
71606
|
init_esm_shims();
|
|
71594
71607
|
var import_kebabCase = __toESM(require_kebabCase(), 1);
|
|
71595
71608
|
function createCommandTransaction(panorama2, command) {
|
|
71596
|
-
const commandFullName = getFullCommandName(command);
|
|
71609
|
+
const commandFullName = (0, import_kebabCase.default)(getFullCommandName(command));
|
|
71610
|
+
panorama2.setDefaultClientData({
|
|
71611
|
+
commandName: command.name(),
|
|
71612
|
+
commandFullName
|
|
71613
|
+
});
|
|
71597
71614
|
const client2 = panorama2.client({
|
|
71598
71615
|
baseParams: {
|
|
71599
71616
|
componentId: "command"
|
|
71600
|
-
},
|
|
71601
|
-
data: {
|
|
71602
|
-
commandName: command.name(),
|
|
71603
|
-
commandFullName
|
|
71604
71617
|
}
|
|
71605
71618
|
});
|
|
71606
|
-
return client2.transaction(
|
|
71619
|
+
return client2.transaction(commandFullName);
|
|
71607
71620
|
}
|
|
71608
71621
|
function getFullCommandName(command) {
|
|
71609
71622
|
if (command.parent) {
|
|
@@ -71915,7 +71928,7 @@ var createBiLogger2 = async ({
|
|
|
71915
71928
|
// ../create-new-packages/app-command/src/components/CreateAppCommand.tsx
|
|
71916
71929
|
init_esm_shims();
|
|
71917
71930
|
var import_react126 = __toESM(require_react(), 1);
|
|
71918
|
-
var
|
|
71931
|
+
var import_variant40 = __toESM(require_lib(), 1);
|
|
71919
71932
|
|
|
71920
71933
|
// ../create-new-packages/app-command/src/components/WelcomeMessage.tsx
|
|
71921
71934
|
init_esm_shims();
|
|
@@ -71954,7 +71967,7 @@ var AuthProvider2 = ({ userInfo: userInfo2, children }) => {
|
|
|
71954
71967
|
// ../create-new-packages/app-command/src/components/Questions/Questions.tsx
|
|
71955
71968
|
init_esm_shims();
|
|
71956
71969
|
var import_react121 = __toESM(require_react(), 1);
|
|
71957
|
-
var
|
|
71970
|
+
var import_variant37 = __toESM(require_lib(), 1);
|
|
71958
71971
|
|
|
71959
71972
|
// ../dev-center-client/src/index.ts
|
|
71960
71973
|
init_esm_shims();
|
|
@@ -80356,7 +80369,7 @@ function useDevCenterClient({
|
|
|
80356
80369
|
|
|
80357
80370
|
// ../create-new-packages/app-command/src/parse-command-options.ts
|
|
80358
80371
|
init_esm_shims();
|
|
80359
|
-
var
|
|
80372
|
+
var import_variant27 = __toESM(require_lib(), 1);
|
|
80360
80373
|
var import_kebabCase2 = __toESM(require_kebabCase(), 1);
|
|
80361
80374
|
import { join as join8, resolve as resolve3 } from "node:path";
|
|
80362
80375
|
|
|
@@ -80389,11 +80402,11 @@ var import_validate_npm_package_name = __toESM(require_lib2(), 1);
|
|
|
80389
80402
|
|
|
80390
80403
|
// ../create-new-packages/app-command/src/validations/result.ts
|
|
80391
80404
|
init_esm_shims();
|
|
80392
|
-
var
|
|
80393
|
-
var Result = (0,
|
|
80394
|
-
(0,
|
|
80395
|
-
Error: (0,
|
|
80396
|
-
Ok:
|
|
80405
|
+
var import_variant26 = __toESM(require_lib(), 1);
|
|
80406
|
+
var Result = (0, import_variant26.variant)(
|
|
80407
|
+
(0, import_variant26.onTerms)(({ T }) => ({
|
|
80408
|
+
Error: (0, import_variant26.payload)(T),
|
|
80409
|
+
Ok: import_variant26.nil
|
|
80397
80410
|
}))
|
|
80398
80411
|
);
|
|
80399
80412
|
|
|
@@ -80455,11 +80468,11 @@ function validateAppName(value2) {
|
|
|
80455
80468
|
}
|
|
80456
80469
|
|
|
80457
80470
|
// ../create-new-packages/app-command/src/parse-command-options.ts
|
|
80458
|
-
var TemplateSource = (0,
|
|
80459
|
-
App: (0,
|
|
80460
|
-
GitRepo: (0,
|
|
80461
|
-
Local: (0,
|
|
80462
|
-
Default: (0,
|
|
80471
|
+
var TemplateSource = (0, import_variant27.variant)({
|
|
80472
|
+
App: (0, import_variant27.payload)(),
|
|
80473
|
+
GitRepo: (0, import_variant27.fields)(),
|
|
80474
|
+
Local: (0, import_variant27.fields)(),
|
|
80475
|
+
Default: (0, import_variant27.constant)({ path: resolve3(__dirname, "../templates/app/blank") })
|
|
80463
80476
|
});
|
|
80464
80477
|
async function parseTemplateOptions(options, { devCenterClient }) {
|
|
80465
80478
|
if (options.template) {
|
|
@@ -80492,8 +80505,8 @@ async function parseTemplateOptions(options, { devCenterClient }) {
|
|
|
80492
80505
|
return TemplateSource.Local({ path: options.templatePath });
|
|
80493
80506
|
}
|
|
80494
80507
|
}
|
|
80495
|
-
var AppNameOptions = (0,
|
|
80496
|
-
Provided: (0,
|
|
80508
|
+
var AppNameOptions = (0, import_variant27.variant)({
|
|
80509
|
+
Provided: (0, import_variant27.fields)(),
|
|
80497
80510
|
Missing: {}
|
|
80498
80511
|
});
|
|
80499
80512
|
async function parseAppNameOptions(targetParentFolder2, options) {
|
|
@@ -80509,7 +80522,7 @@ async function parseAppNameOptions(targetParentFolder2, options) {
|
|
|
80509
80522
|
});
|
|
80510
80523
|
}
|
|
80511
80524
|
const npmValidationErrors = await validatePackageName(packageName);
|
|
80512
|
-
if ((0,
|
|
80525
|
+
if ((0, import_variant27.isType)(npmValidationErrors, "Error")) {
|
|
80513
80526
|
throw new CliError({
|
|
80514
80527
|
code: CliErrorCode.AppNameArgumentIsInvalid({
|
|
80515
80528
|
errorMessage: `Invalid package name "${packageName}". Please fix the following issues: ${npmValidationErrors.payload.join(", ")}`
|
|
@@ -80524,7 +80537,7 @@ async function parseAppNameOptions(targetParentFolder2, options) {
|
|
|
80524
80537
|
async function parseCommandOptions(targetParentFolder2, options, clients) {
|
|
80525
80538
|
const template = await parseTemplateOptions(options, clients);
|
|
80526
80539
|
const appNameOptions = await parseAppNameOptions(targetParentFolder2, options);
|
|
80527
|
-
if ((0,
|
|
80540
|
+
if ((0, import_variant27.isType)(appNameOptions, "Provided") && !template) {
|
|
80528
80541
|
throw new CliError({
|
|
80529
80542
|
code: CliErrorCode.AppNameArgumentIsInvalid({
|
|
80530
80543
|
errorMessage: "An application name was provided, but no template was specified. Please specify a template when defining the application name."
|
|
@@ -80537,8 +80550,8 @@ async function parseCommandOptions(targetParentFolder2, options, clients) {
|
|
|
80537
80550
|
|
|
80538
80551
|
// ../create-new-packages/app-command/src/types.ts
|
|
80539
80552
|
init_esm_shims();
|
|
80540
|
-
var
|
|
80541
|
-
var DeveloperAppsStatus = (0,
|
|
80553
|
+
var import_variant28 = __toESM(require_lib(), 1);
|
|
80554
|
+
var DeveloperAppsStatus = (0, import_variant28.variant)({
|
|
80542
80555
|
NoApps: {},
|
|
80543
80556
|
FailedLoadingApps: {},
|
|
80544
80557
|
Available: {}
|
|
@@ -80547,16 +80560,16 @@ var DeveloperAppsStatus = (0, import_variant27.variant)({
|
|
|
80547
80560
|
// ../create-new-packages/app-command/src/components/CreateAppOrExtendExisting.tsx
|
|
80548
80561
|
init_esm_shims();
|
|
80549
80562
|
var import_react106 = __toESM(require_react(), 1);
|
|
80550
|
-
var
|
|
80563
|
+
var import_variant29 = __toESM(require_lib(), 1);
|
|
80551
80564
|
var CreateAppOrExtendExisting = ({
|
|
80552
80565
|
developerAppsStatus,
|
|
80553
80566
|
onStartCreationFlow
|
|
80554
80567
|
}) => {
|
|
80555
80568
|
const { t: t3 } = useTranslation();
|
|
80556
80569
|
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
80557
|
-
const exisitingAvailabilty = (0,
|
|
80570
|
+
const exisitingAvailabilty = (0, import_variant29.match)(
|
|
80558
80571
|
developerAppsStatus,
|
|
80559
|
-
(0,
|
|
80572
|
+
(0, import_variant29.lookup)({
|
|
80560
80573
|
FailedLoadingApps: SelectOptionAvailability.Disabled({
|
|
80561
80574
|
reason: t3("create_app.create_new_or_extend.failed_fetching_apps")
|
|
80562
80575
|
}),
|
|
@@ -80597,7 +80610,7 @@ var CreateAppOrExtendExisting = ({
|
|
|
80597
80610
|
// ../create-new-packages/app-command/src/components/Questions/NewAppFlow.tsx
|
|
80598
80611
|
init_esm_shims();
|
|
80599
80612
|
var import_react117 = __toESM(require_react(), 1);
|
|
80600
|
-
var
|
|
80613
|
+
var import_variant34 = __toESM(require_lib(), 1);
|
|
80601
80614
|
|
|
80602
80615
|
// ../backend-as-a-service-client/src/index.ts
|
|
80603
80616
|
init_esm_shims();
|
|
@@ -81266,7 +81279,7 @@ var ChooseAppName = ({ onSubmit }) => {
|
|
|
81266
81279
|
// ../create-new-packages/app-command/src/components/ChoosePackageName.tsx
|
|
81267
81280
|
init_esm_shims();
|
|
81268
81281
|
var import_react110 = __toESM(require_react(), 1);
|
|
81269
|
-
var
|
|
81282
|
+
var import_variant30 = __toESM(require_lib(), 1);
|
|
81270
81283
|
import { join as join9, relative } from "node:path";
|
|
81271
81284
|
var import_kebabCase3 = __toESM(require_kebabCase(), 1);
|
|
81272
81285
|
|
|
@@ -81315,13 +81328,13 @@ var ChoosePackageName = ({
|
|
|
81315
81328
|
const defaultPackageName = (0, import_react110.useMemo)(() => {
|
|
81316
81329
|
return (0, import_kebabCase3.default)(appName);
|
|
81317
81330
|
}, [appName]);
|
|
81318
|
-
const isMonorepo = (0,
|
|
81331
|
+
const isMonorepo = (0, import_variant30.isType)(repoType2, RepoType.Monorepo);
|
|
81319
81332
|
async function validate3(packageName2) {
|
|
81320
81333
|
if (!await validateDirectory(join9(targetParentFolder2, packageName2))) {
|
|
81321
81334
|
return t3("validation_errors.invalid_directory");
|
|
81322
81335
|
}
|
|
81323
81336
|
const npmValidationErrors = await validatePackageName(packageName2);
|
|
81324
|
-
return (0,
|
|
81337
|
+
return (0, import_variant30.match)(npmValidationErrors, {
|
|
81325
81338
|
Ok: () => true,
|
|
81326
81339
|
Error: ({ payload: payload7 }) => t3("validation_errors.invalid_package_name", {
|
|
81327
81340
|
errors: payload7.join(", ")
|
|
@@ -81419,7 +81432,7 @@ var ChooseAppCreationSource = ({
|
|
|
81419
81432
|
// ../create-new-packages/app-command/src/components/ChooseTemplate.tsx
|
|
81420
81433
|
init_esm_shims();
|
|
81421
81434
|
var import_react112 = __toESM(require_react(), 1);
|
|
81422
|
-
var
|
|
81435
|
+
var import_variant31 = __toESM(require_lib(), 1);
|
|
81423
81436
|
var ChooseTemplate = ({ onSelected }) => {
|
|
81424
81437
|
const { t: t3 } = useTranslation();
|
|
81425
81438
|
const { cliFlowStepAnswered } = useCreateAppBi();
|
|
@@ -81441,7 +81454,7 @@ var ChooseTemplate = ({ onSelected }) => {
|
|
|
81441
81454
|
})
|
|
81442
81455
|
};
|
|
81443
81456
|
}, []);
|
|
81444
|
-
return /* @__PURE__ */ import_react112.default.createElement(import_react112.default.Fragment, null, (0,
|
|
81457
|
+
return /* @__PURE__ */ import_react112.default.createElement(import_react112.default.Fragment, null, (0, import_variant31.match)(status, {
|
|
81445
81458
|
Error: () => null,
|
|
81446
81459
|
Loading: () => /* @__PURE__ */ import_react112.default.createElement(Spinner2, null),
|
|
81447
81460
|
Success: ({ result: { appTemplatesOptions } }) => /* @__PURE__ */ import_react112.default.createElement(import_react112.default.Fragment, null, /* @__PURE__ */ import_react112.default.createElement(
|
|
@@ -81522,8 +81535,8 @@ var AppRegistered = ({ appName }) => {
|
|
|
81522
81535
|
// ../create-new-packages/app-command/src/components/mcp/ConfigMcp.tsx
|
|
81523
81536
|
init_esm_shims();
|
|
81524
81537
|
var import_react116 = __toESM(require_react(), 1);
|
|
81525
|
-
var
|
|
81526
|
-
var IdeForMcp = (0,
|
|
81538
|
+
var import_variant32 = __toESM(require_lib(), 1);
|
|
81539
|
+
var IdeForMcp = (0, import_variant32.variant)({
|
|
81527
81540
|
VsCode: {},
|
|
81528
81541
|
Cursor: {},
|
|
81529
81542
|
ClaudeCode: {}
|
|
@@ -81580,17 +81593,17 @@ var ConfigMcp = ({ onSelected }) => {
|
|
|
81580
81593
|
|
|
81581
81594
|
// ../create-new-packages/app-command/src/components/mcp/getMcpResult.ts
|
|
81582
81595
|
init_esm_shims();
|
|
81583
|
-
var
|
|
81596
|
+
var import_variant33 = __toESM(require_lib(), 1);
|
|
81584
81597
|
import { join as join10 } from "node:path";
|
|
81585
|
-
var McpConfigResult = (0,
|
|
81586
|
-
Created: (0,
|
|
81598
|
+
var McpConfigResult = (0, import_variant33.variant)({
|
|
81599
|
+
Created: (0, import_variant33.fields)(),
|
|
81587
81600
|
Canceled: {}
|
|
81588
81601
|
});
|
|
81589
81602
|
var getMcpData = ({
|
|
81590
81603
|
ideForMcp,
|
|
81591
81604
|
packageFolder
|
|
81592
81605
|
}) => {
|
|
81593
|
-
const mcpPath = (0,
|
|
81606
|
+
const mcpPath = (0, import_variant33.match)(ideForMcp, {
|
|
81594
81607
|
Cursor: () => join10(packageFolder, ".cursor", "mcp.json"),
|
|
81595
81608
|
VsCode: () => join10(packageFolder, ".vscode", "mcp.json"),
|
|
81596
81609
|
ClaudeCode: () => join10(packageFolder, ".mcp.json")
|
|
@@ -81598,9 +81611,9 @@ var getMcpData = ({
|
|
|
81598
81611
|
return McpConfigResult.Created({
|
|
81599
81612
|
mcpPath,
|
|
81600
81613
|
ideForMcp,
|
|
81601
|
-
docsUrl: (0,
|
|
81614
|
+
docsUrl: (0, import_variant33.match)(
|
|
81602
81615
|
ideForMcp,
|
|
81603
|
-
(0,
|
|
81616
|
+
(0, import_variant33.lookup)({
|
|
81604
81617
|
Cursor: "https://cursor.com/docs/context/mcp",
|
|
81605
81618
|
VsCode: "https://code.visualstudio.com/docs/copilot/chat/mcp-servers",
|
|
81606
81619
|
ClaudeCode: "https://docs.anthropic.com/en/docs/claude-code/mcp"
|
|
@@ -81682,9 +81695,9 @@ var NewAppFlow = ({
|
|
|
81682
81695
|
const [packageName, setPackageName] = (0, import_react117.useState)();
|
|
81683
81696
|
const createAppCallback = useAsyncCallback3(
|
|
81684
81697
|
async (_2, { appName: appName2, packageName: packageName2, template, mcpConfigResult }) => {
|
|
81685
|
-
const { id: appId } = await (0,
|
|
81698
|
+
const { id: appId } = await (0, import_variant34.match)(
|
|
81686
81699
|
template,
|
|
81687
|
-
(0,
|
|
81700
|
+
(0, import_variant34.partial)({
|
|
81688
81701
|
App: ({ payload: payload7 }) => devCenterClient.createAppFromTemplate(
|
|
81689
81702
|
{
|
|
81690
81703
|
name: appName2,
|
|
@@ -81722,7 +81735,7 @@ var NewAppFlow = ({
|
|
|
81722
81735
|
};
|
|
81723
81736
|
}
|
|
81724
81737
|
);
|
|
81725
|
-
const autoCreateApp = (0,
|
|
81738
|
+
const autoCreateApp = (0, import_variant34.isType)(appNameFromOptions, "Provided") && !!templateFromOptions;
|
|
81726
81739
|
useAsync2(async () => {
|
|
81727
81740
|
if (autoCreateApp) {
|
|
81728
81741
|
return createAppCallback.execute({
|
|
@@ -81740,7 +81753,7 @@ var NewAppFlow = ({
|
|
|
81740
81753
|
targetParentFolder: targetParentFolder2,
|
|
81741
81754
|
repoType: repoType2,
|
|
81742
81755
|
onSelected: (userPackageName) => {
|
|
81743
|
-
if ((0,
|
|
81756
|
+
if ((0, import_variant34.isType)(repoType2, RepoType.Monorepo)) {
|
|
81744
81757
|
void createAppCallback.execute({
|
|
81745
81758
|
appName,
|
|
81746
81759
|
packageName: userPackageName,
|
|
@@ -81768,7 +81781,7 @@ var NewAppFlow = ({
|
|
|
81768
81781
|
});
|
|
81769
81782
|
}
|
|
81770
81783
|
}
|
|
81771
|
-
)), (0,
|
|
81784
|
+
)), (0, import_variant34.match)(createAppCallback.status, {
|
|
81772
81785
|
Error: () => null,
|
|
81773
81786
|
Loading: () => /* @__PURE__ */ import_react117.default.createElement(RegisteringApp, null),
|
|
81774
81787
|
Success: ({ result }) => /* @__PURE__ */ import_react117.default.createElement(AppRegistered, { ...result }),
|
|
@@ -81779,7 +81792,7 @@ var NewAppFlow = ({
|
|
|
81779
81792
|
// ../create-new-packages/app-command/src/components/Questions/ExistingAppFlow.tsx
|
|
81780
81793
|
init_esm_shims();
|
|
81781
81794
|
var import_react119 = __toESM(require_react(), 1);
|
|
81782
|
-
var
|
|
81795
|
+
var import_variant35 = __toESM(require_lib(), 1);
|
|
81783
81796
|
|
|
81784
81797
|
// ../create-new-packages/app-command/src/components/ExtendExistingApp.tsx
|
|
81785
81798
|
init_esm_shims();
|
|
@@ -81870,7 +81883,7 @@ var ExistingAppFlow = ({
|
|
|
81870
81883
|
});
|
|
81871
81884
|
}
|
|
81872
81885
|
}
|
|
81873
|
-
), (0,
|
|
81886
|
+
), (0, import_variant35.match)(registerAppCallback.status, {
|
|
81874
81887
|
Error: () => null,
|
|
81875
81888
|
Loading: () => /* @__PURE__ */ import_react119.default.createElement(Box_default, { marginTop: 1 }, /* @__PURE__ */ import_react119.default.createElement(Spinner2, { text: t3("create_app.extend_existing.get_project") })),
|
|
81876
81889
|
Success: () => null,
|
|
@@ -81881,11 +81894,11 @@ var ExistingAppFlow = ({
|
|
|
81881
81894
|
// ../create-new-packages/app-command/src/components/StartFromTemplateMessage.tsx
|
|
81882
81895
|
init_esm_shims();
|
|
81883
81896
|
var import_react120 = __toESM(require_react(), 1);
|
|
81884
|
-
var
|
|
81897
|
+
var import_variant36 = __toESM(require_lib(), 1);
|
|
81885
81898
|
var StartFromTemplateMessage = ({
|
|
81886
81899
|
template
|
|
81887
81900
|
}) => {
|
|
81888
|
-
const messageComponent = (0,
|
|
81901
|
+
const messageComponent = (0, import_variant36.match)(template, {
|
|
81889
81902
|
App: ({ payload: payload7 }) => /* @__PURE__ */ import_react120.default.createElement(
|
|
81890
81903
|
Trans2,
|
|
81891
81904
|
{
|
|
@@ -81963,7 +81976,7 @@ var Questions = ({
|
|
|
81963
81976
|
};
|
|
81964
81977
|
}
|
|
81965
81978
|
}, []);
|
|
81966
|
-
return (0,
|
|
81979
|
+
return (0, import_variant37.match)(status, {
|
|
81967
81980
|
Error: () => null,
|
|
81968
81981
|
Loading: () => /* @__PURE__ */ import_react121.default.createElement(Spinner2, { text: t3("general.loading") }),
|
|
81969
81982
|
Success: ({
|
|
@@ -81982,7 +81995,7 @@ var Questions = ({
|
|
|
81982
81995
|
}
|
|
81983
81996
|
));
|
|
81984
81997
|
}
|
|
81985
|
-
if ((0,
|
|
81998
|
+
if ((0, import_variant37.isType)(developerAppsStatus, "NoApps")) {
|
|
81986
81999
|
return /* @__PURE__ */ import_react121.default.createElement(
|
|
81987
82000
|
NewAppFlow,
|
|
81988
82001
|
{
|
|
@@ -82020,7 +82033,7 @@ var Questions = ({
|
|
|
82020
82033
|
|
|
82021
82034
|
// ../create-new-packages/app-command/src/tasks.ts
|
|
82022
82035
|
init_esm_shims();
|
|
82023
|
-
var
|
|
82036
|
+
var import_variant38 = __toESM(require_lib(), 1);
|
|
82024
82037
|
import { mkdir } from "node:fs/promises";
|
|
82025
82038
|
import { join as join12 } from "node:path";
|
|
82026
82039
|
|
|
@@ -82110,7 +82123,7 @@ function getTasks({
|
|
|
82110
82123
|
repoType: repoType2,
|
|
82111
82124
|
template,
|
|
82112
82125
|
templateParams,
|
|
82113
|
-
ideForMcp: (0,
|
|
82126
|
+
ideForMcp: (0, import_variant38.match)(mcpConfigResult, {
|
|
82114
82127
|
Created: ({ ideForMcp }) => ideForMcp,
|
|
82115
82128
|
Canceled: () => {
|
|
82116
82129
|
}
|
|
@@ -82208,7 +82221,7 @@ function getTasks({
|
|
|
82208
82221
|
successText: agentConfigsTaskText.successText
|
|
82209
82222
|
};
|
|
82210
82223
|
const optionalInstallAndAgentsTask = skipInstall ? [] : [installDependenciesTask, addWixSkillsTask, generateAgentConfigsTask];
|
|
82211
|
-
return (0,
|
|
82224
|
+
return (0, import_variant38.match)(repoType2, {
|
|
82212
82225
|
None: () => [
|
|
82213
82226
|
generateProjectTask,
|
|
82214
82227
|
...skipGit ? [] : [initializeGitTask],
|
|
@@ -82304,8 +82317,8 @@ var TaskList = ({ tasks, totalTaskCount }) => {
|
|
|
82304
82317
|
// ../create-new-packages/app-command/src/task-runner.ts
|
|
82305
82318
|
init_esm_shims();
|
|
82306
82319
|
var import_react124 = __toESM(require_react(), 1);
|
|
82307
|
-
var
|
|
82308
|
-
var TaskRunnerStatus = (0,
|
|
82320
|
+
var import_variant39 = __toESM(require_lib(), 1);
|
|
82321
|
+
var TaskRunnerStatus = (0, import_variant39.variant)({
|
|
82309
82322
|
Idle: {},
|
|
82310
82323
|
Running: (runningTasks, totalTaskCount) => {
|
|
82311
82324
|
const taskStatuses = runningTasks.map((task, index) => {
|
|
@@ -82419,10 +82432,10 @@ var CreateAppCommand = ({
|
|
|
82419
82432
|
})
|
|
82420
82433
|
}
|
|
82421
82434
|
)),
|
|
82422
|
-
generationData && (0,
|
|
82435
|
+
generationData && (0, import_variant40.match)(taskRunnerStatus, {
|
|
82423
82436
|
Idle: () => null,
|
|
82424
82437
|
Running: (status) => /* @__PURE__ */ import_react126.default.createElement(GenerationProgress, { ...status }),
|
|
82425
|
-
Done: (status) => /* @__PURE__ */ import_react126.default.createElement(import_react126.default.Fragment, null, /* @__PURE__ */ import_react126.default.createElement(GenerationProgress, { ...status }), (0,
|
|
82438
|
+
Done: (status) => /* @__PURE__ */ import_react126.default.createElement(import_react126.default.Fragment, null, /* @__PURE__ */ import_react126.default.createElement(GenerationProgress, { ...status }), (0, import_variant40.match)(generationData.mcpConfigResult, {
|
|
82426
82439
|
Created: ({ mcpPath, docsUrl }) => /* @__PURE__ */ import_react126.default.createElement(McpConfigCreated, { mcpPath, docsUrl }),
|
|
82427
82440
|
Canceled: () => null
|
|
82428
82441
|
}), /* @__PURE__ */ import_react126.default.createElement(
|
|
@@ -82636,7 +82649,7 @@ var validateProjectName = (value2) => {
|
|
|
82636
82649
|
// ../create-new-packages/headless-command/src/components/LinkCommand/LinkCommand.tsx
|
|
82637
82650
|
init_esm_shims();
|
|
82638
82651
|
var import_react138 = __toESM(require_react(), 1);
|
|
82639
|
-
var
|
|
82652
|
+
var import_variant45 = __toESM(require_lib(), 1);
|
|
82640
82653
|
|
|
82641
82654
|
// ../create-new-packages/headless-command/src/components/WelcomeMessage.tsx
|
|
82642
82655
|
init_esm_shims();
|
|
@@ -82671,7 +82684,7 @@ var ChooseBusinessName = ({ onSubmit }) => {
|
|
|
82671
82684
|
// ../create-new-packages/headless-command/src/components/CreateBusiness.tsx
|
|
82672
82685
|
init_esm_shims();
|
|
82673
82686
|
var import_react131 = __toESM(require_react(), 1);
|
|
82674
|
-
var
|
|
82687
|
+
var import_variant41 = __toESM(require_lib(), 1);
|
|
82675
82688
|
|
|
82676
82689
|
// ../create-new-packages/headless-command/src/clients/funnel-projects/useFunnelProjectsClient.ts
|
|
82677
82690
|
init_esm_shims();
|
|
@@ -82795,7 +82808,7 @@ var CreateBusiness = ({ businessName, businessTemplateId, onDone }) => {
|
|
|
82795
82808
|
const { project } = await createProject3(businessName, businessTemplateId);
|
|
82796
82809
|
onDone({ businessId: project.metaSiteId });
|
|
82797
82810
|
}, []);
|
|
82798
|
-
return /* @__PURE__ */ import_react131.default.createElement(import_react131.default.Fragment, null, (0,
|
|
82811
|
+
return /* @__PURE__ */ import_react131.default.createElement(import_react131.default.Fragment, null, (0, import_variant41.match)(status, {
|
|
82799
82812
|
Error: () => null,
|
|
82800
82813
|
Loading: () => /* @__PURE__ */ import_react131.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react131.default.createElement(Spinner2, { text: "Creating your business..." })),
|
|
82801
82814
|
Success: () => /* @__PURE__ */ import_react131.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react131.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react131.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react131.default.createElement(Text2, null, "Business created successfully"))),
|
|
@@ -82806,7 +82819,7 @@ var CreateBusiness = ({ businessName, businessTemplateId, onDone }) => {
|
|
|
82806
82819
|
// ../create-new-packages/headless-command/src/components/CreateProject.tsx
|
|
82807
82820
|
init_esm_shims();
|
|
82808
82821
|
var import_react133 = __toESM(require_react(), 1);
|
|
82809
|
-
var
|
|
82822
|
+
var import_variant42 = __toESM(require_lib(), 1);
|
|
82810
82823
|
|
|
82811
82824
|
// ../create-new-packages/headless-command/src/hooks/create-project.ts
|
|
82812
82825
|
init_esm_shims();
|
|
@@ -83733,7 +83746,7 @@ var CreateProject = ({
|
|
|
83733
83746
|
}) => {
|
|
83734
83747
|
const { status, execute } = useCreateProject(businessId);
|
|
83735
83748
|
(0, import_react133.useEffect)(() => {
|
|
83736
|
-
if ((0,
|
|
83749
|
+
if ((0, import_variant42.isType)(status, "Success")) {
|
|
83737
83750
|
onSubmit(status.result);
|
|
83738
83751
|
}
|
|
83739
83752
|
}, [status, onSubmit]);
|
|
@@ -83758,7 +83771,7 @@ var CreateProject = ({
|
|
|
83758
83771
|
validate: validate3,
|
|
83759
83772
|
inCreateFlow: true
|
|
83760
83773
|
}
|
|
83761
|
-
), (0,
|
|
83774
|
+
), (0, import_variant42.match)(status, {
|
|
83762
83775
|
Error: () => null,
|
|
83763
83776
|
Loading: () => /* @__PURE__ */ import_react133.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react133.default.createElement(Spinner2, { text: "Creating your project..." })),
|
|
83764
83777
|
Success: () => /* @__PURE__ */ import_react133.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react133.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react133.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react133.default.createElement(Text2, null, "Project created successfully"))),
|
|
@@ -83769,7 +83782,7 @@ var CreateProject = ({
|
|
|
83769
83782
|
// ../create-new-packages/headless-command/src/components/LinkCommand/GenerateProject.tsx
|
|
83770
83783
|
init_esm_shims();
|
|
83771
83784
|
var import_react136 = __toESM(require_react(), 1);
|
|
83772
|
-
var
|
|
83785
|
+
var import_variant44 = __toESM(require_lib(), 1);
|
|
83773
83786
|
|
|
83774
83787
|
// ../cli-project-extender/src/index.ts
|
|
83775
83788
|
init_esm_shims();
|
|
@@ -92823,8 +92836,8 @@ async function extend2(projectFolder) {
|
|
|
92823
92836
|
// ../create-new-packages/headless-command/src/task-runner.ts
|
|
92824
92837
|
init_esm_shims();
|
|
92825
92838
|
var import_react134 = __toESM(require_react(), 1);
|
|
92826
|
-
var
|
|
92827
|
-
var TaskRunnerStatus2 = (0,
|
|
92839
|
+
var import_variant43 = __toESM(require_lib(), 1);
|
|
92840
|
+
var TaskRunnerStatus2 = (0, import_variant43.variant)({
|
|
92828
92841
|
Idle: {},
|
|
92829
92842
|
Running: (runningTasks, totalTaskCount) => {
|
|
92830
92843
|
const taskStatuses = runningTasks.map((task, index) => {
|
|
@@ -92936,7 +92949,7 @@ var GenerateProject = ({ projectFolder, businessId, projectData, onDone, package
|
|
|
92936
92949
|
await executeTaskRunner(tasks);
|
|
92937
92950
|
onDone(true);
|
|
92938
92951
|
}, []);
|
|
92939
|
-
return (0,
|
|
92952
|
+
return (0, import_variant44.match)(taskRunnerStatus, {
|
|
92940
92953
|
Idle: () => null,
|
|
92941
92954
|
Running: (status) => /* @__PURE__ */ import_react136.default.createElement(GenerationProgress2, { ...status }),
|
|
92942
92955
|
Done: (status) => /* @__PURE__ */ import_react136.default.createElement(Box_default, { flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ import_react136.default.createElement(GenerationProgress2, { ...status }), /* @__PURE__ */ import_react136.default.createElement(Box_default, { marginLeft: -2, marginTop: 1 }, /* @__PURE__ */ import_react136.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react136.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react136.default.createElement(Text2, null, "Project set up successfully"))))
|
|
@@ -93004,7 +93017,7 @@ var LinkCommand = ({
|
|
|
93004
93017
|
const packageManager2 = await createPackageManager(repoType2);
|
|
93005
93018
|
return { repoType: repoType2, packageManager: packageManager2 };
|
|
93006
93019
|
}, []);
|
|
93007
|
-
return (0,
|
|
93020
|
+
return (0, import_variant45.match)(status, {
|
|
93008
93021
|
Error: () => null,
|
|
93009
93022
|
Loading: () => /* @__PURE__ */ import_react138.default.createElement(Spinner2, { text: "Loading..." }),
|
|
93010
93023
|
Success: ({ result: { packageManager: packageManager2 } }) => {
|
|
@@ -93105,11 +93118,11 @@ var validateCloudProvider = (value2) => {
|
|
|
93105
93118
|
// ../create-new-packages/headless-command/src/components/ProcessCommand.tsx
|
|
93106
93119
|
init_esm_shims();
|
|
93107
93120
|
var import_react149 = __toESM(require_react(), 1);
|
|
93108
|
-
var
|
|
93121
|
+
var import_variant55 = __toESM(require_lib(), 1);
|
|
93109
93122
|
|
|
93110
93123
|
// ../create-new-packages/headless-command/src/parse-command-options.ts
|
|
93111
93124
|
init_esm_shims();
|
|
93112
|
-
var
|
|
93125
|
+
var import_variant47 = __toESM(require_lib(), 1);
|
|
93113
93126
|
import { join as join14 } from "node:path";
|
|
93114
93127
|
|
|
93115
93128
|
// ../create-new-packages/headless-command/src/validations/index.ts
|
|
@@ -93128,11 +93141,11 @@ async function validateDirectory2(projectRoot) {
|
|
|
93128
93141
|
// ../create-new-packages/headless-command/src/validations/package-name.ts
|
|
93129
93142
|
init_esm_shims();
|
|
93130
93143
|
var import_validate_npm_package_name2 = __toESM(require_lib2(), 1);
|
|
93131
|
-
var
|
|
93132
|
-
var Result2 = (0,
|
|
93133
|
-
(0,
|
|
93134
|
-
Error: (0,
|
|
93135
|
-
Ok:
|
|
93144
|
+
var import_variant46 = __toESM(require_lib(), 1);
|
|
93145
|
+
var Result2 = (0, import_variant46.variant)(
|
|
93146
|
+
(0, import_variant46.onTerms)(({ T }) => ({
|
|
93147
|
+
Error: (0, import_variant46.payload)(T),
|
|
93148
|
+
Ok: import_variant46.nil
|
|
93136
93149
|
}))
|
|
93137
93150
|
);
|
|
93138
93151
|
async function validatePackageName2(name) {
|
|
@@ -93202,10 +93215,10 @@ var headlessTemplates = [
|
|
|
93202
93215
|
...vibeCompatibleTemplates,
|
|
93203
93216
|
...pureHeadlessTemplates
|
|
93204
93217
|
];
|
|
93205
|
-
var TemplateSource2 = (0,
|
|
93206
|
-
HeadlessApp: (0,
|
|
93207
|
-
GitRepo: (0,
|
|
93208
|
-
Local: (0,
|
|
93218
|
+
var TemplateSource2 = (0, import_variant47.variant)({
|
|
93219
|
+
HeadlessApp: (0, import_variant47.fields)(),
|
|
93220
|
+
GitRepo: (0, import_variant47.fields)(),
|
|
93221
|
+
Local: (0, import_variant47.fields)()
|
|
93209
93222
|
});
|
|
93210
93223
|
function parseProviderString(cloudProvider) {
|
|
93211
93224
|
switch (cloudProvider.trim().toLowerCase()) {
|
|
@@ -93274,7 +93287,7 @@ async function parseProjectNameOptions(targetParentFolder2, options) {
|
|
|
93274
93287
|
});
|
|
93275
93288
|
}
|
|
93276
93289
|
const npmValidationErrors = await validatePackageName2(projectName);
|
|
93277
|
-
if ((0,
|
|
93290
|
+
if ((0, import_variant47.isType)(npmValidationErrors, "Error")) {
|
|
93278
93291
|
throw new CliError({
|
|
93279
93292
|
code: CliErrorCode.ProjectNameArgumentIsInvalid({
|
|
93280
93293
|
errorMessage: `Invalid package name "${projectName}". Please fix the following issues: ${npmValidationErrors.payload.join(", ")}`
|
|
@@ -93330,21 +93343,21 @@ async function parseCommandOptions2(targetParentFolder2, options) {
|
|
|
93330
93343
|
// ../create-new-packages/headless-command/src/components/CreateHeadlessSiteCommand.tsx
|
|
93331
93344
|
init_esm_shims();
|
|
93332
93345
|
var import_react148 = __toESM(require_react(), 1);
|
|
93333
|
-
var
|
|
93346
|
+
var import_variant54 = __toESM(require_lib(), 1);
|
|
93334
93347
|
var import_kebabCase5 = __toESM(require_kebabCase(), 1);
|
|
93335
93348
|
import { join as join19 } from "node:path";
|
|
93336
93349
|
|
|
93337
93350
|
// ../create-new-packages/headless-command/src/components/ChooseFolder.tsx
|
|
93338
93351
|
init_esm_shims();
|
|
93339
93352
|
var import_react139 = __toESM(require_react(), 1);
|
|
93340
|
-
var
|
|
93353
|
+
var import_variant48 = __toESM(require_lib(), 1);
|
|
93341
93354
|
import { join as join15 } from "node:path";
|
|
93342
93355
|
var validateAppDirectory = async (targetParentFolder2, packageName) => {
|
|
93343
93356
|
if (!await validateDirectory2(join15(targetParentFolder2, packageName))) {
|
|
93344
93357
|
return `Provided directory "${packageName}" is not empty`;
|
|
93345
93358
|
}
|
|
93346
93359
|
const npmValidationErrors = await validatePackageName2(packageName);
|
|
93347
|
-
return (0,
|
|
93360
|
+
return (0, import_variant48.match)(npmValidationErrors, {
|
|
93348
93361
|
Ok: () => true,
|
|
93349
93362
|
Error: ({ payload: payload7 }) => `Invalid folder name. Please fix the following issues: ${payload7.join(", ")}`
|
|
93350
93363
|
});
|
|
@@ -93370,7 +93383,7 @@ var ChooseFolder = ({ initialFolderName, targetParentFolder: targetParentFolder2
|
|
|
93370
93383
|
init_esm_shims();
|
|
93371
93384
|
import { mkdir as mkdir2 } from "node:fs/promises";
|
|
93372
93385
|
var import_react140 = __toESM(require_react(), 1);
|
|
93373
|
-
var
|
|
93386
|
+
var import_variant49 = __toESM(require_lib(), 1);
|
|
93374
93387
|
import { join as join17 } from "node:path";
|
|
93375
93388
|
|
|
93376
93389
|
// ../create-new-packages/headless-command/src/services/generator/template-fetcher.ts
|
|
@@ -93417,7 +93430,7 @@ async function resolveTemplateFolder(templatePathOverride, selectedTemplate) {
|
|
|
93417
93430
|
if (templatePathOverride) {
|
|
93418
93431
|
return templatePathOverride;
|
|
93419
93432
|
}
|
|
93420
|
-
return (0,
|
|
93433
|
+
return (0, import_variant49.match)(selectedTemplate, {
|
|
93421
93434
|
HeadlessApp: ({ gitPath }) => fetchTemplate(headlessTemplatesGitUrl, gitPath),
|
|
93422
93435
|
GitRepo: ({ url, path: path4 }) => fetchTemplate(url, path4),
|
|
93423
93436
|
Local: ({ path: path4 }) => path4
|
|
@@ -93569,7 +93582,7 @@ var GenerateProject2 = ({
|
|
|
93569
93582
|
await executeTaskRunner(tasks);
|
|
93570
93583
|
onDone(true);
|
|
93571
93584
|
}, []);
|
|
93572
|
-
return (0,
|
|
93585
|
+
return (0, import_variant49.match)(taskRunnerStatus, {
|
|
93573
93586
|
Idle: () => null,
|
|
93574
93587
|
Running: (status) => /* @__PURE__ */ import_react140.default.createElement(GenerationProgress3, { ...status }),
|
|
93575
93588
|
Done: (status) => /* @__PURE__ */ import_react140.default.createElement(Box_default, { flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ import_react140.default.createElement(GenerationProgress3, { ...status }), /* @__PURE__ */ import_react140.default.createElement(Box_default, { marginLeft: -2, marginTop: 1 }, /* @__PURE__ */ import_react140.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react140.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react140.default.createElement(Text2, null, "Project set up successfully"))))
|
|
@@ -93618,7 +93631,7 @@ var ChooseTemplate2 = ({ onSubmit }) => {
|
|
|
93618
93631
|
// ../create-new-packages/headless-command/src/components/ReleaseProject.tsx
|
|
93619
93632
|
init_esm_shims();
|
|
93620
93633
|
var import_react143 = __toESM(require_react(), 1);
|
|
93621
|
-
var
|
|
93634
|
+
var import_variant51 = __toESM(require_lib(), 1);
|
|
93622
93635
|
|
|
93623
93636
|
// ../create-new-packages/headless-command/src/components/FinishedSuccessfullyMessage.tsx
|
|
93624
93637
|
init_esm_shims();
|
|
@@ -93644,9 +93657,9 @@ var FinishedSuccessfullyMessage3 = ({ packageManager: packageManager2, folderNam
|
|
|
93644
93657
|
|
|
93645
93658
|
// ../create-new-packages/headless-command/src/hooks/release-project.ts
|
|
93646
93659
|
init_esm_shims();
|
|
93647
|
-
var
|
|
93660
|
+
var import_variant50 = __toESM(require_lib(), 1);
|
|
93648
93661
|
import { join as join18 } from "node:path";
|
|
93649
|
-
var ReleaseStateVariant = (0,
|
|
93662
|
+
var ReleaseStateVariant = (0, import_variant50.variant)({
|
|
93650
93663
|
Success: {},
|
|
93651
93664
|
Skipped: {},
|
|
93652
93665
|
Error: {}
|
|
@@ -93718,10 +93731,10 @@ var ReleaseProject = ({
|
|
|
93718
93731
|
});
|
|
93719
93732
|
}
|
|
93720
93733
|
}
|
|
93721
|
-
)), (0,
|
|
93734
|
+
)), (0, import_variant51.match)(status, {
|
|
93722
93735
|
NotRequested: () => null,
|
|
93723
93736
|
Success: ({ result }) => {
|
|
93724
|
-
return /* @__PURE__ */ import_react143.default.createElement(import_react143.default.Fragment, null, (0,
|
|
93737
|
+
return /* @__PURE__ */ import_react143.default.createElement(import_react143.default.Fragment, null, (0, import_variant51.match)(result, {
|
|
93725
93738
|
Success: () => /* @__PURE__ */ import_react143.default.createElement(Box_default, { marginLeft: -2 }, /* @__PURE__ */ import_react143.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react143.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react143.default.createElement(Text2, null, "Site published successfully"))),
|
|
93726
93739
|
Skipped: () => /* @__PURE__ */ import_react143.default.createElement(Text2, null, `No worries, you can publish your site later by running ${packageManager2.getRunCmd()} release`),
|
|
93727
93740
|
Error: () => /* @__PURE__ */ import_react143.default.createElement(Box_default, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ import_react143.default.createElement(Alert, { type: "error" }, "Failed to publish your site"), /* @__PURE__ */ import_react143.default.createElement(Text2, null, `No worries, you can publish your site later by running ${packageManager2.getRunCmd()} release`))
|
|
@@ -93731,7 +93744,7 @@ var ReleaseProject = ({
|
|
|
93731
93744
|
packageManager: packageManager2,
|
|
93732
93745
|
folderName,
|
|
93733
93746
|
projectData,
|
|
93734
|
-
isReleased: (0,
|
|
93747
|
+
isReleased: (0, import_variant51.isType)(result, "Success")
|
|
93735
93748
|
}
|
|
93736
93749
|
));
|
|
93737
93750
|
},
|
|
@@ -93743,8 +93756,8 @@ var ReleaseProject = ({
|
|
|
93743
93756
|
// ../create-new-packages/headless-command/src/components/ChooseVibeSetup.tsx
|
|
93744
93757
|
init_esm_shims();
|
|
93745
93758
|
var import_react144 = __toESM(require_react(), 1);
|
|
93746
|
-
var
|
|
93747
|
-
var VibeSetupChoice = (0,
|
|
93759
|
+
var import_variant52 = __toESM(require_lib(), 1);
|
|
93760
|
+
var VibeSetupChoice = (0, import_variant52.variant)({
|
|
93748
93761
|
SetupVibe: {},
|
|
93749
93762
|
Skip: {}
|
|
93750
93763
|
});
|
|
@@ -93776,7 +93789,7 @@ var ChooseVibeSetup = ({ onSubmit }) => {
|
|
|
93776
93789
|
// ../create-new-packages/headless-command/src/components/VibeRepositorySetupPolling.tsx
|
|
93777
93790
|
init_esm_shims();
|
|
93778
93791
|
var import_react147 = __toESM(require_react(), 1);
|
|
93779
|
-
var
|
|
93792
|
+
var import_variant53 = __toESM(require_lib(), 1);
|
|
93780
93793
|
|
|
93781
93794
|
// ../velo-client/src/index.ts
|
|
93782
93795
|
init_esm_shims();
|
|
@@ -94692,8 +94705,8 @@ function useCodestoreClient() {
|
|
|
94692
94705
|
}
|
|
94693
94706
|
|
|
94694
94707
|
// ../create-new-packages/headless-command/src/components/VibeRepositorySetupPolling.tsx
|
|
94695
|
-
var VibeSetupResult = (0,
|
|
94696
|
-
Success: (0,
|
|
94708
|
+
var VibeSetupResult = (0, import_variant53.variant)({
|
|
94709
|
+
Success: (0, import_variant53.fields)(),
|
|
94697
94710
|
Canceled: {},
|
|
94698
94711
|
Failed: {}
|
|
94699
94712
|
});
|
|
@@ -94755,7 +94768,7 @@ var VibeRepositorySetupPolling = ({
|
|
|
94755
94768
|
[projectFolder, projectId],
|
|
94756
94769
|
{
|
|
94757
94770
|
onSuccess: (result) => {
|
|
94758
|
-
if ((0,
|
|
94771
|
+
if ((0, import_variant53.isType)(result, VibeSetupResult.Success)) {
|
|
94759
94772
|
onSubmit?.();
|
|
94760
94773
|
}
|
|
94761
94774
|
},
|
|
@@ -94766,10 +94779,10 @@ var VibeRepositorySetupPolling = ({
|
|
|
94766
94779
|
}
|
|
94767
94780
|
}
|
|
94768
94781
|
);
|
|
94769
|
-
return (0,
|
|
94782
|
+
return (0, import_variant53.match)(status, {
|
|
94770
94783
|
Error: () => /* @__PURE__ */ import_react147.default.createElement(Box_default, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ import_react147.default.createElement(Text2, { skin: "error" }, "Failed to connect to Wix Vibe")),
|
|
94771
94784
|
Loading: () => /* @__PURE__ */ import_react147.default.createElement(Box_default, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ import_react147.default.createElement(Spinner2, { text: "Opening browser for Wix Vibe setup..." }), /* @__PURE__ */ import_react147.default.createElement(Text2, { skin: "secondary" }, "Complete the setup in your browser. We're waiting for you to finish...")),
|
|
94772
|
-
Success: ({ result }) => (0,
|
|
94785
|
+
Success: ({ result }) => (0, import_variant53.match)(result, {
|
|
94773
94786
|
Success: ({ repoName, htmlUrl }) => /* @__PURE__ */ import_react147.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react147.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react147.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react147.default.createElement(Text2, null, "GitHub repository '", repoName, "' created and Synced.", " ", /* @__PURE__ */ import_react147.default.createElement(Link, { url: htmlUrl }, "View Repository.")))),
|
|
94774
94787
|
Canceled: () => null
|
|
94775
94788
|
})
|
|
@@ -94808,10 +94821,10 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94808
94821
|
return { packageManager: packageManager2 };
|
|
94809
94822
|
}, []);
|
|
94810
94823
|
const isVibeCompatible = (0, import_react148.useMemo)(
|
|
94811
|
-
() => (0,
|
|
94824
|
+
() => (0, import_variant54.isType)(selectedTemplate, "HeadlessApp") && selectedTemplate.vibeCompatible,
|
|
94812
94825
|
[selectedTemplate]
|
|
94813
94826
|
);
|
|
94814
|
-
return (0,
|
|
94827
|
+
return (0, import_variant54.match)(status, {
|
|
94815
94828
|
Error: () => null,
|
|
94816
94829
|
Loading: () => /* @__PURE__ */ import_react148.default.createElement(Spinner2, { text: "Loading..." }),
|
|
94817
94830
|
Success: ({ result: { packageManager: packageManager2 } }) => {
|
|
@@ -94885,7 +94898,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94885
94898
|
onSubmit: (choice) => setVibeSetupChoice(choice)
|
|
94886
94899
|
}
|
|
94887
94900
|
),
|
|
94888
|
-
businessName && selectedTemplate && businessId && projectData && projectFolder && generationDone && isVibeCompatible && (0,
|
|
94901
|
+
businessName && selectedTemplate && businessId && projectData && projectFolder && generationDone && isVibeCompatible && (0, import_variant54.isType)(vibeSetupChoice, "SetupVibe") && /* @__PURE__ */ import_react148.default.createElement(AuthProvider, null, /* @__PURE__ */ import_react148.default.createElement(
|
|
94889
94902
|
VibeRepositorySetupPolling,
|
|
94890
94903
|
{
|
|
94891
94904
|
projectId: projectData.projectId,
|
|
@@ -94893,7 +94906,7 @@ var CreateHeadlessSiteCommand = ({
|
|
|
94893
94906
|
onSubmit: () => setVibeSetupDone(true)
|
|
94894
94907
|
}
|
|
94895
94908
|
)),
|
|
94896
|
-
businessName && selectedTemplate && businessId && projectData && folderName && generationDone && (vibeSetupDone || (0,
|
|
94909
|
+
businessName && selectedTemplate && businessId && projectData && folderName && generationDone && (vibeSetupDone || (0, import_variant54.isType)(vibeSetupChoice, "Skip") || !isVibeCompatible) && /* @__PURE__ */ import_react148.default.createElement(
|
|
94897
94910
|
ReleaseProject,
|
|
94898
94911
|
{
|
|
94899
94912
|
folderName,
|
|
@@ -94931,7 +94944,7 @@ var ProcessCommand = ({ targetParentFolder: targetParentFolder2, commandOptions
|
|
|
94931
94944
|
}
|
|
94932
94945
|
return result;
|
|
94933
94946
|
}, []);
|
|
94934
|
-
return (0,
|
|
94947
|
+
return (0, import_variant55.match)(status, {
|
|
94935
94948
|
Error: () => null,
|
|
94936
94949
|
Loading: () => /* @__PURE__ */ import_react149.default.createElement(Spinner2, { text: "Loading..." }),
|
|
94937
94950
|
Success: ({
|
|
@@ -95157,7 +95170,7 @@ import { randomUUID as randomUUID2 } from "node:crypto";
|
|
|
95157
95170
|
var package_default = {
|
|
95158
95171
|
name: "@wix/create-new",
|
|
95159
95172
|
description: "General entry point for creating Wix projects",
|
|
95160
|
-
version: "0.0.
|
|
95173
|
+
version: "0.0.39",
|
|
95161
95174
|
bin: "bin/index.cjs",
|
|
95162
95175
|
devDependencies: {
|
|
95163
95176
|
"@commander-js/extra-typings": "^13.0.0",
|