ts-procedures 5.6.0-beta.2 → 5.7.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.
- package/README.md +37 -2
- package/agent_config/claude-code/skills/guide/api-reference.md +29 -6
- package/agent_config/claude-code/skills/guide/patterns.md +1 -0
- package/agent_config/copilot/copilot-instructions.md +7 -0
- package/agent_config/cursor/cursorrules +7 -0
- package/build/codegen/bin/cli.d.ts +27 -1
- package/build/codegen/bin/cli.js +90 -11
- package/build/codegen/bin/cli.js.map +1 -1
- package/build/codegen/bin/cli.test.js +96 -1
- package/build/codegen/bin/cli.test.js.map +1 -1
- package/build/codegen/constants.d.ts +1 -0
- package/build/codegen/constants.js +2 -0
- package/build/codegen/constants.js.map +1 -0
- package/build/codegen/e2e.test.js +143 -0
- package/build/codegen/e2e.test.js.map +1 -1
- package/build/codegen/emit-client-runtime.d.ts +9 -0
- package/build/codegen/emit-client-runtime.js +99 -0
- package/build/codegen/emit-client-runtime.js.map +1 -0
- package/build/codegen/emit-client-runtime.test.d.ts +1 -0
- package/build/codegen/emit-client-runtime.test.js +78 -0
- package/build/codegen/emit-client-runtime.test.js.map +1 -0
- package/build/codegen/emit-client-types.d.ts +8 -0
- package/build/codegen/emit-client-types.js +25 -0
- package/build/codegen/emit-client-types.js.map +1 -0
- package/build/codegen/emit-client-types.test.d.ts +1 -0
- package/build/codegen/emit-client-types.test.js +33 -0
- package/build/codegen/emit-client-types.test.js.map +1 -0
- package/build/codegen/emit-errors.d.ts +8 -1
- package/build/codegen/emit-errors.js +36 -13
- package/build/codegen/emit-errors.js.map +1 -1
- package/build/codegen/emit-errors.test.js +29 -1
- package/build/codegen/emit-errors.test.js.map +1 -1
- package/build/codegen/emit-index.d.ts +5 -1
- package/build/codegen/emit-index.js +4 -5
- package/build/codegen/emit-index.js.map +1 -1
- package/build/codegen/emit-index.test.js +1 -1
- package/build/codegen/emit-index.test.js.map +1 -1
- package/build/codegen/emit-scope.d.ts +10 -1
- package/build/codegen/emit-scope.js +133 -54
- package/build/codegen/emit-scope.js.map +1 -1
- package/build/codegen/emit-scope.test.js +126 -9
- package/build/codegen/emit-scope.test.js.map +1 -1
- package/build/codegen/emit-types.d.ts +29 -0
- package/build/codegen/emit-types.js +79 -8
- package/build/codegen/emit-types.js.map +1 -1
- package/build/codegen/emit-types.test.js +103 -1
- package/build/codegen/emit-types.test.js.map +1 -1
- package/build/codegen/index.d.ts +2 -0
- package/build/codegen/index.js +2 -0
- package/build/codegen/index.js.map +1 -1
- package/build/codegen/pipeline.d.ts +2 -0
- package/build/codegen/pipeline.js +29 -4
- package/build/codegen/pipeline.js.map +1 -1
- package/build/codegen/pipeline.test.js +59 -1
- package/build/codegen/pipeline.test.js.map +1 -1
- package/package.json +10 -2
- package/src/client/call.ts +74 -0
- package/src/client/errors.ts +43 -0
- package/src/client/fetch-adapter.ts +191 -0
- package/src/client/hooks.ts +65 -0
- package/src/client/index.ts +121 -0
- package/src/client/request-builder.ts +73 -0
- package/src/client/stream.ts +164 -0
- package/src/client/types.ts +103 -0
package/README.md
CHANGED
|
@@ -953,8 +953,18 @@ generated/
|
|
|
953
953
|
| `--interval <ms>` | Watch poll interval (default: 3000) | No |
|
|
954
954
|
| `--dry-run` | Preview without writing files | No |
|
|
955
955
|
| `--client-import-path <path>` | Override import path (default: `ts-procedures/client`) | No |
|
|
956
|
-
| `--
|
|
957
|
-
| `--
|
|
956
|
+
| `--namespace-types` | Wrap types in nested TypeScript namespaces per scope/route | No |
|
|
957
|
+
| `--config <path>` | Path to config file (default: `ts-procedures-codegen.config.json`) | No |
|
|
958
|
+
| `--enum-style <union\|enum>` | TypeScript enum style (requires `--namespace-types`) | No |
|
|
959
|
+
| `--depluralize` | Singularize array item type names (requires `--namespace-types`) | No |
|
|
960
|
+
| `--array-item-naming <value>` | Postfix for array item type names (requires `--namespace-types`) | No |
|
|
961
|
+
| `--uncountable-words <list>` | Comma-separated words to skip singularization (requires `--namespace-types`) | No |
|
|
962
|
+
| `--jsdoc` | Emit JSDoc comments from JSON Schema descriptions (requires `--namespace-types`) | No |
|
|
963
|
+
| `--self-contained` | Emit `_types.ts` and `_client.ts` — no runtime dependency on `ts-procedures` | No |
|
|
964
|
+
|
|
965
|
+
> **Note:** ajsc formatting options (`--enum-style enum`, `--depluralize`, `--array-item-naming`, `--uncountable-words`, `--jsdoc`) only take effect with `--namespace-types`. In flat mode, all types are inlined and these options have no effect.
|
|
966
|
+
>
|
|
967
|
+
> You can also use a `ts-procedures-codegen.config.json` file in your project root instead of CLI flags. CLI flags override config values.
|
|
958
968
|
|
|
959
969
|
### Adapter Interface
|
|
960
970
|
|
|
@@ -1028,10 +1038,35 @@ await generateClient({
|
|
|
1028
1038
|
url: 'http://localhost:3000/docs',
|
|
1029
1039
|
outDir: './src/generated/api',
|
|
1030
1040
|
clientImportPath: '@my-app/procedures-client', // optional
|
|
1041
|
+
namespaceTypes: true, // optional — wrap types in nested namespaces
|
|
1042
|
+
selfContained: true, // optional — emit _types.ts + _client.ts (no ts-procedures runtime dep)
|
|
1031
1043
|
dryRun: false, // optional
|
|
1044
|
+
ajsc: { // optional — ajsc TypescriptConverter options
|
|
1045
|
+
enumStyle: 'union',
|
|
1046
|
+
depluralize: true,
|
|
1047
|
+
arrayItemNaming: 'Item',
|
|
1048
|
+
uncountableWords: ['criteria'],
|
|
1049
|
+
},
|
|
1032
1050
|
})
|
|
1033
1051
|
```
|
|
1034
1052
|
|
|
1053
|
+
### Self-Contained Mode
|
|
1054
|
+
|
|
1055
|
+
With `--self-contained`, the generated output includes two additional files in the output directory:
|
|
1056
|
+
|
|
1057
|
+
- **`_types.ts`** — All client type definitions (`ClientInstance`, `TypedStream`, `ProcedureCallOptions`, hooks, adapters, descriptors)
|
|
1058
|
+
- **`_client.ts`** — Full client runtime: `createClient`, `createFetchAdapter`, hook pipeline, and error classes (`ClientRequestError`, `ClientPathParamError`, `ClientStreamError`)
|
|
1059
|
+
|
|
1060
|
+
All generated scope files and `index.ts` import from `./_types` instead of `ts-procedures/client`, so app consumers can import everything from the generated directory without needing `ts-procedures` as a runtime dependency. `ts-procedures` becomes a devDependency only.
|
|
1061
|
+
|
|
1062
|
+
```typescript
|
|
1063
|
+
// Without --self-contained (default)
|
|
1064
|
+
import { createClient, createFetchAdapter } from 'ts-procedures/client'
|
|
1065
|
+
|
|
1066
|
+
// With --self-contained
|
|
1067
|
+
import { createClient, createFetchAdapter } from './generated/_client'
|
|
1068
|
+
```
|
|
1069
|
+
|
|
1035
1070
|
## AI Agent Setup
|
|
1036
1071
|
|
|
1037
1072
|
ts-procedures ships with built-in AI assistant configuration for **Claude Code**, **Cursor**, and **GitHub Copilot**. This gives AI tools framework-aware context when writing ts-procedures code in your project.
|
|
@@ -845,13 +845,20 @@ Build-time CLI and programmatic API for generating typed client files from a `Do
|
|
|
845
845
|
|
|
846
846
|
```typescript
|
|
847
847
|
// CLI usage (preferred)
|
|
848
|
-
// npx ts-procedures-codegen --url <url> --out <dir> [--
|
|
848
|
+
// npx ts-procedures-codegen --url <url> --out <dir> [--namespace-types] [--dry-run]
|
|
849
849
|
|
|
850
850
|
// Programmatic
|
|
851
851
|
async function generateClient(options: {
|
|
852
|
-
|
|
852
|
+
url?: string
|
|
853
|
+
file?: string
|
|
854
|
+
envelope?: DocEnvelope
|
|
853
855
|
outDir: string
|
|
854
|
-
|
|
856
|
+
ajsc?: AjscOptions
|
|
857
|
+
clientImportPath?: string
|
|
858
|
+
dryRun?: boolean
|
|
859
|
+
namespaceTypes?: boolean
|
|
860
|
+
selfContained?: boolean
|
|
861
|
+
}): Promise<GeneratedFile[]>
|
|
855
862
|
```
|
|
856
863
|
|
|
857
864
|
### CLI Options
|
|
@@ -859,27 +866,43 @@ async function generateClient(options: {
|
|
|
859
866
|
| Flag | Description |
|
|
860
867
|
|------|-------------|
|
|
861
868
|
| `--url <url>` | URL to fetch the `DocEnvelope` JSON from (e.g., `http://localhost:3000/docs`) |
|
|
869
|
+
| `--file <path>` | Read DocEnvelope from a local JSON file |
|
|
862
870
|
| `--out <dir>` | Output directory for generated files |
|
|
863
|
-
| `--
|
|
871
|
+
| `--watch` | Poll for changes and regenerate |
|
|
872
|
+
| `--interval <ms>` | Watch poll interval (default: 3000) |
|
|
873
|
+
| `--dry-run` | Preview without writing files |
|
|
874
|
+
| `--namespace-types` | Wrap types in nested TS namespaces (`Scope.Route.Params`) |
|
|
875
|
+
| `--config <path>` | Path to config file (default: `ts-procedures-codegen.config.json`) |
|
|
876
|
+
| `--client-import-path <path>` | Override import path (default: `ts-procedures/client`) |
|
|
877
|
+
| `--enum-style <union\|enum>` | TypeScript enum style (requires `--namespace-types`) |
|
|
878
|
+
| `--depluralize` | Singularize array item type names (requires `--namespace-types`) |
|
|
879
|
+
| `--array-item-naming <value>` | Postfix for array item type names (requires `--namespace-types`) |
|
|
880
|
+
| `--uncountable-words <list>` | Comma-separated words to skip singularization (requires `--namespace-types`) |
|
|
881
|
+
| `--jsdoc` | Emit JSDoc comments from schema descriptions (requires `--namespace-types`) |
|
|
882
|
+
| `--self-contained` | Emit `_types.ts` and `_client.ts` in output dir — no runtime dependency on `ts-procedures` |
|
|
864
883
|
|
|
865
884
|
### Generated Output
|
|
866
885
|
|
|
867
886
|
- One `.ts` file per scope (e.g., `users.ts`, `events.ts`)
|
|
868
887
|
- A root `index.ts` exporting `createScopeBindings`
|
|
869
888
|
- Each scope file exports fully-typed callable functions and TypeScript types
|
|
889
|
+
- With `--namespace-types`: types are wrapped in `export namespace Scope { export namespace Route { ... } }`
|
|
870
890
|
|
|
871
891
|
### Example
|
|
872
892
|
|
|
873
893
|
```typescript
|
|
874
894
|
// CLI
|
|
875
|
-
// npx ts-procedures-codegen --url http://localhost:3000/docs --out ./src/generated/api
|
|
895
|
+
// npx ts-procedures-codegen --url http://localhost:3000/docs --out ./src/generated/api --namespace-types
|
|
876
896
|
|
|
877
897
|
// Programmatic
|
|
878
898
|
import { generateClient } from 'ts-procedures/codegen'
|
|
879
899
|
|
|
880
900
|
await generateClient({
|
|
881
|
-
|
|
901
|
+
url: 'http://localhost:3000/docs',
|
|
882
902
|
outDir: './src/generated/api',
|
|
903
|
+
namespaceTypes: true,
|
|
904
|
+
selfContained: true, // emit _types.ts + _client.ts (no runtime dep)
|
|
905
|
+
ajsc: { depluralize: true, arrayItemNaming: 'Item' },
|
|
883
906
|
})
|
|
884
907
|
```
|
|
885
908
|
|
|
@@ -780,6 +780,7 @@ app.get('/docs', (c) => c.json(docs.toJSON()))
|
|
|
780
780
|
|
|
781
781
|
// Then generate client:
|
|
782
782
|
// npx ts-procedures-codegen --url http://localhost:3000/docs --out ./src/generated/api
|
|
783
|
+
// Optional: --namespace-types --self-contained --depluralize --enum-style union
|
|
783
784
|
```
|
|
784
785
|
|
|
785
786
|
---
|
|
@@ -312,9 +312,16 @@ import { generateClient } from 'ts-procedures/codegen'
|
|
|
312
312
|
|
|
313
313
|
```bash
|
|
314
314
|
npx ts-procedures-codegen --url http://localhost:3000/docs --out ./src/generated/api
|
|
315
|
+
# Optional flags: --namespace-types --jsdoc --depluralize --enum-style union
|
|
316
|
+
# --array-item-naming Item --uncountable-words criteria,alumni
|
|
317
|
+
# --dry-run --watch --client-import-path @my-app/client
|
|
318
|
+
# --config ./codegen.config.json --self-contained
|
|
315
319
|
```
|
|
316
320
|
|
|
317
321
|
Generates one `.ts` file per scope plus a root `index.ts` exporting `createScopeBindings`.
|
|
322
|
+
Use `--namespace-types` to wrap types in nested TS namespaces (`Scope.Route.Params` instead of flat `RouteParams`).
|
|
323
|
+
Note: ajsc formatting options (`--enum-style enum`, `--depluralize`, `--jsdoc`, etc.) only take effect with `--namespace-types`.
|
|
324
|
+
Supports config file: `ts-procedures-codegen.config.json` (auto-loaded from CWD) or `--config <path>`.
|
|
318
325
|
|
|
319
326
|
### createClient Example
|
|
320
327
|
|
|
@@ -312,9 +312,16 @@ import { generateClient } from 'ts-procedures/codegen'
|
|
|
312
312
|
|
|
313
313
|
```bash
|
|
314
314
|
npx ts-procedures-codegen --url http://localhost:3000/docs --out ./src/generated/api
|
|
315
|
+
# Optional flags: --namespace-types --jsdoc --depluralize --enum-style union
|
|
316
|
+
# --array-item-naming Item --uncountable-words criteria,alumni
|
|
317
|
+
# --dry-run --watch --client-import-path @my-app/client
|
|
318
|
+
# --config ./codegen.config.json --self-contained
|
|
315
319
|
```
|
|
316
320
|
|
|
317
321
|
Generates one `.ts` file per scope plus a root `index.ts` exporting `createScopeBindings`.
|
|
322
|
+
Use `--namespace-types` to wrap types in nested TS namespaces (`Scope.Route.Params` instead of flat `RouteParams`).
|
|
323
|
+
Note: ajsc formatting options (`--enum-style enum`, `--depluralize`, `--jsdoc`, etc.) only take effect with `--namespace-types`.
|
|
324
|
+
Supports config file: `ts-procedures-codegen.config.json` (auto-loaded from CWD) or `--config <path>`.
|
|
318
325
|
|
|
319
326
|
### createClient Example
|
|
320
327
|
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import type { AjscOptions } from '../emit-types.js';
|
|
3
|
+
export interface CodegenConfig {
|
|
4
|
+
url?: string;
|
|
5
|
+
file?: string;
|
|
6
|
+
outDir?: string;
|
|
7
|
+
watch?: boolean;
|
|
8
|
+
interval?: number;
|
|
9
|
+
ajsc?: AjscOptions;
|
|
10
|
+
clientImportPath?: string;
|
|
11
|
+
dryRun?: boolean;
|
|
12
|
+
namespaceTypes?: boolean;
|
|
13
|
+
selfContained?: boolean;
|
|
14
|
+
}
|
|
3
15
|
export interface ParsedArgs {
|
|
4
16
|
url?: string;
|
|
5
17
|
file?: string;
|
|
@@ -9,9 +21,23 @@ export interface ParsedArgs {
|
|
|
9
21
|
ajsc?: AjscOptions;
|
|
10
22
|
clientImportPath?: string;
|
|
11
23
|
dryRun: boolean;
|
|
24
|
+
namespaceTypes: boolean;
|
|
25
|
+
selfContained: boolean;
|
|
12
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Loads a JSON config file. Returns undefined if the file doesn't exist.
|
|
29
|
+
* Throws on parse errors.
|
|
30
|
+
*/
|
|
31
|
+
export declare function loadConfigFile(configPath?: string): Promise<CodegenConfig | undefined>;
|
|
13
32
|
/**
|
|
14
33
|
* Parses CLI argv (pass process.argv.slice(2)).
|
|
15
34
|
* Throws with a descriptive message on validation errors.
|
|
35
|
+
*
|
|
36
|
+
* When a config object is provided, its values are used as defaults
|
|
37
|
+
* and CLI flags override them.
|
|
38
|
+
*/
|
|
39
|
+
export declare function parseArgs(argv: string[], config?: CodegenConfig): ParsedArgs;
|
|
40
|
+
/**
|
|
41
|
+
* Extracts the --config value from argv without full parsing.
|
|
16
42
|
*/
|
|
17
|
-
export declare function
|
|
43
|
+
export declare function extractConfigPath(argv: string[]): string | undefined;
|
package/build/codegen/bin/cli.js
CHANGED
|
@@ -1,23 +1,54 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { readFile } from 'node:fs/promises';
|
|
3
|
+
import { resolve } from 'node:path';
|
|
2
4
|
import { createHash } from 'node:crypto';
|
|
3
5
|
import { generateClient } from '../index.js';
|
|
4
6
|
// ---------------------------------------------------------------------------
|
|
7
|
+
// Config file loading
|
|
8
|
+
// ---------------------------------------------------------------------------
|
|
9
|
+
const DEFAULT_CONFIG_NAME = 'ts-procedures-codegen.config.json';
|
|
10
|
+
/**
|
|
11
|
+
* Loads a JSON config file. Returns undefined if the file doesn't exist.
|
|
12
|
+
* Throws on parse errors.
|
|
13
|
+
*/
|
|
14
|
+
export async function loadConfigFile(configPath) {
|
|
15
|
+
const filePath = resolve(configPath ?? DEFAULT_CONFIG_NAME);
|
|
16
|
+
try {
|
|
17
|
+
const raw = await readFile(filePath, 'utf8');
|
|
18
|
+
return JSON.parse(raw);
|
|
19
|
+
}
|
|
20
|
+
catch (err) {
|
|
21
|
+
if (configPath !== undefined) {
|
|
22
|
+
// Explicit path — always throw
|
|
23
|
+
throw new Error(`[ts-procedures-codegen] Failed to load config from ${filePath}: ${err instanceof Error ? err.message : err}`);
|
|
24
|
+
}
|
|
25
|
+
// Default path — silently ignore if not found
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
// ---------------------------------------------------------------------------
|
|
5
30
|
// parseArgs
|
|
6
31
|
// ---------------------------------------------------------------------------
|
|
7
32
|
/**
|
|
8
33
|
* Parses CLI argv (pass process.argv.slice(2)).
|
|
9
34
|
* Throws with a descriptive message on validation errors.
|
|
35
|
+
*
|
|
36
|
+
* When a config object is provided, its values are used as defaults
|
|
37
|
+
* and CLI flags override them.
|
|
10
38
|
*/
|
|
11
|
-
export function parseArgs(argv) {
|
|
12
|
-
let url;
|
|
13
|
-
let file;
|
|
14
|
-
let outDir;
|
|
15
|
-
let watch = false;
|
|
16
|
-
let interval = 3000;
|
|
17
|
-
const ajsc = {};
|
|
18
|
-
let hasAjsc =
|
|
19
|
-
let clientImportPath;
|
|
20
|
-
let dryRun = false;
|
|
39
|
+
export function parseArgs(argv, config) {
|
|
40
|
+
let url = config?.url;
|
|
41
|
+
let file = config?.file;
|
|
42
|
+
let outDir = config?.outDir;
|
|
43
|
+
let watch = config?.watch ?? false;
|
|
44
|
+
let interval = config?.interval ?? 3000;
|
|
45
|
+
const ajsc = { ...config?.ajsc };
|
|
46
|
+
let hasAjsc = config?.ajsc != null;
|
|
47
|
+
let clientImportPath = config?.clientImportPath;
|
|
48
|
+
let dryRun = config?.dryRun ?? false;
|
|
49
|
+
let namespaceTypes = config?.namespaceTypes ?? false;
|
|
50
|
+
let selfContained = config?.selfContained ?? false;
|
|
51
|
+
let configPath;
|
|
21
52
|
for (let i = 0; i < argv.length; i++) {
|
|
22
53
|
const arg = argv[i];
|
|
23
54
|
if (arg === '--url') {
|
|
@@ -46,13 +77,37 @@ export function parseArgs(argv) {
|
|
|
46
77
|
ajsc.depluralize = true;
|
|
47
78
|
hasAjsc = true;
|
|
48
79
|
}
|
|
80
|
+
else if (arg === '--array-item-naming') {
|
|
81
|
+
const val = argv[++i];
|
|
82
|
+
ajsc.arrayItemNaming = val === 'false' ? false : val;
|
|
83
|
+
hasAjsc = true;
|
|
84
|
+
}
|
|
85
|
+
else if (arg === '--uncountable-words') {
|
|
86
|
+
ajsc.uncountableWords = (argv[++i] ?? '').split(',').map((w) => w.trim()).filter(Boolean);
|
|
87
|
+
hasAjsc = true;
|
|
88
|
+
}
|
|
89
|
+
else if (arg === '--jsdoc') {
|
|
90
|
+
ajsc.jsdoc = true;
|
|
91
|
+
hasAjsc = true;
|
|
92
|
+
}
|
|
49
93
|
else if (arg === '--client-import-path') {
|
|
50
94
|
clientImportPath = argv[++i];
|
|
51
95
|
}
|
|
52
96
|
else if (arg === '--dry-run') {
|
|
53
97
|
dryRun = true;
|
|
54
98
|
}
|
|
99
|
+
else if (arg === '--namespace-types') {
|
|
100
|
+
namespaceTypes = true;
|
|
101
|
+
}
|
|
102
|
+
else if (arg === '--self-contained') {
|
|
103
|
+
selfContained = true;
|
|
104
|
+
}
|
|
105
|
+
else if (arg === '--config') {
|
|
106
|
+
configPath = argv[++i];
|
|
107
|
+
}
|
|
55
108
|
}
|
|
109
|
+
// configPath is consumed by the caller (main) before parseArgs is called with the loaded config.
|
|
110
|
+
// When called from main, config is already loaded. When called directly (tests), configPath is ignored.
|
|
56
111
|
if (outDir === undefined) {
|
|
57
112
|
throw new Error('Missing required argument: --out <dir>');
|
|
58
113
|
}
|
|
@@ -68,8 +123,20 @@ export function parseArgs(argv) {
|
|
|
68
123
|
...(hasAjsc ? { ajsc } : {}),
|
|
69
124
|
...(clientImportPath !== undefined ? { clientImportPath } : {}),
|
|
70
125
|
dryRun,
|
|
126
|
+
namespaceTypes,
|
|
127
|
+
selfContained,
|
|
71
128
|
};
|
|
72
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* Extracts the --config value from argv without full parsing.
|
|
132
|
+
*/
|
|
133
|
+
export function extractConfigPath(argv) {
|
|
134
|
+
for (let i = 0; i < argv.length; i++) {
|
|
135
|
+
if (argv[i] === '--config')
|
|
136
|
+
return argv[i + 1];
|
|
137
|
+
}
|
|
138
|
+
return undefined;
|
|
139
|
+
}
|
|
73
140
|
// ---------------------------------------------------------------------------
|
|
74
141
|
// Watch mode
|
|
75
142
|
// ---------------------------------------------------------------------------
|
|
@@ -84,6 +151,8 @@ async function runWithWatch(parsed) {
|
|
|
84
151
|
ajsc: parsed.ajsc,
|
|
85
152
|
clientImportPath: parsed.clientImportPath,
|
|
86
153
|
dryRun: parsed.dryRun,
|
|
154
|
+
namespaceTypes: parsed.namespaceTypes,
|
|
155
|
+
selfContained: parsed.selfContained,
|
|
87
156
|
};
|
|
88
157
|
let lastHash;
|
|
89
158
|
const run = async () => {
|
|
@@ -103,6 +172,8 @@ async function runWithWatch(parsed) {
|
|
|
103
172
|
ajsc: parsed.ajsc,
|
|
104
173
|
clientImportPath: parsed.clientImportPath,
|
|
105
174
|
dryRun: parsed.dryRun,
|
|
175
|
+
namespaceTypes: parsed.namespaceTypes,
|
|
176
|
+
selfContained: parsed.selfContained,
|
|
106
177
|
});
|
|
107
178
|
console.log(`[ts-procedures-codegen] Generated client files → ${parsed.outDir}`);
|
|
108
179
|
}
|
|
@@ -119,7 +190,13 @@ async function runWithWatch(parsed) {
|
|
|
119
190
|
// Main
|
|
120
191
|
// ---------------------------------------------------------------------------
|
|
121
192
|
async function main() {
|
|
122
|
-
const
|
|
193
|
+
const argv = process.argv.slice(2);
|
|
194
|
+
const configPath = extractConfigPath(argv);
|
|
195
|
+
const config = await loadConfigFile(configPath);
|
|
196
|
+
if (config != null) {
|
|
197
|
+
console.log(`[ts-procedures-codegen] Loaded config from ${configPath ?? DEFAULT_CONFIG_NAME}`);
|
|
198
|
+
}
|
|
199
|
+
const parsed = parseArgs(argv, config);
|
|
123
200
|
const source = parsed.url ?? parsed.file;
|
|
124
201
|
console.log(`[ts-procedures-codegen] Reading docs from ${source}...`);
|
|
125
202
|
if (parsed.watch) {
|
|
@@ -133,6 +210,8 @@ async function main() {
|
|
|
133
210
|
ajsc: parsed.ajsc,
|
|
134
211
|
clientImportPath: parsed.clientImportPath,
|
|
135
212
|
dryRun: parsed.dryRun,
|
|
213
|
+
namespaceTypes: parsed.namespaceTypes,
|
|
214
|
+
selfContained: parsed.selfContained,
|
|
136
215
|
});
|
|
137
216
|
if (parsed.dryRun) {
|
|
138
217
|
console.log(`[ts-procedures-codegen] Dry run complete — ${result.length} files would be generated`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/codegen/bin/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,cAAc,EAA8B,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/codegen/bin/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,cAAc,EAA8B,MAAM,aAAa,CAAA;AAiCxE,8EAA8E;AAC9E,sBAAsB;AACtB,8EAA8E;AAE9E,MAAM,mBAAmB,GAAG,mCAAmC,CAAA;AAE/D;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,UAAmB;IACtD,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,IAAI,mBAAmB,CAAC,CAAA;IAC3D,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;QAC5C,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAkB,CAAA;IACzC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC7B,+BAA+B;YAC/B,MAAM,IAAI,KAAK,CAAC,sDAAsD,QAAQ,KAAK,GAAG,YAAY,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QAAQ,CAAC;IACnC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;AAEnC,IAAI,MAAM,EAAE,CAAC;IACX,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;QAC5B,OAAO,CAAC,KAAK,CAAC,sCAAsC,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;QAC/F,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { parseArgs } from './cli.js';
|
|
2
|
+
import { parseArgs, loadConfigFile, extractConfigPath } from './cli.js';
|
|
3
3
|
describe('parseArgs', () => {
|
|
4
4
|
it('parses --url and --out', () => {
|
|
5
5
|
const result = parseArgs(['--url', 'http://localhost:3000/docs', '--out', './generated']);
|
|
@@ -79,5 +79,100 @@ describe('parseArgs', () => {
|
|
|
79
79
|
const result = parseArgs(['--url', 'http://x.com/docs', '--out', './out']);
|
|
80
80
|
expect(result.dryRun).toBe(false);
|
|
81
81
|
});
|
|
82
|
+
it('parses --namespace-types flag', () => {
|
|
83
|
+
const result = parseArgs(['--url', 'http://x.com/docs', '--out', './out', '--namespace-types']);
|
|
84
|
+
expect(result.namespaceTypes).toBe(true);
|
|
85
|
+
});
|
|
86
|
+
it('defaults namespaceTypes to false when not provided', () => {
|
|
87
|
+
const result = parseArgs(['--url', 'http://x.com/docs', '--out', './out']);
|
|
88
|
+
expect(result.namespaceTypes).toBe(false);
|
|
89
|
+
});
|
|
90
|
+
it('parses --jsdoc flag', () => {
|
|
91
|
+
const result = parseArgs(['--url', 'http://x.com/docs', '--out', './out', '--jsdoc']);
|
|
92
|
+
expect(result.ajsc?.jsdoc).toBe(true);
|
|
93
|
+
});
|
|
94
|
+
it('parses --array-item-naming with a string value', () => {
|
|
95
|
+
const result = parseArgs(['--url', 'http://x.com/docs', '--out', './out', '--array-item-naming', 'Item']);
|
|
96
|
+
expect(result.ajsc?.arrayItemNaming).toBe('Item');
|
|
97
|
+
});
|
|
98
|
+
it('parses --array-item-naming false to disable', () => {
|
|
99
|
+
const result = parseArgs(['--url', 'http://x.com/docs', '--out', './out', '--array-item-naming', 'false']);
|
|
100
|
+
expect(result.ajsc?.arrayItemNaming).toBe(false);
|
|
101
|
+
});
|
|
102
|
+
it('parses --uncountable-words as comma-separated list', () => {
|
|
103
|
+
const result = parseArgs(['--url', 'http://x.com/docs', '--out', './out', '--uncountable-words', 'criteria,alumni,corpus']);
|
|
104
|
+
expect(result.ajsc?.uncountableWords).toEqual(['criteria', 'alumni', 'corpus']);
|
|
105
|
+
});
|
|
106
|
+
it('trims whitespace in --uncountable-words', () => {
|
|
107
|
+
const result = parseArgs(['--url', 'http://x.com/docs', '--out', './out', '--uncountable-words', ' data , info ']);
|
|
108
|
+
expect(result.ajsc?.uncountableWords).toEqual(['data', 'info']);
|
|
109
|
+
});
|
|
110
|
+
it('parses --self-contained flag', () => {
|
|
111
|
+
const result = parseArgs(['--url', 'http://x.com/docs', '--out', './out', '--self-contained']);
|
|
112
|
+
expect(result.selfContained).toBe(true);
|
|
113
|
+
});
|
|
114
|
+
it('defaults selfContained to false when not provided', () => {
|
|
115
|
+
const result = parseArgs(['--url', 'http://x.com/docs', '--out', './out']);
|
|
116
|
+
expect(result.selfContained).toBe(false);
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
describe('config file support', () => {
|
|
120
|
+
it('parseArgs uses config as defaults', () => {
|
|
121
|
+
const config = {
|
|
122
|
+
url: 'http://config.com/docs',
|
|
123
|
+
outDir: './config-out',
|
|
124
|
+
namespaceTypes: true,
|
|
125
|
+
ajsc: { enumStyle: 'enum', depluralize: true },
|
|
126
|
+
};
|
|
127
|
+
const result = parseArgs([], config);
|
|
128
|
+
expect(result.url).toBe('http://config.com/docs');
|
|
129
|
+
expect(result.outDir).toBe('./config-out');
|
|
130
|
+
expect(result.namespaceTypes).toBe(true);
|
|
131
|
+
expect(result.ajsc?.enumStyle).toBe('enum');
|
|
132
|
+
expect(result.ajsc?.depluralize).toBe(true);
|
|
133
|
+
});
|
|
134
|
+
it('CLI flags override config values', () => {
|
|
135
|
+
const config = {
|
|
136
|
+
url: 'http://config.com/docs',
|
|
137
|
+
outDir: './config-out',
|
|
138
|
+
namespaceTypes: false,
|
|
139
|
+
};
|
|
140
|
+
const result = parseArgs(['--url', 'http://override.com/docs', '--out', './override-out', '--namespace-types'], config);
|
|
141
|
+
expect(result.url).toBe('http://override.com/docs');
|
|
142
|
+
expect(result.outDir).toBe('./override-out');
|
|
143
|
+
expect(result.namespaceTypes).toBe(true);
|
|
144
|
+
});
|
|
145
|
+
it('config file selfContained is used as default', () => {
|
|
146
|
+
const config = {
|
|
147
|
+
url: 'http://config.com/docs',
|
|
148
|
+
outDir: './config-out',
|
|
149
|
+
selfContained: true,
|
|
150
|
+
};
|
|
151
|
+
const result = parseArgs([], config);
|
|
152
|
+
expect(result.selfContained).toBe(true);
|
|
153
|
+
});
|
|
154
|
+
it('CLI ajsc flags merge with config ajsc', () => {
|
|
155
|
+
const config = {
|
|
156
|
+
url: 'http://config.com/docs',
|
|
157
|
+
outDir: './out',
|
|
158
|
+
ajsc: { enumStyle: 'enum' },
|
|
159
|
+
};
|
|
160
|
+
const result = parseArgs(['--depluralize'], config);
|
|
161
|
+
expect(result.ajsc?.enumStyle).toBe('enum');
|
|
162
|
+
expect(result.ajsc?.depluralize).toBe(true);
|
|
163
|
+
});
|
|
164
|
+
it('extractConfigPath finds --config value', () => {
|
|
165
|
+
expect(extractConfigPath(['--config', 'my-config.json', '--out', './out'])).toBe('my-config.json');
|
|
166
|
+
});
|
|
167
|
+
it('extractConfigPath returns undefined when not provided', () => {
|
|
168
|
+
expect(extractConfigPath(['--out', './out'])).toBeUndefined();
|
|
169
|
+
});
|
|
170
|
+
it('loadConfigFile returns undefined for non-existent default path', async () => {
|
|
171
|
+
const result = await loadConfigFile();
|
|
172
|
+
expect(result).toBeUndefined();
|
|
173
|
+
});
|
|
174
|
+
it('loadConfigFile throws for explicit non-existent path', async () => {
|
|
175
|
+
await expect(loadConfigFile('/nonexistent/config.json')).rejects.toThrow('Failed to load config');
|
|
176
|
+
});
|
|
82
177
|
});
|
|
83
178
|
//# sourceMappingURL=cli.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.test.js","sourceRoot":"","sources":["../../../src/codegen/bin/cli.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"cli.test.js","sourceRoot":"","sources":["../../../src/codegen/bin/cli.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,iBAAiB,EAAsB,MAAM,UAAU,CAAA;AAE3F,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,wBAAwB,EAAE,GAAG,EAAE;QAChC,MAAM,MAAM,GAAG,SAAS,CAAC,CAAC,OAAO,EAAE,4BAA4B,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAA;QACzF,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAA;QACrD,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;QACzC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,CAAA;IACrC,CAAC,CAAC,CAAA;IAEF,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c,CAAC,0BAA0B,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAA;IACnG,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CODEGEN_HEADER = "// Auto-generated by ts-procedures-codegen \u2014 do not edit";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/codegen/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,0DAA0D,CAAA"}
|