@dudousxd/nestjs-codegen 0.13.2 → 0.14.1

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.
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/markers.ts
21
+ var markers_exports = {};
22
+ __export(markers_exports, {
23
+ AsQuery: () => AsQuery
24
+ });
25
+ module.exports = __toCommonJS(markers_exports);
26
+ function AsQuery() {
27
+ return () => {
28
+ };
29
+ }
30
+ // Annotate the CommonJS export names for ESM import in node:
31
+ 0 && (module.exports = {
32
+ AsQuery
33
+ });
34
+ //# sourceMappingURL=markers.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/markers.ts"],"sourcesContent":["/**\n * Zero-dependency decorators consumed by `@dudousxd/nestjs-codegen`'s static AST\n * scan. Import from the `@dudousxd/nestjs-codegen/markers` subpath (NOT the\n * package root) so a controller can use them without pulling in the generator,\n * ts-morph, or any of the codegen CLI/Nest-module machinery.\n *\n * Every export here is a runtime no-op: the decorator does nothing when the\n * app actually runs. Its only job is to be a stable, statically-detectable AST\n * shape (`@AsQuery()` on a method) that codegen's discovery pass looks for.\n */\n\n/**\n * Marks a non-GET route whose semantics are a READ (e.g. a `POST` endpoint that\n * accepts a query-shaped payload) so codegen emits `queryOptions` for it —\n * exactly like a GET or a filter-search route — instead of only\n * `mutationOptions`. Detected statically by codegen's AST scan; does nothing at\n * runtime.\n *\n * @example\n * ```ts\n * import { AsQuery } from '@dudousxd/nestjs-codegen/markers';\n *\n * @Controller('reports')\n * class ReportsController {\n * @Post('search')\n * @AsQuery()\n * search(@Body() body: SearchDto) { ... }\n * }\n * ```\n */\nexport function AsQuery(): MethodDecorator {\n return () => {\n // No-op at runtime — codegen detects the decorator statically via AST scan.\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA8BO,SAAS,UAA2B;AACzC,SAAO,MAAM;AAAA,EAEb;AACF;","names":[]}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Zero-dependency decorators consumed by `@dudousxd/nestjs-codegen`'s static AST
3
+ * scan. Import from the `@dudousxd/nestjs-codegen/markers` subpath (NOT the
4
+ * package root) so a controller can use them without pulling in the generator,
5
+ * ts-morph, or any of the codegen CLI/Nest-module machinery.
6
+ *
7
+ * Every export here is a runtime no-op: the decorator does nothing when the
8
+ * app actually runs. Its only job is to be a stable, statically-detectable AST
9
+ * shape (`@AsQuery()` on a method) that codegen's discovery pass looks for.
10
+ */
11
+ /**
12
+ * Marks a non-GET route whose semantics are a READ (e.g. a `POST` endpoint that
13
+ * accepts a query-shaped payload) so codegen emits `queryOptions` for it —
14
+ * exactly like a GET or a filter-search route — instead of only
15
+ * `mutationOptions`. Detected statically by codegen's AST scan; does nothing at
16
+ * runtime.
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * import { AsQuery } from '@dudousxd/nestjs-codegen/markers';
21
+ *
22
+ * @Controller('reports')
23
+ * class ReportsController {
24
+ * @Post('search')
25
+ * @AsQuery()
26
+ * search(@Body() body: SearchDto) { ... }
27
+ * }
28
+ * ```
29
+ */
30
+ declare function AsQuery(): MethodDecorator;
31
+
32
+ export { AsQuery };
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Zero-dependency decorators consumed by `@dudousxd/nestjs-codegen`'s static AST
3
+ * scan. Import from the `@dudousxd/nestjs-codegen/markers` subpath (NOT the
4
+ * package root) so a controller can use them without pulling in the generator,
5
+ * ts-morph, or any of the codegen CLI/Nest-module machinery.
6
+ *
7
+ * Every export here is a runtime no-op: the decorator does nothing when the
8
+ * app actually runs. Its only job is to be a stable, statically-detectable AST
9
+ * shape (`@AsQuery()` on a method) that codegen's discovery pass looks for.
10
+ */
11
+ /**
12
+ * Marks a non-GET route whose semantics are a READ (e.g. a `POST` endpoint that
13
+ * accepts a query-shaped payload) so codegen emits `queryOptions` for it —
14
+ * exactly like a GET or a filter-search route — instead of only
15
+ * `mutationOptions`. Detected statically by codegen's AST scan; does nothing at
16
+ * runtime.
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * import { AsQuery } from '@dudousxd/nestjs-codegen/markers';
21
+ *
22
+ * @Controller('reports')
23
+ * class ReportsController {
24
+ * @Post('search')
25
+ * @AsQuery()
26
+ * search(@Body() body: SearchDto) { ... }
27
+ * }
28
+ * ```
29
+ */
30
+ declare function AsQuery(): MethodDecorator;
31
+
32
+ export { AsQuery };
@@ -0,0 +1,9 @@
1
+ // src/markers.ts
2
+ function AsQuery() {
3
+ return () => {
4
+ };
5
+ }
6
+ export {
7
+ AsQuery
8
+ };
9
+ //# sourceMappingURL=markers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/markers.ts"],"sourcesContent":["/**\n * Zero-dependency decorators consumed by `@dudousxd/nestjs-codegen`'s static AST\n * scan. Import from the `@dudousxd/nestjs-codegen/markers` subpath (NOT the\n * package root) so a controller can use them without pulling in the generator,\n * ts-morph, or any of the codegen CLI/Nest-module machinery.\n *\n * Every export here is a runtime no-op: the decorator does nothing when the\n * app actually runs. Its only job is to be a stable, statically-detectable AST\n * shape (`@AsQuery()` on a method) that codegen's discovery pass looks for.\n */\n\n/**\n * Marks a non-GET route whose semantics are a READ (e.g. a `POST` endpoint that\n * accepts a query-shaped payload) so codegen emits `queryOptions` for it —\n * exactly like a GET or a filter-search route — instead of only\n * `mutationOptions`. Detected statically by codegen's AST scan; does nothing at\n * runtime.\n *\n * @example\n * ```ts\n * import { AsQuery } from '@dudousxd/nestjs-codegen/markers';\n *\n * @Controller('reports')\n * class ReportsController {\n * @Post('search')\n * @AsQuery()\n * search(@Body() body: SearchDto) { ... }\n * }\n * ```\n */\nexport function AsQuery(): MethodDecorator {\n return () => {\n // No-op at runtime — codegen detects the decorator statically via AST scan.\n };\n}\n"],"mappings":";AA8BO,SAAS,UAA2B;AACzC,SAAO,MAAM;AAAA,EAEb;AACF;","names":[]}