@genesislcap/genx 14.162.2 → 14.162.4-alpha-ea9526e.0

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.
@@ -2,7 +2,7 @@ export declare const commands: {
2
2
  clean: () => Promise<(paths?: string[]) => Promise<void>>;
3
3
  run: () => Promise<(task: any, module: any, options: any) => Promise<void>>;
4
4
  runBuilder: () => Promise<(dir: string, options: any, env: import("@genesislcap/build-kit").ENV, command: import("@genesislcap/build-kit").COMMAND) => Promise<void>>;
5
- runSeedCommand: () => Promise<(dir: any, options: any, command?: import("@genesislcap/build-kit").COMMAND) => Promise<void>>;
5
+ runSeedCommand: () => Promise<(dir: any, cliOptions: any, command?: import("@genesislcap/build-kit").COMMAND) => Promise<void>>;
6
6
  serve: () => Promise<(path?: string, options?: import("./serve").ServeOptions) => Promise<void>>;
7
7
  upgrade: () => Promise<(dir: string, options: any) => Promise<void>>;
8
8
  };
@@ -1,4 +1,4 @@
1
1
  import { COMMAND } from '@genesislcap/build-kit';
2
- declare const _default: (dir: any, options: any, command?: COMMAND) => Promise<void>;
2
+ declare const _default: (dir: any, cliOptions: any, command?: COMMAND) => Promise<void>;
3
3
  export default _default;
4
4
  //# sourceMappingURL=run-seed-command.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"run-seed-command.d.ts","sourceRoot":"","sources":["../../src/commands/run-seed-command.ts"],"names":[],"mappings":"AACA,OAAO,EAQL,OAAO,EACR,MAAM,wBAAwB,CAAC;2DAoCa,OAAO;AAApD,wBAgEE"}
1
+ {"version":3,"file":"run-seed-command.d.ts","sourceRoot":"","sources":["../../src/commands/run-seed-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAkC,MAAM,wBAAwB,CAAC;8DAmCjC,OAAO;AAAvD,wBAGE"}
@@ -1,11 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const node_fs_1 = require("node:fs");
5
4
  const build_kit_1 = require("@genesislcap/build-kit");
6
- const consola_1 = require("consola");
7
5
  const getOptions = (options) => {
8
- // param exclusion list needs to be updated if init options change
6
+ // param exclusion list needs to be updated if init/add options change
9
7
  const params = (0, build_kit_1.excludeObjKeys)(options, [
10
8
  'seed',
11
9
  's',
@@ -36,46 +34,7 @@ const getOptions = (options) => {
36
34
  scope: options.scope,
37
35
  };
38
36
  };
39
- exports.default = (dir, options, command = build_kit_1.COMMAND.INIT) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
40
- const start = Date.now();
41
- consola_1.consola.debug('CLI options', { dir, options, command });
42
- const isInit = command === build_kit_1.COMMAND.INIT;
43
- const { insecure, seed, subdir, remote, ref, skipOptionalPrompts, params, isLogLevelVerbose, shell, scope, npm, } = getOptions(options);
44
- if (isLogLevelVerbose) {
45
- // Enables debug output in giget
46
- process.env.DEBUG = '1';
47
- // Debug level https://github.com/unjs/consola#log-level
48
- process.env.CONSOLA_LEVEL = '4';
49
- consola_1.consola.level = 4;
50
- }
51
- // don't overwrite if exists
52
- if (isInit && (0, node_fs_1.existsSync)(dir)) {
53
- consola_1.consola.error(`Target directory ${(0, build_kit_1.bold)(dir)} already exists.`);
54
- process.exit(1);
55
- }
56
- // for add operation there is no default seed - it needs to be specified explicitly
57
- if (!isInit && !seed) {
58
- consola_1.consola.error(`Please specify a seed.`);
59
- process.exit();
60
- }
61
- // fetch remote or copy local seed
62
- const result = yield (0, build_kit_1.fetchSeed)(seed, dir, remote, ref, insecure, subdir, isInit, npm, scope);
63
- consola_1.consola.debug('Seed fetched', result);
64
- // NPM install in .genx folder
65
- yield (0, build_kit_1.installSeedDeps)(result.extractedSeedGenxDir, isLogLevelVerbose);
66
- const seedInfo = yield (0, build_kit_1.loadSeed)(result.extractedSeedGenxDir);
67
- consola_1.consola.debug('Seed loaded', seedInfo);
68
- // run seed configure script
69
- yield (0, build_kit_1.configureSeedApp)(seedInfo, result, params, dir, skipOptionalPrompts, isInit);
70
- const label = isInit ? 'created' : 'updated';
71
- consola_1.consola.success(`Project successfully ${label} in ${Date.now() - start}ms.`);
72
- // show next steps message if defined in seed details
73
- const nextStepsMessage = seedInfo.details.nextStepsMessage;
74
- if (nextStepsMessage === null || nextStepsMessage === void 0 ? void 0 : nextStepsMessage.length) {
75
- consola_1.consola.info(`Next steps: \n` + nextStepsMessage);
76
- }
77
- // launch shell in app dir
78
- if (shell) {
79
- (0, build_kit_1.startShell)(dir);
80
- }
37
+ exports.default = (dir, cliOptions, command = build_kit_1.COMMAND.INIT) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
38
+ const options = getOptions(cliOptions);
39
+ yield (0, build_kit_1.runSeedCommand)(dir, options, command);
81
40
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/genx",
3
3
  "description": "Genx CLI",
4
- "version": "14.162.2",
4
+ "version": "14.162.4-alpha-ea9526e.0",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "engines": {
7
7
  "node": ">=20.0.0"
@@ -19,13 +19,13 @@
19
19
  "typescript": "^4.5.5"
20
20
  },
21
21
  "dependencies": {
22
- "@genesislcap/build-kit": "14.162.2",
23
- "@genesislcap/eslint-stylelint-builder": "14.162.2",
24
- "@genesislcap/rollup-builder": "14.162.2",
25
- "@genesislcap/ts-builder": "14.162.2",
26
- "@genesislcap/uvu-playwright-builder": "14.162.2",
27
- "@genesislcap/vite-builder": "14.162.2",
28
- "@genesislcap/webpack-builder": "14.162.2",
22
+ "@genesislcap/build-kit": "14.162.4-alpha-ea9526e.0",
23
+ "@genesislcap/eslint-stylelint-builder": "14.162.4-alpha-ea9526e.0",
24
+ "@genesislcap/rollup-builder": "14.162.4-alpha-ea9526e.0",
25
+ "@genesislcap/ts-builder": "14.162.4-alpha-ea9526e.0",
26
+ "@genesislcap/uvu-playwright-builder": "14.162.4-alpha-ea9526e.0",
27
+ "@genesislcap/vite-builder": "14.162.4-alpha-ea9526e.0",
28
+ "@genesislcap/webpack-builder": "14.162.4-alpha-ea9526e.0",
29
29
  "cac": "^6.7.14",
30
30
  "consola": "^3.0.2",
31
31
  "serve-handler": "^6.1.5",
@@ -39,5 +39,5 @@
39
39
  "publishConfig": {
40
40
  "access": "public"
41
41
  },
42
- "gitHead": "952099ec5c648c226cf24280e205eff22628c95b"
42
+ "gitHead": "57640122af03a2dbac94236575cf78a40bd4cf49"
43
43
  }