ts-procedures 6.1.0 → 6.2.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/agent_config/bin/setup.mjs +2 -2
- package/agent_config/claude-code/skills/ts-procedures/SKILL.md +1 -0
- package/agent_config/claude-code/skills/ts-procedures/api-reference.md +1 -1
- package/agent_config/claude-code/skills/ts-procedures-kotlin/SKILL.md +1 -1
- package/agent_config/claude-code/skills/ts-procedures-swift/SKILL.md +119 -0
- package/agent_config/copilot/copilot-instructions.md +1 -0
- package/agent_config/cursor/cursorrules +1 -0
- package/agent_config/lib/install-claude.mjs +1 -1
- package/build/codegen/bin/cli.d.ts +17 -3
- package/build/codegen/bin/cli.js +79 -3
- package/build/codegen/bin/cli.js.map +1 -1
- package/build/codegen/index.d.ts +18 -1
- package/build/codegen/index.js +3 -0
- package/build/codegen/index.js.map +1 -1
- package/build/codegen/pipeline.d.ts +16 -5
- package/build/codegen/pipeline.js +44 -143
- package/build/codegen/pipeline.js.map +1 -1
- package/build/codegen/targets/_shared/error-schemas.d.ts +10 -0
- package/build/codegen/targets/_shared/error-schemas.js +17 -0
- package/build/codegen/targets/_shared/error-schemas.js.map +1 -0
- package/build/codegen/targets/_shared/error-schemas.test.d.ts +1 -0
- package/build/codegen/targets/_shared/error-schemas.test.js +38 -0
- package/build/codegen/targets/_shared/error-schemas.test.js.map +1 -0
- package/build/codegen/targets/_shared/indent.d.ts +6 -0
- package/build/codegen/targets/_shared/indent.js +13 -0
- package/build/codegen/targets/_shared/indent.js.map +1 -0
- package/build/codegen/targets/_shared/indent.test.d.ts +1 -0
- package/build/codegen/targets/_shared/indent.test.js +21 -0
- package/build/codegen/targets/_shared/indent.test.js.map +1 -0
- package/build/codegen/targets/_shared/pascal-case.d.ts +6 -0
- package/build/codegen/targets/_shared/pascal-case.js +13 -0
- package/build/codegen/targets/_shared/pascal-case.js.map +1 -0
- package/build/codegen/targets/_shared/pascal-case.test.d.ts +1 -0
- package/build/codegen/targets/_shared/pascal-case.test.js +25 -0
- package/build/codegen/targets/_shared/pascal-case.test.js.map +1 -0
- package/build/codegen/targets/_shared/path-utils.d.ts +12 -0
- package/build/codegen/targets/_shared/path-utils.js +20 -0
- package/build/codegen/targets/_shared/path-utils.js.map +1 -0
- package/build/codegen/targets/_shared/path-utils.test.d.ts +1 -0
- package/build/codegen/targets/_shared/path-utils.test.js +42 -0
- package/build/codegen/targets/_shared/path-utils.test.js.map +1 -0
- package/build/codegen/targets/_shared/pick-defined.d.ts +11 -0
- package/build/codegen/targets/_shared/pick-defined.js +21 -0
- package/build/codegen/targets/_shared/pick-defined.js.map +1 -0
- package/build/codegen/targets/_shared/pick-defined.test.d.ts +1 -0
- package/build/codegen/targets/_shared/pick-defined.test.js +25 -0
- package/build/codegen/targets/_shared/pick-defined.test.js.map +1 -0
- package/build/codegen/targets/_shared/route-slots.d.ts +17 -0
- package/build/codegen/targets/_shared/route-slots.js +17 -0
- package/build/codegen/targets/_shared/route-slots.js.map +1 -0
- package/build/codegen/targets/_shared/route-slots.test.d.ts +1 -0
- package/build/codegen/targets/_shared/route-slots.test.js +43 -0
- package/build/codegen/targets/_shared/route-slots.test.js.map +1 -0
- package/build/codegen/targets/_shared/target-run.d.ts +27 -0
- package/build/codegen/targets/_shared/target-run.js +2 -0
- package/build/codegen/targets/_shared/target-run.js.map +1 -0
- package/build/codegen/targets/_shared/write-files.d.ts +24 -0
- package/build/codegen/targets/_shared/write-files.js +35 -0
- package/build/codegen/targets/_shared/write-files.js.map +1 -0
- package/build/codegen/targets/_shared/write-files.test.d.ts +1 -0
- package/build/codegen/targets/_shared/write-files.test.js +79 -0
- package/build/codegen/targets/_shared/write-files.test.js.map +1 -0
- package/build/codegen/targets/kotlin/e2e-compile.test.js +1 -1
- package/build/codegen/targets/kotlin/e2e-compile.test.js.map +1 -1
- package/build/codegen/targets/kotlin/emit-route-kotlin.js +5 -22
- package/build/codegen/targets/kotlin/emit-route-kotlin.js.map +1 -1
- package/build/codegen/targets/kotlin/emit-scope-kotlin.js +4 -8
- package/build/codegen/targets/kotlin/emit-scope-kotlin.js.map +1 -1
- package/build/codegen/targets/kotlin/format-kotlin.d.ts +0 -12
- package/build/codegen/targets/kotlin/format-kotlin.js +0 -27
- package/build/codegen/targets/kotlin/format-kotlin.js.map +1 -1
- package/build/codegen/targets/kotlin/format-kotlin.test.js +1 -34
- package/build/codegen/targets/kotlin/format-kotlin.test.js.map +1 -1
- package/build/codegen/targets/kotlin/integration.test.js +1 -1
- package/build/codegen/targets/kotlin/integration.test.js.map +1 -1
- package/build/codegen/targets/kotlin/run.d.ts +11 -0
- package/build/codegen/targets/kotlin/run.js +51 -0
- package/build/codegen/targets/kotlin/run.js.map +1 -0
- package/build/codegen/targets/swift/access-level.test.d.ts +1 -0
- package/build/codegen/targets/swift/access-level.test.js +98 -0
- package/build/codegen/targets/swift/access-level.test.js.map +1 -0
- package/build/codegen/targets/swift/ajsc-adapter.d.ts +27 -0
- package/build/codegen/targets/swift/ajsc-adapter.js +38 -0
- package/build/codegen/targets/swift/ajsc-adapter.js.map +1 -0
- package/build/codegen/targets/swift/ajsc-adapter.test.d.ts +1 -0
- package/build/codegen/targets/swift/ajsc-adapter.test.js +37 -0
- package/build/codegen/targets/swift/ajsc-adapter.test.js.map +1 -0
- package/build/codegen/targets/swift/e2e-compile.test.d.ts +1 -0
- package/build/codegen/targets/swift/e2e-compile.test.js +57 -0
- package/build/codegen/targets/swift/e2e-compile.test.js.map +1 -0
- package/build/codegen/targets/swift/emit-route-swift.d.ts +15 -0
- package/build/codegen/targets/swift/emit-route-swift.js +64 -0
- package/build/codegen/targets/swift/emit-route-swift.js.map +1 -0
- package/build/codegen/targets/swift/emit-route-swift.test.d.ts +1 -0
- package/build/codegen/targets/swift/emit-route-swift.test.js +258 -0
- package/build/codegen/targets/swift/emit-route-swift.test.js.map +1 -0
- package/build/codegen/targets/swift/emit-scope-swift.d.ts +13 -0
- package/build/codegen/targets/swift/emit-scope-swift.js +36 -0
- package/build/codegen/targets/swift/emit-scope-swift.js.map +1 -0
- package/build/codegen/targets/swift/emit-scope-swift.test.d.ts +1 -0
- package/build/codegen/targets/swift/emit-scope-swift.test.js +136 -0
- package/build/codegen/targets/swift/emit-scope-swift.test.js.map +1 -0
- package/build/codegen/targets/swift/format-swift.d.ts +2 -0
- package/build/codegen/targets/swift/format-swift.js +10 -0
- package/build/codegen/targets/swift/format-swift.js.map +1 -0
- package/build/codegen/targets/swift/format-swift.test.d.ts +1 -0
- package/build/codegen/targets/swift/format-swift.test.js +14 -0
- package/build/codegen/targets/swift/format-swift.test.js.map +1 -0
- package/build/codegen/targets/swift/integration.test.d.ts +1 -0
- package/build/codegen/targets/swift/integration.test.js +53 -0
- package/build/codegen/targets/swift/integration.test.js.map +1 -0
- package/build/codegen/targets/swift/run.d.ts +11 -0
- package/build/codegen/targets/swift/run.js +47 -0
- package/build/codegen/targets/swift/run.js.map +1 -0
- package/build/codegen/targets/ts/run.d.ts +4 -0
- package/build/codegen/targets/ts/run.js +86 -0
- package/build/codegen/targets/ts/run.js.map +1 -0
- package/docs/codegen-kotlin.md +1 -0
- package/docs/codegen-swift.md +314 -0
- package/docs/superpowers/specs/2026-04-24-kotlin-swift-codegen-design.md +1 -1
- package/docs/superpowers/specs/2026-04-25-ajsc-v7-kotlin-polish-design.md +1 -1
- package/docs/superpowers/specs/2026-04-25-swift-codegen-design.md +264 -0
- package/package.json +2 -2
- package/src/codegen/bin/cli.ts +91 -7
- package/src/codegen/index.ts +24 -1
- package/src/codegen/pipeline.ts +52 -174
- package/src/codegen/targets/_shared/error-schemas.test.ts +42 -0
- package/src/codegen/targets/_shared/error-schemas.ts +17 -0
- package/src/codegen/targets/_shared/indent.test.ts +25 -0
- package/src/codegen/targets/_shared/indent.ts +12 -0
- package/src/codegen/targets/_shared/pascal-case.test.ts +30 -0
- package/src/codegen/targets/_shared/pascal-case.ts +12 -0
- package/src/codegen/targets/_shared/path-utils.test.ts +51 -0
- package/src/codegen/targets/_shared/path-utils.ts +21 -0
- package/src/codegen/targets/_shared/pick-defined.test.ts +48 -0
- package/src/codegen/targets/_shared/pick-defined.ts +23 -0
- package/src/codegen/targets/_shared/route-slots.test.ts +55 -0
- package/src/codegen/targets/_shared/route-slots.ts +32 -0
- package/src/codegen/targets/_shared/target-run.ts +28 -0
- package/src/codegen/targets/_shared/write-files.test.ts +110 -0
- package/src/codegen/targets/_shared/write-files.ts +53 -0
- package/src/codegen/targets/kotlin/e2e-compile.test.ts +1 -1
- package/src/codegen/targets/kotlin/emit-route-kotlin.ts +5 -25
- package/src/codegen/targets/kotlin/emit-scope-kotlin.ts +4 -9
- package/src/codegen/targets/kotlin/format-kotlin.test.ts +0 -44
- package/src/codegen/targets/kotlin/format-kotlin.ts +0 -32
- package/src/codegen/targets/kotlin/integration.test.ts +1 -1
- package/src/codegen/targets/kotlin/run.ts +78 -0
- package/src/codegen/targets/swift/__fixtures__/users-golden.swift +123 -0
- package/src/codegen/targets/swift/access-level.test.ts +108 -0
- package/src/codegen/targets/swift/ajsc-adapter.test.ts +47 -0
- package/src/codegen/targets/swift/ajsc-adapter.ts +67 -0
- package/src/codegen/targets/swift/e2e-compile.test.ts +66 -0
- package/src/codegen/targets/swift/emit-route-swift.test.ts +300 -0
- package/src/codegen/targets/swift/emit-route-swift.ts +90 -0
- package/src/codegen/targets/swift/emit-scope-swift.test.ts +164 -0
- package/src/codegen/targets/swift/emit-scope-swift.ts +59 -0
- package/src/codegen/targets/swift/format-swift.test.ts +23 -0
- package/src/codegen/targets/swift/format-swift.ts +9 -0
- package/src/codegen/targets/swift/integration.test.ts +80 -0
- package/src/codegen/targets/swift/run.ts +74 -0
- package/src/codegen/targets/ts/run.ts +117 -0
- /package/src/codegen/{targets/kotlin/__fixtures__ → __fixtures__}/users-envelope.json +0 -0
|
@@ -92,7 +92,7 @@ function setupClaude({ dryRun, check } = {}) {
|
|
|
92
92
|
// Mirror install-claude.mjs: copy every file under each source skill dir, plus the agent.
|
|
93
93
|
const claudeFiles = [];
|
|
94
94
|
const skillsSrc = join(AGENT_CONFIG_DIR, 'claude-code', 'skills');
|
|
95
|
-
for (const skill of ['ts-procedures', 'ts-procedures-review', 'ts-procedures-scaffold']) {
|
|
95
|
+
for (const skill of ['ts-procedures', 'ts-procedures-review', 'ts-procedures-scaffold', 'ts-procedures-kotlin', 'ts-procedures-swift']) {
|
|
96
96
|
const walk = (dir, prefix) => {
|
|
97
97
|
for (const entry of readdirSync(dir)) {
|
|
98
98
|
const full = join(dir, entry);
|
|
@@ -128,7 +128,7 @@ function setupClaude({ dryRun, check } = {}) {
|
|
|
128
128
|
console.log(` ${f}`);
|
|
129
129
|
}
|
|
130
130
|
console.log('');
|
|
131
|
-
console.log(' Skills: ts-procedures, ts-procedures-scaffold, ts-procedures-review');
|
|
131
|
+
console.log(' Skills: ts-procedures, ts-procedures-scaffold, ts-procedures-review, ts-procedures-kotlin, ts-procedures-swift');
|
|
132
132
|
console.log(' Agent: ts-procedures-architect (architecture planning)\n');
|
|
133
133
|
return false;
|
|
134
134
|
}
|
|
@@ -16,6 +16,7 @@ Load the right reference for your task:
|
|
|
16
16
|
- **Reviewing or debugging existing code?** Read [anti-patterns.md](anti-patterns.md) — 20 common mistakes with before/after fixes and severity ratings
|
|
17
17
|
- **Need exact API signatures or type definitions?** Read [api-reference.md](api-reference.md) — complete API documentation with type signatures for every export
|
|
18
18
|
- **Generating a Kotlin client for Android/JVM consumers?** Use the separate `ts-procedures-kotlin` skill — it covers `--target kotlin` end-to-end and won't load unless the user mentions Kotlin/Android.
|
|
19
|
+
- **Generating a Swift client for iOS/macOS/Apple-platform consumers?** Use the separate `ts-procedures-swift` skill — it covers `--target swift` end-to-end and won't load unless the user mentions Swift/iOS/Apple platforms.
|
|
19
20
|
|
|
20
21
|
## Core Flow
|
|
21
22
|
|
|
@@ -1013,7 +1013,7 @@ const adapter = createFetchAdapter({ fetch: customFetch })
|
|
|
1013
1013
|
|
|
1014
1014
|
## generateClient(options)
|
|
1015
1015
|
|
|
1016
|
-
> For **Kotlin** client codegen (Android/JVM, types-only output), see the dedicated `ts-procedures-kotlin` skill. The reference below covers TypeScript codegen only.
|
|
1016
|
+
> For **Kotlin** client codegen (Android/JVM, types-only output), see the dedicated `ts-procedures-kotlin` skill. For **Swift** client codegen (iOS/macOS/Apple platforms, types-only output), see the dedicated `ts-procedures-swift` skill. The reference below covers TypeScript codegen only.
|
|
1017
1017
|
|
|
1018
1018
|
Build-time CLI and programmatic API for generating typed client files from a `DocEnvelope`.
|
|
1019
1019
|
|
|
@@ -14,7 +14,7 @@ You are assisting a developer who needs to generate Kotlin types from a `ts-proc
|
|
|
14
14
|
- The user wants to share API types between a `ts-procedures` server and a Kotlin/JVM consumer.
|
|
15
15
|
- The user is debugging Kotlin codegen output, Gradle setup, or contextual serializer registration.
|
|
16
16
|
|
|
17
|
-
If the user is generating a **TypeScript** client, redirect them to the main `ts-procedures` skill
|
|
17
|
+
If the user is generating a **TypeScript** client, redirect them to the main `ts-procedures` skill. For **Swift / iOS / macOS / Apple-platform** consumers, redirect to `ts-procedures-swift`.
|
|
18
18
|
|
|
19
19
|
## Quickstart
|
|
20
20
|
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ts-procedures-swift
|
|
3
|
+
description: "Swift client codegen for ts-procedures — generate types-only Swift source from a ts-procedures DocEnvelope for iOS/macOS/Apple-platform consumers. Use when the user mentions Swift, iOS, macOS, Apple platforms, Codable, or asks how to generate non-TypeScript types from a ts-procedures server."
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# ts-procedures — Swift Client Codegen
|
|
8
|
+
|
|
9
|
+
You are assisting a developer who needs to generate Swift types from a `ts-procedures` server's `DocEnvelope`. The Swift target is **types-only** — no runtime, no adapter, no error registry. iOS / macOS / Apple-platform consumers own the HTTP layer.
|
|
10
|
+
|
|
11
|
+
## When this skill applies
|
|
12
|
+
|
|
13
|
+
- The user mentions Swift, iOS, macOS, watchOS, tvOS, visionOS, Apple platforms, `Codable`, `URLSession`, or `--target swift`.
|
|
14
|
+
- The user wants to share API types between a `ts-procedures` server and a Swift consumer.
|
|
15
|
+
- The user is debugging Swift codegen output, SPM/Xcode integration, `JSONDecoder` configuration, or `Codable` conformance issues.
|
|
16
|
+
|
|
17
|
+
If the user is generating a **TypeScript** client, redirect them to the main `ts-procedures` skill. For **Kotlin/Android** consumers, redirect to `ts-procedures-kotlin`.
|
|
18
|
+
|
|
19
|
+
## Quickstart
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx ts-procedures-codegen \
|
|
23
|
+
--target swift \
|
|
24
|
+
--url https://api.example.com/_ts-procedures.json \
|
|
25
|
+
--out ./Sources/MyApp/Generated
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
One `.swift` file per scope. Types accessed as `Users.GetUser.Response`, `Users.GetUser.PathParams`, `Users.GetUser.Response.Address` (nested structs via `inlineTypes: true`), `Users.GetUser.Errors.NotFound`.
|
|
29
|
+
|
|
30
|
+
**Note:** unlike the Kotlin target, no `--swift-package` flag exists or is required. Swift modules are defined by Xcode/SPM targets.
|
|
31
|
+
|
|
32
|
+
## CLI flags (Swift-specific)
|
|
33
|
+
|
|
34
|
+
| Flag | Default | Purpose |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| `--target swift` | `ts` | Switch to the Swift codegen path |
|
|
37
|
+
| `--swift-serializer <codable\|none>` | `codable` | `codable` emits `: Codable` + `CodingKeys`; `none` emits plain structs (consumer handles serialization) |
|
|
38
|
+
| `--swift-access-level <public\|internal>` | `public` | Threads through to ajsc's `accessLevel`; use `internal` when generated types shouldn't appear in module ABI |
|
|
39
|
+
| `--unsupported-unions <throw\|fallback>` | `throw` | **Functional for Swift** (unlike Kotlin where it's a no-op) — `fallback` emits a self-contained `AnyCodable` helper for untagged `anyOf`/`oneOf` |
|
|
40
|
+
|
|
41
|
+
`--array-item-naming`, `--depluralize`, `--uncountable-words` also apply to the Swift target.
|
|
42
|
+
|
|
43
|
+
## Output shape (what consumers see)
|
|
44
|
+
|
|
45
|
+
```swift
|
|
46
|
+
import Foundation
|
|
47
|
+
|
|
48
|
+
public enum Users {
|
|
49
|
+
public enum GetUser {
|
|
50
|
+
public static let method = "GET"
|
|
51
|
+
public static let pathTemplate = "/users/{id}"
|
|
52
|
+
public static func path(_ p: PathParams) -> String { return "/users/\(p.id)" }
|
|
53
|
+
|
|
54
|
+
public struct PathParams: Codable {
|
|
55
|
+
public let id: String
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
public struct Response: Codable {
|
|
59
|
+
public let id: String
|
|
60
|
+
public let createdAt: Date
|
|
61
|
+
public let address: Address
|
|
62
|
+
|
|
63
|
+
enum CodingKeys: String, CodingKey {
|
|
64
|
+
case id
|
|
65
|
+
case createdAt = "created-at"
|
|
66
|
+
case address
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
public struct Address: Codable {
|
|
70
|
+
public let street: String
|
|
71
|
+
public let city: String
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
public enum Errors {
|
|
76
|
+
public struct NotFound: Codable {
|
|
77
|
+
public let name: String
|
|
78
|
+
public let message: String
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
For routes without path params, `path` is a `static let`, not a function. Namespaces are caseless `enum`s (the standard Swift idiom — uninstantiable, zero runtime cost).
|
|
86
|
+
|
|
87
|
+
## Consumer-side setup the dev MUST do
|
|
88
|
+
|
|
89
|
+
The generated code requires these on the Apple-platform side. **Don't let the user assume the codegen handles them.**
|
|
90
|
+
|
|
91
|
+
1. **Drop generated files into your SPM target or Xcode source group.** Any target containing the generated dir picks them up — no special build config. SPM globs sources recursively; for Xcode, use **File → Add Files to "<TargetName>"…** and ensure target membership is checked.
|
|
92
|
+
|
|
93
|
+
2. **Configure `JSONDecoder.dateDecodingStrategy = .iso8601`.** **Required** if the schema uses any `format: date-time` field (which become `Foundation.Date`). Without this, decoding fails with `DecodingError.typeMismatch`. Symmetric: set `JSONEncoder.dateEncodingStrategy = .iso8601` for request bodies.
|
|
94
|
+
|
|
95
|
+
3. **HTTP transport is the consumer's choice.** `URLSession` (with `async/await`) is the default recommendation — it's built-in and works on all Apple platforms with no dependencies. Alamofire / other libraries are fine but never required.
|
|
96
|
+
|
|
97
|
+
4. **No runtime dispatch.** Error types are emitted as nested structs (`Users.GetUser.Errors.NotFound`), but there's no registry, no `instanceof`-style lookup, no `dispatchTypedError`. Consumers catch HTTP failures themselves and dispatch on status code or `body.name` (a regular `String` field, not a type-system discriminator) to decide which error struct to decode against. To make error structs throwable, declare a one-line `extension X.Errors.NotFound: Error {}` in user code (keep it out of the generated file so re-runs don't clobber it). This is by design; don't suggest implementing a registry.
|
|
98
|
+
|
|
99
|
+
The full setup guide lives at `docs/codegen-swift.md` in the `ts-procedures` repo.
|
|
100
|
+
|
|
101
|
+
## Documented limitations to flag during reviews
|
|
102
|
+
|
|
103
|
+
- **`format: date` and `format: time` map to `String`.** Foundation has no native date-only or time-only type. Parse with `DateFormatter` if a typed value is needed.
|
|
104
|
+
- **`type: integer` maps to `Int64`** (not `Int`). 32-bit Apple platforms exist; `Int64` guarantees range parity.
|
|
105
|
+
- **`type: number` maps to `Double`.** For monetary values, convert to `Decimal` at the parse boundary.
|
|
106
|
+
- **Heterogeneous tuples throw under `Codable`.** Swift tuples aren't `Codable`. Schemas with positional-tuple `items: [...]` arrays throw at codegen time. Refactor to a struct schema upstream.
|
|
107
|
+
- **`additionalProperties: { type: T }` is silently dropped** with a doc-comment. Add a sibling `[String: T]` field by hand if your contract uses extra keys.
|
|
108
|
+
- **`not` and `patternProperties` throw at codegen time.** Simplify the schema upstream.
|
|
109
|
+
- **Untagged `oneOf` throws by default.** Add a discriminator, or pass `--unsupported-unions fallback` to emit `AnyCodable`-typed values (loses static typing).
|
|
110
|
+
|
|
111
|
+
## Anti-patterns
|
|
112
|
+
|
|
113
|
+
- **Suggesting the Swift target ships a networking layer or HTTP adapter.** It does not — consumers own `URLSession`/etc. entirely.
|
|
114
|
+
- **Recommending Alamofire as required.** `URLSession` + `async/await` is fine and ships with the OS. Alamofire is a personal-preference choice, not a dependency of the generated code.
|
|
115
|
+
- **Conflating `--swift-serializer none` with "no setup needed".** `none` removes `Codable` conformance and `CodingKeys` — the consumer then needs their own serialization plan (hand-rolled, SwiftyJSON, etc.). It's strictly *more* setup, not less.
|
|
116
|
+
- **Treating `--unsupported-unions fallback` as a no-op for Swift.** Unlike Kotlin (where it's silently dropped), the Swift target actually emits an `AnyCodable` helper that round-trips correctly. Use it when needed.
|
|
117
|
+
- **Suggesting backwards compatibility with Swift 4 / pre-async-await.** Assume Swift 5.5+ (the async/await era). Sample dispatch code in docs uses `async throws`.
|
|
118
|
+
- **Suggesting the codegen emits `: Error` conformance on error structs.** It doesn't (`Codable` only) — consumers add a one-line extension. Don't ask for this to be added to the codegen; it would force users into a particular error model.
|
|
119
|
+
- **Mixing `--target swift` flags into a TypeScript-target invocation.** The flags are silently ignored; no harm, but the user is probably running the wrong target.
|
|
@@ -387,6 +387,7 @@ npx ts-procedures-codegen --url http://localhost:3000/docs --out ./src/generated
|
|
|
387
387
|
```
|
|
388
388
|
|
|
389
389
|
For Kotlin codegen (Android/JVM consumers), see `docs/codegen-kotlin.md` in the ts-procedures repo. The Kotlin target is types-only; consumer apps own HTTP/error handling.
|
|
390
|
+
For Swift codegen (iOS/macOS/Apple-platform consumers), see `docs/codegen-swift.md` in the ts-procedures repo. The Swift target is types-only; consumer apps own HTTP/error handling.
|
|
390
391
|
|
|
391
392
|
Generates one `.ts` file per scope plus a root `index.ts` that imports each scope as a namespace and exports a `create${ServiceName}Bindings(client)` factory AND a `create${ServiceName}Client(config)` convenience factory that pre-wires the error registry (defaults to `createApiBindings` / `createApiClient`; pass `--service-name <Name>` to rename). When namespace mode is on (the default), `index.ts` also wraps every scope namespace in an outer `export namespace ${ServiceName} { ... }` block so types are reachable as `Api.Users.GetUser.Params`, `Api.Errors.UseCaseError`, etc. The errors file (`_errors.ts`) emits runtime error classes extending a shared `${ServiceName}ProcedureError` base, each with `static fromResponse(body, meta)`, plus `${ServiceName}ErrorRegistry` (runtime dispatch map) and `${ServiceName}ProcedureErrorUnion` (type union). Defaults: `ApiErrors`, `ApiProcedureError`, `ApiErrorRegistry`, `ApiProcedureErrorUnion`.
|
|
392
393
|
By default, types are wrapped in nested TS namespaces (`Scope.Route.Params`), JSDoc comments are emitted, and output is self-contained (no runtime dependency on `ts-procedures`). Use `--no-namespace-types` to revert to flat type names (`RouteParams`); this also disables the outer service namespace in `index.ts` and skips importing `_errors` from there.
|
|
@@ -387,6 +387,7 @@ npx ts-procedures-codegen --url http://localhost:3000/docs --out ./src/generated
|
|
|
387
387
|
```
|
|
388
388
|
|
|
389
389
|
For Kotlin codegen (Android/JVM consumers), see `docs/codegen-kotlin.md` in the ts-procedures repo. The Kotlin target is types-only; consumer apps own HTTP/error handling.
|
|
390
|
+
For Swift codegen (iOS/macOS/Apple-platform consumers), see `docs/codegen-swift.md` in the ts-procedures repo. The Swift target is types-only; consumer apps own HTTP/error handling.
|
|
390
391
|
|
|
391
392
|
Generates one `.ts` file per scope plus a root `index.ts` that imports each scope as a namespace and exports a `create${ServiceName}Bindings(client)` factory AND a `create${ServiceName}Client(config)` convenience factory that pre-wires the error registry (defaults to `createApiBindings` / `createApiClient`; pass `--service-name <Name>` to rename). When namespace mode is on (the default), `index.ts` also wraps every scope namespace in an outer `export namespace ${ServiceName} { ... }` block so types are reachable as `Api.Users.GetUser.Params`, `Api.Errors.UseCaseError`, etc. The errors file (`_errors.ts`) emits runtime error classes extending a shared `${ServiceName}ProcedureError` base, each with `static fromResponse(body, meta)`, plus `${ServiceName}ErrorRegistry` (runtime dispatch map) and `${ServiceName}ProcedureErrorUnion` (type union). Defaults: `ApiErrors`, `ApiProcedureError`, `ApiErrorRegistry`, `ApiProcedureErrorUnion`.
|
|
392
393
|
By default, types are wrapped in nested TS namespaces (`Scope.Route.Params`), JSDoc comments are emitted, and output is self-contained (no runtime dependency on `ts-procedures`). Use `--no-namespace-types` to revert to flat type names (`RouteParams`); this also disables the outer service namespace in `index.ts` and skips importing `_errors` from there.
|
|
@@ -6,7 +6,7 @@ const __filename = fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = dirname(__filename);
|
|
7
7
|
const SOURCE_DIR = join(__dirname, '..', 'claude-code');
|
|
8
8
|
|
|
9
|
-
const SKILL_NAMES = ['ts-procedures', 'ts-procedures-review', 'ts-procedures-scaffold'];
|
|
9
|
+
const SKILL_NAMES = ['ts-procedures', 'ts-procedures-review', 'ts-procedures-scaffold', 'ts-procedures-kotlin', 'ts-procedures-swift'];
|
|
10
10
|
const AGENT_FILES = ['ts-procedures-architect.md'];
|
|
11
11
|
|
|
12
12
|
function listFilesRecursive(dir) {
|
|
@@ -13,11 +13,15 @@ export interface CodegenConfig {
|
|
|
13
13
|
selfContained?: boolean;
|
|
14
14
|
serviceName?: string;
|
|
15
15
|
cleanOutDir?: boolean;
|
|
16
|
-
target?: 'ts' | 'kotlin';
|
|
16
|
+
target?: 'ts' | 'kotlin' | 'swift';
|
|
17
17
|
kotlin?: {
|
|
18
18
|
package: string;
|
|
19
19
|
serializer?: 'kotlinx' | 'none';
|
|
20
20
|
};
|
|
21
|
+
swift?: {
|
|
22
|
+
serializer?: 'codable' | 'none';
|
|
23
|
+
accessLevel?: 'public' | 'internal';
|
|
24
|
+
};
|
|
21
25
|
unsupportedUnions?: 'throw' | 'fallback';
|
|
22
26
|
}
|
|
23
27
|
export interface ParsedArgs {
|
|
@@ -33,11 +37,15 @@ export interface ParsedArgs {
|
|
|
33
37
|
selfContained: boolean;
|
|
34
38
|
serviceName?: string;
|
|
35
39
|
cleanOutDir: boolean;
|
|
36
|
-
target?: 'ts' | 'kotlin';
|
|
40
|
+
target?: 'ts' | 'kotlin' | 'swift';
|
|
37
41
|
kotlin?: {
|
|
38
42
|
package: string;
|
|
39
43
|
serializer?: 'kotlinx' | 'none';
|
|
40
44
|
};
|
|
45
|
+
swift?: {
|
|
46
|
+
serializer?: 'codable' | 'none';
|
|
47
|
+
accessLevel?: 'public' | 'internal';
|
|
48
|
+
};
|
|
41
49
|
unsupportedUnions?: 'throw' | 'fallback';
|
|
42
50
|
}
|
|
43
51
|
/**
|
|
@@ -58,10 +66,16 @@ export declare function parseArgs(argv: string[], config?: CodegenConfig): Parse
|
|
|
58
66
|
*/
|
|
59
67
|
export declare function extractConfigPath(argv: string[]): string | undefined;
|
|
60
68
|
export declare function printPostRunHints(parsed: {
|
|
61
|
-
target?: 'ts' | 'kotlin';
|
|
69
|
+
target?: 'ts' | 'kotlin' | 'swift';
|
|
62
70
|
}): void;
|
|
63
71
|
/**
|
|
64
72
|
* Warns about flags that are currently no-ops for the Kotlin target.
|
|
73
|
+
*
|
|
74
|
+
* Scope is intentionally Kotlin-only — the param type omits `'swift'` so a
|
|
75
|
+
* reader can tell at a glance this function will never act on swift. Other
|
|
76
|
+
* targets get their own warner if/when they grow no-op flags. The call site
|
|
77
|
+
* narrows `parsed.target` before invoking.
|
|
78
|
+
*
|
|
65
79
|
* Currently: `--unsupported-unions` is a no-op because ajsc v7.2's Kotlin
|
|
66
80
|
* emitter silently emits an empty data class for untagged oneOf regardless
|
|
67
81
|
* of the flag (see docs/codegen-kotlin.md#untagged-unions).
|
package/build/codegen/bin/cli.js
CHANGED
|
@@ -52,6 +52,8 @@ export function parseArgs(argv, config) {
|
|
|
52
52
|
let target = config?.target;
|
|
53
53
|
let kotlinPackage = config?.kotlin?.package;
|
|
54
54
|
let kotlinSerializer = config?.kotlin?.serializer;
|
|
55
|
+
let swiftSerializer = config?.swift?.serializer;
|
|
56
|
+
let swiftAccessLevel = config?.swift?.accessLevel;
|
|
55
57
|
let unsupportedUnions = config?.unsupportedUnions;
|
|
56
58
|
let configPath;
|
|
57
59
|
for (let i = 0; i < argv.length; i++) {
|
|
@@ -122,11 +124,11 @@ export function parseArgs(argv, config) {
|
|
|
122
124
|
}
|
|
123
125
|
else if (arg === '--target') {
|
|
124
126
|
const val = argv[++i];
|
|
125
|
-
if (val === 'ts' || val === 'kotlin') {
|
|
127
|
+
if (val === 'ts' || val === 'kotlin' || val === 'swift') {
|
|
126
128
|
target = val;
|
|
127
129
|
}
|
|
128
130
|
else {
|
|
129
|
-
throw new Error(`Invalid --target value: ${val ?? '(missing)'} (expected 'ts' or '
|
|
131
|
+
throw new Error(`Invalid --target value: ${val ?? '(missing)'} (expected 'ts', 'kotlin', or 'swift')`);
|
|
130
132
|
}
|
|
131
133
|
}
|
|
132
134
|
else if (arg === '--kotlin-package') {
|
|
@@ -141,6 +143,24 @@ export function parseArgs(argv, config) {
|
|
|
141
143
|
throw new Error(`Invalid --kotlin-serializer value: ${val ?? '(missing)'} (expected 'kotlinx' or 'none')`);
|
|
142
144
|
}
|
|
143
145
|
}
|
|
146
|
+
else if (arg === '--swift-serializer') {
|
|
147
|
+
const val = argv[++i];
|
|
148
|
+
if (val === 'codable' || val === 'none') {
|
|
149
|
+
swiftSerializer = val;
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
throw new Error(`Invalid --swift-serializer value: ${val ?? '(missing)'} (expected 'codable' or 'none')`);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
else if (arg === '--swift-access-level') {
|
|
156
|
+
const val = argv[++i];
|
|
157
|
+
if (val === 'public' || val === 'internal') {
|
|
158
|
+
swiftAccessLevel = val;
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
throw new Error(`Invalid --swift-access-level value: ${val ?? '(missing)'} (expected 'public' or 'internal')`);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
144
164
|
else if (arg === '--unsupported-unions') {
|
|
145
165
|
const val = argv[++i];
|
|
146
166
|
if (val === 'throw' || val === 'fallback') {
|
|
@@ -156,15 +176,26 @@ export function parseArgs(argv, config) {
|
|
|
156
176
|
}
|
|
157
177
|
// configPath is consumed by the caller (main) before parseArgs is called with the loaded config.
|
|
158
178
|
// When called from main, config is already loaded. When called directly (tests), configPath is ignored.
|
|
179
|
+
// ---------------------------------------------------------------------------
|
|
180
|
+
// Validation — fails fast on user-controllable errors before envelope resolve.
|
|
181
|
+
// Runtime checks (emitter availability, etc.) happen later in pipeline.ts;
|
|
182
|
+
// those guards are aimed at non-CLI callers (direct API consumers, tests).
|
|
183
|
+
// The CLI resolves emitters before invoking `runPipeline`, so users only ever
|
|
184
|
+
// see flag-shape errors from this block, not pipeline-internal throws.
|
|
185
|
+
// ---------------------------------------------------------------------------
|
|
159
186
|
if (outDir === undefined) {
|
|
160
187
|
throw new Error('Missing required argument: --out <dir>');
|
|
161
188
|
}
|
|
162
189
|
if (url === undefined && file === undefined) {
|
|
163
190
|
throw new Error('Missing required input source: provide --url <url> or --file <path>');
|
|
164
191
|
}
|
|
192
|
+
// Kotlin target requires a package; surface this before any I/O happens.
|
|
165
193
|
if (target === 'kotlin' && (kotlinPackage === undefined || kotlinPackage === '')) {
|
|
166
194
|
throw new Error('Missing required argument: --kotlin-package <pkg> (required when --target kotlin)');
|
|
167
195
|
}
|
|
196
|
+
// Swift target currently has no required flags. If that changes, add the
|
|
197
|
+
// guard here so the failure mode stays consistent (flag-shape errors fire
|
|
198
|
+
// from parseArgs; runtime/emitter wiring errors fire from pipeline.ts).
|
|
168
199
|
return {
|
|
169
200
|
url,
|
|
170
201
|
file,
|
|
@@ -187,6 +218,14 @@ export function parseArgs(argv, config) {
|
|
|
187
218
|
},
|
|
188
219
|
}
|
|
189
220
|
: {}),
|
|
221
|
+
...(swiftSerializer !== undefined || swiftAccessLevel !== undefined
|
|
222
|
+
? {
|
|
223
|
+
swift: {
|
|
224
|
+
...(swiftSerializer !== undefined ? { serializer: swiftSerializer } : {}),
|
|
225
|
+
...(swiftAccessLevel !== undefined ? { accessLevel: swiftAccessLevel } : {}),
|
|
226
|
+
},
|
|
227
|
+
}
|
|
228
|
+
: {}),
|
|
190
229
|
...(unsupportedUnions !== undefined ? { unsupportedUnions } : {}),
|
|
191
230
|
};
|
|
192
231
|
}
|
|
@@ -227,6 +266,13 @@ async function runWithWatch(parsed) {
|
|
|
227
266
|
kotlinEmitter: await (await import('../targets/kotlin/ajsc-adapter.js')).resolveProductionKotlinEmitter(),
|
|
228
267
|
}
|
|
229
268
|
: {};
|
|
269
|
+
// Resolve the swift emitter once at watch start; it's stateless and reused per tick.
|
|
270
|
+
const swiftWiring = parsed.target === 'swift'
|
|
271
|
+
? {
|
|
272
|
+
target: 'swift',
|
|
273
|
+
swiftEmitter: await (await import('../targets/swift/ajsc-adapter.js')).resolveProductionSwiftEmitter(),
|
|
274
|
+
}
|
|
275
|
+
: {};
|
|
230
276
|
let lastHash;
|
|
231
277
|
const run = async () => {
|
|
232
278
|
try {
|
|
@@ -251,7 +297,10 @@ async function runWithWatch(parsed) {
|
|
|
251
297
|
cleanOutDir: parsed.cleanOutDir,
|
|
252
298
|
...(parsed.kotlin?.serializer !== undefined ? { kotlinSerializer: parsed.kotlin.serializer } : {}),
|
|
253
299
|
...(parsed.unsupportedUnions !== undefined ? { unsupportedUnions: parsed.unsupportedUnions } : {}),
|
|
300
|
+
...(parsed.swift?.serializer !== undefined ? { swiftSerializer: parsed.swift.serializer } : {}),
|
|
301
|
+
...(parsed.swift?.accessLevel !== undefined ? { swiftAccessLevel: parsed.swift.accessLevel } : {}),
|
|
254
302
|
...kotlinWiring,
|
|
303
|
+
...swiftWiring,
|
|
255
304
|
});
|
|
256
305
|
console.log(`[ts-procedures-codegen] Generated client files → ${parsed.outDir}`);
|
|
257
306
|
}
|
|
@@ -268,13 +317,23 @@ async function runWithWatch(parsed) {
|
|
|
268
317
|
// Main
|
|
269
318
|
// ---------------------------------------------------------------------------
|
|
270
319
|
const KOTLIN_SETUP_GUIDE_URL = 'https://bitbucket.org/thermsio/ts-procedures/src/master/docs/codegen-kotlin.md';
|
|
320
|
+
const SWIFT_SETUP_GUIDE_URL = 'https://bitbucket.org/thermsio/ts-procedures/src/master/docs/codegen-swift.md';
|
|
271
321
|
export function printPostRunHints(parsed) {
|
|
272
322
|
if (parsed.target === 'kotlin') {
|
|
273
323
|
console.log(`[ts-procedures-codegen] Kotlin setup guide: ${KOTLIN_SETUP_GUIDE_URL}`);
|
|
274
324
|
}
|
|
325
|
+
if (parsed.target === 'swift') {
|
|
326
|
+
console.log(`[ts-procedures-codegen] Swift setup guide: ${SWIFT_SETUP_GUIDE_URL}`);
|
|
327
|
+
}
|
|
275
328
|
}
|
|
276
329
|
/**
|
|
277
330
|
* Warns about flags that are currently no-ops for the Kotlin target.
|
|
331
|
+
*
|
|
332
|
+
* Scope is intentionally Kotlin-only — the param type omits `'swift'` so a
|
|
333
|
+
* reader can tell at a glance this function will never act on swift. Other
|
|
334
|
+
* targets get their own warner if/when they grow no-op flags. The call site
|
|
335
|
+
* narrows `parsed.target` before invoking.
|
|
336
|
+
*
|
|
278
337
|
* Currently: `--unsupported-unions` is a no-op because ajsc v7.2's Kotlin
|
|
279
338
|
* emitter silently emits an empty data class for untagged oneOf regardless
|
|
280
339
|
* of the flag (see docs/codegen-kotlin.md#untagged-unions).
|
|
@@ -293,7 +352,15 @@ async function main() {
|
|
|
293
352
|
console.log(`[ts-procedures-codegen] Loaded config from ${configPath ?? DEFAULT_CONFIG_NAME}`);
|
|
294
353
|
}
|
|
295
354
|
const parsed = parseArgs(argv, config);
|
|
296
|
-
|
|
355
|
+
// The warner is intentionally Kotlin-only; pass the relevant fields and
|
|
356
|
+
// narrow `target` away from 'swift' here so the function's param type can
|
|
357
|
+
// stay tight.
|
|
358
|
+
if (parsed.target !== 'swift') {
|
|
359
|
+
warnIfKotlinNoOpFlags({
|
|
360
|
+
target: parsed.target,
|
|
361
|
+
...(parsed.unsupportedUnions !== undefined ? { unsupportedUnions: parsed.unsupportedUnions } : {}),
|
|
362
|
+
});
|
|
363
|
+
}
|
|
297
364
|
const source = parsed.url ?? parsed.file;
|
|
298
365
|
console.log(`[ts-procedures-codegen] Reading docs from ${source}...`);
|
|
299
366
|
if (parsed.watch) {
|
|
@@ -307,6 +374,12 @@ async function main() {
|
|
|
307
374
|
kotlinEmitter: await (await import('../targets/kotlin/ajsc-adapter.js')).resolveProductionKotlinEmitter(),
|
|
308
375
|
}
|
|
309
376
|
: {};
|
|
377
|
+
const swiftWiring = parsed.target === 'swift'
|
|
378
|
+
? {
|
|
379
|
+
target: 'swift',
|
|
380
|
+
swiftEmitter: await (await import('../targets/swift/ajsc-adapter.js')).resolveProductionSwiftEmitter(),
|
|
381
|
+
}
|
|
382
|
+
: {};
|
|
310
383
|
const result = await generateClient({
|
|
311
384
|
url: parsed.url,
|
|
312
385
|
file: parsed.file,
|
|
@@ -320,7 +393,10 @@ async function main() {
|
|
|
320
393
|
cleanOutDir: parsed.cleanOutDir,
|
|
321
394
|
...(parsed.kotlin?.serializer !== undefined ? { kotlinSerializer: parsed.kotlin.serializer } : {}),
|
|
322
395
|
...(parsed.unsupportedUnions !== undefined ? { unsupportedUnions: parsed.unsupportedUnions } : {}),
|
|
396
|
+
...(parsed.swift?.serializer !== undefined ? { swiftSerializer: parsed.swift.serializer } : {}),
|
|
397
|
+
...(parsed.swift?.accessLevel !== undefined ? { swiftAccessLevel: parsed.swift.accessLevel } : {}),
|
|
323
398
|
...kotlinWiring,
|
|
399
|
+
...swiftWiring,
|
|
324
400
|
});
|
|
325
401
|
if (parsed.dryRun) {
|
|
326
402
|
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,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;A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AC,CAAC,KAAK,SAAS;IAC7B,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,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"}
|
package/build/codegen/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { type ResolveInput } from './resolve-envelope.js';
|
|
|
2
2
|
import { type GeneratedFile } from './pipeline.js';
|
|
3
3
|
import type { AjscOptions } from './emit-types.js';
|
|
4
4
|
import type { KotlinEmitter } from './targets/kotlin/ajsc-adapter.js';
|
|
5
|
+
import type { SwiftEmitter } from './targets/swift/ajsc-adapter.js';
|
|
5
6
|
export interface GenerateClientOptions extends ResolveInput {
|
|
6
7
|
outDir: string;
|
|
7
8
|
ajsc?: AjscOptions;
|
|
@@ -11,12 +12,16 @@ export interface GenerateClientOptions extends ResolveInput {
|
|
|
11
12
|
selfContained?: boolean;
|
|
12
13
|
serviceName?: string;
|
|
13
14
|
cleanOutDir?: boolean;
|
|
14
|
-
target?: 'ts' | 'kotlin';
|
|
15
|
+
target?: 'ts' | 'kotlin' | 'swift';
|
|
15
16
|
kotlinPackage?: string;
|
|
16
17
|
kotlinSerializer?: 'kotlinx' | 'none';
|
|
17
18
|
unsupportedUnions?: 'throw' | 'fallback';
|
|
18
19
|
/** Injected for tests; production wiring resolves a real ajsc emitter. */
|
|
19
20
|
kotlinEmitter?: KotlinEmitter;
|
|
21
|
+
swiftSerializer?: 'codable' | 'none';
|
|
22
|
+
swiftAccessLevel?: 'public' | 'internal';
|
|
23
|
+
/** Injected for tests; production wiring resolves a real ajsc emitter. */
|
|
24
|
+
swiftEmitter?: SwiftEmitter;
|
|
20
25
|
}
|
|
21
26
|
export declare function generateClient(options: GenerateClientOptions): Promise<GeneratedFile[]>;
|
|
22
27
|
export type { AjscOptions } from './emit-types.js';
|
|
@@ -33,3 +38,15 @@ export type { KotlinEmitter } from './targets/kotlin/ajsc-adapter.js';
|
|
|
33
38
|
export type { KotlinEmitOptions } from './targets/kotlin/ajsc-adapter.js';
|
|
34
39
|
/** Result shape produced by `KotlinEmitter.emit`; stable, useful for stub builders in tests. */
|
|
35
40
|
export type { KotlinEmitResult } from './targets/kotlin/ajsc-adapter.js';
|
|
41
|
+
/**
|
|
42
|
+
* @internal Subject to change with ajsc minor versions. Use for test injection
|
|
43
|
+
* only; consumer code should not depend on this shape.
|
|
44
|
+
*/
|
|
45
|
+
export type { SwiftEmitter } from './targets/swift/ajsc-adapter.js';
|
|
46
|
+
/**
|
|
47
|
+
* @internal Mirrors ajsc's `SwiftConverterOpts` and may shift with ajsc
|
|
48
|
+
* minor versions. Use for test injection only.
|
|
49
|
+
*/
|
|
50
|
+
export type { SwiftEmitOptions } from './targets/swift/ajsc-adapter.js';
|
|
51
|
+
/** Result shape produced by `SwiftEmitter.emit`; stable, useful for stub builders in tests. */
|
|
52
|
+
export type { SwiftEmitResult } from './targets/swift/ajsc-adapter.js';
|
package/build/codegen/index.js
CHANGED
|
@@ -17,6 +17,9 @@ export async function generateClient(options) {
|
|
|
17
17
|
kotlinSerializer: options.kotlinSerializer,
|
|
18
18
|
unsupportedUnions: options.unsupportedUnions,
|
|
19
19
|
kotlinEmitter: options.kotlinEmitter,
|
|
20
|
+
swiftSerializer: options.swiftSerializer,
|
|
21
|
+
swiftAccessLevel: options.swiftAccessLevel,
|
|
22
|
+
swiftEmitter: options.swiftEmitter,
|
|
20
23
|
});
|
|
21
24
|
}
|
|
22
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/codegen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAqB,MAAM,uBAAuB,CAAA;AAC1E,OAAO,EAAE,WAAW,EAAsB,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/codegen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAqB,MAAM,uBAAuB,CAAA;AAC1E,OAAO,EAAE,WAAW,EAAsB,MAAM,eAAe,CAAA;AA0B/D,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,OAA8B;IACjE,MAAM,QAAQ,GAAG,MAAM,eAAe,CAAC,OAAO,CAAC,CAAA;IAC/C,OAAO,WAAW,CAAC;QACjB,QAAQ;QACR,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;QAC1C,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;QAC1C,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;QAC5C,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,eAAe,EAAE,OAAO,CAAC,eAAe;QACxC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;QAC1C,YAAY,EAAE,OAAO,CAAC,YAAY;KACnC,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { DocEnvelope } from '../implementations/types.js';
|
|
2
2
|
import type { AjscOptions } from './emit-types.js';
|
|
3
|
+
import type { GeneratedFile } from './targets/_shared/write-files.js';
|
|
3
4
|
import type { KotlinEmitter } from './targets/kotlin/ajsc-adapter.js';
|
|
5
|
+
import type { SwiftEmitter } from './targets/swift/ajsc-adapter.js';
|
|
4
6
|
export interface PipelineOptions {
|
|
5
7
|
envelope: DocEnvelope;
|
|
6
8
|
outDir: string;
|
|
@@ -11,15 +13,24 @@ export interface PipelineOptions {
|
|
|
11
13
|
selfContained?: boolean;
|
|
12
14
|
serviceName?: string;
|
|
13
15
|
cleanOutDir?: boolean;
|
|
14
|
-
target?: 'ts' | 'kotlin';
|
|
16
|
+
target?: 'ts' | 'kotlin' | 'swift';
|
|
15
17
|
kotlinPackage?: string;
|
|
16
18
|
kotlinSerializer?: 'kotlinx' | 'none';
|
|
17
19
|
unsupportedUnions?: 'throw' | 'fallback';
|
|
18
20
|
/** Injected for tests; production wiring resolves a real ajsc emitter. */
|
|
19
21
|
kotlinEmitter?: KotlinEmitter;
|
|
22
|
+
swiftSerializer?: 'codable' | 'none';
|
|
23
|
+
swiftAccessLevel?: 'public' | 'internal';
|
|
24
|
+
/** Injected for tests; production wiring resolves a real ajsc emitter. */
|
|
25
|
+
swiftEmitter?: SwiftEmitter;
|
|
20
26
|
}
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
export type { GeneratedFile } from './targets/_shared/write-files.js';
|
|
28
|
+
/**
|
|
29
|
+
* Top-level codegen entry. Validates the service name, computes the source
|
|
30
|
+
* hash, groups routes by scope, then dispatches to the per-target run module.
|
|
31
|
+
*
|
|
32
|
+
* Per-target modules own their language-specific emission and the file-write
|
|
33
|
+
* tail (dryRun / cleanOutDir / mkdir / writeFile via
|
|
34
|
+
* `_shared/write-files.ts`).
|
|
35
|
+
*/
|
|
25
36
|
export declare function runPipeline(options: PipelineOptions): Promise<GeneratedFile[]>;
|