@wix/create-app 0.0.108 → 0.0.109

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/bin/index.cjs CHANGED
@@ -1,8 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /* eslint-disable no-var,node/prefer-global/process */
3
3
 
4
- process.setSourceMapsEnabled(true);
5
-
6
4
  (function minimumNodeVersionCheck() {
7
5
  const RED = '\x1B[0;31m';
8
6
  const GREEN = '\x1B[0;32m';
@@ -32,4 +30,6 @@ process.setSourceMapsEnabled(true);
32
30
  }
33
31
  })();
34
32
 
33
+ process.setSourceMapsEnabled(true);
34
+
35
35
  require('./import.cjs');
package/build/index.js CHANGED
@@ -44854,7 +44854,7 @@ var require_loader = __commonJS({
44854
44854
  simpleEscapeMap[i2] = simpleEscapeSequence(i2);
44855
44855
  }
44856
44856
  var i2;
44857
- function State3(input, options) {
44857
+ function State4(input, options) {
44858
44858
  this.input = input;
44859
44859
  this.filename = options["filename"] || null;
44860
44860
  this.schema = options["schema"] || DEFAULT_FULL_SCHEMA;
@@ -45821,7 +45821,7 @@ var require_loader = __commonJS({
45821
45821
  input = input.slice(1);
45822
45822
  }
45823
45823
  }
45824
- var state = new State3(input, options);
45824
+ var state = new State4(input, options);
45825
45825
  var nullpos = input.indexOf("\0");
45826
45826
  if (nullpos !== -1) {
45827
45827
  state.position = nullpos;
@@ -45981,7 +45981,7 @@ var require_dumper = __commonJS({
45981
45981
  }
45982
45982
  return "\\" + handle + common2.repeat("0", length - string.length) + string;
45983
45983
  }
45984
- function State3(options) {
45984
+ function State4(options) {
45985
45985
  this.schema = options["schema"] || DEFAULT_FULL_SCHEMA;
45986
45986
  this.indent = Math.max(1, options["indent"] || 2);
45987
45987
  this.noArrayIndent = options["noArrayIndent"] || false;
@@ -46412,7 +46412,7 @@ var require_dumper = __commonJS({
46412
46412
  }
46413
46413
  function dump(input, options) {
46414
46414
  options = options || {};
46415
- var state = new State3(options);
46415
+ var state = new State4(options);
46416
46416
  if (!state.noRefs) getDuplicateReferences(input, state);
46417
46417
  if (writeNode(state, 0, input, true, true)) return state.dump + "\n";
46418
46418
  return "";
@@ -51483,8 +51483,7 @@ var skins = {
51483
51483
  question: { color: "blue" },
51484
51484
  info: { color: "blueBright" },
51485
51485
  error: { color: "red" },
51486
- warning: { color: "yellow" },
51487
- code: { color: "yellowBright" }
51486
+ warning: { color: "yellow" }
51488
51487
  };
51489
51488
  var Text2 = ({
51490
51489
  children,
@@ -57274,7 +57273,7 @@ var CliUserErrorCode = (0, import_variant11.variant)({
57274
57273
  CreateVersionDeprecated: (0, import_variant11.fields)(),
57275
57274
  ServeDeprecated: (0, import_variant11.fields)(),
57276
57275
  CannotFindConfigReferencedAsset: (0, import_variant11.fields)(),
57277
- CannotReleaseApplicationInReview: {},
57276
+ CannotReleaseLockedApplication: {},
57278
57277
  FailedToCreateIntellisenseAdapter: {},
57279
57278
  FailedToInitIntellisenseAdapterTypes: {},
57280
57279
  FailedToUpdateIntellisenseAdapterTypes: {},
@@ -57286,7 +57285,8 @@ var CliUserErrorCode = (0, import_variant11.variant)({
57286
57285
  CannotReleaseMinorInNoninteractive: {},
57287
57286
  SiteComponentConfigNotFound: (0, import_variant11.fields)(),
57288
57287
  FailedToImportCliApp: {},
57289
- FailedToCleanDistFolder: {}
57288
+ FailedToCleanDistFolder: {},
57289
+ FailedToIdentifyProgramFlow: (0, import_variant11.fields)()
57290
57290
  });
57291
57291
  var CliErrorCode = (0, import_variant11.variant)({
57292
57292
  ...CliSystemErrorCode,
@@ -67559,7 +67559,7 @@ function getErrorComponent(code, cause) {
67559
67559
  }
67560
67560
  );
67561
67561
  },
67562
- CannotReleaseApplicationInReview: () => {
67562
+ CannotReleaseLockedApplication: () => {
67563
67563
  return () => /* @__PURE__ */ import_react78.default.createElement(
67564
67564
  ErrorMessage,
67565
67565
  {
@@ -67741,6 +67741,16 @@ ${errorMessage2}`
67741
67741
  },
67742
67742
  FailedToImportCliApp: () => {
67743
67743
  return () => /* @__PURE__ */ import_react78.default.createElement(ErrorMessage, { cause, message: "Failed to load `@wix/cli-app`." });
67744
+ },
67745
+ FailedToIdentifyProgramFlow: ({ reason }) => {
67746
+ return () => /* @__PURE__ */ import_react78.default.createElement(
67747
+ ErrorMessage,
67748
+ {
67749
+ cause,
67750
+ message: reason,
67751
+ hint: "Ensure that you are executing the command from inside a project directory."
67752
+ }
67753
+ );
67744
67754
  }
67745
67755
  });
67746
67756
  }
@@ -71234,7 +71244,7 @@ function reportCommandStartEvent({
71234
71244
  var package_default = {
71235
71245
  name: "@wix/create-app",
71236
71246
  description: "Create Wix apps",
71237
- version: "0.0.108",
71247
+ version: "0.0.109",
71238
71248
  author: "Ihor Machuzhak",
71239
71249
  bin: "bin/index.cjs",
71240
71250
  devDependencies: {
@@ -75359,6 +75369,176 @@ function getAppByVersion(payload5) {
75359
75369
  return __getAppByVersion;
75360
75370
  }
75361
75371
 
75372
+ // ../../node_modules/@wix/ambassador-devcenter-apps-v1-app-version/build/es/http.impl.js
75373
+ init_esm_shims();
75374
+ var _appVersion = {
75375
+ createdDate: "google.protobuf.Timestamp",
75376
+ updatedDate: "google.protobuf.Timestamp"
75377
+ };
75378
+ var _queryAppVersionRequest = {};
75379
+ var _queryAppVersionResponse = { appVersions: "_appVersion" };
75380
+ function resolveWixDevcenterAppsVersionsV1AppVersionsServiceUrl(opts) {
75381
+ var domainToMappings = {
75382
+ "bo._base_domain_": [
75383
+ {
75384
+ srcPath: "/app-versions",
75385
+ destPath: ""
75386
+ }
75387
+ ],
75388
+ "wixbo.ai": [
75389
+ {
75390
+ srcPath: "/app-versions",
75391
+ destPath: ""
75392
+ }
75393
+ ],
75394
+ "wix-bo.com": [
75395
+ {
75396
+ srcPath: "/app-versions",
75397
+ destPath: ""
75398
+ }
75399
+ ],
75400
+ "dev._base_domain_": [
75401
+ {
75402
+ srcPath: "/app-versions",
75403
+ destPath: ""
75404
+ }
75405
+ ],
75406
+ "editor._base_domain_": [
75407
+ {
75408
+ srcPath: "/_api/app-versions",
75409
+ destPath: ""
75410
+ }
75411
+ ],
75412
+ "blocks._base_domain_": [
75413
+ {
75414
+ srcPath: "/_api/app-versions",
75415
+ destPath: ""
75416
+ }
75417
+ ],
75418
+ "create.editorx": [
75419
+ {
75420
+ srcPath: "/_api/app-versions",
75421
+ destPath: ""
75422
+ }
75423
+ ],
75424
+ "manage._base_domain_": [
75425
+ {
75426
+ srcPath: "/_api/app-versions",
75427
+ destPath: ""
75428
+ }
75429
+ ]
75430
+ };
75431
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
75432
+ }
75433
+ function queryAppVersion(payload5) {
75434
+ var _a3 = serializer(_queryAppVersionRequest, {}), toReq = _a3.toJSON, fromReq = _a3.fromJSON;
75435
+ var fromRes = serializer(_queryAppVersionResponse, {
75436
+ _appVersion
75437
+ }).fromJSON;
75438
+ function __queryAppVersion(_a4) {
75439
+ var host = _a4.host;
75440
+ var serializedData = toReq(payload5);
75441
+ var metadata = {
75442
+ entityFqdn: "wix.devcenter.apps.v1.app_version",
75443
+ method: "POST",
75444
+ methodFqn: "wix.devcenter.apps.versions.v1.AppVersionsService.QueryAppVersion",
75445
+ url: resolveWixDevcenterAppsVersionsV1AppVersionsServiceUrl({
75446
+ protoPath: "/v1/app-versions/query",
75447
+ data: serializedData,
75448
+ host
75449
+ }),
75450
+ data: serializedData,
75451
+ transformResponse: fromRes
75452
+ };
75453
+ return metadata;
75454
+ }
75455
+ __queryAppVersion.fromReq = fromReq;
75456
+ __queryAppVersion.__isAmbassador = true;
75457
+ return __queryAppVersion;
75458
+ }
75459
+
75460
+ // ../../node_modules/@wix/ambassador-devcenter-apps-v1-app-version/build/es/types.impl.js
75461
+ init_esm_shims();
75462
+ var State;
75463
+ (function(State4) {
75464
+ State4["UNKNOWN_STATE"] = "UNKNOWN_STATE";
75465
+ State4["UNLOCKED_DRAFT"] = "UNLOCKED_DRAFT";
75466
+ State4["LOCKED_DRAFT"] = "LOCKED_DRAFT";
75467
+ State4["PRODUCTION"] = "PRODUCTION";
75468
+ })(State || (State = {}));
75469
+ var Status;
75470
+ (function(Status5) {
75471
+ Status5["UNKNOWN"] = "UNKNOWN";
75472
+ Status5["DEPRECATED"] = "DEPRECATED";
75473
+ Status5["ARCHIVED"] = "ARCHIVED";
75474
+ })(Status || (Status = {}));
75475
+ var CreatedByType;
75476
+ (function(CreatedByType4) {
75477
+ CreatedByType4["UNKNOWN_CREATED_BY"] = "UNKNOWN_CREATED_BY";
75478
+ CreatedByType4["USER"] = "USER";
75479
+ CreatedByType4["SERVICE"] = "SERVICE";
75480
+ CreatedByType4["ACCOUNT"] = "ACCOUNT";
75481
+ })(CreatedByType || (CreatedByType = {}));
75482
+ var PromoteStrategy;
75483
+ (function(PromoteStrategy2) {
75484
+ PromoteStrategy2["UNKNOWN_STRATEGY"] = "UNKNOWN_STRATEGY";
75485
+ PromoteStrategy2["ENTIRE_APP"] = "ENTIRE_APP";
75486
+ })(PromoteStrategy || (PromoteStrategy = {}));
75487
+ var VersionStatus;
75488
+ (function(VersionStatus3) {
75489
+ VersionStatus3["NONE_STATUS"] = "NONE_STATUS";
75490
+ VersionStatus3["DRAFT"] = "DRAFT";
75491
+ VersionStatus3["SUBMITTED"] = "SUBMITTED";
75492
+ VersionStatus3["IN_REVIEW"] = "IN_REVIEW";
75493
+ VersionStatus3["APPROVED"] = "APPROVED";
75494
+ VersionStatus3["PUBLISHED"] = "PUBLISHED";
75495
+ VersionStatus3["DECLINED"] = "DECLINED";
75496
+ VersionStatus3["ARCHIVED"] = "ARCHIVED";
75497
+ VersionStatus3["HIDDEN"] = "HIDDEN";
75498
+ VersionStatus3["RELEASED"] = "RELEASED";
75499
+ })(VersionStatus || (VersionStatus = {}));
75500
+ var SortOrder;
75501
+ (function(SortOrder3) {
75502
+ SortOrder3["ASC"] = "ASC";
75503
+ SortOrder3["DESC"] = "DESC";
75504
+ })(SortOrder || (SortOrder = {}));
75505
+ var PlanStatus;
75506
+ (function(PlanStatus3) {
75507
+ PlanStatus3["UNKNOWN"] = "UNKNOWN";
75508
+ PlanStatus3["VISIBLE"] = "VISIBLE";
75509
+ PlanStatus3["HIDDEN"] = "HIDDEN";
75510
+ })(PlanStatus || (PlanStatus = {}));
75511
+ var PlanDescription;
75512
+ (function(PlanDescription3) {
75513
+ PlanDescription3["UNKNOWN_DESCRIPTION"] = "UNKNOWN_DESCRIPTION";
75514
+ PlanDescription3["BENEFITS"] = "BENEFITS";
75515
+ PlanDescription3["CUSTOM_TEXT"] = "CUSTOM_TEXT";
75516
+ })(PlanDescription || (PlanDescription = {}));
75517
+ var BusinessModel;
75518
+ (function(BusinessModel3) {
75519
+ BusinessModel3["None"] = "None";
75520
+ BusinessModel3["FREEMIUM"] = "FREEMIUM";
75521
+ BusinessModel3["PREMIUM"] = "PREMIUM";
75522
+ BusinessModel3["FREE"] = "FREE";
75523
+ BusinessModel3["WIX_PREMIUM"] = "WIX_PREMIUM";
75524
+ BusinessModel3["DYNAMIC"] = "DYNAMIC";
75525
+ })(BusinessModel || (BusinessModel = {}));
75526
+ var Action;
75527
+ (function(Action2) {
75528
+ Action2["CREATED"] = "CREATED";
75529
+ Action2["UPDATED"] = "UPDATED";
75530
+ Action2["RESTORED"] = "RESTORED";
75531
+ Action2["DELETED"] = "DELETED";
75532
+ })(Action || (Action = {}));
75533
+ var WebhookIdentityType;
75534
+ (function(WebhookIdentityType3) {
75535
+ WebhookIdentityType3["UNKNOWN"] = "UNKNOWN";
75536
+ WebhookIdentityType3["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
75537
+ WebhookIdentityType3["MEMBER"] = "MEMBER";
75538
+ WebhookIdentityType3["WIX_USER"] = "WIX_USER";
75539
+ WebhookIdentityType3["APP"] = "APP";
75540
+ })(WebhookIdentityType || (WebhookIdentityType = {}));
75541
+
75362
75542
  // ../../node_modules/@wix/ambassador-devcenter-myapps-v1-my-app/build/es/http.impl.js
75363
75543
  init_esm_shims();
75364
75544
  var _myApp = {
@@ -76909,11 +77089,11 @@ var Domain;
76909
77089
  Domain3["USER"] = "USER";
76910
77090
  Domain3["WIX"] = "WIX";
76911
77091
  })(Domain || (Domain = {}));
76912
- var Status;
76913
- (function(Status4) {
76914
- Status4["ACTIVE"] = "ACTIVE";
76915
- Status4["INACTIVE"] = "INACTIVE";
76916
- })(Status || (Status = {}));
77092
+ var Status2;
77093
+ (function(Status5) {
77094
+ Status5["ACTIVE"] = "ACTIVE";
77095
+ Status5["INACTIVE"] = "INACTIVE";
77096
+ })(Status2 || (Status2 = {}));
76917
77097
  var TextInputDisplayType;
76918
77098
  (function(TextInputDisplayType3) {
76919
77099
  TextInputDisplayType3["TEXT"] = "TEXT";
@@ -77282,13 +77462,13 @@ var NavigationType;
77282
77462
  NavigationType3["NAVIGATE"] = "NAVIGATE";
77283
77463
  NavigationType3["MODAL"] = "MODAL";
77284
77464
  })(NavigationType || (NavigationType = {}));
77285
- var State;
77286
- (function(State3) {
77287
- State3["UNKNOWN_STATE"] = "UNKNOWN_STATE";
77288
- State3["DEFAULT_ON"] = "DEFAULT_ON";
77289
- State3["DEFAULT_OFF"] = "DEFAULT_OFF";
77290
- State3["ALWAYS_ON"] = "ALWAYS_ON";
77291
- })(State || (State = {}));
77465
+ var State2;
77466
+ (function(State4) {
77467
+ State4["UNKNOWN_STATE"] = "UNKNOWN_STATE";
77468
+ State4["DEFAULT_ON"] = "DEFAULT_ON";
77469
+ State4["DEFAULT_OFF"] = "DEFAULT_OFF";
77470
+ State4["ALWAYS_ON"] = "ALWAYS_ON";
77471
+ })(State2 || (State2 = {}));
77292
77472
  var NotificationTopicState;
77293
77473
  (function(NotificationTopicState3) {
77294
77474
  NotificationTopicState3["UNKNOWN_STATE"] = "UNKNOWN_STATE";
@@ -78221,11 +78401,11 @@ var AppType2;
78221
78401
  AppType4["HEADLESS"] = "HEADLESS";
78222
78402
  AppType4["FUNCTION_ACTIVATION_APP"] = "FUNCTION_ACTIVATION_APP";
78223
78403
  })(AppType2 || (AppType2 = {}));
78224
- var CreatedByType;
78225
- (function(CreatedByType3) {
78226
- CreatedByType3["USER"] = "USER";
78227
- CreatedByType3["APP"] = "APP";
78228
- })(CreatedByType || (CreatedByType = {}));
78404
+ var CreatedByType2;
78405
+ (function(CreatedByType4) {
78406
+ CreatedByType4["USER"] = "USER";
78407
+ CreatedByType4["APP"] = "APP";
78408
+ })(CreatedByType2 || (CreatedByType2 = {}));
78229
78409
  var ShowConsentBehaviour;
78230
78410
  (function(ShowConsentBehaviour3) {
78231
78411
  ShowConsentBehaviour3["DEFAULT_BEHAVIOUR"] = "DEFAULT_BEHAVIOUR";
@@ -78248,11 +78428,11 @@ var NamespaceType;
78248
78428
  NamespaceType3["ACCOUNT"] = "ACCOUNT";
78249
78429
  NamespaceType3["COMPANY"] = "COMPANY";
78250
78430
  })(NamespaceType || (NamespaceType = {}));
78251
- var SortOrder;
78252
- (function(SortOrder2) {
78253
- SortOrder2["ASC"] = "ASC";
78254
- SortOrder2["DESC"] = "DESC";
78255
- })(SortOrder || (SortOrder = {}));
78431
+ var SortOrder2;
78432
+ (function(SortOrder3) {
78433
+ SortOrder3["ASC"] = "ASC";
78434
+ SortOrder3["DESC"] = "DESC";
78435
+ })(SortOrder2 || (SortOrder2 = {}));
78256
78436
  var AppChangedEventAction;
78257
78437
  (function(AppChangedEventAction2) {
78258
78438
  AppChangedEventAction2["CREATED"] = "CREATED";
@@ -78260,14 +78440,14 @@ var AppChangedEventAction;
78260
78440
  AppChangedEventAction2["DEPRECATED"] = "DEPRECATED";
78261
78441
  AppChangedEventAction2["DELETED"] = "DELETED";
78262
78442
  })(AppChangedEventAction || (AppChangedEventAction = {}));
78263
- var WebhookIdentityType;
78264
- (function(WebhookIdentityType2) {
78265
- WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
78266
- WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
78267
- WebhookIdentityType2["MEMBER"] = "MEMBER";
78268
- WebhookIdentityType2["WIX_USER"] = "WIX_USER";
78269
- WebhookIdentityType2["APP"] = "APP";
78270
- })(WebhookIdentityType || (WebhookIdentityType = {}));
78443
+ var WebhookIdentityType2;
78444
+ (function(WebhookIdentityType3) {
78445
+ WebhookIdentityType3["UNKNOWN"] = "UNKNOWN";
78446
+ WebhookIdentityType3["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
78447
+ WebhookIdentityType3["MEMBER"] = "MEMBER";
78448
+ WebhookIdentityType3["WIX_USER"] = "WIX_USER";
78449
+ WebhookIdentityType3["APP"] = "APP";
78450
+ })(WebhookIdentityType2 || (WebhookIdentityType2 = {}));
78271
78451
  var Classification;
78272
78452
  (function(Classification2) {
78273
78453
  Classification2["SITE_APP"] = "SITE_APP";
@@ -78277,19 +78457,19 @@ var Classification;
78277
78457
  Classification2["HEADLESS"] = "HEADLESS";
78278
78458
  Classification2["FUNCTION_ACTIVATION_APP"] = "FUNCTION_ACTIVATION_APP";
78279
78459
  })(Classification || (Classification = {}));
78280
- var VersionStatus;
78281
- (function(VersionStatus2) {
78282
- VersionStatus2["NONE_STATUS"] = "NONE_STATUS";
78283
- VersionStatus2["DRAFT"] = "DRAFT";
78284
- VersionStatus2["SUBMITTED"] = "SUBMITTED";
78285
- VersionStatus2["IN_REVIEW"] = "IN_REVIEW";
78286
- VersionStatus2["APPROVED"] = "APPROVED";
78287
- VersionStatus2["PUBLISHED"] = "PUBLISHED";
78288
- VersionStatus2["DECLINED"] = "DECLINED";
78289
- VersionStatus2["ARCHIVED"] = "ARCHIVED";
78290
- VersionStatus2["HIDDEN"] = "HIDDEN";
78291
- VersionStatus2["RELEASED"] = "RELEASED";
78292
- })(VersionStatus || (VersionStatus = {}));
78460
+ var VersionStatus2;
78461
+ (function(VersionStatus3) {
78462
+ VersionStatus3["NONE_STATUS"] = "NONE_STATUS";
78463
+ VersionStatus3["DRAFT"] = "DRAFT";
78464
+ VersionStatus3["SUBMITTED"] = "SUBMITTED";
78465
+ VersionStatus3["IN_REVIEW"] = "IN_REVIEW";
78466
+ VersionStatus3["APPROVED"] = "APPROVED";
78467
+ VersionStatus3["PUBLISHED"] = "PUBLISHED";
78468
+ VersionStatus3["DECLINED"] = "DECLINED";
78469
+ VersionStatus3["ARCHIVED"] = "ARCHIVED";
78470
+ VersionStatus3["HIDDEN"] = "HIDDEN";
78471
+ VersionStatus3["RELEASED"] = "RELEASED";
78472
+ })(VersionStatus2 || (VersionStatus2 = {}));
78293
78473
  var ComponentType2;
78294
78474
  (function(ComponentType3) {
78295
78475
  ComponentType3["NONE"] = "NONE";
@@ -78822,11 +79002,11 @@ var Domain2;
78822
79002
  Domain3["USER"] = "USER";
78823
79003
  Domain3["WIX"] = "WIX";
78824
79004
  })(Domain2 || (Domain2 = {}));
78825
- var Status2;
78826
- (function(Status4) {
78827
- Status4["ACTIVE"] = "ACTIVE";
78828
- Status4["INACTIVE"] = "INACTIVE";
78829
- })(Status2 || (Status2 = {}));
79005
+ var Status3;
79006
+ (function(Status5) {
79007
+ Status5["ACTIVE"] = "ACTIVE";
79008
+ Status5["INACTIVE"] = "INACTIVE";
79009
+ })(Status3 || (Status3 = {}));
78830
79010
  var TextInputDisplayType2;
78831
79011
  (function(TextInputDisplayType3) {
78832
79012
  TextInputDisplayType3["TEXT"] = "TEXT";
@@ -79195,13 +79375,13 @@ var NavigationType2;
79195
79375
  NavigationType3["NAVIGATE"] = "NAVIGATE";
79196
79376
  NavigationType3["MODAL"] = "MODAL";
79197
79377
  })(NavigationType2 || (NavigationType2 = {}));
79198
- var State2;
79199
- (function(State3) {
79200
- State3["UNKNOWN_STATE"] = "UNKNOWN_STATE";
79201
- State3["DEFAULT_ON"] = "DEFAULT_ON";
79202
- State3["DEFAULT_OFF"] = "DEFAULT_OFF";
79203
- State3["ALWAYS_ON"] = "ALWAYS_ON";
79204
- })(State2 || (State2 = {}));
79378
+ var State3;
79379
+ (function(State4) {
79380
+ State4["UNKNOWN_STATE"] = "UNKNOWN_STATE";
79381
+ State4["DEFAULT_ON"] = "DEFAULT_ON";
79382
+ State4["DEFAULT_OFF"] = "DEFAULT_OFF";
79383
+ State4["ALWAYS_ON"] = "ALWAYS_ON";
79384
+ })(State3 || (State3 = {}));
79205
79385
  var NotificationTopicState2;
79206
79386
  (function(NotificationTopicState3) {
79207
79387
  NotificationTopicState3["UNKNOWN_STATE"] = "UNKNOWN_STATE";
@@ -80060,27 +80240,27 @@ var MediaType;
80060
80240
  MediaType2["IMAGE"] = "IMAGE";
80061
80241
  MediaType2["YOUTUBE"] = "YOUTUBE";
80062
80242
  })(MediaType || (MediaType = {}));
80063
- var PlanStatus;
80064
- (function(PlanStatus2) {
80065
- PlanStatus2["UNKNOWN"] = "UNKNOWN";
80066
- PlanStatus2["VISIBLE"] = "VISIBLE";
80067
- PlanStatus2["HIDDEN"] = "HIDDEN";
80068
- })(PlanStatus || (PlanStatus = {}));
80069
- var PlanDescription;
80070
- (function(PlanDescription2) {
80071
- PlanDescription2["UNKNOWN_DESCRIPTION"] = "UNKNOWN_DESCRIPTION";
80072
- PlanDescription2["BENEFITS"] = "BENEFITS";
80073
- PlanDescription2["CUSTOM_TEXT"] = "CUSTOM_TEXT";
80074
- })(PlanDescription || (PlanDescription = {}));
80075
- var BusinessModel;
80076
- (function(BusinessModel2) {
80077
- BusinessModel2["None"] = "None";
80078
- BusinessModel2["FREEMIUM"] = "FREEMIUM";
80079
- BusinessModel2["PREMIUM"] = "PREMIUM";
80080
- BusinessModel2["FREE"] = "FREE";
80081
- BusinessModel2["WIX_PREMIUM"] = "WIX_PREMIUM";
80082
- BusinessModel2["DYNAMIC"] = "DYNAMIC";
80083
- })(BusinessModel || (BusinessModel = {}));
80243
+ var PlanStatus2;
80244
+ (function(PlanStatus3) {
80245
+ PlanStatus3["UNKNOWN"] = "UNKNOWN";
80246
+ PlanStatus3["VISIBLE"] = "VISIBLE";
80247
+ PlanStatus3["HIDDEN"] = "HIDDEN";
80248
+ })(PlanStatus2 || (PlanStatus2 = {}));
80249
+ var PlanDescription2;
80250
+ (function(PlanDescription3) {
80251
+ PlanDescription3["UNKNOWN_DESCRIPTION"] = "UNKNOWN_DESCRIPTION";
80252
+ PlanDescription3["BENEFITS"] = "BENEFITS";
80253
+ PlanDescription3["CUSTOM_TEXT"] = "CUSTOM_TEXT";
80254
+ })(PlanDescription2 || (PlanDescription2 = {}));
80255
+ var BusinessModel2;
80256
+ (function(BusinessModel3) {
80257
+ BusinessModel3["None"] = "None";
80258
+ BusinessModel3["FREEMIUM"] = "FREEMIUM";
80259
+ BusinessModel3["PREMIUM"] = "PREMIUM";
80260
+ BusinessModel3["FREE"] = "FREE";
80261
+ BusinessModel3["WIX_PREMIUM"] = "WIX_PREMIUM";
80262
+ BusinessModel3["DYNAMIC"] = "DYNAMIC";
80263
+ })(BusinessModel2 || (BusinessModel2 = {}));
80084
80264
  var TranslationType;
80085
80265
  (function(TranslationType2) {
80086
80266
  TranslationType2["UNINITIALIZED"] = "UNINITIALIZED";
@@ -80114,12 +80294,12 @@ var NamespaceType2;
80114
80294
  NamespaceType3["ACCOUNT"] = "ACCOUNT";
80115
80295
  NamespaceType3["COMPANY"] = "COMPANY";
80116
80296
  })(NamespaceType2 || (NamespaceType2 = {}));
80117
- var Status3;
80118
- (function(Status4) {
80119
- Status4["ACTIVE"] = "ACTIVE";
80120
- Status4["DEPRECATED"] = "DEPRECATED";
80121
- Status4["ARCHIVED"] = "ARCHIVED";
80122
- })(Status3 || (Status3 = {}));
80297
+ var Status4;
80298
+ (function(Status5) {
80299
+ Status5["ACTIVE"] = "ACTIVE";
80300
+ Status5["DEPRECATED"] = "DEPRECATED";
80301
+ Status5["ARCHIVED"] = "ARCHIVED";
80302
+ })(Status4 || (Status4 = {}));
80123
80303
  var AppType3;
80124
80304
  (function(AppType4) {
80125
80305
  AppType4["SITE_APP"] = "SITE_APP";
@@ -80129,11 +80309,11 @@ var AppType3;
80129
80309
  AppType4["HEADLESS"] = "HEADLESS";
80130
80310
  AppType4["FUNCTION_ACTIVATION_APP"] = "FUNCTION_ACTIVATION_APP";
80131
80311
  })(AppType3 || (AppType3 = {}));
80132
- var CreatedByType2;
80133
- (function(CreatedByType3) {
80134
- CreatedByType3["USER"] = "USER";
80135
- CreatedByType3["APP"] = "APP";
80136
- })(CreatedByType2 || (CreatedByType2 = {}));
80312
+ var CreatedByType3;
80313
+ (function(CreatedByType4) {
80314
+ CreatedByType4["USER"] = "USER";
80315
+ CreatedByType4["APP"] = "APP";
80316
+ })(CreatedByType3 || (CreatedByType3 = {}));
80137
80317
  var ShowConsentBehaviour2;
80138
80318
  (function(ShowConsentBehaviour3) {
80139
80319
  ShowConsentBehaviour3["DEFAULT_BEHAVIOUR"] = "DEFAULT_BEHAVIOUR";
@@ -80209,6 +80389,19 @@ var appByVersionSchema = z.object({
80209
80389
  }),
80210
80390
  appStatus: z.string().optional()
80211
80391
  });
80392
+ var appVersionSchema = z.object({
80393
+ appVersions: z.array(
80394
+ z.object({
80395
+ /** Application ID */
80396
+ id: z.string(),
80397
+ fullVersion: z.string().optional().default("0.0.0"),
80398
+ /** indicates if this is the draft instance of the version. */
80399
+ state: z.string().optional(),
80400
+ /** status of the app */
80401
+ status: z.string().optional()
80402
+ })
80403
+ )
80404
+ });
80212
80405
  var appSecretsSchema = z.object({
80213
80406
  appSecret: z.string(),
80214
80407
  webhookPublicKey: z.string()
@@ -80363,6 +80556,56 @@ var DevCenterClient = class {
80363
80556
  });
80364
80557
  }
80365
80558
  };
80559
+ queryAppVersion = async ({ appId }) => {
80560
+ try {
80561
+ const { data } = await pRetry(
80562
+ () => this.httpClient.request(
80563
+ queryAppVersion({
80564
+ query: {
80565
+ paging: {
80566
+ limit: 1
80567
+ },
80568
+ filter: { appId },
80569
+ sort: [{ fieldName: "updatedDate", order: SortOrder.DESC }]
80570
+ }
80571
+ })
80572
+ ),
80573
+ this.retryOptions
80574
+ );
80575
+ const parsedData = appVersionSchema.parse(data);
80576
+ const lastVersion = parsedData.appVersions[0];
80577
+ if (!lastVersion) {
80578
+ throw new CliError({
80579
+ code: CliErrorCode.AppForVersionNotFound({
80580
+ version: "latest"
80581
+ }),
80582
+ cause: null
80583
+ });
80584
+ }
80585
+ return {
80586
+ latestVersion: lastVersion.fullVersion,
80587
+ isPublished: lastVersion.state === State.PRODUCTION,
80588
+ isLocked: lastVersion.state === State.LOCKED_DRAFT
80589
+ };
80590
+ } catch (cause) {
80591
+ if (isHttpError(cause) && cause.response?.status === 404) {
80592
+ throw new CliError({
80593
+ code: CliErrorCode.AppForVersionNotFound({
80594
+ version: "latest"
80595
+ }),
80596
+ cause
80597
+ });
80598
+ }
80599
+ throw new CliError({
80600
+ code: CliErrorCode.FailedToFetchAppForVersion(),
80601
+ cause
80602
+ });
80603
+ }
80604
+ };
80605
+ /**
80606
+ * This method is deprecated.
80607
+ * Use `queryAppVersion()` if you need to get information about app version.
80608
+ */
80366
80609
  getAppByVersion = async ({
80367
80610
  appId,
80368
80611
  version = "latest"