@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/nest/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _nestjs_common from '@nestjs/common';
|
|
2
2
|
import { DynamicModule, OnApplicationBootstrap, OnModuleDestroy, ExecutionContext } from '@nestjs/common';
|
|
3
|
-
import { U as UserConfig } from '../index-
|
|
3
|
+
import { U as UserConfig } from '../index-D4Blt-RT.cjs';
|
|
4
4
|
import 'ts-morph';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/nest/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _nestjs_common from '@nestjs/common';
|
|
2
2
|
import { DynamicModule, OnApplicationBootstrap, OnModuleDestroy, ExecutionContext } from '@nestjs/common';
|
|
3
|
-
import { U as UserConfig } from '../index-
|
|
3
|
+
import { U as UserConfig } from '../index-D4Blt-RT.js';
|
|
4
4
|
import 'ts-morph';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/nest/index.js
CHANGED
|
@@ -87,11 +87,6 @@ function validateUserConfig(userConfig) {
|
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
if (userConfig.scopes && Object.keys(userConfig.scopes).length > 0) {
|
|
91
|
-
console.warn(
|
|
92
|
-
"[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)."
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
90
|
}
|
|
96
91
|
function isGlobInput(value) {
|
|
97
92
|
if (typeof value === "string") return true;
|
|
@@ -139,7 +134,6 @@ function applyDefaults(userConfig, cwd) {
|
|
|
139
134
|
glob: userConfig.contracts?.glob ?? "src/**/*.controller.ts",
|
|
140
135
|
debounceMs: userConfig.contracts?.debounceMs ?? 500
|
|
141
136
|
},
|
|
142
|
-
scopes: userConfig.scopes ?? {},
|
|
143
137
|
codegen: {
|
|
144
138
|
outDir,
|
|
145
139
|
cwd: resolvedCwd
|
|
@@ -5752,7 +5746,7 @@ async function generate(config, inputRoutes = [], entryPoint = "cli") {
|
|
|
5752
5746
|
}
|
|
5753
5747
|
const configHash = computeConfigHash(config);
|
|
5754
5748
|
const configKeyHashes = computeConfigKeyHashes(config);
|
|
5755
|
-
if (config.driftGuard && manifest?.entryPoint && manifest.entryPoint !== entryPoint && manifest.configHash && manifest.configHash !== configHash) {
|
|
5749
|
+
if (config.driftGuard && manifest?.version === VERSION && manifest?.entryPoint && manifest.entryPoint !== entryPoint && manifest.configHash && manifest.configHash !== configHash) {
|
|
5756
5750
|
throw new DriftGuardError(
|
|
5757
5751
|
driftGuardMessage(
|
|
5758
5752
|
config.codegen.outDir,
|
|
@@ -6053,6 +6047,11 @@ async function watch(config, onChange, options = {}) {
|
|
|
6053
6047
|
trackedWatcher.on("add", (p) => scheduleContractsRegenerate(p, true));
|
|
6054
6048
|
trackedWatcher.on("change", (p) => scheduleContractsRegenerate(p));
|
|
6055
6049
|
trackedWatcher.on("unlink", (p) => scheduleContractsRegenerate(p, true));
|
|
6050
|
+
await Promise.all(
|
|
6051
|
+
[pagesWatcher, contractsWatcher, formsWatcher].map(
|
|
6052
|
+
(w) => new Promise((resolveReady) => w.once("ready", () => resolveReady()))
|
|
6053
|
+
)
|
|
6054
|
+
);
|
|
6056
6055
|
return {
|
|
6057
6056
|
close: async () => {
|
|
6058
6057
|
if (pagesDebounceTimer !== void 0) {
|
|
@@ -6073,7 +6072,7 @@ async function watch(config, onChange, options = {}) {
|
|
|
6073
6072
|
}
|
|
6074
6073
|
|
|
6075
6074
|
// src/index.ts
|
|
6076
|
-
var VERSION = "0.
|
|
6075
|
+
var VERSION = "0.30.0";
|
|
6077
6076
|
|
|
6078
6077
|
// src/generate-manifest.ts
|
|
6079
6078
|
var MANIFEST_FILE = ".codegen-manifest.json";
|