@modern-js/repo-generator 0.0.0-next-20221014065800 → 0.0.0-next-20221014085531

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.
Files changed (2) hide show
  1. package/dist/index.js +67 -16
  2. package/package.json +13 -13
package/dist/index.js CHANGED
@@ -44049,13 +44049,20 @@ var require_install = __commonJSMin((exports) => {
44049
44049
  }));
44050
44050
  return promise;
44051
44051
  }
44052
- async function npmInstall2(cwd, registryUrl) {
44052
+ async function npmInstall2({
44053
+ cwd,
44054
+ registryUrl,
44055
+ ignoreScripts
44056
+ }) {
44053
44057
  const canUse = await (0, _env.canUseNpm)();
44054
44058
  if (canUse) {
44055
44059
  const params = ["install"];
44056
44060
  if (registryUrl) {
44057
44061
  params.push(`--registry=${registryUrl}`);
44058
44062
  }
44063
+ if (ignoreScripts) {
44064
+ params.push("--ignore-scripts");
44065
+ }
44059
44066
  return execaWithStreamLog("npm", params, {
44060
44067
  cwd,
44061
44068
  env: process.env
@@ -44063,13 +44070,20 @@ var require_install = __commonJSMin((exports) => {
44063
44070
  }
44064
44071
  throw new Error("please install npm first");
44065
44072
  }
44066
- async function yarnInstall2(cwd, registryUrl) {
44073
+ async function yarnInstall2({
44074
+ cwd,
44075
+ registryUrl,
44076
+ ignoreScripts
44077
+ }) {
44067
44078
  const canUse = await (0, _env.canUseYarn)();
44068
44079
  if (canUse) {
44069
44080
  const params = ["install"];
44070
44081
  if (registryUrl) {
44071
44082
  params.push(`--registry=${registryUrl}`);
44072
44083
  }
44084
+ if (ignoreScripts) {
44085
+ params.push("--ignore-scripts");
44086
+ }
44073
44087
  return execaWithStreamLog("yarn", params, {
44074
44088
  cwd,
44075
44089
  env: process.env
@@ -44077,13 +44091,20 @@ var require_install = __commonJSMin((exports) => {
44077
44091
  }
44078
44092
  throw new Error("please install yarn first");
44079
44093
  }
44080
- async function pnpmInstall2(cwd, registryUrl) {
44094
+ async function pnpmInstall2({
44095
+ cwd,
44096
+ registryUrl,
44097
+ ignoreScripts
44098
+ }) {
44081
44099
  const canUse = await (0, _env.canUsePnpm)();
44082
44100
  if (canUse) {
44083
44101
  const params = ["install"];
44084
44102
  if (registryUrl) {
44085
44103
  params.push(`--registry=${registryUrl}`);
44086
44104
  }
44105
+ if (ignoreScripts) {
44106
+ params.push("--ignore-scripts");
44107
+ }
44087
44108
  return execaWithStreamLog("pnpm", params, {
44088
44109
  cwd,
44089
44110
  env: process.env
@@ -44179,14 +44200,38 @@ var require_node = __commonJSMin((exports) => {
44179
44200
  _defineProperty2(this, "generatorCore", void 0);
44180
44201
  this.generatorCore = generatorCore;
44181
44202
  }
44182
- npmInstall(cwd = this.generatorCore.outputPath) {
44183
- return (0, _utils.npmInstall)(cwd);
44203
+ npmInstall({
44204
+ cwd,
44205
+ registryUrl,
44206
+ ignoreScripts
44207
+ }) {
44208
+ return (0, _utils.npmInstall)({
44209
+ cwd: cwd || this.generatorCore.outputPath,
44210
+ registryUrl,
44211
+ ignoreScripts
44212
+ });
44184
44213
  }
44185
- yarnInstall(cwd = this.generatorCore.outputPath) {
44186
- return (0, _utils.yarnInstall)(cwd);
44214
+ yarnInstall({
44215
+ cwd,
44216
+ registryUrl,
44217
+ ignoreScripts
44218
+ }) {
44219
+ return (0, _utils.yarnInstall)({
44220
+ cwd: cwd || this.generatorCore.outputPath,
44221
+ registryUrl,
44222
+ ignoreScripts
44223
+ });
44187
44224
  }
44188
- pnpmInstall(cwd = this.generatorCore.outputPath) {
44189
- return (0, _utils.pnpmInstall)(cwd);
44225
+ pnpmInstall({
44226
+ cwd,
44227
+ registryUrl,
44228
+ ignoreScripts
44229
+ }) {
44230
+ return (0, _utils.pnpmInstall)({
44231
+ cwd: cwd || this.generatorCore.outputPath,
44232
+ registryUrl,
44233
+ ignoreScripts
44234
+ });
44190
44235
  }
44191
44236
  };
44192
44237
  exports.NpmAPI = NpmAPI;
@@ -112381,7 +112426,7 @@ var require_node8 = __commonJSMin((exports) => {
112381
112426
  }
112382
112427
  return true;
112383
112428
  }
112384
- async runInstall(command) {
112429
+ async runInstall(command, options3) {
112385
112430
  const {
112386
112431
  config: {
112387
112432
  packageManager,
@@ -112395,11 +112440,11 @@ var require_node8 = __commonJSMin((exports) => {
112395
112440
  if (command) {
112396
112441
  intallPromise = (0, _utils.execa)(command);
112397
112442
  } else if (packageManager === "pnpm") {
112398
- intallPromise = this.npmApi.pnpmInstall();
112443
+ intallPromise = this.npmApi.pnpmInstall(options3 || {});
112399
112444
  } else if (packageManager === "yarn") {
112400
- intallPromise = this.npmApi.yarnInstall();
112445
+ intallPromise = this.npmApi.yarnInstall(options3 || {});
112401
112446
  } else {
112402
- intallPromise = this.npmApi.npmInstall();
112447
+ intallPromise = this.npmApi.npmInstall(options3 || {});
112403
112448
  }
112404
112449
  try {
112405
112450
  await intallPromise;
@@ -147287,7 +147332,9 @@ var PluginNpmAPI = /* @__PURE__ */ function() {
147287
147332
  break;
147288
147333
  }
147289
147334
  _context.next = 3;
147290
- return (0, import_codesmith_api_npm.pnpmInstall)(this.projectPath);
147335
+ return (0, import_codesmith_api_npm.pnpmInstall)({
147336
+ cwd: this.projectPath
147337
+ });
147291
147338
  case 3:
147292
147339
  _context.next = 12;
147293
147340
  break;
@@ -147297,13 +147344,17 @@ var PluginNpmAPI = /* @__PURE__ */ function() {
147297
147344
  break;
147298
147345
  }
147299
147346
  _context.next = 8;
147300
- return (0, import_codesmith_api_npm.yarnInstall)(this.projectPath);
147347
+ return (0, import_codesmith_api_npm.yarnInstall)({
147348
+ cwd: this.projectPath
147349
+ });
147301
147350
  case 8:
147302
147351
  _context.next = 12;
147303
147352
  break;
147304
147353
  case 10:
147305
147354
  _context.next = 12;
147306
- return (0, import_codesmith_api_npm.npmInstall)(this.projectPath);
147355
+ return (0, import_codesmith_api_npm.npmInstall)({
147356
+ cwd: this.projectPath
147357
+ });
147307
147358
  case 12:
147308
147359
  case "end":
147309
147360
  return _context.stop();
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "0.0.0-next-20221014065800",
14
+ "version": "0.0.0-next-20221014085531",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "main": "./dist/index.js",
17
17
  "files": [
@@ -23,18 +23,18 @@
23
23
  },
24
24
  "devDependencies": {
25
25
  "@babel/runtime": "^7.18.0",
26
- "@modern-js/base-generator": "0.0.0-next-20221014065800",
27
- "@modern-js/codesmith": "1.6.2",
28
- "@modern-js/codesmith-api-app": "1.6.2",
29
- "@modern-js/generator-common": "0.0.0-next-20221014065800",
30
- "@modern-js/generator-plugin": "0.0.0-next-20221014065800",
31
- "@modern-js/generator-utils": "0.0.0-next-20221014065800",
32
- "@modern-js/module-generator": "0.0.0-next-20221014065800",
33
- "@modern-js/monorepo-generator": "0.0.0-next-20221014065800",
34
- "@modern-js/mwa-generator": "0.0.0-next-20221014065800",
35
- "@modern-js/utils": "0.0.0-next-20221014065800",
36
- "@scripts/build": "0.0.0-next-20221014065800",
37
- "@scripts/jest-config": "0.0.0-next-20221014065800",
26
+ "@modern-js/base-generator": "0.0.0-next-20221014085531",
27
+ "@modern-js/codesmith": "1.6.3",
28
+ "@modern-js/codesmith-api-app": "1.6.3",
29
+ "@modern-js/generator-common": "0.0.0-next-20221014085531",
30
+ "@modern-js/generator-plugin": "0.0.0-next-20221014085531",
31
+ "@modern-js/generator-utils": "0.0.0-next-20221014085531",
32
+ "@modern-js/module-generator": "0.0.0-next-20221014085531",
33
+ "@modern-js/monorepo-generator": "0.0.0-next-20221014085531",
34
+ "@modern-js/mwa-generator": "0.0.0-next-20221014085531",
35
+ "@modern-js/utils": "0.0.0-next-20221014085531",
36
+ "@scripts/build": "0.0.0-next-20221014085531",
37
+ "@scripts/jest-config": "0.0.0-next-20221014085531",
38
38
  "@types/jest": "^27",
39
39
  "@types/node": "^14",
40
40
  "jest": "^27",