@wix/create-new 0.0.68 → 0.0.70
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-UYE4R7XA.js → chunk-FFNTR7KK.js} +2 -1
- package/build/{chunk-UYE4R7XA.js.map → chunk-FFNTR7KK.js.map} +1 -1
- package/build/{generator-NFUFXD34.js → generator-VACPB2NL.js} +2 -2
- package/build/index.js +38 -49
- package/build/index.js.map +1 -1
- package/package.json +2 -2
- /package/build/{generator-NFUFXD34.js.map → generator-VACPB2NL.js.map} +0 -0
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
require_lib,
|
|
14
14
|
temporaryDirectory,
|
|
15
15
|
updateEnvFile
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-FFNTR7KK.js";
|
|
17
17
|
import {
|
|
18
18
|
__toESM,
|
|
19
19
|
init_esm_shims
|
|
@@ -115,4 +115,4 @@ async function generateApp({
|
|
|
115
115
|
export {
|
|
116
116
|
generateApp
|
|
117
117
|
};
|
|
118
|
-
//# sourceMappingURL=generator-
|
|
118
|
+
//# sourceMappingURL=generator-VACPB2NL.js.map
|
package/build/index.js
CHANGED
|
@@ -118,7 +118,7 @@ import {
|
|
|
118
118
|
writeJson,
|
|
119
119
|
writePackageJson,
|
|
120
120
|
zod_default
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-FFNTR7KK.js";
|
|
122
122
|
import {
|
|
123
123
|
__commonJS,
|
|
124
124
|
__dirname,
|
|
@@ -65064,6 +65064,9 @@ function getErrorComponent(code, cause) {
|
|
|
65064
65064
|
AuthenticationRequired: () => {
|
|
65065
65065
|
return () => /* @__PURE__ */ import_react83.default.createElement(ErrorMessage, { message: "You have to already be logged in to run this command." });
|
|
65066
65066
|
},
|
|
65067
|
+
LoginRequired: () => {
|
|
65068
|
+
return () => /* @__PURE__ */ import_react83.default.createElement(ErrorMessage, { message: "You are not authenticated, log in by running `wix login`." });
|
|
65069
|
+
},
|
|
65067
65070
|
InvalidApiKey: () => {
|
|
65068
65071
|
return () => /* @__PURE__ */ import_react83.default.createElement(ErrorMessage, { message: "You used invalid API key to log in." });
|
|
65069
65072
|
},
|
|
@@ -81795,7 +81798,7 @@ function getTasks({
|
|
|
81795
81798
|
cause: e2
|
|
81796
81799
|
});
|
|
81797
81800
|
}
|
|
81798
|
-
const { generateApp } = await import("./generator-
|
|
81801
|
+
const { generateApp } = await import("./generator-VACPB2NL.js");
|
|
81799
81802
|
await generateApp({
|
|
81800
81803
|
packageName,
|
|
81801
81804
|
packageFolder,
|
|
@@ -81834,23 +81837,17 @@ function getTasks({
|
|
|
81834
81837
|
}
|
|
81835
81838
|
};
|
|
81836
81839
|
const addWixSkills = async () => {
|
|
81837
|
-
const
|
|
81838
|
-
|
|
81839
|
-
"skills",
|
|
81840
|
-
"add",
|
|
81841
|
-
"wix/skills",
|
|
81842
|
-
// The `skills` CLI uses -y/--yes to skip prompts.
|
|
81843
|
-
"-y"
|
|
81844
|
-
];
|
|
81840
|
+
const file = packageManager2.getRunCmd();
|
|
81841
|
+
const args = ["wix", "skills", "add"];
|
|
81845
81842
|
try {
|
|
81846
|
-
await runCommand(
|
|
81843
|
+
await runCommand(`${file} ${args.join(" ")}`, {
|
|
81847
81844
|
cwd: packageFolder
|
|
81848
81845
|
});
|
|
81849
81846
|
} catch (e2) {
|
|
81850
81847
|
throw new CliError({
|
|
81851
81848
|
code: CliErrorCode.FailedToRunExternalCommand({
|
|
81852
|
-
file
|
|
81853
|
-
args
|
|
81849
|
+
file,
|
|
81850
|
+
args
|
|
81854
81851
|
}),
|
|
81855
81852
|
cause: e2
|
|
81856
81853
|
});
|
|
@@ -91995,6 +91992,7 @@ async function validatePackageName2(name) {
|
|
|
91995
91992
|
}
|
|
91996
91993
|
|
|
91997
91994
|
// ../create-new-packages/headless-command/src/parse-command-options.ts
|
|
91995
|
+
var DEFAULT_HEADLESS_TEMPLATE_NAME = "blank";
|
|
91998
91996
|
var pureHeadlessTemplates = [
|
|
91999
91997
|
{
|
|
92000
91998
|
name: "commerce",
|
|
@@ -92062,33 +92060,32 @@ function parseCloudProviders(cloudProvider) {
|
|
|
92062
92060
|
return [parseProviderString(cloudProvider)];
|
|
92063
92061
|
}
|
|
92064
92062
|
async function parseTemplateOptions2(options) {
|
|
92065
|
-
|
|
92066
|
-
|
|
92067
|
-
|
|
92068
|
-
|
|
92069
|
-
|
|
92070
|
-
|
|
92071
|
-
|
|
92072
|
-
|
|
92073
|
-
|
|
92074
|
-
|
|
92075
|
-
|
|
92076
|
-
|
|
92077
|
-
|
|
92078
|
-
|
|
92079
|
-
|
|
92080
|
-
|
|
92081
|
-
|
|
92082
|
-
|
|
92083
|
-
}
|
|
92084
|
-
if (options.templatePath) {
|
|
92085
|
-
return TemplateSource2.Local({
|
|
92086
|
-
siteTemplateId: appTemplate.siteTemplateId,
|
|
92087
|
-
path: options.templatePath
|
|
92088
|
-
});
|
|
92089
|
-
}
|
|
92090
|
-
return TemplateSource2.HeadlessApp(appTemplate);
|
|
92063
|
+
const siteTemplate = options.siteTemplate ?? DEFAULT_HEADLESS_TEMPLATE_NAME;
|
|
92064
|
+
const appTemplate = headlessTemplates.find(
|
|
92065
|
+
(item) => item.name === siteTemplate
|
|
92066
|
+
);
|
|
92067
|
+
if (!appTemplate) {
|
|
92068
|
+
throw new CliError({
|
|
92069
|
+
code: CliErrorCode.CliAppTemplateNotFound({
|
|
92070
|
+
id: siteTemplate
|
|
92071
|
+
}),
|
|
92072
|
+
cause: null
|
|
92073
|
+
});
|
|
92074
|
+
}
|
|
92075
|
+
if (options.templateRepo && options.templateRepoPath) {
|
|
92076
|
+
return TemplateSource2.GitRepo({
|
|
92077
|
+
siteTemplateId: appTemplate.siteTemplateId,
|
|
92078
|
+
url: options.templateRepo,
|
|
92079
|
+
path: options.templateRepoPath
|
|
92080
|
+
});
|
|
92091
92081
|
}
|
|
92082
|
+
if (options.templatePath) {
|
|
92083
|
+
return TemplateSource2.Local({
|
|
92084
|
+
siteTemplateId: appTemplate.siteTemplateId,
|
|
92085
|
+
path: options.templatePath
|
|
92086
|
+
});
|
|
92087
|
+
}
|
|
92088
|
+
return TemplateSource2.HeadlessApp(appTemplate);
|
|
92092
92089
|
}
|
|
92093
92090
|
async function parseProjectNameOptions(targetParentFolder2, options) {
|
|
92094
92091
|
const projectName = options.projectName;
|
|
@@ -92138,14 +92135,6 @@ async function parseCommandOptions2(targetParentFolder2, options) {
|
|
|
92138
92135
|
businessName: options.businessName,
|
|
92139
92136
|
publish: options.publish
|
|
92140
92137
|
});
|
|
92141
|
-
if (projectName && !template) {
|
|
92142
|
-
throw new CliError({
|
|
92143
|
-
code: CliErrorCode.ProjectNameArgumentIsInvalid({
|
|
92144
|
-
errorMessage: "A project name was provided, but no template was specified. Specify a template when defining the project name."
|
|
92145
|
-
}),
|
|
92146
|
-
cause: void 0
|
|
92147
|
-
});
|
|
92148
|
-
}
|
|
92149
92138
|
return {
|
|
92150
92139
|
template,
|
|
92151
92140
|
projectName,
|
|
@@ -94110,7 +94099,7 @@ var getHeadlessCommand = ({
|
|
|
94110
94099
|
new Option(
|
|
94111
94100
|
"--site-template <site-template>",
|
|
94112
94101
|
"Site template to use for the app creation"
|
|
94113
|
-
).choices(pureHeadlessTemplates.map((template) => template.name)).argParser(validateSiteTemplate)
|
|
94102
|
+
).choices(pureHeadlessTemplates.map((template) => template.name)).argParser(validateSiteTemplate).default(DEFAULT_HEADLESS_TEMPLATE_NAME)
|
|
94114
94103
|
).addOption(
|
|
94115
94104
|
new Option(
|
|
94116
94105
|
"--template-repo <template-repo>",
|
|
@@ -94201,7 +94190,7 @@ import { randomUUID as randomUUID3 } from "node:crypto";
|
|
|
94201
94190
|
var package_default = {
|
|
94202
94191
|
name: "@wix/create-new",
|
|
94203
94192
|
description: "General entry point for creating Wix projects",
|
|
94204
|
-
version: "0.0.
|
|
94193
|
+
version: "0.0.70",
|
|
94205
94194
|
bin: "bin/index.cjs",
|
|
94206
94195
|
devDependencies: {
|
|
94207
94196
|
"@commander-js/extra-typings": "^13.0.0",
|