@modern-js/server-generator 3.1.28 → 3.1.29
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/dist/index.js +13 -9
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -117947,16 +117947,20 @@ var import_utils2 = __toESM(require_cjs());
|
|
|
117947
117947
|
function isPackageExist(packageName, registry2) {
|
|
117948
117948
|
return __async(this, null, function* () {
|
|
117949
117949
|
if (yield (0, import_utils2.canUseNpm)()) {
|
|
117950
|
-
|
|
117951
|
-
|
|
117952
|
-
|
|
117953
|
-
|
|
117954
|
-
|
|
117955
|
-
|
|
117956
|
-
|
|
117950
|
+
try {
|
|
117951
|
+
const args = [
|
|
117952
|
+
"view",
|
|
117953
|
+
packageName,
|
|
117954
|
+
"version"
|
|
117955
|
+
];
|
|
117956
|
+
if (registry2) {
|
|
117957
|
+
args.push(`--registry=${registry2}`);
|
|
117958
|
+
}
|
|
117959
|
+
const result = yield (0, import_utils2.execa)("npm", args);
|
|
117960
|
+
return (0, import_utils2.stripAnsi)(result.stdout);
|
|
117961
|
+
} catch (e) {
|
|
117962
|
+
return false;
|
|
117957
117963
|
}
|
|
117958
|
-
const result = yield (0, import_utils2.execa)("npm", args);
|
|
117959
|
-
return (0, import_utils2.stripAnsi)(result.stdout);
|
|
117960
117964
|
}
|
|
117961
117965
|
throw new Error("not found npm, please install npm before");
|
|
117962
117966
|
});
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.1.
|
|
18
|
+
"version": "3.1.29",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./src/index.ts",
|
|
21
21
|
"main": "./dist/index.js",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"@types/node": "^14",
|
|
32
32
|
"jest": "^29",
|
|
33
33
|
"typescript": "^5",
|
|
34
|
-
"@modern-js/generator-common": "3.1.
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
38
|
-
"@
|
|
34
|
+
"@modern-js/generator-common": "3.1.29",
|
|
35
|
+
"@scripts/jest-config": "2.27.0",
|
|
36
|
+
"@modern-js/dependence-generator": "3.1.29",
|
|
37
|
+
"@scripts/build": "2.27.0",
|
|
38
|
+
"@modern-js/generator-utils": "3.1.29"
|
|
39
39
|
},
|
|
40
40
|
"sideEffects": false,
|
|
41
41
|
"publishConfig": {
|