@wix/create-app 0.0.201 → 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
  },
@@ -57958,7 +57961,7 @@ function reportCommandStartEvent({
57958
57961
  var package_default = {
57959
57962
  name: "@wix/create-app",
57960
57963
  description: "Create Wix apps",
57961
- version: "0.0.201",
57964
+ version: "0.0.202",
57962
57965
  author: "Ihor Machuzhak",
57963
57966
  bin: "bin/index.cjs",
57964
57967
  devDependencies: {
@@ -67170,7 +67173,16 @@ var appSecretsSchema = external_exports.object({
67170
67173
  webhookPublicKey: external_exports.string()
67171
67174
  });
67172
67175
  var appSchema = external_exports.object({
67173
- 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({
67174
67186
  appSecrets: appSecretsSchema
67175
67187
  })
67176
67188
  });
@@ -67421,18 +67433,13 @@ var DevCenterClient = class {
67421
67433
  });
67422
67434
  }
67423
67435
  };
67424
- getAppSecret = async (req) => {
67436
+ getAppSecret = async ({ appId }) => {
67425
67437
  try {
67426
67438
  const { data } = await pRetry(
67427
- () => this.httpClient.request(
67428
- getApp({
67429
- withSecrets: true,
67430
- ...req
67431
- })
67432
- ),
67439
+ () => this.httpClient.request(getApp({ appId, withSecrets: true })),
67433
67440
  this.retryOptions
67434
67441
  );
67435
- return appSchema.parse(data).app.appSecrets;
67442
+ return getAppWithSecretsSchema.parse(data).app.appSecrets;
67436
67443
  } catch (e2) {
67437
67444
  if (isHttpError(e2) && e2.response?.status === 403 && isHttpApplicationError(e2) && e2.response.data.details.applicationError.code === "PERMISSION_DENIED") {
67438
67445
  throw new CliError({
@@ -67446,6 +67453,20 @@ var DevCenterClient = class {
67446
67453
  });
67447
67454
  }
67448
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
+ };
67449
67470
  /**
67450
67471
  * This method is deprecated.
67451
67472
  */
@@ -67727,7 +67748,8 @@ var DevCenterClient = class {
67727
67748
  tenantType: V1TenantType.SITE
67728
67749
  },
67729
67750
  appInstance: {
67730
- appDefId: appId
67751
+ appDefId: appId,
67752
+ version: "latest"
67731
67753
  }
67732
67754
  })
67733
67755
  ),
@@ -68675,7 +68697,7 @@ function getTasks({
68675
68697
  cause: e2
68676
68698
  });
68677
68699
  }
68678
- const { generateApp } = await import("./generator-XLHVMQCA.js");
68700
+ const { generateApp } = await import("./generator-DP6EOIQM.js");
68679
68701
  await generateApp({
68680
68702
  packageName,
68681
68703
  packageFolder,