@wix/create-app 0.0.93 → 0.0.95
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 +101 -19
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -56909,6 +56909,7 @@ var testOverridesSchema = z.object({
|
|
|
56909
56909
|
inkDebug: z.boolean().optional(),
|
|
56910
56910
|
minRetryTimeout: z.number().optional(),
|
|
56911
56911
|
pollInterval: z.number().optional(),
|
|
56912
|
+
pollTimeout: z.number().optional(),
|
|
56912
56913
|
debounceQueueWait: z.number().optional(),
|
|
56913
56914
|
sentryDsn: z.string().optional(),
|
|
56914
56915
|
userBrowserTestEndpoint: z.string().url().optional(),
|
|
@@ -57003,6 +57004,7 @@ var CliSystemErrorCode = (0, import_variant11.variant)({
|
|
|
57003
57004
|
FailedToDeleteTunnel: {},
|
|
57004
57005
|
FailedToGetBlocksExtensionsData: {},
|
|
57005
57006
|
FailedToGetBlocksStructure: {},
|
|
57007
|
+
FailedToUpdateBlocksAfterSync: {},
|
|
57006
57008
|
GridAppFailedToUpdateFiles: {},
|
|
57007
57009
|
FailedToCreateGridApp: (0, import_variant11.fields)(),
|
|
57008
57010
|
InvalidResponseData: {},
|
|
@@ -57075,7 +57077,8 @@ var CliSystemErrorCode = (0, import_variant11.variant)({
|
|
|
57075
57077
|
WaitForEditorInstallationStateFailure: {},
|
|
57076
57078
|
EditorPendingInstallationCheckTimedout: {},
|
|
57077
57079
|
FailedToParseLatestVersion: (0, import_variant11.fields)(),
|
|
57078
|
-
FailedToGetMonitoringLoaderScript: (0, import_variant11.fields)()
|
|
57080
|
+
FailedToGetMonitoringLoaderScript: (0, import_variant11.fields)(),
|
|
57081
|
+
FailedToFetchWixLockFile: {}
|
|
57079
57082
|
});
|
|
57080
57083
|
var CliUserErrorCode = (0, import_variant11.variant)({
|
|
57081
57084
|
LatestVersionOfCreateAppRequired: (0, import_variant11.fields)(),
|
|
@@ -66261,11 +66264,18 @@ if (typeof module !== "undefined") {
|
|
|
66261
66264
|
// ../cli-error-reporting/src/components/ErrorMessage.tsx
|
|
66262
66265
|
init_esm_shims();
|
|
66263
66266
|
var import_react74 = __toESM(require_react(), 1);
|
|
66267
|
+
function getOriginalCause(error) {
|
|
66268
|
+
if (isCliError(error)) {
|
|
66269
|
+
return getOriginalCause(error.cause());
|
|
66270
|
+
}
|
|
66271
|
+
return error;
|
|
66272
|
+
}
|
|
66264
66273
|
var ErrorMessage = ({ message, cause, explanation, hint }) => {
|
|
66274
|
+
const originalCause = getOriginalCause(cause);
|
|
66265
66275
|
return /* @__PURE__ */ import_react74.default.createElement(
|
|
66266
66276
|
ErrorDetails,
|
|
66267
66277
|
{
|
|
66268
|
-
message:
|
|
66278
|
+
message: originalCause ? /* @__PURE__ */ import_react74.default.createElement(import_react74.default.Fragment, null, message, " Cause: ", originalCause.message) : message,
|
|
66269
66279
|
hint,
|
|
66270
66280
|
explanation
|
|
66271
66281
|
}
|
|
@@ -66446,7 +66456,7 @@ function getErrorComponent(code, cause) {
|
|
|
66446
66456
|
return () => /* @__PURE__ */ import_react77.default.createElement(
|
|
66447
66457
|
ErrorMessage,
|
|
66448
66458
|
{
|
|
66449
|
-
message: `
|
|
66459
|
+
message: `Unsupported package manager detected. Please use a supported one.`,
|
|
66450
66460
|
hint: `Expected Yarn or NPM but ${packageManagerName ? `got ${packageManagerName}` : `failed to detect a package manager`}`
|
|
66451
66461
|
}
|
|
66452
66462
|
);
|
|
@@ -66480,6 +66490,9 @@ function getErrorComponent(code, cause) {
|
|
|
66480
66490
|
FailedToGetBlocksStructure: () => {
|
|
66481
66491
|
return () => /* @__PURE__ */ import_react77.default.createElement(SystemErrorMessage, { message: "Failed to get blocks structure" });
|
|
66482
66492
|
},
|
|
66493
|
+
FailedToUpdateBlocksAfterSync: () => {
|
|
66494
|
+
return () => /* @__PURE__ */ import_react77.default.createElement(ErrorMessage, { message: "Failed updating blocks service after changes occoured" });
|
|
66495
|
+
},
|
|
66483
66496
|
SitePermissionDenied: ({ siteId }) => {
|
|
66484
66497
|
return () => {
|
|
66485
66498
|
return /* @__PURE__ */ import_react77.default.createElement(
|
|
@@ -67074,7 +67087,7 @@ function getErrorComponent(code, cause) {
|
|
|
67074
67087
|
return () => /* @__PURE__ */ import_react77.default.createElement(SystemErrorMessage, { message: "Failed to fetch cli package details." });
|
|
67075
67088
|
},
|
|
67076
67089
|
FailedToGetResolveNpmDependenciesResult: () => {
|
|
67077
|
-
return () => /* @__PURE__ */ import_react77.default.createElement(SystemErrorMessage, { message:
|
|
67090
|
+
return () => /* @__PURE__ */ import_react77.default.createElement(SystemErrorMessage, { message: `Failed to resolve "wix.lock" file.` });
|
|
67078
67091
|
},
|
|
67079
67092
|
CliAppVersionMismatch: ({ cliVersion, cliAppVersion }) => {
|
|
67080
67093
|
return () => /* @__PURE__ */ import_react77.default.createElement(
|
|
@@ -67507,6 +67520,9 @@ ${errorMessage}`
|
|
|
67507
67520
|
message: `The version "${version2}" produced by the system does not conform to the expected semantic versioning format and could not be parsed.`
|
|
67508
67521
|
}
|
|
67509
67522
|
);
|
|
67523
|
+
},
|
|
67524
|
+
FailedToFetchWixLockFile: () => {
|
|
67525
|
+
return () => /* @__PURE__ */ import_react77.default.createElement(SystemErrorMessage, { message: `Failed to fetch "wix.lock" file.` });
|
|
67510
67526
|
}
|
|
67511
67527
|
});
|
|
67512
67528
|
}
|
|
@@ -70997,7 +71013,7 @@ function reportCommandStartEvent({
|
|
|
70997
71013
|
}
|
|
70998
71014
|
|
|
70999
71015
|
// package.json
|
|
71000
|
-
var version = "0.0.
|
|
71016
|
+
var version = "0.0.95";
|
|
71001
71017
|
var package_default = {
|
|
71002
71018
|
name: "@wix/create-app",
|
|
71003
71019
|
description: "Create Wix apps",
|
|
@@ -72866,14 +72882,6 @@ async function isUsingWorkspaces(rootDir) {
|
|
|
72866
72882
|
var NPM = class {
|
|
72867
72883
|
constructor(repoType) {
|
|
72868
72884
|
this.repoType = repoType;
|
|
72869
|
-
if ((0, import_variant26.isType)(repoType, RepoType.Monorepo)) {
|
|
72870
|
-
throw new CliError({
|
|
72871
|
-
code: CliErrorCode.UnsupportedPackageManagerWorkspaces({
|
|
72872
|
-
packageManagerName: this.name
|
|
72873
|
-
}),
|
|
72874
|
-
cause: null
|
|
72875
|
-
});
|
|
72876
|
-
}
|
|
72877
72885
|
}
|
|
72878
72886
|
name = "npm";
|
|
72879
72887
|
getUsage(name) {
|
|
@@ -72886,9 +72894,47 @@ var NPM = class {
|
|
|
72886
72894
|
return "npm run";
|
|
72887
72895
|
}
|
|
72888
72896
|
async setup(_cwd) {
|
|
72897
|
+
if ((0, import_variant26.isType)(this.repoType, RepoType.Monorepo)) {
|
|
72898
|
+
throw new CliError({
|
|
72899
|
+
code: CliErrorCode.UnsupportedPackageManagerWorkspaces({
|
|
72900
|
+
packageManagerName: this.name
|
|
72901
|
+
}),
|
|
72902
|
+
cause: null
|
|
72903
|
+
});
|
|
72904
|
+
}
|
|
72889
72905
|
}
|
|
72890
72906
|
async runInstall(cwd3) {
|
|
72891
|
-
|
|
72907
|
+
try {
|
|
72908
|
+
await runCommand(this.getInstallCmd(), { cwd: cwd3 });
|
|
72909
|
+
} catch (e2) {
|
|
72910
|
+
throw new CliError({
|
|
72911
|
+
code: CliErrorCode.FailedToInstallPackages(),
|
|
72912
|
+
info: { packageManager: this.name },
|
|
72913
|
+
cause: e2
|
|
72914
|
+
});
|
|
72915
|
+
}
|
|
72916
|
+
}
|
|
72917
|
+
async runInstallPackage(cwd3, packageName) {
|
|
72918
|
+
try {
|
|
72919
|
+
await runCommand(`npm install ${packageName}`, { cwd: cwd3 });
|
|
72920
|
+
} catch (e2) {
|
|
72921
|
+
throw new CliError({
|
|
72922
|
+
code: CliErrorCode.FailedToInstallPackage({ packageName }),
|
|
72923
|
+
info: { packageManager: this.name },
|
|
72924
|
+
cause: e2
|
|
72925
|
+
});
|
|
72926
|
+
}
|
|
72927
|
+
}
|
|
72928
|
+
async runUninstallPackage(cwd3, packageName) {
|
|
72929
|
+
try {
|
|
72930
|
+
await runCommand(`npm uninstall ${packageName}`, { cwd: cwd3 });
|
|
72931
|
+
} catch (e2) {
|
|
72932
|
+
throw new CliError({
|
|
72933
|
+
code: CliErrorCode.FailedToUninstallPackage({ packageName }),
|
|
72934
|
+
info: { packageManager: this.name },
|
|
72935
|
+
cause: e2
|
|
72936
|
+
});
|
|
72937
|
+
}
|
|
72892
72938
|
}
|
|
72893
72939
|
};
|
|
72894
72940
|
|
|
@@ -72937,7 +72983,37 @@ var Yarn = class {
|
|
|
72937
72983
|
}).complete();
|
|
72938
72984
|
}
|
|
72939
72985
|
async runInstall(cwd3) {
|
|
72940
|
-
|
|
72986
|
+
try {
|
|
72987
|
+
await runCommand(this.getInstallCmd(), { cwd: cwd3 });
|
|
72988
|
+
} catch (e2) {
|
|
72989
|
+
throw new CliError({
|
|
72990
|
+
code: CliErrorCode.FailedToInstallPackages(),
|
|
72991
|
+
info: { packageManager: this.name },
|
|
72992
|
+
cause: e2
|
|
72993
|
+
});
|
|
72994
|
+
}
|
|
72995
|
+
}
|
|
72996
|
+
async runInstallPackage(cwd3, packageName) {
|
|
72997
|
+
try {
|
|
72998
|
+
await runCommand(`yarn add ${packageName}`, { cwd: cwd3 });
|
|
72999
|
+
} catch (e2) {
|
|
73000
|
+
throw new CliError({
|
|
73001
|
+
code: CliErrorCode.FailedToInstallPackage({ packageName }),
|
|
73002
|
+
info: { packageManager: this.name },
|
|
73003
|
+
cause: e2
|
|
73004
|
+
});
|
|
73005
|
+
}
|
|
73006
|
+
}
|
|
73007
|
+
async runUninstallPackage(cwd3, packageName) {
|
|
73008
|
+
try {
|
|
73009
|
+
await runCommand(`yarn remove ${packageName}`, { cwd: cwd3 });
|
|
73010
|
+
} catch (e2) {
|
|
73011
|
+
throw new CliError({
|
|
73012
|
+
code: CliErrorCode.FailedToUninstallPackage({ packageName }),
|
|
73013
|
+
info: { packageManager: this.name },
|
|
73014
|
+
cause: e2
|
|
73015
|
+
});
|
|
73016
|
+
}
|
|
72941
73017
|
}
|
|
72942
73018
|
};
|
|
72943
73019
|
async function getPackagesRelativePaths(rootDir, yarnVersion) {
|
|
@@ -75135,6 +75211,12 @@ function resolveComWixpressDevcenterDsmDevelopmentSitesManagerUrl(opts) {
|
|
|
75135
75211
|
srcPath: "/_api/development-sites-manager",
|
|
75136
75212
|
destPath: ""
|
|
75137
75213
|
}
|
|
75214
|
+
],
|
|
75215
|
+
"www._base_domain_": [
|
|
75216
|
+
{
|
|
75217
|
+
srcPath: "/_api/development-sites-manager",
|
|
75218
|
+
destPath: ""
|
|
75219
|
+
}
|
|
75138
75220
|
]
|
|
75139
75221
|
};
|
|
75140
75222
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
@@ -79467,7 +79549,7 @@ var marketListingSchema = z.object({
|
|
|
79467
79549
|
slug: z.string()
|
|
79468
79550
|
})
|
|
79469
79551
|
)
|
|
79470
|
-
})
|
|
79552
|
+
}).optional()
|
|
79471
79553
|
});
|
|
79472
79554
|
var managedAppsSchema = z.object({
|
|
79473
79555
|
managedApps: z.array(
|
|
@@ -79674,7 +79756,7 @@ var DevCenterClient = class {
|
|
|
79674
79756
|
getRequiredAppIds = async (appId) => {
|
|
79675
79757
|
try {
|
|
79676
79758
|
const marketListing = await this.getMarketListing(appId);
|
|
79677
|
-
return marketListing?.installationRequirement
|
|
79759
|
+
return marketListing?.installationRequirement?.requiredApps.map(
|
|
79678
79760
|
({ id }) => id
|
|
79679
79761
|
) ?? [];
|
|
79680
79762
|
} catch (e2) {
|
|
@@ -79718,12 +79800,12 @@ var DevCenterClient = class {
|
|
|
79718
79800
|
}) => {
|
|
79719
79801
|
try {
|
|
79720
79802
|
const marketListing = await this.getMarketListing(appId);
|
|
79721
|
-
const appAlreadyRequired = marketListing?.installationRequirement
|
|
79803
|
+
const appAlreadyRequired = marketListing?.installationRequirement?.requiredApps.some(
|
|
79722
79804
|
(requiredApp2) => requiredApp2.id === appIdToRequire
|
|
79723
79805
|
);
|
|
79724
79806
|
if (marketListing && !appAlreadyRequired) {
|
|
79725
79807
|
const newRequiredApps = [
|
|
79726
|
-
...marketListing.installationRequirement
|
|
79808
|
+
...marketListing.installationRequirement?.requiredApps ?? [],
|
|
79727
79809
|
{
|
|
79728
79810
|
id: appIdToRequire,
|
|
79729
79811
|
slug: appIdToRequire
|