@wix/create-new 0.0.20 → 0.0.22
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 +61 -12
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -62397,6 +62397,7 @@ var CliUserErrorCode = (0, import_variant.variant)({
|
|
|
62397
62397
|
FailedToWriteJson: (0, import_variant.fields)(),
|
|
62398
62398
|
FailedToWriteFile: (0, import_variant.fields)(),
|
|
62399
62399
|
FailedToCreateDir: (0, import_variant.fields)(),
|
|
62400
|
+
FailedToRemoveDir: (0, import_variant.fields)(),
|
|
62400
62401
|
InvalidJsonFile: (0, import_variant.fields)(),
|
|
62401
62402
|
FailedToWriteWixLock: {},
|
|
62402
62403
|
InvalidVeloConfigJson: (0, import_variant.fields)(),
|
|
@@ -62447,6 +62448,11 @@ var CliUserErrorCode = (0, import_variant.variant)({
|
|
|
62447
62448
|
AccountWasDeleted: {},
|
|
62448
62449
|
CliAppVersionMismatch: (0, import_variant.fields)(),
|
|
62449
62450
|
NetworkError: {},
|
|
62451
|
+
FailedToQueryLocales: {},
|
|
62452
|
+
FailedToQueryPublishedContents: {},
|
|
62453
|
+
NoTranslationPublishedContents: {},
|
|
62454
|
+
TranslationUnsupportedForProjectType: {},
|
|
62455
|
+
MultilingualAppNotInstalled: {},
|
|
62450
62456
|
AppForVersionNotFound: (0, import_variant.fields)(),
|
|
62451
62457
|
UnknownServicePlugin: (0, import_variant.fields)(),
|
|
62452
62458
|
InvalidServicePluginFolder: (0, import_variant.fields)(),
|
|
@@ -66627,7 +66633,12 @@ var validationErrorSchema = external_exports.object({
|
|
|
66627
66633
|
var applicationErrorSchema = external_exports.object({
|
|
66628
66634
|
details: external_exports.object({
|
|
66629
66635
|
applicationError: external_exports.object({
|
|
66630
|
-
code: external_exports.string()
|
|
66636
|
+
code: external_exports.string(),
|
|
66637
|
+
data: external_exports.object({
|
|
66638
|
+
appNotInstalled: external_exports.object({
|
|
66639
|
+
appId: external_exports.string()
|
|
66640
|
+
}).optional()
|
|
66641
|
+
}).optional()
|
|
66631
66642
|
})
|
|
66632
66643
|
})
|
|
66633
66644
|
});
|
|
@@ -66765,6 +66776,7 @@ var testOverridesSchema = zod_default.object({
|
|
|
66765
66776
|
biLoggerBaseUrl: zod_default.string().url().optional(),
|
|
66766
66777
|
devEditorBaseUrl: zod_default.string().url().optional(),
|
|
66767
66778
|
inkDebug: zod_default.boolean().optional(),
|
|
66779
|
+
retries: zod_default.number().optional(),
|
|
66768
66780
|
minRetryTimeout: zod_default.number().optional(),
|
|
66769
66781
|
pollInterval: zod_default.number().optional(),
|
|
66770
66782
|
pollTimeout: zod_default.number().optional(),
|
|
@@ -67037,7 +67049,7 @@ var client = new AuthClient(createHttpClient({ type: "backoffice" }));
|
|
|
67037
67049
|
|
|
67038
67050
|
// ../cli-auth/src/auth-data.ts
|
|
67039
67051
|
init_esm_shims();
|
|
67040
|
-
import { unlink, rm } from "node:fs/promises";
|
|
67052
|
+
import { unlink, rm as rm2 } from "node:fs/promises";
|
|
67041
67053
|
import { resolve as resolve2 } from "node:path";
|
|
67042
67054
|
|
|
67043
67055
|
// ../cli-data-dir/src/index.ts
|
|
@@ -67057,7 +67069,8 @@ import {
|
|
|
67057
67069
|
access,
|
|
67058
67070
|
readFile as fsReadFile,
|
|
67059
67071
|
writeFile,
|
|
67060
|
-
mkdir
|
|
67072
|
+
mkdir,
|
|
67073
|
+
rm
|
|
67061
67074
|
} from "node:fs/promises";
|
|
67062
67075
|
import { dirname as dirname2, join, relative } from "node:path";
|
|
67063
67076
|
import { EOL } from "node:os";
|
|
@@ -67267,7 +67280,7 @@ async function saveAuthData(authData, siteId) {
|
|
|
67267
67280
|
}
|
|
67268
67281
|
async function deleteAuthData() {
|
|
67269
67282
|
try {
|
|
67270
|
-
await
|
|
67283
|
+
await rm2(getAuthDataFolder(), { recursive: true, force: true });
|
|
67271
67284
|
} catch (error) {
|
|
67272
67285
|
throw new CliError({
|
|
67273
67286
|
code: CliErrorCode.FailedToDeleteAuthData(),
|
|
@@ -81719,6 +81732,33 @@ function getErrorComponent(code, cause) {
|
|
|
81719
81732
|
FailedToRefreshTokenForSite: () => {
|
|
81720
81733
|
return () => /* @__PURE__ */ import_react78.default.createElement(SystemErrorMessage, { message: "An error occurred while logging in: Failed to issue refresh token for site" });
|
|
81721
81734
|
},
|
|
81735
|
+
FailedToRemoveDir: ({ dirPath }) => {
|
|
81736
|
+
return () => /* @__PURE__ */ import_react78.default.createElement(
|
|
81737
|
+
ErrorMessage,
|
|
81738
|
+
{
|
|
81739
|
+
message: `We failed to delete the directory ${dirPath}.`,
|
|
81740
|
+
hint: `Try to delete this directory manually.`
|
|
81741
|
+
}
|
|
81742
|
+
);
|
|
81743
|
+
},
|
|
81744
|
+
FailedToQueryLocales: () => {
|
|
81745
|
+
return () => /* @__PURE__ */ import_react78.default.createElement(SystemErrorMessage, { message: "Failed to pull multilingual data." });
|
|
81746
|
+
},
|
|
81747
|
+
FailedToQueryPublishedContents: () => {
|
|
81748
|
+
return () => /* @__PURE__ */ import_react78.default.createElement(SystemErrorMessage, { message: "Failed to query published contents." });
|
|
81749
|
+
},
|
|
81750
|
+
NoTranslationPublishedContents: () => {
|
|
81751
|
+
return () => /* @__PURE__ */ import_react78.default.createElement(
|
|
81752
|
+
ErrorMessage,
|
|
81753
|
+
{
|
|
81754
|
+
message: "No translation published contents found.",
|
|
81755
|
+
hint: `Please make sure the "Wix Multilingual" app has published content.`
|
|
81756
|
+
}
|
|
81757
|
+
);
|
|
81758
|
+
},
|
|
81759
|
+
TranslationUnsupportedForProjectType: () => {
|
|
81760
|
+
return () => /* @__PURE__ */ import_react78.default.createElement(ErrorMessage, { message: "Translation pull command only applicable for headless sites." });
|
|
81761
|
+
},
|
|
81722
81762
|
FailedToRenewAuthToken: () => {
|
|
81723
81763
|
return () => /* @__PURE__ */ import_react78.default.createElement(SystemErrorMessage, { message: "Failed to renew access token." });
|
|
81724
81764
|
},
|
|
@@ -82593,6 +82633,15 @@ function getErrorComponent(code, cause) {
|
|
|
82593
82633
|
}
|
|
82594
82634
|
);
|
|
82595
82635
|
},
|
|
82636
|
+
MultilingualAppNotInstalled: () => {
|
|
82637
|
+
return () => /* @__PURE__ */ import_react78.default.createElement(
|
|
82638
|
+
ErrorMessage,
|
|
82639
|
+
{
|
|
82640
|
+
message: `Multilingual app is not installed.`,
|
|
82641
|
+
hint: `Please install the "Wix Multilingual" app in your site dashboard to use this command.`
|
|
82642
|
+
}
|
|
82643
|
+
);
|
|
82644
|
+
},
|
|
82596
82645
|
InvalidServicePluginFolder: ({ relativePath }) => {
|
|
82597
82646
|
return () => /* @__PURE__ */ import_react78.default.createElement(
|
|
82598
82647
|
ErrorMessage,
|
|
@@ -87860,7 +87909,7 @@ var createBiLogger2 = async (errorReporter2, cliVersion, userId) => {
|
|
|
87860
87909
|
biLogger,
|
|
87861
87910
|
command: commandFields,
|
|
87862
87911
|
cliVersion,
|
|
87863
|
-
flow: "
|
|
87912
|
+
flow: "Astro_App"
|
|
87864
87913
|
});
|
|
87865
87914
|
}
|
|
87866
87915
|
return {
|
|
@@ -100619,7 +100668,7 @@ var PlatformType = (0, import_variant42.variant)({
|
|
|
100619
100668
|
// ../create-new-packages/app-command/src/services/generator/template-fetcher.ts
|
|
100620
100669
|
init_esm_shims();
|
|
100621
100670
|
import { join as join18 } from "node:path";
|
|
100622
|
-
import { rm as
|
|
100671
|
+
import { rm as rm3 } from "node:fs/promises";
|
|
100623
100672
|
|
|
100624
100673
|
// ../../node_modules/tempy/index.js
|
|
100625
100674
|
init_esm_shims();
|
|
@@ -100774,7 +100823,7 @@ async function downloadAndExtractRepo(url2, branch) {
|
|
|
100774
100823
|
const repoDir = temporaryDirectory2({ prefix: "wix-create-app" });
|
|
100775
100824
|
try {
|
|
100776
100825
|
await gitClone(url2, repoDir, branch);
|
|
100777
|
-
await
|
|
100826
|
+
await rm3(join18(repoDir, ".git"), { recursive: true, force: true });
|
|
100778
100827
|
return repoDir;
|
|
100779
100828
|
} catch (e2) {
|
|
100780
100829
|
throw new CliError({
|
|
@@ -110926,12 +110975,12 @@ var import_variant49 = __toESM(require_lib(), 1);
|
|
|
110926
110975
|
// ../cli-project-extender/src/clone-templates-repo.ts
|
|
110927
110976
|
init_esm_shims();
|
|
110928
110977
|
import { join as join21 } from "node:path";
|
|
110929
|
-
import { rm as
|
|
110978
|
+
import { rm as rm4 } from "node:fs/promises";
|
|
110930
110979
|
async function cloneTemplatesRepo(url2) {
|
|
110931
110980
|
const repoDir = temporaryDirectory2({ prefix: "wix-cli-project-extender" });
|
|
110932
110981
|
try {
|
|
110933
110982
|
await gitClone(url2, repoDir);
|
|
110934
|
-
await
|
|
110983
|
+
await rm4(join21(repoDir, ".git"), { recursive: true, force: true });
|
|
110935
110984
|
} catch (e2) {
|
|
110936
110985
|
throw new CliError({
|
|
110937
110986
|
code: CliErrorCode.FailedToCloneRepo(),
|
|
@@ -111512,13 +111561,13 @@ import { join as join26 } from "node:path";
|
|
|
111512
111561
|
// ../create-new-packages/headless-command/src/services/generator/template-fetcher.ts
|
|
111513
111562
|
init_esm_shims();
|
|
111514
111563
|
import { join as join25 } from "node:path";
|
|
111515
|
-
import { rm as
|
|
111564
|
+
import { rm as rm5 } from "node:fs/promises";
|
|
111516
111565
|
var import_is_git_url4 = __toESM(require_is_git_url(), 1);
|
|
111517
111566
|
async function downloadAndExtractRepo2(url2) {
|
|
111518
111567
|
const repoDir = temporaryDirectory2({ prefix: "wix-create-headless-site" });
|
|
111519
111568
|
try {
|
|
111520
111569
|
await gitClone(url2, repoDir);
|
|
111521
|
-
await
|
|
111570
|
+
await rm5(join25(repoDir, ".git"), { recursive: true, force: true });
|
|
111522
111571
|
return repoDir;
|
|
111523
111572
|
} catch (e2) {
|
|
111524
111573
|
throw new CliError({
|
|
@@ -112197,7 +112246,7 @@ var getHeadlessCommand = ({
|
|
|
112197
112246
|
var package_default = {
|
|
112198
112247
|
name: "@wix/create-new",
|
|
112199
112248
|
description: "General entry point for creating Wix projects",
|
|
112200
|
-
version: "0.0.
|
|
112249
|
+
version: "0.0.22",
|
|
112201
112250
|
bin: "bin/index.cjs",
|
|
112202
112251
|
devDependencies: {
|
|
112203
112252
|
"@commander-js/extra-typings": "^13.0.0",
|