@wix/create-app 0.0.94 → 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 +91 -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(),
|
|
@@ -57076,7 +57077,8 @@ var CliSystemErrorCode = (0, import_variant11.variant)({
|
|
|
57076
57077
|
WaitForEditorInstallationStateFailure: {},
|
|
57077
57078
|
EditorPendingInstallationCheckTimedout: {},
|
|
57078
57079
|
FailedToParseLatestVersion: (0, import_variant11.fields)(),
|
|
57079
|
-
FailedToGetMonitoringLoaderScript: (0, import_variant11.fields)()
|
|
57080
|
+
FailedToGetMonitoringLoaderScript: (0, import_variant11.fields)(),
|
|
57081
|
+
FailedToFetchWixLockFile: {}
|
|
57080
57082
|
});
|
|
57081
57083
|
var CliUserErrorCode = (0, import_variant11.variant)({
|
|
57082
57084
|
LatestVersionOfCreateAppRequired: (0, import_variant11.fields)(),
|
|
@@ -66262,11 +66264,18 @@ if (typeof module !== "undefined") {
|
|
|
66262
66264
|
// ../cli-error-reporting/src/components/ErrorMessage.tsx
|
|
66263
66265
|
init_esm_shims();
|
|
66264
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
|
+
}
|
|
66265
66273
|
var ErrorMessage = ({ message, cause, explanation, hint }) => {
|
|
66274
|
+
const originalCause = getOriginalCause(cause);
|
|
66266
66275
|
return /* @__PURE__ */ import_react74.default.createElement(
|
|
66267
66276
|
ErrorDetails,
|
|
66268
66277
|
{
|
|
66269
|
-
message:
|
|
66278
|
+
message: originalCause ? /* @__PURE__ */ import_react74.default.createElement(import_react74.default.Fragment, null, message, " Cause: ", originalCause.message) : message,
|
|
66270
66279
|
hint,
|
|
66271
66280
|
explanation
|
|
66272
66281
|
}
|
|
@@ -66447,7 +66456,7 @@ function getErrorComponent(code, cause) {
|
|
|
66447
66456
|
return () => /* @__PURE__ */ import_react77.default.createElement(
|
|
66448
66457
|
ErrorMessage,
|
|
66449
66458
|
{
|
|
66450
|
-
message: `
|
|
66459
|
+
message: `Unsupported package manager detected. Please use a supported one.`,
|
|
66451
66460
|
hint: `Expected Yarn or NPM but ${packageManagerName ? `got ${packageManagerName}` : `failed to detect a package manager`}`
|
|
66452
66461
|
}
|
|
66453
66462
|
);
|
|
@@ -67078,7 +67087,7 @@ function getErrorComponent(code, cause) {
|
|
|
67078
67087
|
return () => /* @__PURE__ */ import_react77.default.createElement(SystemErrorMessage, { message: "Failed to fetch cli package details." });
|
|
67079
67088
|
},
|
|
67080
67089
|
FailedToGetResolveNpmDependenciesResult: () => {
|
|
67081
|
-
return () => /* @__PURE__ */ import_react77.default.createElement(SystemErrorMessage, { message:
|
|
67090
|
+
return () => /* @__PURE__ */ import_react77.default.createElement(SystemErrorMessage, { message: `Failed to resolve "wix.lock" file.` });
|
|
67082
67091
|
},
|
|
67083
67092
|
CliAppVersionMismatch: ({ cliVersion, cliAppVersion }) => {
|
|
67084
67093
|
return () => /* @__PURE__ */ import_react77.default.createElement(
|
|
@@ -67511,6 +67520,9 @@ ${errorMessage}`
|
|
|
67511
67520
|
message: `The version "${version2}" produced by the system does not conform to the expected semantic versioning format and could not be parsed.`
|
|
67512
67521
|
}
|
|
67513
67522
|
);
|
|
67523
|
+
},
|
|
67524
|
+
FailedToFetchWixLockFile: () => {
|
|
67525
|
+
return () => /* @__PURE__ */ import_react77.default.createElement(SystemErrorMessage, { message: `Failed to fetch "wix.lock" file.` });
|
|
67514
67526
|
}
|
|
67515
67527
|
});
|
|
67516
67528
|
}
|
|
@@ -71001,7 +71013,7 @@ function reportCommandStartEvent({
|
|
|
71001
71013
|
}
|
|
71002
71014
|
|
|
71003
71015
|
// package.json
|
|
71004
|
-
var version = "0.0.
|
|
71016
|
+
var version = "0.0.95";
|
|
71005
71017
|
var package_default = {
|
|
71006
71018
|
name: "@wix/create-app",
|
|
71007
71019
|
description: "Create Wix apps",
|
|
@@ -72870,14 +72882,6 @@ async function isUsingWorkspaces(rootDir) {
|
|
|
72870
72882
|
var NPM = class {
|
|
72871
72883
|
constructor(repoType) {
|
|
72872
72884
|
this.repoType = repoType;
|
|
72873
|
-
if ((0, import_variant26.isType)(repoType, RepoType.Monorepo)) {
|
|
72874
|
-
throw new CliError({
|
|
72875
|
-
code: CliErrorCode.UnsupportedPackageManagerWorkspaces({
|
|
72876
|
-
packageManagerName: this.name
|
|
72877
|
-
}),
|
|
72878
|
-
cause: null
|
|
72879
|
-
});
|
|
72880
|
-
}
|
|
72881
72885
|
}
|
|
72882
72886
|
name = "npm";
|
|
72883
72887
|
getUsage(name) {
|
|
@@ -72890,9 +72894,47 @@ var NPM = class {
|
|
|
72890
72894
|
return "npm run";
|
|
72891
72895
|
}
|
|
72892
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
|
+
}
|
|
72893
72905
|
}
|
|
72894
72906
|
async runInstall(cwd3) {
|
|
72895
|
-
|
|
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
|
+
}
|
|
72896
72938
|
}
|
|
72897
72939
|
};
|
|
72898
72940
|
|
|
@@ -72941,7 +72983,37 @@ var Yarn = class {
|
|
|
72941
72983
|
}).complete();
|
|
72942
72984
|
}
|
|
72943
72985
|
async runInstall(cwd3) {
|
|
72944
|
-
|
|
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
|
+
}
|
|
72945
73017
|
}
|
|
72946
73018
|
};
|
|
72947
73019
|
async function getPackagesRelativePaths(rootDir, yarnVersion) {
|
|
@@ -79477,7 +79549,7 @@ var marketListingSchema = z.object({
|
|
|
79477
79549
|
slug: z.string()
|
|
79478
79550
|
})
|
|
79479
79551
|
)
|
|
79480
|
-
})
|
|
79552
|
+
}).optional()
|
|
79481
79553
|
});
|
|
79482
79554
|
var managedAppsSchema = z.object({
|
|
79483
79555
|
managedApps: z.array(
|
|
@@ -79684,7 +79756,7 @@ var DevCenterClient = class {
|
|
|
79684
79756
|
getRequiredAppIds = async (appId) => {
|
|
79685
79757
|
try {
|
|
79686
79758
|
const marketListing = await this.getMarketListing(appId);
|
|
79687
|
-
return marketListing?.installationRequirement
|
|
79759
|
+
return marketListing?.installationRequirement?.requiredApps.map(
|
|
79688
79760
|
({ id }) => id
|
|
79689
79761
|
) ?? [];
|
|
79690
79762
|
} catch (e2) {
|
|
@@ -79728,12 +79800,12 @@ var DevCenterClient = class {
|
|
|
79728
79800
|
}) => {
|
|
79729
79801
|
try {
|
|
79730
79802
|
const marketListing = await this.getMarketListing(appId);
|
|
79731
|
-
const appAlreadyRequired = marketListing?.installationRequirement
|
|
79803
|
+
const appAlreadyRequired = marketListing?.installationRequirement?.requiredApps.some(
|
|
79732
79804
|
(requiredApp2) => requiredApp2.id === appIdToRequire
|
|
79733
79805
|
);
|
|
79734
79806
|
if (marketListing && !appAlreadyRequired) {
|
|
79735
79807
|
const newRequiredApps = [
|
|
79736
|
-
...marketListing.installationRequirement
|
|
79808
|
+
...marketListing.installationRequirement?.requiredApps ?? [],
|
|
79737
79809
|
{
|
|
79738
79810
|
id: appIdToRequire,
|
|
79739
79811
|
slug: appIdToRequire
|