@dudousxd/nestjs-codegen 0.29.1 → 0.30.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.
- package/CHANGELOG.md +16 -0
- package/dist/cli/main.cjs +7 -8
- package/dist/cli/main.cjs.map +1 -1
- package/dist/cli/main.js +7 -8
- package/dist/cli/main.js.map +1 -1
- package/dist/extension/index.d.cts +1 -1
- package/dist/extension/index.d.ts +1 -1
- package/dist/{index-Dc4s883u.d.cts → index-D4Blt-RT.d.cts} +1 -13
- package/dist/{index-Dc4s883u.d.ts → index-D4Blt-RT.d.ts} +1 -13
- package/dist/index.cjs +7 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +7 -21
- package/dist/index.js.map +1 -1
- package/dist/nest/index.cjs +7 -8
- package/dist/nest/index.cjs.map +1 -1
- package/dist/nest/index.d.cts +1 -1
- package/dist/nest/index.d.ts +1 -1
- package/dist/nest/index.js +7 -8
- package/dist/nest/index.js.map +1 -1
- package/package.json +9 -9
package/dist/cli/main.js
CHANGED
|
@@ -100,11 +100,6 @@ function validateUserConfig(userConfig) {
|
|
|
100
100
|
);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
if (userConfig.scopes && Object.keys(userConfig.scopes).length > 0) {
|
|
104
|
-
console.warn(
|
|
105
|
-
"[nestjs-codegen] The top-level `scopes` option has no effect and is deprecated. For several Inertia apps use `pages.scopes` (one entry per InertiaModule.forFeature scope); for several controller sets use one `contracts.glob` (e.g. a brace glob)."
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
103
|
}
|
|
109
104
|
function isGlobInput(value) {
|
|
110
105
|
if (typeof value === "string") return true;
|
|
@@ -152,7 +147,6 @@ function applyDefaults(userConfig, cwd) {
|
|
|
152
147
|
glob: userConfig.contracts?.glob ?? "src/**/*.controller.ts",
|
|
153
148
|
debounceMs: userConfig.contracts?.debounceMs ?? 500
|
|
154
149
|
},
|
|
155
|
-
scopes: userConfig.scopes ?? {},
|
|
156
150
|
codegen: {
|
|
157
151
|
outDir,
|
|
158
152
|
cwd: resolvedCwd
|
|
@@ -6012,7 +6006,7 @@ async function generate(config, inputRoutes = [], entryPoint = "cli") {
|
|
|
6012
6006
|
}
|
|
6013
6007
|
const configHash = computeConfigHash(config);
|
|
6014
6008
|
const configKeyHashes = computeConfigKeyHashes(config);
|
|
6015
|
-
if (config.driftGuard && manifest?.entryPoint && manifest.entryPoint !== entryPoint && manifest.configHash && manifest.configHash !== configHash) {
|
|
6009
|
+
if (config.driftGuard && manifest?.version === VERSION && manifest?.entryPoint && manifest.entryPoint !== entryPoint && manifest.configHash && manifest.configHash !== configHash) {
|
|
6016
6010
|
throw new DriftGuardError(
|
|
6017
6011
|
driftGuardMessage(
|
|
6018
6012
|
config.codegen.outDir,
|
|
@@ -6313,6 +6307,11 @@ async function watch(config, onChange, options = {}) {
|
|
|
6313
6307
|
trackedWatcher.on("add", (p) => scheduleContractsRegenerate(p, true));
|
|
6314
6308
|
trackedWatcher.on("change", (p) => scheduleContractsRegenerate(p));
|
|
6315
6309
|
trackedWatcher.on("unlink", (p) => scheduleContractsRegenerate(p, true));
|
|
6310
|
+
await Promise.all(
|
|
6311
|
+
[pagesWatcher, contractsWatcher, formsWatcher].map(
|
|
6312
|
+
(w) => new Promise((resolveReady) => w.once("ready", () => resolveReady()))
|
|
6313
|
+
)
|
|
6314
|
+
);
|
|
6316
6315
|
return {
|
|
6317
6316
|
close: async () => {
|
|
6318
6317
|
if (pagesDebounceTimer !== void 0) {
|
|
@@ -6333,7 +6332,7 @@ async function watch(config, onChange, options = {}) {
|
|
|
6333
6332
|
}
|
|
6334
6333
|
|
|
6335
6334
|
// src/index.ts
|
|
6336
|
-
var VERSION = "0.
|
|
6335
|
+
var VERSION = "0.30.0";
|
|
6337
6336
|
|
|
6338
6337
|
// src/cli/codegen.ts
|
|
6339
6338
|
async function runCodegen(opts = {}) {
|