@postman/sdk-config 0.10.1 → 0.12.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/README.md +6 -0
- package/dist/index.cjs +909 -41
- 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 +895 -42
- package/dist/index.js.map +1 -1
- package/dist/sdk-config/index.cjs +861 -41
- package/dist/sdk-config/index.cjs.map +1 -1
- package/dist/sdk-config/index.d.cts +2 -2
- package/dist/sdk-config/index.d.ts +2 -2
- package/dist/sdk-config/index.js +854 -42
- package/dist/sdk-config/index.js.map +1 -1
- package/dist/sdk-config/v1/index.cjs +861 -41
- package/dist/sdk-config/v1/index.cjs.map +1 -1
- package/dist/sdk-config/v1/index.d.cts +3345 -2632
- package/dist/sdk-config/v1/index.d.ts +3345 -2632
- package/dist/sdk-config/v1/index.js +854 -42
- package/dist/sdk-config/v1/index.js.map +1 -1
- package/dist/sdk-config-ir/index.cjs +286 -5
- package/dist/sdk-config-ir/index.cjs.map +1 -1
- package/dist/sdk-config-ir/index.d.cts +2 -2
- package/dist/sdk-config-ir/index.d.ts +2 -2
- package/dist/sdk-config-ir/index.js +280 -6
- package/dist/sdk-config-ir/index.js.map +1 -1
- package/dist/sdk-config-ir/v1/index.cjs +286 -5
- package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
- package/dist/sdk-config-ir/v1/index.d.cts +3291 -2958
- package/dist/sdk-config-ir/v1/index.d.ts +3291 -2958
- package/dist/sdk-config-ir/v1/index.js +280 -6
- package/dist/sdk-config-ir/v1/index.js.map +1 -1
- package/dist/{typescript-Chge0X4f.d.cts → typescript-Byhn4MqL.d.cts} +145 -1
- package/dist/{typescript-Chge0X4f.d.ts → typescript-Byhn4MqL.d.ts} +145 -1
- package/package.json +1 -1
- package/src/sdk-config/v1/README.md +183 -1
- package/src/sdk-config-ir/v1/README.md +107 -31
|
@@ -44,6 +44,10 @@ declare const packageConfigSchema: z.ZodObject<{
|
|
|
44
44
|
description: z.ZodOptional<z.ZodString>;
|
|
45
45
|
repository: z.ZodOptional<z.ZodString>;
|
|
46
46
|
homepage: z.ZodOptional<z.ZodString>;
|
|
47
|
+
bugs: z.ZodOptional<z.ZodObject<{
|
|
48
|
+
url: z.ZodOptional<z.ZodString>;
|
|
49
|
+
email: z.ZodOptional<z.ZodString>;
|
|
50
|
+
}, z.core.$strict>>;
|
|
47
51
|
documentationUrl: z.ZodOptional<z.ZodString>;
|
|
48
52
|
authors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
49
53
|
name: z.ZodString;
|
|
@@ -134,14 +138,94 @@ declare const packageConfigSchema: z.ZodObject<{
|
|
|
134
138
|
defaultFeatures: z.ZodOptional<z.ZodBoolean>;
|
|
135
139
|
environmentMarker: z.ZodOptional<z.ZodString>;
|
|
136
140
|
}, z.core.$strict>>>;
|
|
141
|
+
extraPeerDependenciesMeta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>>;
|
|
137
142
|
}, z.core.$strict>;
|
|
138
143
|
type Dependency = z.infer<typeof dependencySchema>;
|
|
139
144
|
type PackageConfig = z.infer<typeof packageConfigSchema>;
|
|
140
145
|
|
|
146
|
+
declare const githubActionsSecretNameSchema: z.ZodString;
|
|
147
|
+
declare const cliDistributionGithubAppSchema: z.ZodObject<{
|
|
148
|
+
appIdSecretName: z.ZodString;
|
|
149
|
+
privateKeySecretName: z.ZodString;
|
|
150
|
+
}, z.core.$strict>;
|
|
151
|
+
declare const cliDistributionHomebrewSchema: z.ZodObject<{
|
|
152
|
+
tap: z.ZodString;
|
|
153
|
+
formula: z.ZodOptional<z.ZodString>;
|
|
154
|
+
tokenSecretName: z.ZodOptional<z.ZodString>;
|
|
155
|
+
}, z.core.$strict>;
|
|
156
|
+
declare const cliDistributionScoopSchema: z.ZodObject<{
|
|
157
|
+
bucket: z.ZodString;
|
|
158
|
+
tokenSecretName: z.ZodOptional<z.ZodString>;
|
|
159
|
+
}, z.core.$strict>;
|
|
160
|
+
declare const cliDistributionConfigSchema: z.ZodObject<{
|
|
161
|
+
githubApp: z.ZodOptional<z.ZodObject<{
|
|
162
|
+
appIdSecretName: z.ZodString;
|
|
163
|
+
privateKeySecretName: z.ZodString;
|
|
164
|
+
}, z.core.$strict>>;
|
|
165
|
+
homebrew: z.ZodOptional<z.ZodObject<{
|
|
166
|
+
tap: z.ZodString;
|
|
167
|
+
formula: z.ZodOptional<z.ZodString>;
|
|
168
|
+
tokenSecretName: z.ZodOptional<z.ZodString>;
|
|
169
|
+
}, z.core.$strict>>;
|
|
170
|
+
scoop: z.ZodOptional<z.ZodObject<{
|
|
171
|
+
bucket: z.ZodString;
|
|
172
|
+
tokenSecretName: z.ZodOptional<z.ZodString>;
|
|
173
|
+
}, z.core.$strict>>;
|
|
174
|
+
}, z.core.$strict>;
|
|
175
|
+
declare const CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE = "CLI_DISTRIBUTION_NON_RELEASE_MODE";
|
|
176
|
+
interface SdkConfigDiagnostic {
|
|
177
|
+
code: string;
|
|
178
|
+
severity: 'warning';
|
|
179
|
+
path: (string | number)[];
|
|
180
|
+
reason: string;
|
|
181
|
+
suggestedAction: string;
|
|
182
|
+
}
|
|
183
|
+
type CliDistributionGithubAppConfig = z.infer<typeof cliDistributionGithubAppSchema>;
|
|
184
|
+
type CliDistributionHomebrewConfig = z.infer<typeof cliDistributionHomebrewSchema>;
|
|
185
|
+
type CliDistributionScoopConfig = z.infer<typeof cliDistributionScoopSchema>;
|
|
186
|
+
type CliDistributionConfig = z.infer<typeof cliDistributionConfigSchema>;
|
|
187
|
+
|
|
188
|
+
declare const profilesProvisionOperationSchema: z.ZodObject<{
|
|
189
|
+
operation: z.ZodString;
|
|
190
|
+
credential: z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>;
|
|
191
|
+
revokeParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
|
|
192
|
+
}, z.core.$strict>;
|
|
193
|
+
declare const profilesConfigSchema: z.ZodObject<{
|
|
194
|
+
enabled: z.ZodBoolean;
|
|
195
|
+
commandName: z.ZodOptional<z.ZodString>;
|
|
196
|
+
revokeOperation: z.ZodOptional<z.ZodString>;
|
|
197
|
+
provisionOperation: z.ZodOptional<z.ZodObject<{
|
|
198
|
+
operation: z.ZodString;
|
|
199
|
+
credential: z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>;
|
|
200
|
+
revokeParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
|
|
201
|
+
}, z.core.$strict>>;
|
|
202
|
+
}, z.core.$strict>;
|
|
203
|
+
/**
|
|
204
|
+
* Omitted fields are left undefined; the CLI generator applies its own defaults: a binary name
|
|
205
|
+
* derived from the API display name, custom commands on, no root group, profiles off, a single
|
|
206
|
+
* types crate, and a `user-agent-suffix` flag.
|
|
207
|
+
*/
|
|
141
208
|
declare const cliGenerationConfigSchema: z.ZodObject<{
|
|
142
209
|
paginationParameters: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
143
210
|
skills: z.ZodOptional<z.ZodBoolean>;
|
|
211
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
212
|
+
customCommands: z.ZodOptional<z.ZodBoolean>;
|
|
213
|
+
rootGroup: z.ZodOptional<z.ZodString>;
|
|
214
|
+
profiles: z.ZodOptional<z.ZodObject<{
|
|
215
|
+
enabled: z.ZodBoolean;
|
|
216
|
+
commandName: z.ZodOptional<z.ZodString>;
|
|
217
|
+
revokeOperation: z.ZodOptional<z.ZodString>;
|
|
218
|
+
provisionOperation: z.ZodOptional<z.ZodObject<{
|
|
219
|
+
operation: z.ZodString;
|
|
220
|
+
credential: z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>;
|
|
221
|
+
revokeParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
|
|
222
|
+
}, z.core.$strict>>;
|
|
223
|
+
}, z.core.$strict>>;
|
|
224
|
+
splitTypeCrates: z.ZodOptional<z.ZodBoolean>;
|
|
225
|
+
userAgentSuffixFlag: z.ZodOptional<z.ZodString>;
|
|
144
226
|
}, z.core.$strict>;
|
|
227
|
+
type CliProfilesProvisionOperation = z.infer<typeof profilesProvisionOperationSchema>;
|
|
228
|
+
type CliProfilesConfig = z.infer<typeof profilesConfigSchema>;
|
|
145
229
|
type CliGenerationConfig = z.infer<typeof cliGenerationConfigSchema>;
|
|
146
230
|
|
|
147
231
|
declare const csharpGenerationConfigSchema: z.ZodObject<{
|
|
@@ -224,6 +308,7 @@ declare const mcpGenerationConfigSchema: z.ZodObject<{
|
|
|
224
308
|
name: z.ZodEnum<{
|
|
225
309
|
axios: "axios";
|
|
226
310
|
fetch: "fetch";
|
|
311
|
+
"node-fetch": "node-fetch";
|
|
227
312
|
}>;
|
|
228
313
|
}, z.core.$strict>>;
|
|
229
314
|
packageManager: z.ZodOptional<z.ZodEnum<{
|
|
@@ -243,6 +328,35 @@ declare const mcpGenerationConfigSchema: z.ZodObject<{
|
|
|
243
328
|
exportClassDefault: z.ZodOptional<z.ZodBoolean>;
|
|
244
329
|
namespaceExportName: z.ZodOptional<z.ZodString>;
|
|
245
330
|
consolidateTypeFiles: z.ZodOptional<z.ZodBoolean>;
|
|
331
|
+
formDataSupport: z.ZodOptional<z.ZodEnum<{
|
|
332
|
+
Node16: "Node16";
|
|
333
|
+
Node18: "Node18";
|
|
334
|
+
}>>;
|
|
335
|
+
allowExtraFields: z.ZodOptional<z.ZodBoolean>;
|
|
336
|
+
generateSubpackageExports: z.ZodOptional<z.ZodBoolean>;
|
|
337
|
+
exportAllRequestsAtRoot: z.ZodOptional<z.ZodBoolean>;
|
|
338
|
+
generateEndpointMetadata: z.ZodOptional<z.ZodBoolean>;
|
|
339
|
+
outputEsm: z.ZodOptional<z.ZodBoolean>;
|
|
340
|
+
neverThrowErrors: z.ZodOptional<z.ZodBoolean>;
|
|
341
|
+
includeOtherInUnionTypes: z.ZodOptional<z.ZodBoolean>;
|
|
342
|
+
includeUtilsOnUnionMembers: z.ZodOptional<z.ZodBoolean>;
|
|
343
|
+
omitFernHeaders: z.ZodOptional<z.ZodBoolean>;
|
|
344
|
+
linter: z.ZodOptional<z.ZodEnum<{
|
|
345
|
+
biome: "biome";
|
|
346
|
+
oxlint: "oxlint";
|
|
347
|
+
none: "none";
|
|
348
|
+
}>>;
|
|
349
|
+
formatter: z.ZodOptional<z.ZodEnum<{
|
|
350
|
+
biome: "biome";
|
|
351
|
+
none: "none";
|
|
352
|
+
prettier: "prettier";
|
|
353
|
+
oxfmt: "oxfmt";
|
|
354
|
+
}>>;
|
|
355
|
+
exports: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
|
|
356
|
+
files: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
357
|
+
engines: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
358
|
+
lintStaged: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
359
|
+
browser: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
246
360
|
allowCustomFetcher: z.ZodOptional<z.ZodBoolean>;
|
|
247
361
|
useBrandedStringAliases: z.ZodOptional<z.ZodBoolean>;
|
|
248
362
|
useLegacyExports: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -413,6 +527,7 @@ declare const typescriptGenerationConfigSchema: z.ZodObject<{
|
|
|
413
527
|
name: z.ZodEnum<{
|
|
414
528
|
axios: "axios";
|
|
415
529
|
fetch: "fetch";
|
|
530
|
+
"node-fetch": "node-fetch";
|
|
416
531
|
}>;
|
|
417
532
|
}, z.core.$strict>>;
|
|
418
533
|
packageManager: z.ZodOptional<z.ZodEnum<{
|
|
@@ -433,6 +548,35 @@ declare const typescriptGenerationConfigSchema: z.ZodObject<{
|
|
|
433
548
|
/** Name of the top-level namespace export emitted by Fern-compatible TypeScript SDKs. */
|
|
434
549
|
namespaceExportName: z.ZodOptional<z.ZodString>;
|
|
435
550
|
consolidateTypeFiles: z.ZodOptional<z.ZodBoolean>;
|
|
551
|
+
formDataSupport: z.ZodOptional<z.ZodEnum<{
|
|
552
|
+
Node16: "Node16";
|
|
553
|
+
Node18: "Node18";
|
|
554
|
+
}>>;
|
|
555
|
+
allowExtraFields: z.ZodOptional<z.ZodBoolean>;
|
|
556
|
+
generateSubpackageExports: z.ZodOptional<z.ZodBoolean>;
|
|
557
|
+
exportAllRequestsAtRoot: z.ZodOptional<z.ZodBoolean>;
|
|
558
|
+
generateEndpointMetadata: z.ZodOptional<z.ZodBoolean>;
|
|
559
|
+
outputEsm: z.ZodOptional<z.ZodBoolean>;
|
|
560
|
+
neverThrowErrors: z.ZodOptional<z.ZodBoolean>;
|
|
561
|
+
includeOtherInUnionTypes: z.ZodOptional<z.ZodBoolean>;
|
|
562
|
+
includeUtilsOnUnionMembers: z.ZodOptional<z.ZodBoolean>;
|
|
563
|
+
omitFernHeaders: z.ZodOptional<z.ZodBoolean>;
|
|
564
|
+
linter: z.ZodOptional<z.ZodEnum<{
|
|
565
|
+
biome: "biome";
|
|
566
|
+
oxlint: "oxlint";
|
|
567
|
+
none: "none";
|
|
568
|
+
}>>;
|
|
569
|
+
formatter: z.ZodOptional<z.ZodEnum<{
|
|
570
|
+
biome: "biome";
|
|
571
|
+
none: "none";
|
|
572
|
+
prettier: "prettier";
|
|
573
|
+
oxfmt: "oxfmt";
|
|
574
|
+
}>>;
|
|
575
|
+
exports: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
|
|
576
|
+
files: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
577
|
+
engines: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
578
|
+
lintStaged: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
579
|
+
browser: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
436
580
|
allowCustomFetcher: z.ZodOptional<z.ZodBoolean>;
|
|
437
581
|
useBrandedStringAliases: z.ZodOptional<z.ZodBoolean>;
|
|
438
582
|
useLegacyExports: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -447,4 +591,4 @@ declare const typescriptGenerationConfigSchema: z.ZodObject<{
|
|
|
447
591
|
}, z.core.$strict>;
|
|
448
592
|
type TypescriptGenerationConfig = z.infer<typeof typescriptGenerationConfigSchema>;
|
|
449
593
|
|
|
450
|
-
export {
|
|
594
|
+
export { swiftGenerationConfigSchema as $, exactSemverSchema as A, githubActionsSecretNameSchema as B, CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE as C, type Dependency as D, goGenerationConfigSchema as E, goModulePathSchema as F, type GoGenerationConfig as G, javaGenerationConfigSchema as H, jsonObjectSchema as I, type JavaGenerationConfig as J, type KotlinGenerationConfig as K, jsonValueSchema as L, type McpAvailabilityStatus as M, kotlinGenerationConfigSchema as N, mcpAvailabilityStatuses as O, type PackageConfig as P, mcpGenerationConfigSchema as Q, type RubyGenerationConfig as R, type SdkConfigDiagnostic as S, type TerraformGenerationConfig as T, nonEmptyStringSchema as U, packageConfigSchema as V, phpGenerationConfigSchema as W, pythonGenerationConfigSchema as X, relativePathSchema as Y, rubyGenerationConfigSchema as Z, rustGenerationConfigSchema as _, type CliDistributionConfig as a, terraformGenerationConfigSchema as a0, typescriptGenerationConfigSchema as a1, type CliDistributionGithubAppConfig as b, type CliDistributionHomebrewConfig as c, type CliDistributionScoopConfig as d, type CliGenerationConfig as e, type CliProfilesConfig as f, type CliProfilesProvisionOperation as g, type CsharpGenerationConfig as h, type JsonObject as i, type JsonValue as j, type McpGenerationConfig as k, type McpToolFilter as l, type PhpGenerationConfig as m, type PlanModifiers as n, type PythonGenerationConfig as o, type RustGenerationConfig as p, type SwiftGenerationConfig as q, type TypescriptGenerationConfig as r, cliDistributionConfigSchema as s, cliDistributionGithubAppSchema as t, cliDistributionHomebrewSchema as u, cliDistributionScoopSchema as v, cliGenerationConfigSchema as w, composerPackageNameSchema as x, csharpGenerationConfigSchema as y, dependencySchema as z };
|
|
@@ -44,6 +44,10 @@ declare const packageConfigSchema: z.ZodObject<{
|
|
|
44
44
|
description: z.ZodOptional<z.ZodString>;
|
|
45
45
|
repository: z.ZodOptional<z.ZodString>;
|
|
46
46
|
homepage: z.ZodOptional<z.ZodString>;
|
|
47
|
+
bugs: z.ZodOptional<z.ZodObject<{
|
|
48
|
+
url: z.ZodOptional<z.ZodString>;
|
|
49
|
+
email: z.ZodOptional<z.ZodString>;
|
|
50
|
+
}, z.core.$strict>>;
|
|
47
51
|
documentationUrl: z.ZodOptional<z.ZodString>;
|
|
48
52
|
authors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
49
53
|
name: z.ZodString;
|
|
@@ -134,14 +138,94 @@ declare const packageConfigSchema: z.ZodObject<{
|
|
|
134
138
|
defaultFeatures: z.ZodOptional<z.ZodBoolean>;
|
|
135
139
|
environmentMarker: z.ZodOptional<z.ZodString>;
|
|
136
140
|
}, z.core.$strict>>>;
|
|
141
|
+
extraPeerDependenciesMeta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>>;
|
|
137
142
|
}, z.core.$strict>;
|
|
138
143
|
type Dependency = z.infer<typeof dependencySchema>;
|
|
139
144
|
type PackageConfig = z.infer<typeof packageConfigSchema>;
|
|
140
145
|
|
|
146
|
+
declare const githubActionsSecretNameSchema: z.ZodString;
|
|
147
|
+
declare const cliDistributionGithubAppSchema: z.ZodObject<{
|
|
148
|
+
appIdSecretName: z.ZodString;
|
|
149
|
+
privateKeySecretName: z.ZodString;
|
|
150
|
+
}, z.core.$strict>;
|
|
151
|
+
declare const cliDistributionHomebrewSchema: z.ZodObject<{
|
|
152
|
+
tap: z.ZodString;
|
|
153
|
+
formula: z.ZodOptional<z.ZodString>;
|
|
154
|
+
tokenSecretName: z.ZodOptional<z.ZodString>;
|
|
155
|
+
}, z.core.$strict>;
|
|
156
|
+
declare const cliDistributionScoopSchema: z.ZodObject<{
|
|
157
|
+
bucket: z.ZodString;
|
|
158
|
+
tokenSecretName: z.ZodOptional<z.ZodString>;
|
|
159
|
+
}, z.core.$strict>;
|
|
160
|
+
declare const cliDistributionConfigSchema: z.ZodObject<{
|
|
161
|
+
githubApp: z.ZodOptional<z.ZodObject<{
|
|
162
|
+
appIdSecretName: z.ZodString;
|
|
163
|
+
privateKeySecretName: z.ZodString;
|
|
164
|
+
}, z.core.$strict>>;
|
|
165
|
+
homebrew: z.ZodOptional<z.ZodObject<{
|
|
166
|
+
tap: z.ZodString;
|
|
167
|
+
formula: z.ZodOptional<z.ZodString>;
|
|
168
|
+
tokenSecretName: z.ZodOptional<z.ZodString>;
|
|
169
|
+
}, z.core.$strict>>;
|
|
170
|
+
scoop: z.ZodOptional<z.ZodObject<{
|
|
171
|
+
bucket: z.ZodString;
|
|
172
|
+
tokenSecretName: z.ZodOptional<z.ZodString>;
|
|
173
|
+
}, z.core.$strict>>;
|
|
174
|
+
}, z.core.$strict>;
|
|
175
|
+
declare const CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE = "CLI_DISTRIBUTION_NON_RELEASE_MODE";
|
|
176
|
+
interface SdkConfigDiagnostic {
|
|
177
|
+
code: string;
|
|
178
|
+
severity: 'warning';
|
|
179
|
+
path: (string | number)[];
|
|
180
|
+
reason: string;
|
|
181
|
+
suggestedAction: string;
|
|
182
|
+
}
|
|
183
|
+
type CliDistributionGithubAppConfig = z.infer<typeof cliDistributionGithubAppSchema>;
|
|
184
|
+
type CliDistributionHomebrewConfig = z.infer<typeof cliDistributionHomebrewSchema>;
|
|
185
|
+
type CliDistributionScoopConfig = z.infer<typeof cliDistributionScoopSchema>;
|
|
186
|
+
type CliDistributionConfig = z.infer<typeof cliDistributionConfigSchema>;
|
|
187
|
+
|
|
188
|
+
declare const profilesProvisionOperationSchema: z.ZodObject<{
|
|
189
|
+
operation: z.ZodString;
|
|
190
|
+
credential: z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>;
|
|
191
|
+
revokeParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
|
|
192
|
+
}, z.core.$strict>;
|
|
193
|
+
declare const profilesConfigSchema: z.ZodObject<{
|
|
194
|
+
enabled: z.ZodBoolean;
|
|
195
|
+
commandName: z.ZodOptional<z.ZodString>;
|
|
196
|
+
revokeOperation: z.ZodOptional<z.ZodString>;
|
|
197
|
+
provisionOperation: z.ZodOptional<z.ZodObject<{
|
|
198
|
+
operation: z.ZodString;
|
|
199
|
+
credential: z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>;
|
|
200
|
+
revokeParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
|
|
201
|
+
}, z.core.$strict>>;
|
|
202
|
+
}, z.core.$strict>;
|
|
203
|
+
/**
|
|
204
|
+
* Omitted fields are left undefined; the CLI generator applies its own defaults: a binary name
|
|
205
|
+
* derived from the API display name, custom commands on, no root group, profiles off, a single
|
|
206
|
+
* types crate, and a `user-agent-suffix` flag.
|
|
207
|
+
*/
|
|
141
208
|
declare const cliGenerationConfigSchema: z.ZodObject<{
|
|
142
209
|
paginationParameters: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
143
210
|
skills: z.ZodOptional<z.ZodBoolean>;
|
|
211
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
212
|
+
customCommands: z.ZodOptional<z.ZodBoolean>;
|
|
213
|
+
rootGroup: z.ZodOptional<z.ZodString>;
|
|
214
|
+
profiles: z.ZodOptional<z.ZodObject<{
|
|
215
|
+
enabled: z.ZodBoolean;
|
|
216
|
+
commandName: z.ZodOptional<z.ZodString>;
|
|
217
|
+
revokeOperation: z.ZodOptional<z.ZodString>;
|
|
218
|
+
provisionOperation: z.ZodOptional<z.ZodObject<{
|
|
219
|
+
operation: z.ZodString;
|
|
220
|
+
credential: z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>;
|
|
221
|
+
revokeParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
|
|
222
|
+
}, z.core.$strict>>;
|
|
223
|
+
}, z.core.$strict>>;
|
|
224
|
+
splitTypeCrates: z.ZodOptional<z.ZodBoolean>;
|
|
225
|
+
userAgentSuffixFlag: z.ZodOptional<z.ZodString>;
|
|
144
226
|
}, z.core.$strict>;
|
|
227
|
+
type CliProfilesProvisionOperation = z.infer<typeof profilesProvisionOperationSchema>;
|
|
228
|
+
type CliProfilesConfig = z.infer<typeof profilesConfigSchema>;
|
|
145
229
|
type CliGenerationConfig = z.infer<typeof cliGenerationConfigSchema>;
|
|
146
230
|
|
|
147
231
|
declare const csharpGenerationConfigSchema: z.ZodObject<{
|
|
@@ -224,6 +308,7 @@ declare const mcpGenerationConfigSchema: z.ZodObject<{
|
|
|
224
308
|
name: z.ZodEnum<{
|
|
225
309
|
axios: "axios";
|
|
226
310
|
fetch: "fetch";
|
|
311
|
+
"node-fetch": "node-fetch";
|
|
227
312
|
}>;
|
|
228
313
|
}, z.core.$strict>>;
|
|
229
314
|
packageManager: z.ZodOptional<z.ZodEnum<{
|
|
@@ -243,6 +328,35 @@ declare const mcpGenerationConfigSchema: z.ZodObject<{
|
|
|
243
328
|
exportClassDefault: z.ZodOptional<z.ZodBoolean>;
|
|
244
329
|
namespaceExportName: z.ZodOptional<z.ZodString>;
|
|
245
330
|
consolidateTypeFiles: z.ZodOptional<z.ZodBoolean>;
|
|
331
|
+
formDataSupport: z.ZodOptional<z.ZodEnum<{
|
|
332
|
+
Node16: "Node16";
|
|
333
|
+
Node18: "Node18";
|
|
334
|
+
}>>;
|
|
335
|
+
allowExtraFields: z.ZodOptional<z.ZodBoolean>;
|
|
336
|
+
generateSubpackageExports: z.ZodOptional<z.ZodBoolean>;
|
|
337
|
+
exportAllRequestsAtRoot: z.ZodOptional<z.ZodBoolean>;
|
|
338
|
+
generateEndpointMetadata: z.ZodOptional<z.ZodBoolean>;
|
|
339
|
+
outputEsm: z.ZodOptional<z.ZodBoolean>;
|
|
340
|
+
neverThrowErrors: z.ZodOptional<z.ZodBoolean>;
|
|
341
|
+
includeOtherInUnionTypes: z.ZodOptional<z.ZodBoolean>;
|
|
342
|
+
includeUtilsOnUnionMembers: z.ZodOptional<z.ZodBoolean>;
|
|
343
|
+
omitFernHeaders: z.ZodOptional<z.ZodBoolean>;
|
|
344
|
+
linter: z.ZodOptional<z.ZodEnum<{
|
|
345
|
+
biome: "biome";
|
|
346
|
+
oxlint: "oxlint";
|
|
347
|
+
none: "none";
|
|
348
|
+
}>>;
|
|
349
|
+
formatter: z.ZodOptional<z.ZodEnum<{
|
|
350
|
+
biome: "biome";
|
|
351
|
+
none: "none";
|
|
352
|
+
prettier: "prettier";
|
|
353
|
+
oxfmt: "oxfmt";
|
|
354
|
+
}>>;
|
|
355
|
+
exports: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
|
|
356
|
+
files: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
357
|
+
engines: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
358
|
+
lintStaged: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
359
|
+
browser: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
246
360
|
allowCustomFetcher: z.ZodOptional<z.ZodBoolean>;
|
|
247
361
|
useBrandedStringAliases: z.ZodOptional<z.ZodBoolean>;
|
|
248
362
|
useLegacyExports: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -413,6 +527,7 @@ declare const typescriptGenerationConfigSchema: z.ZodObject<{
|
|
|
413
527
|
name: z.ZodEnum<{
|
|
414
528
|
axios: "axios";
|
|
415
529
|
fetch: "fetch";
|
|
530
|
+
"node-fetch": "node-fetch";
|
|
416
531
|
}>;
|
|
417
532
|
}, z.core.$strict>>;
|
|
418
533
|
packageManager: z.ZodOptional<z.ZodEnum<{
|
|
@@ -433,6 +548,35 @@ declare const typescriptGenerationConfigSchema: z.ZodObject<{
|
|
|
433
548
|
/** Name of the top-level namespace export emitted by Fern-compatible TypeScript SDKs. */
|
|
434
549
|
namespaceExportName: z.ZodOptional<z.ZodString>;
|
|
435
550
|
consolidateTypeFiles: z.ZodOptional<z.ZodBoolean>;
|
|
551
|
+
formDataSupport: z.ZodOptional<z.ZodEnum<{
|
|
552
|
+
Node16: "Node16";
|
|
553
|
+
Node18: "Node18";
|
|
554
|
+
}>>;
|
|
555
|
+
allowExtraFields: z.ZodOptional<z.ZodBoolean>;
|
|
556
|
+
generateSubpackageExports: z.ZodOptional<z.ZodBoolean>;
|
|
557
|
+
exportAllRequestsAtRoot: z.ZodOptional<z.ZodBoolean>;
|
|
558
|
+
generateEndpointMetadata: z.ZodOptional<z.ZodBoolean>;
|
|
559
|
+
outputEsm: z.ZodOptional<z.ZodBoolean>;
|
|
560
|
+
neverThrowErrors: z.ZodOptional<z.ZodBoolean>;
|
|
561
|
+
includeOtherInUnionTypes: z.ZodOptional<z.ZodBoolean>;
|
|
562
|
+
includeUtilsOnUnionMembers: z.ZodOptional<z.ZodBoolean>;
|
|
563
|
+
omitFernHeaders: z.ZodOptional<z.ZodBoolean>;
|
|
564
|
+
linter: z.ZodOptional<z.ZodEnum<{
|
|
565
|
+
biome: "biome";
|
|
566
|
+
oxlint: "oxlint";
|
|
567
|
+
none: "none";
|
|
568
|
+
}>>;
|
|
569
|
+
formatter: z.ZodOptional<z.ZodEnum<{
|
|
570
|
+
biome: "biome";
|
|
571
|
+
none: "none";
|
|
572
|
+
prettier: "prettier";
|
|
573
|
+
oxfmt: "oxfmt";
|
|
574
|
+
}>>;
|
|
575
|
+
exports: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
|
|
576
|
+
files: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
577
|
+
engines: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
578
|
+
lintStaged: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
579
|
+
browser: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
436
580
|
allowCustomFetcher: z.ZodOptional<z.ZodBoolean>;
|
|
437
581
|
useBrandedStringAliases: z.ZodOptional<z.ZodBoolean>;
|
|
438
582
|
useLegacyExports: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -447,4 +591,4 @@ declare const typescriptGenerationConfigSchema: z.ZodObject<{
|
|
|
447
591
|
}, z.core.$strict>;
|
|
448
592
|
type TypescriptGenerationConfig = z.infer<typeof typescriptGenerationConfigSchema>;
|
|
449
593
|
|
|
450
|
-
export {
|
|
594
|
+
export { swiftGenerationConfigSchema as $, exactSemverSchema as A, githubActionsSecretNameSchema as B, CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE as C, type Dependency as D, goGenerationConfigSchema as E, goModulePathSchema as F, type GoGenerationConfig as G, javaGenerationConfigSchema as H, jsonObjectSchema as I, type JavaGenerationConfig as J, type KotlinGenerationConfig as K, jsonValueSchema as L, type McpAvailabilityStatus as M, kotlinGenerationConfigSchema as N, mcpAvailabilityStatuses as O, type PackageConfig as P, mcpGenerationConfigSchema as Q, type RubyGenerationConfig as R, type SdkConfigDiagnostic as S, type TerraformGenerationConfig as T, nonEmptyStringSchema as U, packageConfigSchema as V, phpGenerationConfigSchema as W, pythonGenerationConfigSchema as X, relativePathSchema as Y, rubyGenerationConfigSchema as Z, rustGenerationConfigSchema as _, type CliDistributionConfig as a, terraformGenerationConfigSchema as a0, typescriptGenerationConfigSchema as a1, type CliDistributionGithubAppConfig as b, type CliDistributionHomebrewConfig as c, type CliDistributionScoopConfig as d, type CliGenerationConfig as e, type CliProfilesConfig as f, type CliProfilesProvisionOperation as g, type CsharpGenerationConfig as h, type JsonObject as i, type JsonValue as j, type McpGenerationConfig as k, type McpToolFilter as l, type PhpGenerationConfig as m, type PlanModifiers as n, type PythonGenerationConfig as o, type RustGenerationConfig as p, type SwiftGenerationConfig as q, type TypescriptGenerationConfig as r, cliDistributionConfigSchema as s, cliDistributionGithubAppSchema as t, cliDistributionHomebrewSchema as u, cliDistributionScoopSchema as v, cliGenerationConfigSchema as w, composerPackageNameSchema as x, csharpGenerationConfigSchema as y, dependencySchema as z };
|
package/package.json
CHANGED
|
@@ -67,6 +67,19 @@ lowered into the public API shape. Supported registry credentials, signing mater
|
|
|
67
67
|
credentials are preserved in SDK Config when present; callers must treat these fields as sensitive
|
|
68
68
|
secrets.
|
|
69
69
|
|
|
70
|
+
Legacy package metadata fills `target.package` only where the mapped package has no value yet:
|
|
71
|
+
the CLI generator's `packageIdentity.homepage`, `keywords`, `authors`, and `license`, the Rust
|
|
72
|
+
generator's `packageLicense`, and `metadata.license` for outputs other than GitHub (a GitHub output
|
|
73
|
+
already carries it as its license). A value mapped from another source, such as the GitHub license
|
|
74
|
+
or `publishMetadata` authors, is kept; a differing legacy value is reported as
|
|
75
|
+
`FERN_PACKAGE_VALUE_CONFLICT`. Cargo `authors` entries are `Name` or `Name <email>`; a bracketed
|
|
76
|
+
suffix that is not a valid email stays part of the name (`Acme <Team>`). If any entry has no name
|
|
77
|
+
before its brackets (`<ada@acme.test>`), no authors are written and each such entry is reported as
|
|
78
|
+
`FERN_CONFIG_VALUE_INVALID`. Licenses `MIT`, `Apache-2.0`, `GPL-3.0`, `GPL-3.0-only`, and
|
|
79
|
+
`UNLICENSED` become `MIT`, `APACHE`, `GPL3`, `GPL3`, and `UNLICENSED`; other identifiers are kept
|
|
80
|
+
verbatim. A custom `metadata.license` file is reported rather than migrated. Cargo dependency
|
|
81
|
+
`rev` and `branch` map to `source.ref`, and `registry` maps to a registry source.
|
|
82
|
+
|
|
70
83
|
## Contract boundaries
|
|
71
84
|
|
|
72
85
|
`SdkConfigV1` is distinct from both existing configuration contracts:
|
|
@@ -103,6 +116,34 @@ their operational extensions remain separate explicit allowlists.
|
|
|
103
116
|
Source `path`, `overlays`, and `overrides` values must be relative paths without parent-directory
|
|
104
117
|
segments. Absolute paths and `..` traversal are rejected at validation time.
|
|
105
118
|
|
|
119
|
+
### OAuth client identity
|
|
120
|
+
|
|
121
|
+
An OAuth 2.0 scheme distinguishes two kinds of client identity:
|
|
122
|
+
|
|
123
|
+
- `api.auth.schemes[].clientId` and `clientSecret` describe SDK parameters that the caller supplies
|
|
124
|
+
at runtime, optionally from an environment variable. They carry confidential-client credentials
|
|
125
|
+
and never contain literal values.
|
|
126
|
+
- `api.auth.schemes[].flows[].clientId` is accepted only on `authorization-code` flows. It is the
|
|
127
|
+
literal, public (RFC 6749 §2.2) identifier of an installed application, such as a CLI that runs
|
|
128
|
+
browser login with PKCE. Generators embed it verbatim, so environment expressions are rejected and
|
|
129
|
+
it must never hold a client secret.
|
|
130
|
+
|
|
131
|
+
The flow-level `clientId` is optional so existing documents keep parsing. A generator that needs it
|
|
132
|
+
for an interactive login reports an error when it is absent.
|
|
133
|
+
|
|
134
|
+
```yaml
|
|
135
|
+
api:
|
|
136
|
+
auth:
|
|
137
|
+
schemes:
|
|
138
|
+
- id: login
|
|
139
|
+
type: oauth2
|
|
140
|
+
flows:
|
|
141
|
+
- type: authorization-code
|
|
142
|
+
authorizationUrl: https://auth.example.com/authorize
|
|
143
|
+
tokenUrl: https://auth.example.com/token
|
|
144
|
+
clientId: acme-cli
|
|
145
|
+
```
|
|
146
|
+
|
|
106
147
|
## Shape
|
|
107
148
|
|
|
108
149
|
```json
|
|
@@ -167,6 +208,105 @@ target must have an effective output either from that baseline or from its own `
|
|
|
167
208
|
migration writes output directly on each target because repositories and publication registries are
|
|
168
209
|
properties of the generated language artifact.
|
|
169
210
|
|
|
211
|
+
## CLI distribution and npm publication
|
|
212
|
+
|
|
213
|
+
A `language: cli` target's own `output` block accepts `distribution`, which publishes the generated
|
|
214
|
+
CLI to Homebrew and Scoop from the generated `release.yml` on each tagged release. It exists only on
|
|
215
|
+
the `cli` target; root `output` and other languages reject it as an unknown key. A CLI target may
|
|
216
|
+
also publish to npm, which the CLI generator uses for its npm launcher packages.
|
|
217
|
+
|
|
218
|
+
```yaml
|
|
219
|
+
targets:
|
|
220
|
+
- language: cli
|
|
221
|
+
package:
|
|
222
|
+
packageName: '@acme/cli'
|
|
223
|
+
output:
|
|
224
|
+
delivery: github
|
|
225
|
+
github:
|
|
226
|
+
repository: acme/acme-cli
|
|
227
|
+
mode: release
|
|
228
|
+
publish:
|
|
229
|
+
registry: npm
|
|
230
|
+
trustedPublishing: true # or token: ${NPM_TOKEN}
|
|
231
|
+
distribution:
|
|
232
|
+
githubApp:
|
|
233
|
+
appIdSecretName: PUBLISH_APP_ID
|
|
234
|
+
privateKeySecretName: PUBLISH_APP_PRIVATE_KEY
|
|
235
|
+
homebrew:
|
|
236
|
+
tap: acme/homebrew-tap
|
|
237
|
+
formula: acme # optional; the generator defaults it to the binary name
|
|
238
|
+
scoop:
|
|
239
|
+
bucket: acme/scoop-bucket
|
|
240
|
+
tokenSecretName: SCOOP_BUCKET_PAT # optional; overrides githubApp for Scoop
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### Secret names, not secret values
|
|
244
|
+
|
|
245
|
+
Every `*SecretName` field (`tokenSecretName`, `appIdSecretName`, `privateKeySecretName`) is the
|
|
246
|
+
**name of a GitHub Actions secret in the generated CLI repository**. The generated workflow reads
|
|
247
|
+
`${{ secrets.<NAME> }}` and, for `githubApp`, mints a short-lived installation token at release time.
|
|
248
|
+
Secret values never pass through SDK Config, SDK Config IR, the Fern CLI, or SDK Generation API:
|
|
249
|
+
|
|
250
|
+
- Names are not `${ENV}` expressions. Clients must not resolve them and must not send them through
|
|
251
|
+
the KMS-encrypted publish-credential channel; that channel is for `output.publish` credentials only.
|
|
252
|
+
- Names must match `^[A-Z][A-Z0-9_]*$` and must not be `GITHUB_TOKEN`, so lowercase tokens, PEM keys,
|
|
253
|
+
and `${...}` expressions are rejected. Validation messages never include the rejected value.
|
|
254
|
+
- Defaults are not written into configuration. A channel without `tokenSecretName` uses `githubApp`
|
|
255
|
+
when present and otherwise the generator's default secret (`HOMEBREW_TAP_TOKEN` or
|
|
256
|
+
`SCOOP_BUCKET_TOKEN`). Writing a default name explicitly would override `githubApp` for that channel.
|
|
257
|
+
|
|
258
|
+
The field names differ from the Fern generator's `tokenEnvironmentVariable`, `appIdSecret`, and
|
|
259
|
+
`privateKeySecret` so they cannot be mistaken for environment variables resolved by the client.
|
|
260
|
+
|
|
261
|
+
### Validation
|
|
262
|
+
|
|
263
|
+
| Rule | Result |
|
|
264
|
+
| ---------------------------------------------------------------------- | ---------------------------------------- |
|
|
265
|
+
| `distribution` with `files` or `zip` delivery | Error with a fix instruction |
|
|
266
|
+
| `distribution` on root `output` or a non-`cli` target | Unknown-key error |
|
|
267
|
+
| `distribution: {}` or `githubApp` without `homebrew`/`scoop` | Error |
|
|
268
|
+
| `githubApp` missing either secret name | Error |
|
|
269
|
+
| `tap`/`bucket` not `<owner>/<repo>`; `formula` not `^[a-z][a-z0-9-]*$` | Error |
|
|
270
|
+
| npm publication on a `cli` target without `github` delivery | Error |
|
|
271
|
+
| `trustedPublishing: true` with `token` | Error |
|
|
272
|
+
| `distribution` with GitHub mode `pull-request`, `push`, or `commit` | Warning from `getSdkConfigV1Diagnostics` |
|
|
273
|
+
|
|
274
|
+
Non-release modes are allowed because a customer may push a version tag themselves, but nothing is
|
|
275
|
+
published until they do. Zod has no non-fatal issue channel, so warnings come from
|
|
276
|
+
`getSdkConfigV1Diagnostics(document)` (and `getSdkConfigIrV1Diagnostics` for IR), which returns the
|
|
277
|
+
same `code`/`severity`/`path`/`reason`/`suggestedAction` shape as Fern migration diagnostics.
|
|
278
|
+
|
|
279
|
+
`trustedPublishing` is shared by every npm target. It replaces Fern's `token: OIDC` marker
|
|
280
|
+
(`<USE_OIDC>` in the generator) with a typed flag. For CLI npm, omitting `publish` is equivalent to
|
|
281
|
+
the generator's `shouldGeneratePublishWorkflow: false`.
|
|
282
|
+
|
|
283
|
+
### Fern migration
|
|
284
|
+
|
|
285
|
+
`mapFernConfigToSdkConfigV1` maps the CLI generator's `config.distribution` onto the target's
|
|
286
|
+
`output.distribution` when the Fern output is a GitHub repository. Keys are matched by exact name:
|
|
287
|
+
`appIdSecret` and `privateKeySecret` become `appIdSecretName` and `privateKeySecretName`, and each
|
|
288
|
+
channel's `tokenEnvironmentVariable` becomes `tokenSecretName`. Secret names are copied verbatim and
|
|
289
|
+
generator defaults are not written. Other keys are reported as `FERN_CONFIG_FIELD_UNSUPPORTED`.
|
|
290
|
+
|
|
291
|
+
- A distribution this schema rejects, including the legacy no-ops above, is left out and reported
|
|
292
|
+
as `FERN_CONFIG_VALUE_INVALID` at the legacy path, without the rejected value.
|
|
293
|
+
- Distribution on a non-GitHub Fern output, which the generator ignores, is reported as
|
|
294
|
+
`FERN_CLI_DISTRIBUTION_REQUIRES_GITHUB_OUTPUT` instead of being written.
|
|
295
|
+
- CLI npm publication migrates from the GitHub output's `publishInfo` like any other registry.
|
|
296
|
+
|
|
297
|
+
### Deferred and rejected scope
|
|
298
|
+
|
|
299
|
+
- **Native SDK Generation API expansion.** The native SDK Config expander forces zip output and
|
|
300
|
+
drops output settings, so only the Fern adapter route can deliver distribution today.
|
|
301
|
+
- **Rejected legacy behavior.** The Fern generator accepts an empty `distribution` and a `githubApp`
|
|
302
|
+
without a channel as no-ops, and ignores distribution outside GitHub output. SDK Config rejects
|
|
303
|
+
all three.
|
|
304
|
+
- **Follow-ups.** Fern adapter mapping to `generators.yml`; credential-guard and leak verification,
|
|
305
|
+
including the pre-existing gap where `output.github.credentials` is not stripped from the uploaded
|
|
306
|
+
document.
|
|
307
|
+
- **Not modeled.** Every legacy `config.distribution` field and CLI npm publish field has an SDK
|
|
308
|
+
Config equivalent. Hosted (Postman-operated) tap or bucket publication is out of scope.
|
|
309
|
+
|
|
170
310
|
## Supported languages
|
|
171
311
|
|
|
172
312
|
SdkConfig v1 is language-agnostic across every sdk-gen-core target available when this contract was
|
|
@@ -184,13 +324,55 @@ defined. Each language has an explicitly allowlisted `generation` shape:
|
|
|
184
324
|
| Ruby | `ruby` | `requirePaths` |
|
|
185
325
|
| Rust | `rust` | `dateTimeType` |
|
|
186
326
|
| Swift | `swift` | `moduleName` |
|
|
187
|
-
| CLI | `cli` | `skills`
|
|
327
|
+
| CLI | `cli` | `skills`, `binaryName`, `profiles` |
|
|
188
328
|
| MCP | `mcp` | `serverName` |
|
|
189
329
|
| Terraform | `terraform` | `providerName` |
|
|
190
330
|
|
|
191
331
|
Adding an internal language setting to `SdkConfigIrV1` does not add it here. Portable settings are
|
|
192
332
|
added to the shared domain deliberately; IR-only settings remain explicit internal extensions.
|
|
193
333
|
|
|
334
|
+
### CLI generation settings
|
|
335
|
+
|
|
336
|
+
These settings are accepted only in the `generation` block of a `language: cli` target. Root
|
|
337
|
+
`generation` and every other target language reject them. Each one maps to
|
|
338
|
+
`generation.language.cli` in SDK Config IR with the same name and shape.
|
|
339
|
+
|
|
340
|
+
```yaml
|
|
341
|
+
targets:
|
|
342
|
+
- language: cli
|
|
343
|
+
generation:
|
|
344
|
+
binaryName: acme
|
|
345
|
+
customCommands: false
|
|
346
|
+
rootGroup: api
|
|
347
|
+
profiles:
|
|
348
|
+
enabled: true
|
|
349
|
+
commandName: accounts
|
|
350
|
+
revokeOperation: iam.keys.remove
|
|
351
|
+
provisionOperation:
|
|
352
|
+
operation: iam.keys.create
|
|
353
|
+
credential: { username: sid, password: secret }
|
|
354
|
+
revokeParameters: { Sid: sid }
|
|
355
|
+
splitTypeCrates: true
|
|
356
|
+
userAgentSuffixFlag: via
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
Omitted settings stay omitted in both SDK Config and IR. The CLI generator then applies the
|
|
360
|
+
default shown below. Fern migration copies these keys verbatim from the CLI generator's `config`.
|
|
361
|
+
A legacy `profiles` block without `enabled` migrates as `enabled: false`. A legacy value this schema
|
|
362
|
+
rejects is left out and reported as `FERN_CONFIG_VALUE_INVALID`.
|
|
363
|
+
|
|
364
|
+
| Setting | Behavior | Validation | Generator default when omitted |
|
|
365
|
+
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
|
|
366
|
+
| `binaryName` | Executable name. The generator kebab-cases it (`Acme CLI` becomes `acme-cli`) and uses the result for the Cargo binary, the CLI source directory, the runtime app name, and the fallback environment-variable prefix. | Non-empty string with at least one ASCII letter or digit, since the generator rejects names that kebab-case to empty. | Kebab-cased API display name |
|
|
367
|
+
| `customCommands` | Generates hand-written command support: the model and SDK crates, `sdk.rs`, and `custom.rs`. | Boolean | `true` |
|
|
368
|
+
| `rootGroup` | Nests every spec-derived command under one group, so `acme users list` becomes `acme api users list`. | `^[a-z][a-z0-9_-]*$` | No group |
|
|
369
|
+
| `profiles.enabled` | Emits the profile command group and the global `--profile` / `-p` flag. Profiles store per-profile credentials and request defaults. | Required boolean when `profiles` is present, following the SDK Config convention for feature objects. The generator itself treats a missing `enabled` as `false`. | Profiles off |
|
|
370
|
+
| `profiles.commandName` | Name of the profile command group. | `^[a-z][a-z0-9-]*$`, excluding `auth`, `completion`, `man`, `errors`, `generate-skills`, and `help` | `profiles` |
|
|
371
|
+
| `profiles.revokeOperation` | Operation that `profiles remove --revoke` calls. | Dotted command path, such as `iam.keys.remove` | No `--revoke` flag |
|
|
372
|
+
| `profiles.provisionOperation` | Operation that `profiles create --provision` calls, and how its response fills the stored credential. | `operation` is a required dotted path. `credential` maps at least one field. Map keys and values match `^[A-Za-z0-9_.-]+$`. | No `--provision` flag |
|
|
373
|
+
| `splitTypeCrates` | Splits generated types into one crate per API behind a facade crate. | Boolean | `false` |
|
|
374
|
+
| `userAgentSuffixFlag` | Long flag that appends a product token to the User-Agent. The environment variable is `<BINARY>_<FLAG>`, with hyphens changed to underscores. | `^[a-z][a-z0-9-]*$` without the leading `--`. Built-in global flag names such as `help` and `base-url` are rejected. | `user-agent-suffix` |
|
|
375
|
+
|
|
194
376
|
## Precedence
|
|
195
377
|
|
|
196
378
|
When a server expands the public config into single-target IR documents, it applies these rules:
|