Skip to content

Commit

Permalink
chore(seed): use generator display names to generator record (#4631)
Browse files Browse the repository at this point in the history
  • Loading branch information
armandobelardo authored Sep 12, 2024
1 parent 39e8f85 commit 6b58c4d
Show file tree
Hide file tree
Showing 27 changed files with 37 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/cli/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"@fern-api/fern-definition-formatter": "workspace:*",
"@fern-api/cli-migrations": "workspace:*",
"@fern-api/fern-definition-schema": "workspace:*",
"@fern-fern/generators-sdk": "0.107.0-00fe26566",
"@fern-fern/generators-sdk": "0.109.0-21be2e5be",
"@fern-fern/fiddle-sdk": "0.0.584",
"@types/get-port": "^4.2.0",
"ansi-escapes": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/configuration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@fern-api/fern-definition-schema": "workspace:*",
"@fern-fern/fdr-cjs-sdk": "0.108.0-dcb0f740c",
"@fern-fern/fiddle-sdk": "0.0.584",
"@fern-fern/generators-sdk": "0.107.0-00fe26566",
"@fern-fern/generators-sdk": "0.109.0-21be2e5be",
"find-up": "^6.3.0",
"js-yaml": "^4.1.0",
"lodash-es": "^4.17.21",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ export async function writeResolvedSnippetsJson({
const endpointSnippetTemplates: Record<string, Fern.SnippetRegistryEntry> = {};
if (absolutePathToLocalSnippetTemplateJSON != null) {
const contents = (await readFile(absolutePathToLocalSnippetTemplateJSON)).toString();
if (contents.length <= 0) {
return;
}
const parsed = JSON.parse(contents);
if (Array.isArray(parsed)) {
for (const template of parsed) {
Expand Down
1 change: 1 addition & 0 deletions packages/seed/fern/definition/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ types:
SeedWorkspaceConfiguration:
properties:
image: string
displayName: string
irVersion: string
test: TestConfiguration
publish: PublishConfiguration
Expand Down
2 changes: 1 addition & 1 deletion packages/seed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@fern-api/workspace-loader": "workspace:*",
"@fern-fern/fiddle-sdk": "0.0.584",
"@fern-fern/generator-exec-sdk": "^0.0.898",
"@fern-fern/generators-sdk": "0.107.0-00fe26566",
"@fern-fern/generators-sdk": "0.109.0-21be2e5be",
"@types/pretty-ms": "^5.0.1",
"chalk": "^5.3.0",
"console-table-printer": "^2.12.0",
Expand Down
1 change: 1 addition & 0 deletions packages/seed/src/commands/register/registerGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export async function registerGenerator({
// Register generator itself
fdrClient.generators.upsertGenerator({
id: generatorId,
displayName: generatorConfig.displayName,
generatorType: convertGeneratorType(generatorConfig.generatorType),
generatorLanguage: generatorConfig.language,
dockerImage: generatorConfig.image
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as FernSeedConfig from "../../..";

export interface SeedWorkspaceConfiguration {
image: string;
displayName: string;
irVersion: string;
test: FernSeedConfig.TestConfiguration;
publish: FernSeedConfig.PublishConfiguration;
Expand Down
18 changes: 9 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions seed/csharp-model/seed.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
irVersion: v53
displayName: C# Model
image: fernapi/fern-csharp-model
changelogLocation: ../../generators/csharp/model/versions.yml
publish:
Expand Down
2 changes: 1 addition & 1 deletion seed/csharp-sdk/seed.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

displayName: C# SDK
irVersion: v53
image: fernapi/fern-csharp-sdk
changelogLocation: ../../generators/csharp/sdk/versions.yml
Expand Down
1 change: 1 addition & 0 deletions seed/fastapi/seed.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
irVersion: v53
displayName: FastAPI
image: fernapi/fern-fastapi-server
changelogLocation: ../../generators/python/fastapi/versions.yml
publish:
Expand Down
1 change: 1 addition & 0 deletions seed/go-fiber/seed.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
irVersion: v40
displayName: Fiber
image: fernapi/fern-go-fiber
changelogLocation: ../../generators/go/fiber/versions.yml
publish:
Expand Down
1 change: 1 addition & 0 deletions seed/go-model/seed.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
irVersion: v40
displayName: Go Model
image: fernapi/fern-go-model
changelogLocation: ../../generators/go/model/versions.yml
publish:
Expand Down
1 change: 1 addition & 0 deletions seed/go-sdk/seed.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
irVersion: v40
displayName: Go SDK
image: fernapi/fern-go-sdk
changelogLocation: ../../generators/go/sdk/versions.yml
publish:
Expand Down
1 change: 1 addition & 0 deletions seed/java-model/seed.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
irVersion: v46
displayName: Java Model
changelogLocation: ../../generators/java/model/versions.yml
image: fernapi/fern-java-model
publish:
Expand Down
1 change: 1 addition & 0 deletions seed/java-sdk/seed.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
irVersion: v46
displayName: Java SDK
changelogLocation: ../../generators/java/sdk/versions.yml
image: fernapi/fern-java-sdk
publish:
Expand Down
1 change: 1 addition & 0 deletions seed/java-spring/seed.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
irVersion: v46
displayName: Java Spring
changelogLocation: ../../generators/java/spring/versions.yml
image: fernapi/fern-java-spring
publish:
Expand Down
1 change: 1 addition & 0 deletions seed/openapi/seed.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
irVersion: v23
displayName: OpenAPI
image: fernapi/fern-openapi
changelogLocation: ../../generators/openapi/versions.yml
publish:
Expand Down
1 change: 1 addition & 0 deletions seed/php-model/seed.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
irVersion: v53
displayName: PHP Model
image: fernapi/fern-php-model
test:
docker:
Expand Down
1 change: 1 addition & 0 deletions seed/php-sdk/seed.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
irVersion: v53
displayName: PHP SDK
image: fernapi/fern-php-sdk
test:
docker:
Expand Down
1 change: 1 addition & 0 deletions seed/postman/seed.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
irVersion: v53
displayName: Postman
image: fernapi/fern-postman
changelogLocation: ../../generators/postman/versions.yml
publish:
Expand Down
1 change: 1 addition & 0 deletions seed/pydantic/seed.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
irVersion: v53
displayName: Pydantic Model
image: fernapi/fern-pydantic-model
changelogLocation: ../../generators/python/pydantic/versions.yml
publish:
Expand Down
1 change: 1 addition & 0 deletions seed/python-sdk/seed.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
irVersion: v53
displayName: Python SDK
image: fernapi/fern-python-sdk
changelogLocation: ../../generators/python/sdk/versions.yml
publish:
Expand Down
1 change: 1 addition & 0 deletions seed/ruby-model/seed.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
irVersion: v39
displayName: Ruby Model
image: fernapi/fern-ruby-model
changelogLocation: ../../generators/ruby/model/versions.yml
publish:
Expand Down
1 change: 1 addition & 0 deletions seed/ruby-sdk/seed.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
irVersion: v39
displayName: Ruby SDK
image: fernapi/fern-ruby-sdk
changelogLocation: ../../generators/ruby/sdk/versions.yml
publish:
Expand Down
1 change: 1 addition & 0 deletions seed/ts-express/seed.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
irVersion: v53
displayName: TypeScript Express
changelogLocation: ../../generators/typescript/express/versions.yml
image: fernapi/fern-typescript-express
publish:
Expand Down
1 change: 1 addition & 0 deletions seed/ts-sdk/seed.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
irVersion: v53
displayName: TypeScript SDK
image: fernapi/fern-typescript-node-sdk
publish:
workingDirectory: generators/typescript
Expand Down

0 comments on commit 6b58c4d

Please sign in to comment.