@wix/create-headless-site 0.0.42 → 0.0.44

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 CHANGED
@@ -74455,6 +74455,7 @@ var testOverridesSchema = zod_default.object({
74455
74455
  biLoggerBaseUrl: zod_default.string().url().optional(),
74456
74456
  devEditorBaseUrl: zod_default.string().url().optional(),
74457
74457
  inkDebug: zod_default.boolean().optional(),
74458
+ retries: zod_default.number().optional(),
74458
74459
  minRetryTimeout: zod_default.number().optional(),
74459
74460
  pollInterval: zod_default.number().optional(),
74460
74461
  pollTimeout: zod_default.number().optional(),
@@ -74668,6 +74669,7 @@ var CliUserErrorCode = (0, import_variant11.variant)({
74668
74669
  FailedToWriteJson: (0, import_variant11.fields)(),
74669
74670
  FailedToWriteFile: (0, import_variant11.fields)(),
74670
74671
  FailedToCreateDir: (0, import_variant11.fields)(),
74672
+ FailedToRemoveDir: (0, import_variant11.fields)(),
74671
74673
  InvalidJsonFile: (0, import_variant11.fields)(),
74672
74674
  FailedToWriteWixLock: {},
74673
74675
  InvalidVeloConfigJson: (0, import_variant11.fields)(),
@@ -74718,6 +74720,11 @@ var CliUserErrorCode = (0, import_variant11.variant)({
74718
74720
  AccountWasDeleted: {},
74719
74721
  CliAppVersionMismatch: (0, import_variant11.fields)(),
74720
74722
  NetworkError: {},
74723
+ FailedToQueryLocales: {},
74724
+ FailedToQueryPublishedContents: {},
74725
+ NoTranslationPublishedContents: {},
74726
+ TranslationUnsupportedForProjectType: {},
74727
+ MultilingualAppNotInstalled: {},
74721
74728
  AppForVersionNotFound: (0, import_variant11.fields)(),
74722
74729
  UnknownServicePlugin: (0, import_variant11.fields)(),
74723
74730
  InvalidServicePluginFolder: (0, import_variant11.fields)(),
@@ -75802,7 +75809,12 @@ var validationErrorSchema = external_exports.object({
75802
75809
  var applicationErrorSchema = external_exports.object({
75803
75810
  details: external_exports.object({
75804
75811
  applicationError: external_exports.object({
75805
- code: external_exports.string()
75812
+ code: external_exports.string(),
75813
+ data: external_exports.object({
75814
+ appNotInstalled: external_exports.object({
75815
+ appId: external_exports.string()
75816
+ }).optional()
75817
+ }).optional()
75806
75818
  })
75807
75819
  })
75808
75820
  });
@@ -76163,7 +76175,7 @@ var client = new AuthClient(createHttpClient({ type: "backoffice" }));
76163
76175
 
76164
76176
  // ../cli-auth/src/auth-data.ts
76165
76177
  init_esm_shims();
76166
- import { unlink, rm } from "node:fs/promises";
76178
+ import { unlink, rm as rm2 } from "node:fs/promises";
76167
76179
  import { resolve as resolve2 } from "node:path";
76168
76180
 
76169
76181
  // ../cli-data-dir/src/index.ts
@@ -76183,7 +76195,8 @@ import {
76183
76195
  access,
76184
76196
  readFile as fsReadFile,
76185
76197
  writeFile,
76186
- mkdir
76198
+ mkdir,
76199
+ rm
76187
76200
  } from "node:fs/promises";
76188
76201
  import { dirname as dirname2, join, relative } from "node:path";
76189
76202
  import { EOL } from "node:os";
@@ -76393,7 +76406,7 @@ async function saveAuthData(authData, siteId) {
76393
76406
  }
76394
76407
  async function deleteAuthData() {
76395
76408
  try {
76396
- await rm(getAuthDataFolder(), { recursive: true, force: true });
76409
+ await rm2(getAuthDataFolder(), { recursive: true, force: true });
76397
76410
  } catch (error) {
76398
76411
  throw new CliError({
76399
76412
  code: CliErrorCode.FailedToDeleteAuthData(),
@@ -84371,6 +84384,33 @@ function getErrorComponent(code, cause) {
84371
84384
  FailedToRefreshTokenForSite: () => {
84372
84385
  return () => /* @__PURE__ */ import_react78.default.createElement(SystemErrorMessage, { message: "An error occurred while logging in: Failed to issue refresh token for site" });
84373
84386
  },
84387
+ FailedToRemoveDir: ({ dirPath }) => {
84388
+ return () => /* @__PURE__ */ import_react78.default.createElement(
84389
+ ErrorMessage,
84390
+ {
84391
+ message: `We failed to delete the directory ${dirPath}.`,
84392
+ hint: `Try to delete this directory manually.`
84393
+ }
84394
+ );
84395
+ },
84396
+ FailedToQueryLocales: () => {
84397
+ return () => /* @__PURE__ */ import_react78.default.createElement(SystemErrorMessage, { message: "Failed to pull multilingual data." });
84398
+ },
84399
+ FailedToQueryPublishedContents: () => {
84400
+ return () => /* @__PURE__ */ import_react78.default.createElement(SystemErrorMessage, { message: "Failed to query published contents." });
84401
+ },
84402
+ NoTranslationPublishedContents: () => {
84403
+ return () => /* @__PURE__ */ import_react78.default.createElement(
84404
+ ErrorMessage,
84405
+ {
84406
+ message: "No translation published contents found.",
84407
+ hint: `Please make sure the "Wix Multilingual" app has published content.`
84408
+ }
84409
+ );
84410
+ },
84411
+ TranslationUnsupportedForProjectType: () => {
84412
+ return () => /* @__PURE__ */ import_react78.default.createElement(ErrorMessage, { message: "Translation pull command only applicable for headless sites." });
84413
+ },
84374
84414
  FailedToRenewAuthToken: () => {
84375
84415
  return () => /* @__PURE__ */ import_react78.default.createElement(SystemErrorMessage, { message: "Failed to renew access token." });
84376
84416
  },
@@ -85245,6 +85285,15 @@ function getErrorComponent(code, cause) {
85245
85285
  }
85246
85286
  );
85247
85287
  },
85288
+ MultilingualAppNotInstalled: () => {
85289
+ return () => /* @__PURE__ */ import_react78.default.createElement(
85290
+ ErrorMessage,
85291
+ {
85292
+ message: `Multilingual app is not installed.`,
85293
+ hint: `Please install the "Wix Multilingual" app in your site dashboard to use this command.`
85294
+ }
85295
+ );
85296
+ },
85248
85297
  InvalidServicePluginFolder: ({ relativePath }) => {
85249
85298
  return () => /* @__PURE__ */ import_react78.default.createElement(
85250
85299
  ErrorMessage,
@@ -90389,7 +90438,7 @@ function wixCliCliError(params) {
90389
90438
  var package_default = {
90390
90439
  name: "@wix/create-headless-site",
90391
90440
  description: "Headless site creation wizard",
90392
- version: "0.0.42",
90441
+ version: "0.0.44",
90393
90442
  bin: "bin/index.cjs",
90394
90443
  devDependencies: {
90395
90444
  "@commander-js/extra-typings": "^13.0.0",
@@ -111740,7 +111789,7 @@ var import_variant33 = __toESM(require_lib(), 1);
111740
111789
  // ../cli-project-extender/src/clone-templates-repo.ts
111741
111790
  init_esm_shims();
111742
111791
  import { join as join15 } from "node:path";
111743
- import { rm as rm2 } from "node:fs/promises";
111792
+ import { rm as rm3 } from "node:fs/promises";
111744
111793
 
111745
111794
  // ../../node_modules/tempy/index.js
111746
111795
  init_esm_shims();
@@ -111894,7 +111943,7 @@ async function cloneTemplatesRepo(url2) {
111894
111943
  const repoDir = temporaryDirectory2({ prefix: "wix-cli-project-extender" });
111895
111944
  try {
111896
111945
  await gitClone(url2, repoDir);
111897
- await rm2(join15(repoDir, ".git"), { recursive: true, force: true });
111946
+ await rm3(join15(repoDir, ".git"), { recursive: true, force: true });
111898
111947
  } catch (e2) {
111899
111948
  throw new CliError({
111900
111949
  code: CliErrorCode.FailedToCloneRepo(),
@@ -113110,13 +113159,13 @@ import { join as join20 } from "node:path";
113110
113159
  // src/services/generator/template-fetcher.ts
113111
113160
  init_esm_shims();
113112
113161
  import { join as join19 } from "node:path";
113113
- import { rm as rm3 } from "node:fs/promises";
113162
+ import { rm as rm4 } from "node:fs/promises";
113114
113163
  var import_is_git_url2 = __toESM(require_is_git_url(), 1);
113115
113164
  async function downloadAndExtractRepo(url2) {
113116
113165
  const repoDir = temporaryDirectory2({ prefix: "wix-create-headless-site" });
113117
113166
  try {
113118
113167
  await gitClone(url2, repoDir);
113119
- await rm3(join19(repoDir, ".git"), { recursive: true, force: true });
113168
+ await rm4(join19(repoDir, ".git"), { recursive: true, force: true });
113120
113169
  return repoDir;
113121
113170
  } catch (e2) {
113122
113171
  throw new CliError({