@pristine-ts/cli 2.0.16 → 2.0.17
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/lib/cjs/bin.js +0 -0
- package/dist/lib/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -12
- package/dist/lib/cjs/bootstrap/app-module-cache.js +0 -71
- package/dist/lib/cjs/bootstrap/app-module-cache.js.map +0 -1
- package/dist/lib/cjs/bootstrap/app-module-discoverer.js +0 -119
- package/dist/lib/cjs/bootstrap/app-module-discoverer.js.map +0 -1
- package/dist/lib/cjs/bootstrap/app-module-discovery-candidate.js +0 -21
- package/dist/lib/cjs/bootstrap/app-module-discovery-candidate.js.map +0 -1
- package/dist/lib/cjs/bootstrap/app-module-discovery-reason.enum.js +0 -15
- package/dist/lib/cjs/bootstrap/app-module-discovery-reason.enum.js.map +0 -1
- package/dist/lib/cjs/bootstrap/app-module-prompt.js +0 -78
- package/dist/lib/cjs/bootstrap/app-module-prompt.js.map +0 -1
- package/dist/lib/cjs/commands/config-init.command.js +0 -133
- package/dist/lib/cjs/commands/config-init.command.js.map +0 -1
- package/dist/lib/cjs/enums/exit-code.enum.js +0 -9
- package/dist/lib/cjs/enums/exit-code.enum.js.map +0 -1
- package/dist/lib/cjs/managers/console.manager.js +0 -277
- package/dist/lib/cjs/managers/console.manager.js.map +0 -1
- package/dist/lib/cjs/managers/repl-session.js +0 -251
- package/dist/lib/cjs/managers/repl-session.js.map +0 -1
- package/dist/lib/esm/bootstrap/app-module-cache.js +0 -65
- package/dist/lib/esm/bootstrap/app-module-cache.js.map +0 -1
- package/dist/lib/esm/bootstrap/app-module-discoverer.js +0 -113
- package/dist/lib/esm/bootstrap/app-module-discoverer.js.map +0 -1
- package/dist/lib/esm/bootstrap/app-module-discovery-candidate.js +0 -17
- package/dist/lib/esm/bootstrap/app-module-discovery-candidate.js.map +0 -1
- package/dist/lib/esm/bootstrap/app-module-discovery-reason.enum.js +0 -12
- package/dist/lib/esm/bootstrap/app-module-discovery-reason.enum.js.map +0 -1
- package/dist/lib/esm/bootstrap/app-module-prompt.js +0 -75
- package/dist/lib/esm/bootstrap/app-module-prompt.js.map +0 -1
- package/dist/lib/esm/commands/config-init.command.js +0 -127
- package/dist/lib/esm/commands/config-init.command.js.map +0 -1
- package/dist/lib/esm/enums/exit-code.enum.js +0 -6
- package/dist/lib/esm/enums/exit-code.enum.js.map +0 -1
- package/dist/lib/esm/managers/console.manager.js +0 -241
- package/dist/lib/esm/managers/console.manager.js.map +0 -1
- package/dist/lib/esm/managers/repl-session.js +0 -215
- package/dist/lib/esm/managers/repl-session.js.map +0 -1
- package/dist/types/bootstrap/app-module-cache.d.ts +0 -15
- package/dist/types/bootstrap/app-module-discoverer.d.ts +0 -30
- package/dist/types/bootstrap/app-module-discovery-candidate.d.ts +0 -18
- package/dist/types/bootstrap/app-module-discovery-reason.enum.d.ts +0 -10
- package/dist/types/bootstrap/app-module-prompt.d.ts +0 -20
- package/dist/types/commands/config-init.command.d.ts +0 -18
- package/dist/types/enums/exit-code.enum.d.ts +0 -4
- package/dist/types/managers/console.manager.d.ts +0 -93
- package/dist/types/managers/repl-session.d.ts +0 -62
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pristine-ts/cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.17",
|
|
4
4
|
"description": "",
|
|
5
5
|
"module": "dist/lib/esm/cli.module.js",
|
|
6
6
|
"main": "dist/lib/cjs/cli.module.js",
|
|
@@ -27,17 +27,17 @@
|
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@pristine-ts/common": "^2.0.
|
|
31
|
-
"@pristine-ts/configuration": "^2.0.
|
|
32
|
-
"@pristine-ts/core": "^2.0.
|
|
33
|
-
"@pristine-ts/data-mapping": "^2.0.
|
|
34
|
-
"@pristine-ts/data-mapping-common": "^2.0.
|
|
35
|
-
"@pristine-ts/file": "^2.0.
|
|
36
|
-
"@pristine-ts/logging": "^2.0.
|
|
30
|
+
"@pristine-ts/common": "^2.0.17",
|
|
31
|
+
"@pristine-ts/configuration": "^2.0.17",
|
|
32
|
+
"@pristine-ts/core": "^2.0.17",
|
|
33
|
+
"@pristine-ts/data-mapping": "^2.0.17",
|
|
34
|
+
"@pristine-ts/data-mapping-common": "^2.0.17",
|
|
35
|
+
"@pristine-ts/file": "^2.0.17",
|
|
36
|
+
"@pristine-ts/logging": "^2.0.17",
|
|
37
37
|
"@pristine-ts/metadata": "^1.0.16",
|
|
38
|
-
"@pristine-ts/observability": "^2.0.
|
|
39
|
-
"@pristine-ts/telemetry": "^2.0.
|
|
40
|
-
"@pristine-ts/validation": "^2.0.
|
|
38
|
+
"@pristine-ts/observability": "^2.0.17",
|
|
39
|
+
"@pristine-ts/telemetry": "^2.0.17",
|
|
40
|
+
"@pristine-ts/validation": "^2.0.17"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"esbuild": "^0.24.0"
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"src/*.{js,ts}"
|
|
77
77
|
]
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "26201327def8a2705293e1e47ea12fa3dc438f53",
|
|
80
80
|
"repository": {
|
|
81
81
|
"type": "git",
|
|
82
82
|
"url": "https://github.com/magieno/pristine-ts.git",
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.AppModuleCache = void 0;
|
|
13
|
-
const tsyringe_1 = require("tsyringe");
|
|
14
|
-
const fs_1 = __importDefault(require("fs"));
|
|
15
|
-
const path_1 = __importDefault(require("path"));
|
|
16
|
-
/**
|
|
17
|
-
* Persists the user's selection from the disambiguation prompt so subsequent invocations of
|
|
18
|
-
* `pristine` in the same project skip the prompt. Stale entries (target file deleted since
|
|
19
|
-
* the cache was written) are auto-cleaned on read.
|
|
20
|
-
*
|
|
21
|
-
* Best-effort throughout — failures to read or write the cache file are swallowed because
|
|
22
|
-
* the cache is a UX optimization, not correctness-critical.
|
|
23
|
-
*/
|
|
24
|
-
let AppModuleCache = class AppModuleCache {
|
|
25
|
-
constructor() {
|
|
26
|
-
this.cacheDirName = ".pristine";
|
|
27
|
-
this.cacheFileName = "last-app-module";
|
|
28
|
-
}
|
|
29
|
-
read(projectRoot) {
|
|
30
|
-
const cachePath = this.cachePath(projectRoot);
|
|
31
|
-
if (fs_1.default.existsSync(cachePath) === false) {
|
|
32
|
-
return undefined;
|
|
33
|
-
}
|
|
34
|
-
let cached;
|
|
35
|
-
try {
|
|
36
|
-
cached = fs_1.default.readFileSync(cachePath, "utf8").trim();
|
|
37
|
-
}
|
|
38
|
-
catch (_a) {
|
|
39
|
-
return undefined;
|
|
40
|
-
}
|
|
41
|
-
if (cached.length === 0 || fs_1.default.existsSync(cached) === false) {
|
|
42
|
-
// Stale cache — the user must have deleted or moved the file. Drop it so it doesn't
|
|
43
|
-
// keep being suggested on every subsequent invocation.
|
|
44
|
-
try {
|
|
45
|
-
fs_1.default.unlinkSync(cachePath);
|
|
46
|
-
}
|
|
47
|
-
catch (_b) {
|
|
48
|
-
// Best-effort cleanup.
|
|
49
|
-
}
|
|
50
|
-
return undefined;
|
|
51
|
-
}
|
|
52
|
-
return cached;
|
|
53
|
-
}
|
|
54
|
-
write(projectRoot, absolutePath) {
|
|
55
|
-
try {
|
|
56
|
-
fs_1.default.mkdirSync(path_1.default.resolve(projectRoot, this.cacheDirName), { recursive: true });
|
|
57
|
-
fs_1.default.writeFileSync(this.cachePath(projectRoot), absolutePath, "utf8");
|
|
58
|
-
}
|
|
59
|
-
catch (_a) {
|
|
60
|
-
// Best-effort.
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
cachePath(projectRoot) {
|
|
64
|
-
return path_1.default.resolve(projectRoot, this.cacheDirName, this.cacheFileName);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
exports.AppModuleCache = AppModuleCache;
|
|
68
|
-
exports.AppModuleCache = AppModuleCache = __decorate([
|
|
69
|
-
(0, tsyringe_1.injectable)()
|
|
70
|
-
], AppModuleCache);
|
|
71
|
-
//# sourceMappingURL=app-module-cache.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-module-cache.js","sourceRoot":"","sources":["../../../../src/bootstrap/app-module-cache.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAoC;AACpC,4CAAoB;AACpB,gDAAwB;AAExB;;;;;;;GAOG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAc;IAApB;QACY,iBAAY,GAAW,WAAW,CAAC;QACnC,kBAAa,GAAW,iBAAiB,CAAC;IAyC7D,CAAC;IAvCC,IAAI,CAAC,WAAmB;QACtB,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QAC9C,IAAI,YAAE,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,KAAK,EAAE,CAAC;YACvC,OAAO,SAAS,CAAC;QAC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var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
10
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
12
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
13
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
14
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
-
};
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.AppModuleDiscoverer = void 0;
|
|
22
|
-
const tsyringe_1 = require("tsyringe");
|
|
23
|
-
const fs_1 = __importDefault(require("fs"));
|
|
24
|
-
const path_1 = __importDefault(require("path"));
|
|
25
|
-
const app_module_discovery_candidate_1 = require("./app-module-discovery-candidate");
|
|
26
|
-
const app_module_discovery_reason_enum_1 = require("./app-module-discovery-reason.enum");
|
|
27
|
-
/**
|
|
28
|
-
* Scans well-known directories for files that look like AppModule definitions. Non-recursive
|
|
29
|
-
* (each search root is scanned at depth 1 only) so it stays fast on large repos and predictable
|
|
30
|
-
* when users have many nested module files.
|
|
31
|
-
*
|
|
32
|
-
* A file is a candidate when:
|
|
33
|
-
* - its filename matches `*.module.{js,mjs,cjs}` (and is not a test/spec file), AND
|
|
34
|
-
* - either the filename literally matches `app.module.{js,mjs,cjs}` (highest confidence,
|
|
35
|
-
* scored 0), OR the file's exports include a symbol named `AppModule` (scored 10).
|
|
36
|
-
*/
|
|
37
|
-
let AppModuleDiscoverer = class AppModuleDiscoverer {
|
|
38
|
-
constructor() {
|
|
39
|
-
/**
|
|
40
|
-
* Search roots scanned for candidates, relative to the project root. Order is intentional:
|
|
41
|
-
* compiled output first (most likely runtime entry), then build/, then the project root
|
|
42
|
-
* itself for trivial single-file demos.
|
|
43
|
-
*/
|
|
44
|
-
this.searchRoots = [
|
|
45
|
-
"dist",
|
|
46
|
-
"dist/lib/cjs",
|
|
47
|
-
"dist/lib/esm",
|
|
48
|
-
"build",
|
|
49
|
-
".",
|
|
50
|
-
];
|
|
51
|
-
this.moduleFileRegex = /^[A-Za-z0-9._-]+\.module\.(js|mjs|cjs)$/;
|
|
52
|
-
this.appModuleNameRegex = /^app\.module\.(js|mjs|cjs)$/i;
|
|
53
|
-
}
|
|
54
|
-
discover(projectRoot) {
|
|
55
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
const seen = new Set();
|
|
57
|
-
const candidates = [];
|
|
58
|
-
for (const root of this.searchRoots) {
|
|
59
|
-
const dir = path_1.default.resolve(projectRoot, root);
|
|
60
|
-
if (fs_1.default.existsSync(dir) === false || fs_1.default.statSync(dir).isDirectory() === false) {
|
|
61
|
-
continue;
|
|
62
|
-
}
|
|
63
|
-
const entries = fs_1.default.readdirSync(dir, { withFileTypes: true });
|
|
64
|
-
for (const entry of entries) {
|
|
65
|
-
if (entry.isFile() === false)
|
|
66
|
-
continue;
|
|
67
|
-
if (this.moduleFileRegex.test(entry.name) === false)
|
|
68
|
-
continue;
|
|
69
|
-
if (entry.name.includes(".spec.") || entry.name.includes(".test."))
|
|
70
|
-
continue;
|
|
71
|
-
const absolutePath = path_1.default.resolve(dir, entry.name);
|
|
72
|
-
// Same physical file (e.g. dist/app.module.js and dist/lib/cjs/app.module.js pointing
|
|
73
|
-
// at duplicated builds) — keep the first occurrence (which respects searchRoots order).
|
|
74
|
-
if (seen.has(absolutePath))
|
|
75
|
-
continue;
|
|
76
|
-
seen.add(absolutePath);
|
|
77
|
-
const displayPath = path_1.default.relative(projectRoot, absolutePath);
|
|
78
|
-
if (this.appModuleNameRegex.test(entry.name)) {
|
|
79
|
-
candidates.push(new app_module_discovery_candidate_1.AppModuleDiscoveryCandidate(absolutePath, displayPath, 0, app_module_discovery_reason_enum_1.AppModuleDiscoveryReasonEnum.Named));
|
|
80
|
-
continue;
|
|
81
|
-
}
|
|
82
|
-
if (this.exportsAppModule(absolutePath)) {
|
|
83
|
-
candidates.push(new app_module_discovery_candidate_1.AppModuleDiscoveryCandidate(absolutePath, displayPath, 10, app_module_discovery_reason_enum_1.AppModuleDiscoveryReasonEnum.Exports));
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
candidates.sort((a, b) => {
|
|
88
|
-
if (a.score !== b.score)
|
|
89
|
-
return a.score - b.score;
|
|
90
|
-
return a.displayPath.localeCompare(b.displayPath);
|
|
91
|
-
});
|
|
92
|
-
return candidates;
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Synchronous probe: does this file's exports include an `AppModule` symbol? Uses
|
|
97
|
-
* `require()` rather than dynamic `import()` because (a) we only accept `.js/.mjs/.cjs`
|
|
98
|
-
* whose CJS variants load synchronously, and (b) discarded probes shouldn't hold open
|
|
99
|
-
* `import()` promises.
|
|
100
|
-
* @private
|
|
101
|
-
*/
|
|
102
|
-
exportsAppModule(absolutePath) {
|
|
103
|
-
try {
|
|
104
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
105
|
-
const loaded = require(absolutePath);
|
|
106
|
-
return loaded !== null && typeof loaded === "object" && "AppModule" in loaded;
|
|
107
|
-
}
|
|
108
|
-
catch (_a) {
|
|
109
|
-
// Treat unreadable / unloadable files as non-candidates — the loader couldn't open them
|
|
110
|
-
// either, so they cannot be the AppModule.
|
|
111
|
-
return false;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
exports.AppModuleDiscoverer = AppModuleDiscoverer;
|
|
116
|
-
exports.AppModuleDiscoverer = AppModuleDiscoverer = __decorate([
|
|
117
|
-
(0, tsyringe_1.injectable)()
|
|
118
|
-
], AppModuleDiscoverer);
|
|
119
|
-
//# sourceMappingURL=app-module-discoverer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-module-discoverer.js","sourceRoot":"","sources":["../../../../src/bootstrap/app-module-discoverer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,uCAAoC;AACpC,4CAAoB;AACpB,gDAAwB;AACxB,qFAA6E;AAC7E,yFAAgF;AAEhF;;;;;;;;;GASG;AAEI,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAAzB;QACL;;;;WAIG;QACc,gBAAW,GAA0B;YACpD,MAAM;YACN,cAAc;YACd,cAAc;YACd,OAAO;YACP,GAAG;SACJ,CAAC;QAEe,oBAAe,GAAG,yCAAyC,CAAC;QAC5D,uBAAkB,GAAG,8BAA8B,CAAC;IA+DvE,CAAC;IA7DO,QAAQ,CAAC,WAAmB;;YAChC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;YAC/B,MAAM,UAAU,GAAkC,EAAE,CAAC;YAErD,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;gBACpC,MAAM,GAAG,GAAG,cAAI,CAAC,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBAC5C,IAAI,YAAE,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,KAAK,IAAI,YAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,WAAW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OAAO,CAAC,CAAC,CAAC;oBACxH,CAAC;gBACH,CAAC;YACH,CAAC;YAED,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;gBACvB,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;oBAAE,OAAO,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;gBAClD,OAAO,CAAC,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;YACpD,CAAC,CAAC,CAAC;YAEH,OAAO,UAAU,CAAC;QACpB,CAAC;KAAA;IAED;;;;;;OAMG;IACK,gBAAgB,CAAC,YAAoB;QAC3C,IAAI,CAAC;YACH,8DAA8D;YAC9D,MAAM,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;YACrC,OAAO,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,WAAW,IAAI,MAAM,CAAC;QAChF,CAAC;QAAC,WAAM,CAAC;YACP,wFAAwF;YACxF,2CAA2C;YAC3C,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF,CAAA;AA9EY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,qBAAU,GAAE;GACA,mBAAmB,CA8E/B"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AppModuleDiscoveryCandidate = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* A plausible AppModule found by the convention-based scan. Lower `score` beats higher;
|
|
6
|
-
* ties are ambiguous and trigger the disambiguation prompt.
|
|
7
|
-
*/
|
|
8
|
-
class AppModuleDiscoveryCandidate {
|
|
9
|
-
constructor(absolutePath,
|
|
10
|
-
/** Path relative to the project root. Used purely for human-facing display. */
|
|
11
|
-
displayPath,
|
|
12
|
-
/** Lower = better. Files literally named `app.module.*` get 0; AppModule-exporting `*.module.*` files get 10. */
|
|
13
|
-
score, reason) {
|
|
14
|
-
this.absolutePath = absolutePath;
|
|
15
|
-
this.displayPath = displayPath;
|
|
16
|
-
this.score = score;
|
|
17
|
-
this.reason = reason;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.AppModuleDiscoveryCandidate = AppModuleDiscoveryCandidate;
|
|
21
|
-
//# sourceMappingURL=app-module-discovery-candidate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-module-discovery-candidate.js","sourceRoot":"","sources":["../../../../src/bootstrap/app-module-discovery-candidate.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,MAAa,2BAA2B;IACtC,YACkB,YAAoB;IACpC,+EAA+E;IAC/D,WAAmB;IACnC,iHAAiH;IACjG,KAAa,EACb,MAAoC;QALpC,iBAAY,GAAZ,YAAY,CAAQ;QAEpB,gBAAW,GAAX,WAAW,CAAQ;QAEnB,UAAK,GAAL,KAAK,CAAQ;QACb,WAAM,GAAN,MAAM,CAA8B;IAEtD,CAAC;CACF;AAVD,kEAUC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AppModuleDiscoveryReasonEnum = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Why a candidate file was considered a possible AppModule. Used by the disambiguation prompt
|
|
6
|
-
* so the user sees "(matches app.module.*)" vs "(exports AppModule)" alongside each option.
|
|
7
|
-
*/
|
|
8
|
-
var AppModuleDiscoveryReasonEnum;
|
|
9
|
-
(function (AppModuleDiscoveryReasonEnum) {
|
|
10
|
-
/** The filename matches `app.module.{js,mjs,cjs}`. Highest confidence. */
|
|
11
|
-
AppModuleDiscoveryReasonEnum["Named"] = "named";
|
|
12
|
-
/** The filename is `*.module.{js,mjs,cjs}` and the file's exports include an `AppModule` symbol. */
|
|
13
|
-
AppModuleDiscoveryReasonEnum["Exports"] = "exports";
|
|
14
|
-
})(AppModuleDiscoveryReasonEnum || (exports.AppModuleDiscoveryReasonEnum = AppModuleDiscoveryReasonEnum = {}));
|
|
15
|
-
//# sourceMappingURL=app-module-discovery-reason.enum.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-module-discovery-reason.enum.js","sourceRoot":"","sources":["../../../../src/bootstrap/app-module-discovery-reason.enum.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,IAAY,4BAKX;AALD,WAAY,4BAA4B;IACtC,0EAA0E;IAC1E,+CAAe,CAAA;IACf,oGAAoG;IACpG,mDAAmB,CAAA;AACrB,CAAC,EALW,4BAA4B,4CAA5B,4BAA4B,QAKvC"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.AppModulePrompt = void 0;
|
|
22
|
-
const tsyringe_1 = require("tsyringe");
|
|
23
|
-
const app_module_discovery_reason_enum_1 = require("./app-module-discovery-reason.enum");
|
|
24
|
-
const dynamic_importer_1 = require("./dynamic-importer");
|
|
25
|
-
/**
|
|
26
|
-
* TTY disambiguation for the AppModule discovery cascade. When multiple equally-ranked
|
|
27
|
-
* candidates exist and stdin/stdout are both connected to a real terminal, ask the user
|
|
28
|
-
* to pick one. When non-interactive (CI, Docker, redirected stdin), the caller should
|
|
29
|
-
* fall back to throwing an actionable error rather than guessing.
|
|
30
|
-
*
|
|
31
|
-
* `@inquirer/prompts` is dynamic-imported through `DynamicImporter` so the prompt UI
|
|
32
|
-
* dependency only loads when actually prompting — keeps non-interactive startup fast and
|
|
33
|
-
* avoids paying for inquirer's TTY-detection overhead on every invocation.
|
|
34
|
-
*/
|
|
35
|
-
let AppModulePrompt = class AppModulePrompt {
|
|
36
|
-
constructor(dynamicImporter) {
|
|
37
|
-
this.dynamicImporter = dynamicImporter;
|
|
38
|
-
this.cancelLabel = "Cancel";
|
|
39
|
-
}
|
|
40
|
-
isInteractive() {
|
|
41
|
-
return Boolean(process.stdout.isTTY) && Boolean(process.stdin.isTTY);
|
|
42
|
-
}
|
|
43
|
-
prompt(candidates) {
|
|
44
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
-
const inquirer = yield this.dynamicImporter.import("@inquirer/prompts");
|
|
46
|
-
const select = inquirer.select;
|
|
47
|
-
try {
|
|
48
|
-
const choice = yield select({
|
|
49
|
-
message: "Multiple AppModule candidates were found. Which one should pristine load?",
|
|
50
|
-
choices: [
|
|
51
|
-
...candidates.map(c => ({
|
|
52
|
-
name: `${c.displayPath} ${this.reasonLabel(c.reason)}`,
|
|
53
|
-
value: c.absolutePath,
|
|
54
|
-
})),
|
|
55
|
-
{ name: this.cancelLabel, value: null },
|
|
56
|
-
],
|
|
57
|
-
});
|
|
58
|
-
return choice !== null && choice !== void 0 ? choice : undefined;
|
|
59
|
-
}
|
|
60
|
-
catch (_a) {
|
|
61
|
-
// @inquirer throws on Ctrl+C / SIGINT — treat as a clean abort, not a crash.
|
|
62
|
-
return undefined;
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
reasonLabel(reason) {
|
|
67
|
-
switch (reason) {
|
|
68
|
-
case app_module_discovery_reason_enum_1.AppModuleDiscoveryReasonEnum.Named: return "(matches app.module.*)";
|
|
69
|
-
case app_module_discovery_reason_enum_1.AppModuleDiscoveryReasonEnum.Exports: return "(exports AppModule)";
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
exports.AppModulePrompt = AppModulePrompt;
|
|
74
|
-
exports.AppModulePrompt = AppModulePrompt = __decorate([
|
|
75
|
-
(0, tsyringe_1.injectable)(),
|
|
76
|
-
__metadata("design:paramtypes", [dynamic_importer_1.DynamicImporter])
|
|
77
|
-
], AppModulePrompt);
|
|
78
|
-
//# sourceMappingURL=app-module-prompt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-module-prompt.js","sourceRoot":"","sources":["../../../../src/bootstrap/app-module-prompt.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,uCAAoC;AAEpC,yFAAgF;AAChF,yDAAmD;AAEnD;;;;;;;;;GASG;AAEI,IAAM,eAAe,GAArB,MAAM,eAAe;IAG1B,YAA6B,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;QAF5C,gBAAW,GAAW,QAAQ,CAAC;IAGhD,CAAC;IAED,aAAa;QACX,OAAO,OAAO,CAAE,OAAO,CAAC,MAAc,CAA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ate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
21
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
22
|
-
};
|
|
23
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.ConfigInitCommand = void 0;
|
|
25
|
-
const fs_1 = __importDefault(require("fs"));
|
|
26
|
-
const path_1 = __importDefault(require("path"));
|
|
27
|
-
const common_1 = require("@pristine-ts/common");
|
|
28
|
-
const tsyringe_1 = require("tsyringe");
|
|
29
|
-
const console_manager_1 = require("../managers/console.manager");
|
|
30
|
-
const exit_code_enum_1 = require("../enums/exit-code.enum");
|
|
31
|
-
const cli_module_keyname_1 = require("../cli.module.keyname");
|
|
32
|
-
/**
|
|
33
|
-
* Generates a starter `pristine.config.ts` in the current directory. If the consumer's
|
|
34
|
-
* `package.json` already declares `pristine.appModule.path` or `pristine.appModule.cjsPath`,
|
|
35
|
-
* the value is migrated into the new config and the user is told to remove the old field.
|
|
36
|
-
*/
|
|
37
|
-
let ConfigInitCommand = class ConfigInitCommand {
|
|
38
|
-
constructor(consoleManager) {
|
|
39
|
-
this.consoleManager = consoleManager;
|
|
40
|
-
this.optionsType = null;
|
|
41
|
-
this.name = "p:config:init";
|
|
42
|
-
this.description = "Generate a starter pristine.config.ts. Migrates from package.json if present.";
|
|
43
|
-
}
|
|
44
|
-
run(args) {
|
|
45
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
const projectRoot = process.cwd();
|
|
47
|
-
const targetPath = path_1.default.resolve(projectRoot, "pristine.config.ts");
|
|
48
|
-
if (fs_1.default.existsSync(targetPath)) {
|
|
49
|
-
this.consoleManager.writeError(`pristine.config.ts already exists at ${targetPath}. Aborting to avoid overwriting.`);
|
|
50
|
-
return exit_code_enum_1.ExitCodeEnum.Error;
|
|
51
|
-
}
|
|
52
|
-
const migratedAppModulePath = this.detectExistingAppModulePath(projectRoot);
|
|
53
|
-
const body = this.renderConfigTemplate(migratedAppModulePath);
|
|
54
|
-
fs_1.default.writeFileSync(targetPath, body, "utf8");
|
|
55
|
-
this.consoleManager.writeSuccess(`Created ${path_1.default.relative(projectRoot, targetPath)}`);
|
|
56
|
-
if (migratedAppModulePath !== undefined) {
|
|
57
|
-
this.consoleManager.writeInfo(`Migrated 'pristine.appModule' from package.json. ` +
|
|
58
|
-
`You can now remove the 'pristine' field from your package.json.`);
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
this.consoleManager.writeInfo("No existing pristine config found in package.json. " +
|
|
62
|
-
"Edit pristine.config.ts to point at your AppModule.");
|
|
63
|
-
}
|
|
64
|
-
return exit_code_enum_1.ExitCodeEnum.Success;
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
detectExistingAppModulePath(projectRoot) {
|
|
68
|
-
var _a;
|
|
69
|
-
const packageJson = path_1.default.resolve(projectRoot, "package.json");
|
|
70
|
-
if (fs_1.default.existsSync(packageJson) === false) {
|
|
71
|
-
return undefined;
|
|
72
|
-
}
|
|
73
|
-
let parsed;
|
|
74
|
-
try {
|
|
75
|
-
parsed = JSON.parse(fs_1.default.readFileSync(packageJson, "utf8"));
|
|
76
|
-
}
|
|
77
|
-
catch (_b) {
|
|
78
|
-
return undefined;
|
|
79
|
-
}
|
|
80
|
-
const appModule = (_a = parsed === null || parsed === void 0 ? void 0 : parsed.pristine) === null || _a === void 0 ? void 0 : _a.appModule;
|
|
81
|
-
if ((appModule === null || appModule === void 0 ? void 0 : appModule.path) !== undefined) {
|
|
82
|
-
return appModule.path;
|
|
83
|
-
}
|
|
84
|
-
if ((appModule === null || appModule === void 0 ? void 0 : appModule.cjsPath) !== undefined) {
|
|
85
|
-
return appModule.cjsPath;
|
|
86
|
-
}
|
|
87
|
-
return undefined;
|
|
88
|
-
}
|
|
89
|
-
renderConfigTemplate(appModulePath) {
|
|
90
|
-
const pathLine = appModulePath !== undefined
|
|
91
|
-
? ` path: "${appModulePath}",`
|
|
92
|
-
: ` // path: "dist/app.module.js", // <-- point this at your AppModule`;
|
|
93
|
-
return `import {defineConfig} from "@pristine-ts/cli";
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Pristine CLI configuration. See https://github.com/magieno/pristine-ts for the full
|
|
97
|
-
* schema reference.
|
|
98
|
-
*/
|
|
99
|
-
export default defineConfig({
|
|
100
|
-
appModule: {
|
|
101
|
-
${pathLine}
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
// build: {
|
|
105
|
-
// outDir: "dist",
|
|
106
|
-
// tsconfig: "tsconfig.json",
|
|
107
|
-
// format: "esm",
|
|
108
|
-
// },
|
|
109
|
-
|
|
110
|
-
// start: {
|
|
111
|
-
// entry: "dist/main.js",
|
|
112
|
-
// nodeArgs: ["--enable-source-maps"],
|
|
113
|
-
// },
|
|
114
|
-
|
|
115
|
-
// plugins: [
|
|
116
|
-
// // "@my-org/pristine-cli-extras",
|
|
117
|
-
// ],
|
|
118
|
-
|
|
119
|
-
// kernelConfiguration: {
|
|
120
|
-
// // "pristine.logging.logSeverityLevelConfiguration": 1,
|
|
121
|
-
// },
|
|
122
|
-
});
|
|
123
|
-
`;
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
exports.ConfigInitCommand = ConfigInitCommand;
|
|
127
|
-
exports.ConfigInitCommand = ConfigInitCommand = __decorate([
|
|
128
|
-
(0, common_1.tag)(common_1.ServiceDefinitionTagEnum.Command),
|
|
129
|
-
(0, common_1.moduleScoped)(cli_module_keyname_1.CliModuleKeyname),
|
|
130
|
-
(0, tsyringe_1.injectable)(),
|
|
131
|
-
__metadata("design:paramtypes", [console_manager_1.ConsoleManager])
|
|
132
|
-
], ConfigInitCommand);
|
|
133
|
-
//# sourceMappingURL=config-init.command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-init.command.js","sourceRoot":"","sources":["../../../../src/commands/config-init.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AACxB,gDAAgF;AAChF,uCAAoC;AAEpC,iEAA2D;AAC3D,4DAAqD;AACrD,8DAAuD;AAEvD;;;;GAIG;AAII,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAK5B,YAA6B,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;QAJ3D,gBAAW,GAAG,IAAI,CAAC;QACnB,SAAI,GAAG,eAAe,CAAC;QACvB,gBAAW,GAAG,+EAA+E,CAAC;IAG9F,CAAC;IAEK,GAAG,CAAC,IAAS;;YACjB,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG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,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;QAC5D,CAAC;QAAC,WAAM,CAAC;YACP,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,MAAM,SAAS,GAAG,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,0CAAE,SAAS,CAAC;QAC9C,IAAI,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,IAAI,MAAK,SAAS,EAAE,CAAC;YAClC,OAAO,SAAS,CAAC,IAAI,CAAC;QACxB,CAAC;QACD,IAAI,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,OAAO,MAAK,SAAS,EAAE,CAAC;YACrC,OAAO,SAAS,CAAC,OAAO,CAAC;QAC3B,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAEO,oBAAoB,CAAC,aAAiC;QAC5D,MAAM,QAAQ,GAAG,aAAa,KAAK,SAAS;YAC1C,CAAC,CAAC,cAAc,aAAa,IAAI;YACjC,CAAC,CAAC,0EAA0E,CAAC;QAE/E,OAAO;;;;;;;;EAQT,QAAQ;;;;;;;;;;;;;;;;;;;;;;CAsBT,CAAC;IACA,CAAC;CACF,CAAA;AAnGY,8CAAiB;4BAAjB,iBAAiB;IAH7B,IAAA,YAAG,EAAC,iCAAwB,CAAC,OAAO,CAAC;IACrC,IAAA,qBAAY,EAAC,qCAAgB,CAAC;IAC9B,IAAA,qBAAU,GAAE;qCAMkC,gCAAc;GALhD,iBAAiB,CAmG7B"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExitCodeEnum = void 0;
|
|
4
|
-
var ExitCodeEnum;
|
|
5
|
-
(function (ExitCodeEnum) {
|
|
6
|
-
ExitCodeEnum[ExitCodeEnum["Success"] = 0] = "Success";
|
|
7
|
-
ExitCodeEnum[ExitCodeEnum["Error"] = 1] = "Error";
|
|
8
|
-
})(ExitCodeEnum || (exports.ExitCodeEnum = ExitCodeEnum = {}));
|
|
9
|
-
//# sourceMappingURL=exit-code.enum.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exit-code.enum.js","sourceRoot":"","sources":["../../../../src/enums/exit-code.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,qDAAW,CAAA;IACX,iDAAS,CAAA;AACX,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB"}
|