@dudousxd/nestjs-codegen 0.27.1 → 0.27.2
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 +6 -0
- package/dist/cli/main.cjs +11 -5
- package/dist/cli/main.cjs.map +1 -1
- package/dist/cli/main.js +11 -5
- package/dist/cli/main.js.map +1 -1
- package/dist/index.cjs +11 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +11 -5
- package/dist/index.js.map +1 -1
- package/dist/nest/index.cjs +11 -5
- package/dist/nest/index.cjs.map +1 -1
- package/dist/nest/index.js +11 -5
- package/dist/nest/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -382,6 +382,6 @@ interface FastDiscoveryOptions {
|
|
|
382
382
|
}
|
|
383
383
|
declare function discoverContractsFast(opts: FastDiscoveryOptions): Promise<RouteDescriptor[]>;
|
|
384
384
|
|
|
385
|
-
declare const VERSION = "0.27.
|
|
385
|
+
declare const VERSION = "0.27.2";
|
|
386
386
|
|
|
387
387
|
export { type ChainModuleRendererOptions, CodegenError, type CodegenManifest, ConfigError, DriftGuardError, type EntryPoint, type FastDiscoveryOptions, type JsonSchema, type MocksEmitOptions, type OpenApiDocument, type OpenApiEmitOptions, type OpenApiInfo, RenderContext, RenderedModule, ResolvedConfig, RouteDescriptor, SchemaModule, SchemaNode, type TsTypeContext, UserConfig, VERSION, ValidationAdapter, type WatchOptions, type Watcher, acquireLock, buildMocksFile, buildOpenApiSpec, createChainModuleRenderer, defineConfig, discoverContractsFast, emitApi, emitForms, emitMocks, emitOpenApi, emitRoutes, extractSchemaFromDto, generate, loadConfig, renderTsType, resolveConfig, schemaModuleToJsonSchema, schemaNodeToJsonSchema, toObjectKey, typeNameFor, watch };
|
package/dist/index.d.ts
CHANGED
|
@@ -382,6 +382,6 @@ interface FastDiscoveryOptions {
|
|
|
382
382
|
}
|
|
383
383
|
declare function discoverContractsFast(opts: FastDiscoveryOptions): Promise<RouteDescriptor[]>;
|
|
384
384
|
|
|
385
|
-
declare const VERSION = "0.27.
|
|
385
|
+
declare const VERSION = "0.27.2";
|
|
386
386
|
|
|
387
387
|
export { type ChainModuleRendererOptions, CodegenError, type CodegenManifest, ConfigError, DriftGuardError, type EntryPoint, type FastDiscoveryOptions, type JsonSchema, type MocksEmitOptions, type OpenApiDocument, type OpenApiEmitOptions, type OpenApiInfo, RenderContext, RenderedModule, ResolvedConfig, RouteDescriptor, SchemaModule, SchemaNode, type TsTypeContext, UserConfig, VERSION, ValidationAdapter, type WatchOptions, type Watcher, acquireLock, buildMocksFile, buildOpenApiSpec, createChainModuleRenderer, defineConfig, discoverContractsFast, emitApi, emitForms, emitMocks, emitOpenApi, emitRoutes, extractSchemaFromDto, generate, loadConfig, renderTsType, resolveConfig, schemaModuleToJsonSchema, schemaNodeToJsonSchema, toObjectKey, typeNameFor, watch };
|
package/dist/index.js
CHANGED
|
@@ -690,12 +690,18 @@ function findTypeInFile(name, file) {
|
|
|
690
690
|
function resolveModuleSpecifier(moduleSpecifier, sourceFile, project) {
|
|
691
691
|
if (moduleSpecifier.startsWith(".")) {
|
|
692
692
|
const dir = dirname(sourceFile.getFilePath());
|
|
693
|
-
const
|
|
694
|
-
|
|
695
|
-
|
|
693
|
+
const ext = /\.(c|m)?(j|t)sx?$/.exec(moduleSpecifier)?.[0];
|
|
694
|
+
const base = ext ? moduleSpecifier.slice(0, -ext.length) : moduleSpecifier;
|
|
695
|
+
const flavour = ext?.startsWith(".c") ? "c" : ext?.startsWith(".m") ? "m" : "";
|
|
696
|
+
const candidates = [
|
|
697
|
+
resolve2(dir, `${base}.${flavour}ts`),
|
|
698
|
+
...flavour === "" ? [resolve2(dir, `${base}.tsx`)] : [],
|
|
696
699
|
resolve2(dir, `${moduleSpecifier}.ts`),
|
|
697
|
-
resolve2(dir, moduleSpecifier, "index.ts")
|
|
700
|
+
resolve2(dir, moduleSpecifier, "index.ts"),
|
|
701
|
+
resolve2(dir, `${base}.d.${flavour}ts`),
|
|
702
|
+
...ext === void 0 ? [resolve2(dir, moduleSpecifier, "index.d.ts")] : []
|
|
698
703
|
];
|
|
704
|
+
return [...new Set(candidates)];
|
|
699
705
|
}
|
|
700
706
|
const ctx = _ctxFor(project);
|
|
701
707
|
const baseUrl = ctx.pathsBase ?? ctx.projectRoot;
|
|
@@ -6096,7 +6102,7 @@ function createChainModuleRenderer(opts) {
|
|
|
6096
6102
|
}
|
|
6097
6103
|
|
|
6098
6104
|
// src/index.ts
|
|
6099
|
-
var VERSION = "0.27.
|
|
6105
|
+
var VERSION = "0.27.2";
|
|
6100
6106
|
export {
|
|
6101
6107
|
CodegenError,
|
|
6102
6108
|
ConfigError,
|