-
Notifications
You must be signed in to change notification settings - Fork 341
Expand file tree
/
Copy pathseed.yml
More file actions
693 lines (690 loc) · 21.1 KB
/
Copy pathseed.yml
File metadata and controls
693 lines (690 loc) · 21.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
displayName: TypeScript SDK
irVersion: v67
image: fernapi/fern-typescript-sdk
imageAliases: [fernapi/fern-typescript-node-sdk]
changelogLocation: ../../generators/typescript/sdk/versions.yml
publish:
preBuildCommands:
- pnpm turbo run dist:cli --filter @fern-typescript/sdk-generator-cli
docker:
file: ./generators/typescript/sdk/cli/Dockerfile
image: fernapi/fern-typescript-sdk
aliases: [fernapi/fern-typescript-node-sdk]
context: .
sentry:
name: fern-typescript-sdk
project: typescript-sdk
sourceMaps:
- dir: generators/typescript/sdk/cli/dist
test:
docker:
image: fernapi/fern-typescript-sdk:latest
command:
- pnpm turbo run dockerTagLatest --filter @fern-typescript/sdk-generator-cli
podman:
image: fernapi/fern-typescript-sdk:latest
command:
- pnpm turbo run podmanTagLatest --filter @fern-typescript/sdk-generator-cli
local:
workingDirectory: generators/typescript
buildCommand:
- pnpm turbo run dist:cli --filter @fern-typescript/sdk-generator-cli
runCommand: node --enable-source-maps sdk/cli/dist/cli.cjs {CONFIG_PATH}
env:
NODE_ENV: test
language: typescript
generatorType: SDK
defaultOutputMode: github
customFixtureConfig:
customConfig: {}
fixtures:
webhooks:
- outputFolder: no-custom-config
customConfig: null
imdb:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: omit-undefined
customConfig:
omitUndefined: true
- outputFolder: branded-string-aliases
customConfig:
useBrandedStringAliases: true
maxRetries: 5
streaming:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: serde-layer
customConfig:
noSerdeLayer: false
- outputFolder: wrapper
customConfig:
streamType: wrapper
testFramework: jest
audiences:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: with-partner-audience
customConfig: null
audiences:
- partner
exhaustive:
- outputFolder: use-jest
customConfig:
testFramework: jest
- outputFolder: package-path
customConfig:
packagePath: src/test-packagePath
- outputFolder: no-custom-config
customConfig: null
- outputFolder: include-idempotency-key
customConfig:
auto-generate-idempotency-key: true
- outputFolder: with-audiences
customConfig: null
audiences:
- audience1
- audience2
- outputFolder: serde-layer
customConfig:
noSerdeLayer: false
- outputFolder: retain-original-casing
customConfig:
retainOriginalCasing: true
- outputFolder: allow-extra-fields
customConfig:
allowExtraFields: true
- outputFolder: bigint
customConfig:
useBigInt: true
testFramework: jest
- outputFolder: bigint-serde-layer
customConfig:
useBigInt: true
noSerdeLayer: false
testFramework: jest
- outputFolder: web-stream-wrapper
customConfig:
streamType: web
- outputFolder: node-fetch
customConfig:
fetchSupport: node-fetch
- outputFolder: local-files
outputMode: local_files
- outputFolder: local-files-no-source
outputMode: local_files
customConfig:
outputSourceFiles: false
- outputFolder: output-src-only
outputMode: local_files
customConfig:
outputSrcOnly: true
- outputFolder: never-throw-errors
customConfig:
neverThrowErrors: true
- outputFolder: export-all-requests-at-root
customConfig:
exportAllRequestsAtRoot: true
- outputFolder: consolidate-type-files
customConfig:
consolidateTypeFiles: true
- outputFolder: parameter-naming-original-name
customConfig:
parameterNaming: originalName
- outputFolder: parameter-naming-wire-value
customConfig:
parameterNaming: wireValue
- outputFolder: parameter-naming-camel-case
customConfig:
parameterNaming: camelCase
- outputFolder: parameter-naming-snake-case
customConfig:
parameterNaming: snakeCase
- outputFolder: multiple-exports
customConfig:
generateSubpackageExports: true
- outputFolder: flatten-request-parameters
customConfig:
flattenRequestParameters: true
ts-optional-request-body:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: respect-optional-request-body
customConfig:
respectOptionalRequestBody: true
idempotency-headers:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: auto-generate-idempotency-key
customConfig:
auto-generate-idempotency-key: true
error-property:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: union-utils
customConfig:
includeUtilsOnUnionMembers: true
includeOtherInUnionTypes: true
unions:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: serde-layer
customConfig:
noSerdeLayer: false
undiscriminated-unions:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: skip-response-validation
customConfig:
skipResponseValidation: true
union-query-parameters:
- outputFolder: no-custom-config
customConfig: null
query-parameters-openapi-as-objects:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: deep-object-map-query-parameters
customConfig:
deepObjectMapQueryParameters: true
ts-deep-object-map-query-parameters:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: deep-object-map-no-serde
customConfig:
deepObjectMapQueryParameters: true
- outputFolder: deep-object-map-serde
customConfig:
deepObjectMapQueryParameters: true
noSerdeLayer: false
file-download:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: file-download-response-headers
customConfig:
includeContentHeadersOnFileDownloadResponse: true
- outputFolder: stream-wrapper
customConfig:
fileResponseType: 'stream'
streamType: wrapper
testFramework: jest
file-upload:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: inline
customConfig:
inlineFileProperties: true
inlinePathParameters: true
- outputFolder: serde
customConfig:
noSerdeLayer: false
- outputFolder: wrapper
customConfig:
streamType: wrapper
testFramework: jest
- outputFolder: form-data-node16
customConfig:
formDataSupport: 'Node16'
- outputFolder: use-jest
customConfig:
testFramework: jest
unknown:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: unknown-as-any
customConfig:
treatUnknownAsAny: true
query-parameters:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: serde
customConfig:
noSerdeLayer: false
- outputFolder: parameter-naming-original-name
customConfig:
parameterNaming: originalName
- outputFolder: parameter-naming-wire-value
customConfig:
parameterNaming: wireValue
- outputFolder: parameter-naming-camel-case
customConfig:
parameterNaming: camelCase
- outputFolder: parameter-naming-snake-case
customConfig:
parameterNaming: snakeCase
request-parameters:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: use-default-request-parameter-values
customConfig:
useDefaultRequestParameterValues: true
- outputFolder: use-big-int-and-default-request-parameter-values
customConfig:
useDefaultRequestParameterValues: true
useBigInt: true
testFramework: jest
- outputFolder: flatten-request-parameters
customConfig:
flattenRequestParameters: true
openapi-request-body-ref:
- outputFolder: no-custom-config
customConfig: null
trace:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: serde
customConfig:
noSerdeLayer: false
- outputFolder: serde-no-throwing
customConfig:
noSerdeLayer: false
neverThrowErrors: true
- outputFolder: exhaustive
customConfig:
useBrandedStringAliases: true
neverThrowErrors: true
includeCredentialsOnCrossOriginRequests: true
includeUtilsOnUnionMembers: true
includeOtherInUnionTypes: true
timeoutInSeconds: 'infinity'
examples:
- outputFolder: examples-with-api-reference
customConfig:
includeApiReference: true
customReadmeSections:
- title: "Override Section"
content: "Override Content"
- title: "Generator Invocation Custom Section"
content: "Generator Invocation Custom Content for {{ packageName }}"
readmeConfig:
apiName: "CustomName"
disabledSections:
- "contributing"
bannerLink: https://www.fernapi.com
apiReferenceLink: https://www.docs.fernapi.com
defaultEndpoint: POST /movie
customSections:
- title: "Base Readme Custom Section"
language: typescript
content: "Base Readme Custom Content for {{ packageName }}"
- title: "Override Section"
language: typescript
content: "Base Content"
features:
timeouts:
- GET /movie/{movieId}
- method: POST
path: /movie
- outputFolder: retain-original-casing
customConfig:
retainOriginalCasing: true
oauth-client-credentials:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: serde
customConfig:
noSerdeLayer: false
oauth-client-credentials-custom-prefix-openapi:
- outputFolder: .
customConfig: null
oauth-client-credentials-openapi:
- outputFolder: .
customConfig: null
oauth-client-credentials-mandatory-auth:
- outputFolder: no-custom-config
customConfig: null
oauth-client-credentials-environment-variables:
- outputFolder: no-custom-config
customConfig: null
oauth-client-credentials-nested-root:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: never-throw-errors
customConfig:
neverThrowErrors: true
oauth-client-credentials-reference:
- outputFolder: .
customConfig: null
ts-oauth-token-optional:
- outputFolder: no-custom-config
customConfig: null
mixed-case:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: retain-original-casing
customConfig:
retainOriginalCasing: true
ts-inline-types:
- outputFolder: inline
customConfig:
enableInlineTypes: true
- outputFolder: no-inline
customConfig:
enableInlineTypes: false
path-parameters:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: no-inline-path-parameters
customConfig:
inlinePathParameters: false
- outputFolder: no-inline-path-parameters-serde
customConfig:
inlinePathParameters: false
noSerdeLayer: false
- outputFolder: no-inline-path-parameters-retain-original-casing
customConfig:
inlinePathParameters: false
retainOriginalCasing: true
- outputFolder: retain-original-casing
customConfig:
retainOriginalCasing: true
- outputFolder: parameter-naming-original-name
customConfig:
parameterNaming: originalName
- outputFolder: parameter-naming-wire-value
customConfig:
parameterNaming: wireValue
- outputFolder: parameter-naming-camel-case
customConfig:
parameterNaming: camelCase
- outputFolder: parameter-naming-snake-case
customConfig:
parameterNaming: snakeCase
websocket:
- outputFolder: no-websocket-clients
- outputFolder: serde
customConfig:
noSerdeLayer: false
generateWebSocketClients: true
- outputFolder: no-serde
customConfig:
noSerdeLayer: true
generateWebSocketClients: true
property-access:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: generate-read-write-only-types
customConfig:
experimentalGenerateReadWriteOnlyTypes: true
websocket-bearer-auth:
- outputFolder: websockets
customConfig:
generateWebSocketClients: true
websocket-inferred-auth:
- outputFolder: websockets
customConfig:
generateWebSocketClients: true
any-auth:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: generate-endpoint-metadata
customConfig:
generateEndpointMetadata: true
- outputFolder: always-send-auth
customConfig:
alwaysSendAuth: true
- outputFolder: always-send-auth-optional-auth
customConfig:
alwaysSendAuth: true
optional-auth: true
- outputFolder: guard-process-env-access
customConfig:
guardProcessEnvAccess: true
single-url-environment-default:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: optional-auth
customConfig:
optional-auth: true
single-url-environment-no-default:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: require-base-url
customConfig:
requireBaseUrl: true
no-environment:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: require-base-url
customConfig:
requireBaseUrl: true
multi-url-environment-no-default:
- outputFolder: no-custom-config
customConfig: null
# `requireBaseUrl` is ignored for multi-base-URL APIs, so this output matches no-custom-config.
- outputFolder: require-base-url
customConfig:
requireBaseUrl: true
simple-api:
- outputFolder: use-yarn
customConfig:
packageManager: yarn
- outputFolder: use-prettier
customConfig:
formatter: prettier
- outputFolder: use-oxfmt
customConfig:
formatter: oxfmt
- outputFolder: use-prettier-no-linter
customConfig:
formatter: prettier
linter: none
- outputFolder: use-oxlint
customConfig:
linter: oxlint
- outputFolder: use-oxc
customConfig:
linter: oxlint
formatter: oxfmt
- outputFolder: no-linter-and-formatter
customConfig:
linter: none
formatter: none
- outputFolder: omit-fern-headers
customConfig:
omitFernHeaders: true
- outputFolder: optional-auth
customConfig:
optional-auth: true
- outputFolder: include-platform-headers
customConfig:
includePlatformHeaders: true
- outputFolder: allow-user-agent-app-info
customConfig:
includePlatformHeaders: true
allowUserAgentAppInfo: true
- outputFolder: no-custom-config
customConfig: null
- outputFolder: bundle
license: MIT
customConfig:
bundle: true
extraDependencies:
lodash-es: '^4.17.21'
- outputFolder: custom-package-json
customConfig:
private: true
extraDependencies:
lodash-es: '^4.17.21'
extraDevDependencies:
jest: '^29.7.0'
extraPeerDependencies:
'openai': '^4.47.1'
extraPeerDependenciesMeta:
'openai':
optional: true
packageJson:
version: '0.0.2'
dependencies:
stream: '^0.0.2'
qs: '^6.11.2'
files:
- exampleFile
- dist
browser:
command-exists: false
execa: false
engines:
node: '>=16.0.0'
- outputFolder: allow-extra-fields
customConfig:
allowExtraFields: true
- outputFolder: jsr
customConfig:
publishToJsr: true
- outputFolder: legacy-exports
customConfig:
useLegacyExports: true
- outputFolder: oidc-token
publishConfig:
type: npm
registryUrl: https://registry.npmjs.org/
packageName: "@fern-api/dummy"
token: <USE_OIDC>
- outputFolder: no-scripts
customConfig:
noScripts: true
- outputFolder: allow-custom-fetcher
customConfig:
allowCustomFetcher: true
- outputFolder: naming
customConfig:
naming:
namespace: acme
client: AcmeSdkClient
error: AcmeApiError
timeoutError: AcmeRequestTimeoutError
environment: AcmeApiEnvironment
environmentUrls: AcmeApiEnvironmentUrls
version: AcmeApiVersion
- outputFolder: naming-shorthand
customConfig:
naming: acme
enum:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: forward-compatible-enums
customConfig:
enableForwardCompatibleEnums: true
- outputFolder: serde
customConfig:
noSerdeLayer: false
- outputFolder: forward-compatible-enums-with-serde
customConfig:
enableForwardCompatibleEnums: true
noSerdeLayer: false
pagination:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: page-index-semantics
customConfig:
offsetSemantics: "page-index"
pagination-custom:
- outputFolder: .
customConfig:
customPagerName: "MyPager"
cross-package-type-names:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: serde-layer
customConfig:
noSerdeLayer: false
query-param-name-conflict:
- outputFolder: .
customConfig:
noSerdeLayer: true
enableInlineTypes: true
resolveQueryParameterNameConflicts: true
ts-extra-properties:
- outputFolder: .
customConfig:
noSerdeLayer: false
ts-error-name-collision:
- outputFolder: .
customConfig:
namespaceExport: SeedErrors
naming:
client: SeedErrors
ts-react-query:
- outputFolder: .
customConfig:
generateReactQueryHooks: true
server-sent-events-openapi:
- outputFolder: no-custom-config
customConfig: null
server-url-templating:
- outputFolder: no-custom-config
customConfig: null
server-url-templating-single-url:
- outputFolder: no-custom-config
customConfig: null
ts-multi-env-url-templating:
- outputFolder: no-custom-config
customConfig: null
ts-bytes-upload-path-param:
- outputFolder: no-custom-config
customConfig: null
- outputFolder: bigint
customConfig:
useBigInt: true
- outputFolder: no-inline-path-parameters
customConfig:
inlinePathParameters: false
openapi-per-spec-base-path:
- outputFolder: no-custom-config
customConfig: null
openapi-per-spec-base-path-disabled:
- outputFolder: no-custom-config
customConfig: null
scripts:
- image: fernapi/ts-seed
commands:
build:
- |
if [ ! -f "package.json" ]; then
echo "No package.json found, exiting..."
exit 0
fi
if grep -q '"packageManager": "pnpm' package.json; then
mkdir -p .pnpm-cache
echo "Preparing corepack and pnpm..."
corepack prepare pnpm --activate
echo "Running pnpm install..."
if [ -f "pnpm-lock.yaml" ]; then
corepack pnpm install --prefer-offline --frozen-lockfile
else
corepack pnpm install --prefer-offline
fi
echo "Running pnpm build..."
if grep -q '"build":' package.json; then corepack pnpm build; fi
fi
if grep -q '"packageManager": "yarn' package.json; then
mkdir -p .yarn-cache
echo "Preparing corepack and yarn..."
corepack prepare yarn --activate
echo "Running yarn install..."
if [ -f "yarn.lock" ]; then
corepack yarn install --prefer-offline --frozen-lockfile
else
corepack yarn install --prefer-offline
fi
echo "Running yarn build..."
if grep -q '"build":' package.json; then corepack yarn build; fi
fi
test:
- |
if grep -q '"packageManager": "pnpm' package.json; then
echo "Running pnpm test..."
if grep -q '"test":' package.json; then corepack pnpm test; fi
fi
if grep -q '"packageManager": "yarn' package.json; then
echo "Running yarn test..."
if grep -q '"test":' package.json; then corepack yarn test; fi
fi
allowedFailures:
# CLI-specific OAuth fixture: the full IR client-credentials contract is not
# generated by the TS SDK generator. Exercised by the CLI generator.
- cli-oauth
- server-sent-events-openapi:no-custom-config # tmp - wire test generation is failing
- pagination:no-custom-config # pre-existing: TS5076 '??' and '&&' mixed without parentheses in Client.ts
- pagination:page-index-semantics # pre-existing: TS5076 '??' and '&&' mixed without parentheses in Client.ts
- webhooks:no-custom-config # pre-existing: generation failure