@wix/create-new 0.0.80 → 0.0.82

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
@@ -118,7 +118,7 @@ import {
118
118
  writeJson,
119
119
  writePackageJson,
120
120
  zod_default
121
- } from "./chunk-YAK2QTA5.js";
121
+ } from "./chunk-C2BJURIW.js";
122
122
  import {
123
123
  __commonJS,
124
124
  __dirname,
@@ -65799,13 +65799,13 @@ ${errorMessage2}`
65799
65799
  }
65800
65800
  );
65801
65801
  },
65802
- FailedToPullEnvironment: () => {
65802
+ FailedToGetAppEnvironmentVariablesByEnvironment: () => {
65803
65803
  return () => /* @__PURE__ */ import_react84.default.createElement(SystemErrorMessage, { message: "Failed to pull environment variables." });
65804
65804
  },
65805
- FailedToSetEnvironmentVariable: () => {
65805
+ FailedToBulkUpsertAppEnvironmentVariables: () => {
65806
65806
  return () => /* @__PURE__ */ import_react84.default.createElement(SystemErrorMessage, { message: "Failed to set/update environment variable." });
65807
65807
  },
65808
- FailedToRemoveEnvironmentVariable: () => {
65808
+ FailedToDeleteAppEnvironmentVariableByEnvironmentAndKey: () => {
65809
65809
  return () => /* @__PURE__ */ import_react84.default.createElement(SystemErrorMessage, { message: "Failed to remove environment variable." });
65810
65810
  },
65811
65811
  FailedToUploadStaticFiles: () => {
@@ -72179,9 +72179,9 @@ var VersionStatus;
72179
72179
  VersionStatus3["RELEASED"] = "RELEASED";
72180
72180
  })(VersionStatus || (VersionStatus = {}));
72181
72181
  var SortOrder;
72182
- (function(SortOrder4) {
72183
- SortOrder4["ASC"] = "ASC";
72184
- SortOrder4["DESC"] = "DESC";
72182
+ (function(SortOrder5) {
72183
+ SortOrder5["ASC"] = "ASC";
72184
+ SortOrder5["DESC"] = "DESC";
72185
72185
  })(SortOrder || (SortOrder = {}));
72186
72186
  var RequestedFields;
72187
72187
  (function(RequestedFields3) {
@@ -72218,12 +72218,12 @@ var JoinedConditionOperator;
72218
72218
  JoinedConditionOperator2["AND"] = "AND";
72219
72219
  })(JoinedConditionOperator || (JoinedConditionOperator = {}));
72220
72220
  var WebhookIdentityType;
72221
- (function(WebhookIdentityType10) {
72222
- WebhookIdentityType10["UNKNOWN"] = "UNKNOWN";
72223
- WebhookIdentityType10["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
72224
- WebhookIdentityType10["MEMBER"] = "MEMBER";
72225
- WebhookIdentityType10["WIX_USER"] = "WIX_USER";
72226
- WebhookIdentityType10["APP"] = "APP";
72221
+ (function(WebhookIdentityType11) {
72222
+ WebhookIdentityType11["UNKNOWN"] = "UNKNOWN";
72223
+ WebhookIdentityType11["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
72224
+ WebhookIdentityType11["MEMBER"] = "MEMBER";
72225
+ WebhookIdentityType11["WIX_USER"] = "WIX_USER";
72226
+ WebhookIdentityType11["APP"] = "APP";
72227
72227
  })(WebhookIdentityType || (WebhookIdentityType = {}));
72228
72228
 
72229
72229
  // ../../node_modules/@wix/ambassador-devcenter-dsm-v1-development-site/build/es/http.impl.js
@@ -73423,12 +73423,12 @@ function installApp(payload7) {
73423
73423
  // ../../node_modules/@wix/ambassador-apps-v1-app-instance/es/build/types.impl.js
73424
73424
  init_esm_shims();
73425
73425
  var WebhookIdentityType2;
73426
- (function(WebhookIdentityType10) {
73427
- WebhookIdentityType10["UNKNOWN"] = "UNKNOWN";
73428
- WebhookIdentityType10["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
73429
- WebhookIdentityType10["MEMBER"] = "MEMBER";
73430
- WebhookIdentityType10["WIX_USER"] = "WIX_USER";
73431
- WebhookIdentityType10["APP"] = "APP";
73426
+ (function(WebhookIdentityType11) {
73427
+ WebhookIdentityType11["UNKNOWN"] = "UNKNOWN";
73428
+ WebhookIdentityType11["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
73429
+ WebhookIdentityType11["MEMBER"] = "MEMBER";
73430
+ WebhookIdentityType11["WIX_USER"] = "WIX_USER";
73431
+ WebhookIdentityType11["APP"] = "APP";
73432
73432
  })(WebhookIdentityType2 || (WebhookIdentityType2 = {}));
73433
73433
  var InstallType;
73434
73434
  (function(InstallType2) {
@@ -76254,12 +76254,12 @@ var VersionType;
76254
76254
  VersionType2["DEV_VERSION"] = "DEV_VERSION";
76255
76255
  })(VersionType || (VersionType = {}));
76256
76256
  var WebhookIdentityType3;
76257
- (function(WebhookIdentityType10) {
76258
- WebhookIdentityType10["UNKNOWN"] = "UNKNOWN";
76259
- WebhookIdentityType10["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
76260
- WebhookIdentityType10["MEMBER"] = "MEMBER";
76261
- WebhookIdentityType10["WIX_USER"] = "WIX_USER";
76262
- WebhookIdentityType10["APP"] = "APP";
76257
+ (function(WebhookIdentityType11) {
76258
+ WebhookIdentityType11["UNKNOWN"] = "UNKNOWN";
76259
+ WebhookIdentityType11["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
76260
+ WebhookIdentityType11["MEMBER"] = "MEMBER";
76261
+ WebhookIdentityType11["WIX_USER"] = "WIX_USER";
76262
+ WebhookIdentityType11["APP"] = "APP";
76263
76263
  })(WebhookIdentityType3 || (WebhookIdentityType3 = {}));
76264
76264
 
76265
76265
  // ../dev-center-client/src/schemas.ts
@@ -78725,12 +78725,12 @@ var WritingModeValue2;
78725
78725
  WritingModeValue3["sidewaysLr"] = "sidewaysLr";
78726
78726
  })(WritingModeValue2 || (WritingModeValue2 = {}));
78727
78727
  var WebhookIdentityType4;
78728
- (function(WebhookIdentityType10) {
78729
- WebhookIdentityType10["UNKNOWN"] = "UNKNOWN";
78730
- WebhookIdentityType10["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
78731
- WebhookIdentityType10["MEMBER"] = "MEMBER";
78732
- WebhookIdentityType10["WIX_USER"] = "WIX_USER";
78733
- WebhookIdentityType10["APP"] = "APP";
78728
+ (function(WebhookIdentityType11) {
78729
+ WebhookIdentityType11["UNKNOWN"] = "UNKNOWN";
78730
+ WebhookIdentityType11["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
78731
+ WebhookIdentityType11["MEMBER"] = "MEMBER";
78732
+ WebhookIdentityType11["WIX_USER"] = "WIX_USER";
78733
+ WebhookIdentityType11["APP"] = "APP";
78734
78734
  })(WebhookIdentityType4 || (WebhookIdentityType4 = {}));
78735
78735
  var ValidationTargetMethod;
78736
78736
  (function(ValidationTargetMethod2) {
@@ -80909,24 +80909,25 @@ function getAppProject(payload7) {
80909
80909
  return __getAppProject;
80910
80910
  }
80911
80911
 
80912
- // ../../node_modules/@wix/ambassador-velo-backend-v1-app-environment/build/es/http.impl.js
80912
+ // ../../node_modules/@wix/ambassador-velo-backend-v2-app-environment-variable/es/build/http.impl.js
80913
80913
  init_esm_shims();
80914
- var _appEnvironment = {
80914
+ var _appEnvironmentVariable = {
80915
80915
  createdDate: "google.protobuf.Timestamp",
80916
80916
  updatedDate: "google.protobuf.Timestamp"
80917
80917
  };
80918
- var _getAppEnvironmentByNameRequest = {};
80919
- var _getAppEnvironmentByNameResponse = { appEnvironment: "_appEnvironment" };
80920
- var _removeAppEnvironmentVariablesRequest = {};
80921
- var _removeAppEnvironmentVariablesResponse = {
80922
- appEnvironment: "_appEnvironment"
80918
+ var _bulkAppEnvironmentVariableResult = { item: "_appEnvironmentVariable" };
80919
+ var _bulkUpsertAppEnvironmentVariablesRequest = {};
80920
+ var _bulkUpsertAppEnvironmentVariablesResponse = {
80921
+ results: "_bulkAppEnvironmentVariableResult",
80922
+ appEnvironmentVariables: "_appEnvironmentVariable"
80923
80923
  };
80924
- var _upsertAppEnvironmentRequest = {
80925
- fieldMask: "google.protobuf.FieldMask",
80926
- appEnvironment: "_appEnvironment"
80924
+ var _deleteAppEnvironmentVariableByEnvironmentAndKeyRequest = {};
80925
+ var _deleteAppEnvironmentVariableByEnvironmentAndKeyResponse = {};
80926
+ var _getAppEnvironmentVariablesByEnvironmentRequest = {};
80927
+ var _getAppEnvironmentVariablesByEnvironmentResponse = {
80928
+ appEnvironmentVariables: "_appEnvironmentVariable"
80927
80929
  };
80928
- var _upsertAppEnvironmentResponse = { appEnvironment: "_appEnvironment" };
80929
- function resolveWixVeloBackendV1AppEnvironmentManagementUrl(opts) {
80930
+ function resolveWixVeloBackendV2AppEnvironmentVariableServiceUrl(opts) {
80930
80931
  var domainToMappings = {
80931
80932
  "manage._base_domain_": [
80932
80933
  {
@@ -80937,23 +80938,21 @@ function resolveWixVeloBackendV1AppEnvironmentManagementUrl(opts) {
80937
80938
  };
80938
80939
  return resolveUrl(Object.assign(opts, { domainToMappings }));
80939
80940
  }
80940
- function upsertAppEnvironment(payload7) {
80941
- var _a3 = serializer(_upsertAppEnvironmentRequest, { _appEnvironment }), toReq = _a3.toJSON, fromReq = _a3.fromJSON;
80942
- var fromRes = serializer(_upsertAppEnvironmentResponse, {
80943
- _appEnvironment
80944
- }).fromJSON;
80945
- function __upsertAppEnvironment(_a4) {
80941
+ function bulkUpsertAppEnvironmentVariables(payload7) {
80942
+ var _a3 = serializer(_bulkUpsertAppEnvironmentVariablesRequest, {}), toReq = _a3.toJSON, fromReq = _a3.fromJSON;
80943
+ var fromRes = serializer(_bulkUpsertAppEnvironmentVariablesResponse, { _appEnvironmentVariable, _bulkAppEnvironmentVariableResult }).fromJSON;
80944
+ function __bulkUpsertAppEnvironmentVariables(_a4) {
80946
80945
  var host = _a4.host;
80947
80946
  var serializedData = toReq(payload7);
80948
80947
  var metadata = {
80949
- entityFqdn: "wix.velo.backend.v1.app_environment",
80948
+ entityFqdn: "wix.velo.backend.v2.app_environment_variable",
80950
80949
  method: "POST",
80951
- methodFqn: "wix.velo.backend.v1.AppEnvironmentManagement.UpsertAppEnvironment",
80950
+ methodFqn: "wix.velo.backend.v2.AppEnvironmentVariableService.BulkUpsertAppEnvironmentVariables",
80952
80951
  migrationOptions: {
80953
80952
  optInTransformResponse: true
80954
80953
  },
80955
- url: resolveWixVeloBackendV1AppEnvironmentManagementUrl({
80956
- protoPath: "/v1/app-projects/{appEnvironment.appProjectId}/app-environments/upsert/name/{appEnvironment.name}",
80954
+ url: resolveWixVeloBackendV2AppEnvironmentVariableServiceUrl({
80955
+ protoPath: "/v2/bulk/app-projects/{appProjectId}/app-environment-variables/upsert",
80957
80956
  data: serializedData,
80958
80957
  host
80959
80958
  }),
@@ -80962,27 +80961,25 @@ function upsertAppEnvironment(payload7) {
80962
80961
  };
80963
80962
  return metadata;
80964
80963
  }
80965
- __upsertAppEnvironment.fromReq = fromReq;
80966
- __upsertAppEnvironment.__isAmbassador = true;
80967
- return __upsertAppEnvironment;
80964
+ __bulkUpsertAppEnvironmentVariables.fromReq = fromReq;
80965
+ __bulkUpsertAppEnvironmentVariables.__isAmbassador = true;
80966
+ return __bulkUpsertAppEnvironmentVariables;
80968
80967
  }
80969
- function getAppEnvironmentByName(payload7) {
80970
- var _a3 = serializer(_getAppEnvironmentByNameRequest, {}), toReq = _a3.toJSON, fromReq = _a3.fromJSON;
80971
- var fromRes = serializer(_getAppEnvironmentByNameResponse, {
80972
- _appEnvironment
80973
- }).fromJSON;
80974
- function __getAppEnvironmentByName(_a4) {
80968
+ function getAppEnvironmentVariablesByEnvironment(payload7) {
80969
+ var _a3 = serializer(_getAppEnvironmentVariablesByEnvironmentRequest, {}), toReq = _a3.toJSON, fromReq = _a3.fromJSON;
80970
+ var fromRes = serializer(_getAppEnvironmentVariablesByEnvironmentResponse, { _appEnvironmentVariable }).fromJSON;
80971
+ function __getAppEnvironmentVariablesByEnvironment(_a4) {
80975
80972
  var host = _a4.host;
80976
80973
  var serializedData = toReq(payload7);
80977
80974
  var metadata = {
80978
- entityFqdn: "wix.velo.backend.v1.app_environment",
80975
+ entityFqdn: "wix.velo.backend.v2.app_environment_variable",
80979
80976
  method: "GET",
80980
- methodFqn: "wix.velo.backend.v1.AppEnvironmentManagement.GetAppEnvironmentByName",
80977
+ methodFqn: "wix.velo.backend.v2.AppEnvironmentVariableService.GetAppEnvironmentVariablesByEnvironment",
80981
80978
  migrationOptions: {
80982
80979
  optInTransformResponse: true
80983
80980
  },
80984
- url: resolveWixVeloBackendV1AppEnvironmentManagementUrl({
80985
- protoPath: "/v1/app-projects/{appProjectId}/app-environments/name/{appEnvironmentName}",
80981
+ url: resolveWixVeloBackendV2AppEnvironmentVariableServiceUrl({
80982
+ protoPath: "/v2/app-projects/{appProjectId}/app-environment-variables/environment/{environment}",
80986
80983
  data: serializedData,
80987
80984
  host
80988
80985
  }),
@@ -80991,38 +80988,66 @@ function getAppEnvironmentByName(payload7) {
80991
80988
  };
80992
80989
  return metadata;
80993
80990
  }
80994
- __getAppEnvironmentByName.fromReq = fromReq;
80995
- __getAppEnvironmentByName.__isAmbassador = true;
80996
- return __getAppEnvironmentByName;
80991
+ __getAppEnvironmentVariablesByEnvironment.fromReq = fromReq;
80992
+ __getAppEnvironmentVariablesByEnvironment.__isAmbassador = true;
80993
+ return __getAppEnvironmentVariablesByEnvironment;
80997
80994
  }
80998
- function removeAppEnvironmentVariables(payload7) {
80999
- var _a3 = serializer(_removeAppEnvironmentVariablesRequest, {}), toReq = _a3.toJSON, fromReq = _a3.fromJSON;
81000
- var fromRes = serializer(_removeAppEnvironmentVariablesResponse, { _appEnvironment }).fromJSON;
81001
- function __removeAppEnvironmentVariables(_a4) {
80995
+ function deleteAppEnvironmentVariableByEnvironmentAndKey(payload7) {
80996
+ var _a3 = serializer(_deleteAppEnvironmentVariableByEnvironmentAndKeyRequest, {}), toReq = _a3.toJSON, fromReq = _a3.fromJSON;
80997
+ var fromRes = serializer(_deleteAppEnvironmentVariableByEnvironmentAndKeyResponse, {}).fromJSON;
80998
+ function __deleteAppEnvironmentVariableByEnvironmentAndKey(_a4) {
81002
80999
  var host = _a4.host;
81003
81000
  var serializedData = toReq(payload7);
81004
81001
  var metadata = {
81005
- entityFqdn: "wix.velo.backend.v1.app_environment",
81006
- method: "POST",
81007
- methodFqn: "wix.velo.backend.v1.AppEnvironmentManagement.RemoveAppEnvironmentVariables",
81002
+ entityFqdn: "wix.velo.backend.v2.app_environment_variable",
81003
+ method: "DELETE",
81004
+ methodFqn: "wix.velo.backend.v2.AppEnvironmentVariableService.DeleteAppEnvironmentVariableByEnvironmentAndKey",
81008
81005
  migrationOptions: {
81009
81006
  optInTransformResponse: true
81010
81007
  },
81011
- url: resolveWixVeloBackendV1AppEnvironmentManagementUrl({
81012
- protoPath: "/v1/app-projects/{appProjectId}/app-environments/{appEnvironmentId}/remove",
81008
+ url: resolveWixVeloBackendV2AppEnvironmentVariableServiceUrl({
81009
+ protoPath: "/v2/app-projects/{appProjectId}/app-environment-variables/environment/{environment}/key/{key}",
81013
81010
  data: serializedData,
81014
81011
  host
81015
81012
  }),
81016
- data: serializedData,
81013
+ params: toURLSearchParams(serializedData),
81017
81014
  transformResponse: fromRes
81018
81015
  };
81019
81016
  return metadata;
81020
81017
  }
81021
- __removeAppEnvironmentVariables.fromReq = fromReq;
81022
- __removeAppEnvironmentVariables.__isAmbassador = true;
81023
- return __removeAppEnvironmentVariables;
81018
+ __deleteAppEnvironmentVariableByEnvironmentAndKey.fromReq = fromReq;
81019
+ __deleteAppEnvironmentVariableByEnvironmentAndKey.__isAmbassador = true;
81020
+ return __deleteAppEnvironmentVariableByEnvironmentAndKey;
81024
81021
  }
81025
81022
 
81023
+ // ../../node_modules/@wix/ambassador-velo-backend-v2-app-environment-variable/es/build/types.impl.js
81024
+ init_esm_shims();
81025
+ var WebhookIdentityType5;
81026
+ (function(WebhookIdentityType11) {
81027
+ WebhookIdentityType11["UNKNOWN"] = "UNKNOWN";
81028
+ WebhookIdentityType11["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
81029
+ WebhookIdentityType11["MEMBER"] = "MEMBER";
81030
+ WebhookIdentityType11["WIX_USER"] = "WIX_USER";
81031
+ WebhookIdentityType11["APP"] = "APP";
81032
+ })(WebhookIdentityType5 || (WebhookIdentityType5 = {}));
81033
+ var SortOrder2;
81034
+ (function(SortOrder5) {
81035
+ SortOrder5["ASC"] = "ASC";
81036
+ SortOrder5["DESC"] = "DESC";
81037
+ })(SortOrder2 || (SortOrder2 = {}));
81038
+ var Mutability;
81039
+ (function(Mutability2) {
81040
+ Mutability2["UNKNOWN_MUTABILITY"] = "UNKNOWN_MUTABILITY";
81041
+ Mutability2["STATIC"] = "STATIC";
81042
+ Mutability2["DYNAMIC"] = "DYNAMIC";
81043
+ })(Mutability || (Mutability = {}));
81044
+ var Sensitivity;
81045
+ (function(Sensitivity2) {
81046
+ Sensitivity2["UNKNOWN_SENSITIVITY"] = "UNKNOWN_SENSITIVITY";
81047
+ Sensitivity2["PUBLIC"] = "PUBLIC";
81048
+ Sensitivity2["SECRET"] = "SECRET";
81049
+ })(Sensitivity || (Sensitivity = {}));
81050
+
81026
81051
  // ../backend-as-a-service-client/src/schemas.ts
81027
81052
  init_esm_shims();
81028
81053
 
@@ -81041,19 +81066,19 @@ var DeploymentState;
81041
81066
  DeploymentState2["DEPLOY_SUCCESS"] = "DEPLOY_SUCCESS";
81042
81067
  DeploymentState2["DEPLOY_FAILED"] = "DEPLOY_FAILED";
81043
81068
  })(DeploymentState || (DeploymentState = {}));
81044
- var SortOrder2;
81045
- (function(SortOrder4) {
81046
- SortOrder4["ASC"] = "ASC";
81047
- SortOrder4["DESC"] = "DESC";
81048
- })(SortOrder2 || (SortOrder2 = {}));
81049
- var WebhookIdentityType5;
81050
- (function(WebhookIdentityType10) {
81051
- WebhookIdentityType10["UNKNOWN"] = "UNKNOWN";
81052
- WebhookIdentityType10["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
81053
- WebhookIdentityType10["MEMBER"] = "MEMBER";
81054
- WebhookIdentityType10["WIX_USER"] = "WIX_USER";
81055
- WebhookIdentityType10["APP"] = "APP";
81056
- })(WebhookIdentityType5 || (WebhookIdentityType5 = {}));
81069
+ var SortOrder3;
81070
+ (function(SortOrder5) {
81071
+ SortOrder5["ASC"] = "ASC";
81072
+ SortOrder5["DESC"] = "DESC";
81073
+ })(SortOrder3 || (SortOrder3 = {}));
81074
+ var WebhookIdentityType6;
81075
+ (function(WebhookIdentityType11) {
81076
+ WebhookIdentityType11["UNKNOWN"] = "UNKNOWN";
81077
+ WebhookIdentityType11["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
81078
+ WebhookIdentityType11["MEMBER"] = "MEMBER";
81079
+ WebhookIdentityType11["WIX_USER"] = "WIX_USER";
81080
+ WebhookIdentityType11["APP"] = "APP";
81081
+ })(WebhookIdentityType6 || (WebhookIdentityType6 = {}));
81057
81082
 
81058
81083
  // ../backend-as-a-service-client/src/schemas.ts
81059
81084
  var staticFileMetadata = external_exports.object({
@@ -81074,13 +81099,6 @@ var AppDeploymentSchema = external_exports.object({
81074
81099
  var CompleteAppDeploymentSchema = external_exports.object({
81075
81100
  appDeployment: AppDeploymentSchema
81076
81101
  });
81077
- var AppEnvironmentSchema = external_exports.object({
81078
- appEnvironment: external_exports.object({
81079
- id: external_exports.string(),
81080
- variables: external_exports.record(external_exports.string()),
81081
- secrets: external_exports.record(external_exports.string())
81082
- }).passthrough()
81083
- });
81084
81102
  var AppProjectSchema = external_exports.object({
81085
81103
  appProject: external_exports.object({
81086
81104
  id: external_exports.string().uuid(),
@@ -81115,6 +81133,28 @@ var StaticFileUploadSchema = external_exports.object({
81115
81133
  jwt: external_exports.string().optional()
81116
81134
  }).optional()
81117
81135
  }).passthrough();
81136
+ var AppEnvironmentVariableSchema = external_exports.object({
81137
+ key: external_exports.string(),
81138
+ value: external_exports.string()
81139
+ });
81140
+ var AppEnvironmentVariablesSchema = external_exports.array(AppEnvironmentVariableSchema).optional().transform((variables) => {
81141
+ return (variables ?? []).reduce((acc, curr) => {
81142
+ acc[curr.key] = curr.value;
81143
+ return acc;
81144
+ }, {});
81145
+ });
81146
+ var GetAppEnvironmentVariablesSchema = external_exports.object({
81147
+ appEnvironmentVariables: AppEnvironmentVariablesSchema
81148
+ });
81149
+ var UpsertAppEnvironmentVariablesSchema = external_exports.object({
81150
+ appEnvironmentVariables: AppEnvironmentVariablesSchema,
81151
+ results: external_exports.array(external_exports.unknown()).optional(),
81152
+ bulkActionMetadata: external_exports.object({
81153
+ totalSuccesses: external_exports.number().optional(),
81154
+ totalFailures: external_exports.number().optional(),
81155
+ undetailedFailures: external_exports.number().optional()
81156
+ }).optional()
81157
+ });
81118
81158
 
81119
81159
  // ../backend-as-a-service-client/src/backend-as-a-service-client.ts
81120
81160
  var { minRetryTimeout } = getTestOverrides();
@@ -81266,64 +81306,74 @@ var BackendAsAServiceClient = class {
81266
81306
  }
81267
81307
  };
81268
81308
  // Env management
81269
- getAppEnvironmentByName = async (appId, environment) => {
81309
+ getAppEnvironmentVariables = async (appId, environment) => {
81270
81310
  try {
81271
81311
  const { data } = await pRetry(
81272
81312
  () => this.httpClient.request(
81273
- getAppEnvironmentByName({
81313
+ getAppEnvironmentVariablesByEnvironment({
81274
81314
  appProjectId: appId,
81275
- appEnvironmentName: environment
81315
+ environment
81276
81316
  })
81277
81317
  ),
81278
81318
  this.retryOptions
81279
81319
  );
81280
- return AppEnvironmentSchema.parse(data).appEnvironment;
81320
+ const { appEnvironmentVariables } = GetAppEnvironmentVariablesSchema.parse(data);
81321
+ return appEnvironmentVariables;
81281
81322
  } catch (e2) {
81282
81323
  throw new CliError({
81283
- code: CliErrorCode.FailedToPullEnvironment(),
81324
+ code: CliErrorCode.FailedToGetAppEnvironmentVariablesByEnvironment(),
81284
81325
  cause: e2
81285
81326
  });
81286
81327
  }
81287
81328
  };
81288
- upsertAppEnvironment = async (appId, environment, variables) => {
81329
+ upsertAppEnvironmentVariables = async (appId, environment, variables) => {
81330
+ let result;
81289
81331
  try {
81290
81332
  const { data } = await this.httpClient.request(
81291
- upsertAppEnvironment({
81292
- appEnvironment: {
81293
- appProjectId: appId,
81294
- name: environment,
81295
- variables
81296
- }
81333
+ bulkUpsertAppEnvironmentVariables({
81334
+ appProjectId: appId,
81335
+ environment,
81336
+ variables,
81337
+ mutability: Mutability.STATIC,
81338
+ returnEntity: true,
81339
+ returnAllEnvironment: true
81297
81340
  })
81298
81341
  );
81299
- return AppEnvironmentSchema.parse(data).appEnvironment;
81342
+ result = UpsertAppEnvironmentVariablesSchema.parse(data);
81300
81343
  } catch (e2) {
81301
81344
  throw new CliError({
81302
- code: CliErrorCode.FailedToSetEnvironmentVariable(),
81345
+ code: CliErrorCode.FailedToBulkUpsertAppEnvironmentVariables(),
81303
81346
  cause: e2
81304
81347
  });
81305
81348
  }
81349
+ const { bulkActionMetadata, appEnvironmentVariables } = result;
81350
+ if (bulkActionMetadata?.totalFailures || bulkActionMetadata?.undetailedFailures) {
81351
+ throw new CliError({
81352
+ code: CliErrorCode.FailedToBulkUpsertAppEnvironmentVariables(),
81353
+ cause: void 0,
81354
+ info: { ...result }
81355
+ });
81356
+ }
81357
+ return appEnvironmentVariables;
81306
81358
  };
81307
- removeAppEnvironmentVariable = async (appId, environment, variable) => {
81359
+ deleteAppEnvironmentVariable = async (appId, environment, variable) => {
81308
81360
  try {
81309
- const appEnvironment = await this.getAppEnvironmentByName(
81310
- appId,
81311
- environment
81312
- );
81313
- const { data } = await pRetry(
81314
- () => this.httpClient.request(
81315
- removeAppEnvironmentVariables({
81316
- appEnvironmentId: appEnvironment.id,
81317
- appProjectId: appId,
81318
- variables: [variable]
81319
- })
81320
- ),
81321
- this.retryOptions
81361
+ await this.httpClient.request(
81362
+ deleteAppEnvironmentVariableByEnvironmentAndKey({
81363
+ appProjectId: appId,
81364
+ environment,
81365
+ key: variable
81366
+ })
81322
81367
  );
81323
- return AppEnvironmentSchema.parse(data).appEnvironment;
81324
81368
  } catch (e2) {
81369
+ if (isHttpError(e2) && isHttpApplicationError(e2)) {
81370
+ const applicationError = e2.response?.data.details.applicationError;
81371
+ if (applicationError?.code === "APP_ENVIRONMENT_VARIABLE_NOT_FOUND") {
81372
+ return;
81373
+ }
81374
+ }
81325
81375
  throw new CliError({
81326
- code: CliErrorCode.FailedToRemoveEnvironmentVariable(),
81376
+ code: CliErrorCode.FailedToDeleteAppEnvironmentVariableByEnvironmentAndKey(),
81327
81377
  cause: e2
81328
81378
  });
81329
81379
  }
@@ -81351,7 +81401,6 @@ var createAppProjectAndEnvironment = async ({
81351
81401
  backendAsAServiceClient
81352
81402
  }) => {
81353
81403
  let appProject = await backendAsAServiceClient.getAppProject(appId);
81354
- let appEnvironment;
81355
81404
  if (!appProject) {
81356
81405
  const publicKeyAndSecret = await devCenterClient.getAppSecret({ appId });
81357
81406
  appProject = await backendAsAServiceClient.createAppProject({
@@ -81361,7 +81410,7 @@ var createAppProjectAndEnvironment = async ({
81361
81410
  cloudProvider: CloudProvider.CLOUD_FLARE,
81362
81411
  projectType: "APP"
81363
81412
  });
81364
- appEnvironment = await backendAsAServiceClient.upsertAppEnvironment(
81413
+ return await backendAsAServiceClient.upsertAppEnvironmentVariables(
81365
81414
  appProject.id,
81366
81415
  DEFAULT_ENVIRONMENT_NAME,
81367
81416
  {
@@ -81372,13 +81421,10 @@ var createAppProjectAndEnvironment = async ({
81372
81421
  }
81373
81422
  );
81374
81423
  }
81375
- if (!appEnvironment) {
81376
- appEnvironment = await backendAsAServiceClient.getAppEnvironmentByName(
81377
- appProject.id,
81378
- DEFAULT_ENVIRONMENT_NAME
81379
- );
81380
- }
81381
- return { variables: appEnvironment.variables };
81424
+ return await backendAsAServiceClient.getAppEnvironmentVariables(
81425
+ appProject.id,
81426
+ DEFAULT_ENVIRONMENT_NAME
81427
+ );
81382
81428
  };
81383
81429
  function generateRandomSlug() {
81384
81430
  return randomBytes(8).toString("hex");
@@ -81409,7 +81455,7 @@ var useAppCreation = ({ extendAppId }) => {
81409
81455
  }
81410
81456
  })
81411
81457
  );
81412
- const { variables: environmentVariables } = await createAppProjectAndEnvironment({
81458
+ const environmentVariables = await createAppProjectAndEnvironment({
81413
81459
  appId,
81414
81460
  appName,
81415
81461
  devCenterClient,
@@ -81646,7 +81692,7 @@ var ExistingAppFlow = ({
81646
81692
  );
81647
81693
  const registerAppCallback = useAsyncCallback3(
81648
81694
  async (_2, { appData, packageName }) => {
81649
- const { variables } = await createAppProjectAndEnvironment({
81695
+ const environmentVariables = await createAppProjectAndEnvironment({
81650
81696
  appId: appData.appId,
81651
81697
  appName: appData.appName,
81652
81698
  devCenterClient,
@@ -81657,7 +81703,7 @@ var ExistingAppFlow = ({
81657
81703
  packageName,
81658
81704
  template: TemplateSource.Default(),
81659
81705
  mcpConfigResult: McpConfigResult.Canceled(),
81660
- environmentVariables: variables
81706
+ environmentVariables
81661
81707
  });
81662
81708
  }
81663
81709
  );
@@ -81928,7 +81974,7 @@ function getTasks({
81928
81974
  cause: e2
81929
81975
  });
81930
81976
  }
81931
- const { generateApp } = await import("./generator-PWWNQSLZ.js");
81977
+ const { generateApp } = await import("./generator-RMZDEH6M.js");
81932
81978
  await generateApp({
81933
81979
  packageName,
81934
81980
  packageFolder,
@@ -82713,7 +82759,7 @@ var useCreateProject = (businessId) => {
82713
82759
  } = useDevCenterClient({
82714
82760
  siteId: businessId
82715
82761
  });
82716
- const { createAppProject: createAppProject2, upsertAppEnvironment: upsertAppEnvironment2 } = useBackendAsAServiceClient();
82762
+ const { createAppProject: createAppProject2, upsertAppEnvironmentVariables } = useBackendAsAServiceClient();
82717
82763
  return useAsyncCallback3(
82718
82764
  async (_2, {
82719
82765
  businessName,
@@ -82754,7 +82800,7 @@ var useCreateProject = (businessId) => {
82754
82800
  ],
82755
82801
  redirectUrlWixPages: prodBaseDomain
82756
82802
  });
82757
- const appEnvironment = await upsertAppEnvironment2(
82803
+ const environmentVariables = await upsertAppEnvironmentVariables(
82758
82804
  appProject.id,
82759
82805
  DEFAULT_ENVIRONMENT_NAME2,
82760
82806
  {
@@ -82770,7 +82816,7 @@ var useCreateProject = (businessId) => {
82770
82816
  instanceId: appInstall.appInstance.id,
82771
82817
  appSecret: publicKeyAndSecret.appSecret,
82772
82818
  webhookPublicKey: publicKeyAndSecret.webhookPublicKey,
82773
- environmentVariables: appEnvironment.variables,
82819
+ environmentVariables,
82774
82820
  baseUrl: appProject.baseUrl
82775
82821
  };
82776
82822
  return projectData;
@@ -92805,14 +92851,14 @@ var Action;
92805
92851
  Action2["OVERWRITE"] = "OVERWRITE";
92806
92852
  Action2["COPY"] = "COPY";
92807
92853
  })(Action || (Action = {}));
92808
- var WebhookIdentityType6;
92809
- (function(WebhookIdentityType10) {
92810
- WebhookIdentityType10["UNKNOWN"] = "UNKNOWN";
92811
- WebhookIdentityType10["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
92812
- WebhookIdentityType10["MEMBER"] = "MEMBER";
92813
- WebhookIdentityType10["WIX_USER"] = "WIX_USER";
92814
- WebhookIdentityType10["APP"] = "APP";
92815
- })(WebhookIdentityType6 || (WebhookIdentityType6 = {}));
92854
+ var WebhookIdentityType7;
92855
+ (function(WebhookIdentityType11) {
92856
+ WebhookIdentityType11["UNKNOWN"] = "UNKNOWN";
92857
+ WebhookIdentityType11["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
92858
+ WebhookIdentityType11["MEMBER"] = "MEMBER";
92859
+ WebhookIdentityType11["WIX_USER"] = "WIX_USER";
92860
+ WebhookIdentityType11["APP"] = "APP";
92861
+ })(WebhookIdentityType7 || (WebhookIdentityType7 = {}));
92816
92862
 
92817
92863
  // ../../node_modules/@wix/ambassador-velo-github-v1-github-onboarding-status/build/es/types.impl.js
92818
92864
  init_esm_shims();
@@ -92894,14 +92940,14 @@ var DeleteStatus;
92894
92940
  DeleteStatus2["PENDING_PURGE"] = "PENDING_PURGE";
92895
92941
  DeleteStatus2["PURGED_EXTERNALLY"] = "PURGED_EXTERNALLY";
92896
92942
  })(DeleteStatus || (DeleteStatus = {}));
92897
- var WebhookIdentityType7;
92898
- (function(WebhookIdentityType10) {
92899
- WebhookIdentityType10["UNKNOWN"] = "UNKNOWN";
92900
- WebhookIdentityType10["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
92901
- WebhookIdentityType10["MEMBER"] = "MEMBER";
92902
- WebhookIdentityType10["WIX_USER"] = "WIX_USER";
92903
- WebhookIdentityType10["APP"] = "APP";
92904
- })(WebhookIdentityType7 || (WebhookIdentityType7 = {}));
92943
+ var WebhookIdentityType8;
92944
+ (function(WebhookIdentityType11) {
92945
+ WebhookIdentityType11["UNKNOWN"] = "UNKNOWN";
92946
+ WebhookIdentityType11["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
92947
+ WebhookIdentityType11["MEMBER"] = "MEMBER";
92948
+ WebhookIdentityType11["WIX_USER"] = "WIX_USER";
92949
+ WebhookIdentityType11["APP"] = "APP";
92950
+ })(WebhookIdentityType8 || (WebhookIdentityType8 = {}));
92905
92951
 
92906
92952
  // ../velo-client/src/velo-client.ts
92907
92953
  init_esm_shims();
@@ -92932,14 +92978,14 @@ var RcLabel;
92932
92978
  RcLabel2["UNKNOWN"] = "UNKNOWN";
92933
92979
  RcLabel2["WIX_CLI"] = "WIX_CLI";
92934
92980
  })(RcLabel || (RcLabel = {}));
92935
- var WebhookIdentityType8;
92936
- (function(WebhookIdentityType10) {
92937
- WebhookIdentityType10["UNKNOWN"] = "UNKNOWN";
92938
- WebhookIdentityType10["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
92939
- WebhookIdentityType10["MEMBER"] = "MEMBER";
92940
- WebhookIdentityType10["WIX_USER"] = "WIX_USER";
92941
- WebhookIdentityType10["APP"] = "APP";
92942
- })(WebhookIdentityType8 || (WebhookIdentityType8 = {}));
92981
+ var WebhookIdentityType9;
92982
+ (function(WebhookIdentityType11) {
92983
+ WebhookIdentityType11["UNKNOWN"] = "UNKNOWN";
92984
+ WebhookIdentityType11["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
92985
+ WebhookIdentityType11["MEMBER"] = "MEMBER";
92986
+ WebhookIdentityType11["WIX_USER"] = "WIX_USER";
92987
+ WebhookIdentityType11["APP"] = "APP";
92988
+ })(WebhookIdentityType9 || (WebhookIdentityType9 = {}));
92943
92989
 
92944
92990
  // ../../node_modules/@wix/ambassador-velo-apps-v1-app/build/es/http.impl.js
92945
92991
  init_esm_shims();
@@ -93607,19 +93653,19 @@ var GitRemoteType;
93607
93653
  GitRemoteType2["S3"] = "S3";
93608
93654
  GitRemoteType2["GITHUB"] = "GITHUB";
93609
93655
  })(GitRemoteType || (GitRemoteType = {}));
93610
- var WebhookIdentityType9;
93611
- (function(WebhookIdentityType10) {
93612
- WebhookIdentityType10["UNKNOWN"] = "UNKNOWN";
93613
- WebhookIdentityType10["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
93614
- WebhookIdentityType10["MEMBER"] = "MEMBER";
93615
- WebhookIdentityType10["WIX_USER"] = "WIX_USER";
93616
- WebhookIdentityType10["APP"] = "APP";
93617
- })(WebhookIdentityType9 || (WebhookIdentityType9 = {}));
93618
- var SortOrder3;
93619
- (function(SortOrder4) {
93620
- SortOrder4["ASC"] = "ASC";
93621
- SortOrder4["DESC"] = "DESC";
93622
- })(SortOrder3 || (SortOrder3 = {}));
93656
+ var WebhookIdentityType10;
93657
+ (function(WebhookIdentityType11) {
93658
+ WebhookIdentityType11["UNKNOWN"] = "UNKNOWN";
93659
+ WebhookIdentityType11["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
93660
+ WebhookIdentityType11["MEMBER"] = "MEMBER";
93661
+ WebhookIdentityType11["WIX_USER"] = "WIX_USER";
93662
+ WebhookIdentityType11["APP"] = "APP";
93663
+ })(WebhookIdentityType10 || (WebhookIdentityType10 = {}));
93664
+ var SortOrder4;
93665
+ (function(SortOrder5) {
93666
+ SortOrder5["ASC"] = "ASC";
93667
+ SortOrder5["DESC"] = "DESC";
93668
+ })(SortOrder4 || (SortOrder4 = {}));
93623
93669
 
93624
93670
  // ../codestore-client/src/schemas.ts
93625
93671
  init_esm_shims();
@@ -94318,7 +94364,7 @@ import { randomUUID as randomUUID3 } from "node:crypto";
94318
94364
  var package_default = {
94319
94365
  name: "@wix/create-new",
94320
94366
  description: "General entry point for creating Wix projects",
94321
- version: "0.0.80",
94367
+ version: "0.0.82",
94322
94368
  bin: "bin/index.cjs",
94323
94369
  devDependencies: {
94324
94370
  "@commander-js/extra-typings": "^13.0.0",