@wix/create-new 0.0.110 → 0.0.112

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
  require_lib,
14
14
  temporaryDirectory,
15
15
  updateEnvFile
16
- } from "./chunk-JNEPCJPC.js";
16
+ } from "./chunk-DO5DLGL7.js";
17
17
  import {
18
18
  __toESM,
19
19
  init_esm_shims
@@ -115,4 +115,4 @@ async function generateApp({
115
115
  export {
116
116
  generateApp
117
117
  };
118
- //# sourceMappingURL=generator-244YLYSZ.js.map
118
+ //# sourceMappingURL=generator-DDPWEUUW.js.map
package/build/index.js CHANGED
@@ -119,7 +119,7 @@ import {
119
119
  writeJson,
120
120
  writePackageJson,
121
121
  zod_default
122
- } from "./chunk-JNEPCJPC.js";
122
+ } from "./chunk-DO5DLGL7.js";
123
123
  import {
124
124
  __commonJS,
125
125
  __dirname,
@@ -67147,6 +67147,16 @@ ${errorMessage2}`
67147
67147
  }
67148
67148
  );
67149
67149
  },
67150
+ PluginInvalidPlatformLinksResult: ({ pluginName, reason }) => {
67151
+ return () => /* @__PURE__ */ import_react84.default.createElement(
67152
+ ErrorMessage,
67153
+ {
67154
+ cause,
67155
+ message: `Plugin "${pluginName}" returned an invalid result from "platformLinks": ${reason}`,
67156
+ hint: `"platformLinks" must return an array of { platform: "site" | "dashboard" | "editor", label: string, url: string }, each platform at most once.`
67157
+ }
67158
+ );
67159
+ },
67150
67160
  PluginHandlerFailed: ({
67151
67161
  handlerName,
67152
67162
  pluginName
@@ -74213,6 +74223,8 @@ function getOrCreateCompanionApp(payload7) {
74213
74223
 
74214
74224
  // ../../node_modules/@wix/ambassador-apps-v1-app-instance/es/build/http.impl.js
74215
74225
  init_esm_shims();
74226
+ var _getInstalledAppsRequest = {};
74227
+ var _getInstalledAppsResponse = { appInstances: "_v1AppInstance" };
74216
74228
  var _installAppRequest = { appInstance: "_v1AppInstance" };
74217
74229
  var _installAppResponse = {
74218
74230
  appInstance: "_v1AppInstance",
@@ -74330,6 +74342,46 @@ function installApp(payload7) {
74330
74342
  __installApp.__isAmbassador = true;
74331
74343
  return __installApp;
74332
74344
  }
74345
+ function getInstalledApps(payload7) {
74346
+ var _a3 = serializer(_getInstalledAppsRequest, {}), toReq = _a3.toJSON, fromReq = _a3.fromJSON;
74347
+ var fromRes = serializer(_getInstalledAppsResponse, {
74348
+ _v1AppInstance
74349
+ }).fromJSON;
74350
+ function __getInstalledApps(_a4) {
74351
+ var host = _a4.host;
74352
+ var serializedData = toReq(payload7);
74353
+ var metadata = {
74354
+ entityFqdn: "wix.apps.v1.app_instance",
74355
+ method: "GET",
74356
+ methodFqn: "wix.devcenter.apps.installer.v1.AppsInstallerService.GetInstalledApps",
74357
+ migrationOptions: {
74358
+ optInTransformResponse: true
74359
+ },
74360
+ url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({
74361
+ protoPath: "/v1/app-instances",
74362
+ data: serializedData,
74363
+ host
74364
+ }),
74365
+ params: toURLSearchParams(serializedData),
74366
+ transformResponse: fromRes,
74367
+ fallback: [
74368
+ {
74369
+ method: "GET",
74370
+ url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({
74371
+ protoPath: "/v1/app-instances",
74372
+ data: serializedData,
74373
+ host
74374
+ }),
74375
+ params: toURLSearchParams(serializedData)
74376
+ }
74377
+ ]
74378
+ };
74379
+ return metadata;
74380
+ }
74381
+ __getInstalledApps.fromReq = fromReq;
74382
+ __getInstalledApps.__isAmbassador = true;
74383
+ return __getInstalledApps;
74384
+ }
74333
74385
 
74334
74386
  // ../../node_modules/@wix/ambassador-apps-v1-app-instance/es/build/types.impl.js
74335
74387
  init_esm_shims();
@@ -80556,6 +80608,9 @@ var marketListingSchema = external_exports.object({
80556
80608
  )
80557
80609
  }).optional()
80558
80610
  });
80611
+ var getInstalledAppsSchema = external_exports.object({
80612
+ appInstances: external_exports.array(external_exports.object({ appDefId: external_exports.string() })).default([])
80613
+ });
80559
80614
  var managedAppsSchema = external_exports.object({
80560
80615
  managedApps: external_exports.array(
80561
80616
  external_exports.object({
@@ -81091,8 +81146,18 @@ var DevCenterClient = class {
81091
81146
  }
81092
81147
  };
81093
81148
  isAppInstalled = async (appId) => {
81094
- const installationDetails = await this.getAppInstallationDetails(appId);
81095
- return installationDetails?.group === AppGroup.PENDING || installationDetails?.group === AppGroup.INSTALLED;
81149
+ try {
81150
+ const { data } = await pRetry(
81151
+ () => this.httpClient.request(getInstalledApps({})),
81152
+ this.retryOptions
81153
+ );
81154
+ return getInstalledAppsSchema.parse(data).appInstances.some((app) => app.appDefId === appId);
81155
+ } catch (e2) {
81156
+ throw new CliError({
81157
+ code: CliErrorCode.FailedToGetAppInstallationDetails({ appId }),
81158
+ cause: e2
81159
+ });
81160
+ }
81096
81161
  };
81097
81162
  isAppInstalledInEditor = async (appId) => {
81098
81163
  const installationDetails = await this.getAppInstallationDetails(appId);
@@ -83196,7 +83261,7 @@ function getTasks({
83196
83261
  cause: e2
83197
83262
  });
83198
83263
  }
83199
- const { generateApp } = await import("./generator-244YLYSZ.js");
83264
+ const { generateApp } = await import("./generator-DDPWEUUW.js");
83200
83265
  await generateApp({
83201
83266
  packageName,
83202
83267
  packageFolder,
@@ -95562,7 +95627,7 @@ import { randomUUID as randomUUID3 } from "node:crypto";
95562
95627
  var package_default = {
95563
95628
  name: "@wix/create-new",
95564
95629
  description: "General entry point for creating Wix projects",
95565
- version: "0.0.110",
95630
+ version: "0.0.112",
95566
95631
  bin: "bin/index.cjs",
95567
95632
  devDependencies: {
95568
95633
  "@commander-js/extra-typings": "^13.0.0",