@wix/create-app 0.0.200 → 0.0.202

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.
@@ -13,7 +13,7 @@ import {
13
13
  pathExists,
14
14
  require_is_git_url,
15
15
  require_lib
16
- } from "./chunk-IWAYBIJ2.js";
16
+ } from "./chunk-N6DNKZUF.js";
17
17
  import {
18
18
  __commonJS,
19
19
  __require,
@@ -3984,4 +3984,4 @@ ejs/lib/ejs.js:
3984
3984
  * @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0}
3985
3985
  *)
3986
3986
  */
3987
- //# sourceMappingURL=generator-XLHVMQCA.js.map
3987
+ //# sourceMappingURL=generator-DP6EOIQM.js.map
package/build/index.js CHANGED
@@ -99,7 +99,7 @@ import {
99
99
  setupTestEnv,
100
100
  writeJson,
101
101
  zod_default
102
- } from "./chunk-IWAYBIJ2.js";
102
+ } from "./chunk-N6DNKZUF.js";
103
103
  import {
104
104
  __commonJS,
105
105
  __dirname,
@@ -52423,6 +52423,9 @@ function getErrorComponent(code, cause) {
52423
52423
  }
52424
52424
  );
52425
52425
  },
52426
+ FailedToGetApp: () => {
52427
+ return () => /* @__PURE__ */ import_react77.default.createElement(SystemErrorMessage, { message: `Failed to fetch app configuration` });
52428
+ },
52426
52429
  FailedToConnectToLogsService: () => {
52427
52430
  return () => /* @__PURE__ */ import_react77.default.createElement(ErrorMessage, { message: `Failed to connect to logs service.` });
52428
52431
  },
@@ -56222,17 +56225,25 @@ var useErrorReporter = () => {
56222
56225
  // ../cli-auth/src/useColoredVerificationUri.ts
56223
56226
  init_esm_shims();
56224
56227
  var import_react87 = __toESM(require_react(), 1);
56228
+
56229
+ // ../cli-auth/src/verfication-uri.ts
56230
+ init_esm_shims();
56231
+ function buildVerificationUris(verificationUri) {
56232
+ const coloredUri = new URL(verificationUri);
56233
+ coloredUri.searchParams.set("color", "developer");
56234
+ coloredUri.searchParams.set("studio", "true");
56235
+ const signupUri = new URL("https://users.wix.com/login/signup/password");
56236
+ signupUri.searchParams.set("redirectTo", coloredUri.href);
56237
+ return {
56238
+ coloredVerificationUri: coloredUri.toString(),
56239
+ signupUri: signupUri.toString()
56240
+ };
56241
+ }
56242
+
56243
+ // ../cli-auth/src/useColoredVerificationUri.ts
56225
56244
  function useColoredVerificationUri(verificationUri) {
56226
56245
  return (0, import_react87.useMemo)(() => {
56227
- const coloredUri = new URL(verificationUri);
56228
- coloredUri.searchParams.set("color", "developer");
56229
- coloredUri.searchParams.set("studio", "true");
56230
- const signupUri = new URL("https://users.wix.com/login/signup/password");
56231
- signupUri.searchParams.set("redirectTo", coloredUri.href);
56232
- return {
56233
- coloredVerificationUri: coloredUri.toString(),
56234
- signupUri: signupUri.toString()
56235
- };
56246
+ return buildVerificationUris(verificationUri);
56236
56247
  }, [verificationUri]);
56237
56248
  }
56238
56249
 
@@ -57950,7 +57961,7 @@ function reportCommandStartEvent({
57950
57961
  var package_default = {
57951
57962
  name: "@wix/create-app",
57952
57963
  description: "Create Wix apps",
57953
- version: "0.0.200",
57964
+ version: "0.0.202",
57954
57965
  author: "Ihor Machuzhak",
57955
57966
  bin: "bin/index.cjs",
57956
57967
  devDependencies: {
@@ -67162,7 +67173,16 @@ var appSecretsSchema = external_exports.object({
67162
67173
  webhookPublicKey: external_exports.string()
67163
67174
  });
67164
67175
  var appSchema = external_exports.object({
67165
- app: external_exports.object({
67176
+ id: external_exports.string(),
67177
+ name: external_exports.string(),
67178
+ namespace: external_exports.string().optional(),
67179
+ codeIdentifier: external_exports.string().optional()
67180
+ });
67181
+ var getAppSchema = external_exports.object({
67182
+ app: appSchema
67183
+ });
67184
+ var getAppWithSecretsSchema = external_exports.object({
67185
+ app: appSchema.extend({
67166
67186
  appSecrets: appSecretsSchema
67167
67187
  })
67168
67188
  });
@@ -67413,18 +67433,13 @@ var DevCenterClient = class {
67413
67433
  });
67414
67434
  }
67415
67435
  };
67416
- getAppSecret = async (req) => {
67436
+ getAppSecret = async ({ appId }) => {
67417
67437
  try {
67418
67438
  const { data } = await pRetry(
67419
- () => this.httpClient.request(
67420
- getApp({
67421
- withSecrets: true,
67422
- ...req
67423
- })
67424
- ),
67439
+ () => this.httpClient.request(getApp({ appId, withSecrets: true })),
67425
67440
  this.retryOptions
67426
67441
  );
67427
- return appSchema.parse(data).app.appSecrets;
67442
+ return getAppWithSecretsSchema.parse(data).app.appSecrets;
67428
67443
  } catch (e2) {
67429
67444
  if (isHttpError(e2) && e2.response?.status === 403 && isHttpApplicationError(e2) && e2.response.data.details.applicationError.code === "PERMISSION_DENIED") {
67430
67445
  throw new CliError({
@@ -67438,6 +67453,20 @@ var DevCenterClient = class {
67438
67453
  });
67439
67454
  }
67440
67455
  };
67456
+ getApp = async ({ appId }) => {
67457
+ try {
67458
+ const { data } = await pRetry(
67459
+ () => this.httpClient.request(getApp({ appId })),
67460
+ this.retryOptions
67461
+ );
67462
+ return getAppSchema.parse(data).app;
67463
+ } catch (e2) {
67464
+ throw new CliError({
67465
+ code: CliErrorCode.FailedToGetApp(),
67466
+ cause: e2
67467
+ });
67468
+ }
67469
+ };
67441
67470
  /**
67442
67471
  * This method is deprecated.
67443
67472
  */
@@ -67719,7 +67748,8 @@ var DevCenterClient = class {
67719
67748
  tenantType: V1TenantType.SITE
67720
67749
  },
67721
67750
  appInstance: {
67722
- appDefId: appId
67751
+ appDefId: appId,
67752
+ version: "latest"
67723
67753
  }
67724
67754
  })
67725
67755
  ),
@@ -68667,7 +68697,7 @@ function getTasks({
68667
68697
  cause: e2
68668
68698
  });
68669
68699
  }
68670
- const { generateApp } = await import("./generator-XLHVMQCA.js");
68700
+ const { generateApp } = await import("./generator-DP6EOIQM.js");
68671
68701
  await generateApp({
68672
68702
  packageName,
68673
68703
  packageFolder,