-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(cli): Add browser compatible base generator (#5288)
- Loading branch information
Showing
185 changed files
with
367 additions
and
240 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
...ors/commons/src/AbstractGeneratorAgent.ts → ...rators/base/src/AbstractGeneratorAgent.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 6 additions & 3 deletions
9
...ators/commons/src/AbstractGeneratorCli.ts → generators/base/src/AbstractGeneratorCli.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ommons/src/__test__/SourceFetcher.test.ts → ...s/base/src/__test__/SourceFetcher.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Export everything from @fern-api/browser-compatible-base-generator | ||
// so that generators can simply consume @fern-api/base-generator. | ||
// | ||
// Packages that require browser compatibility should import directly | ||
// from @fern-api/browser-compatible-base-generator. | ||
export * from "@fern-api/browser-compatible-base-generator"; |
5 changes: 1 addition & 4 deletions
5
generators/commons/src/index.ts → generators/base/src/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
export * from "./AbstractGeneratorAgent"; | ||
export * from "./AbstractGeneratorCli"; | ||
export * from "./AbstractGeneratorContext"; | ||
export * from "./GeneratorNotificationService"; | ||
export * from "./browserCompatibleExports"; | ||
export * from "./SourceFetcher"; | ||
export * from "./ast"; | ||
export * from "./project"; | ||
export * from "./readme"; | ||
export * from "./reference"; | ||
export * from "./utils"; | ||
export * from "./dynamic-snippets"; |
2 changes: 1 addition & 1 deletion
2
...rs/commons/src/project/AbstractProject.ts → ...ators/base/src/project/AbstractProject.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...rc/readme/AbstractReadmeSnippetBuilder.ts → ...rc/readme/AbstractReadmeSnippetBuilder.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { parseGeneratorConfig } from "./parseGeneratorConfig"; | ||
export { parseIR } from "./parseIR"; |
3 changes: 1 addition & 2 deletions
3
...commons/src/utils/parseGeneratorConfig.ts → ...rs/base/src/utils/parseGeneratorConfig.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"extends": "../../shared/tsconfig.shared.json", | ||
"compilerOptions": { | ||
"composite": true, | ||
"outDir": "lib", | ||
"rootDir": "src" | ||
}, | ||
"include": [ | ||
"./src/**/*" | ||
], | ||
"references": [ | ||
{ | ||
"path": "../browser-compatible-base" | ||
}, | ||
{ | ||
"path": "../../packages/cli/logger" | ||
}, | ||
{ | ||
"path": "../../packages/commons/core-utils" | ||
}, | ||
{ | ||
"path": "../../packages/commons/fs-utils" | ||
}, | ||
{ | ||
"path": "../../packages/commons/logging-execa" | ||
} | ||
] | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"ignores": [ | ||
"@types/jest", | ||
"globals", | ||
"@types/node" | ||
], | ||
"ignore-patterns": [ | ||
"lib" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require("../../.prettierrc.json"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"name": "@fern-api/browser-compatible-base-generator", | ||
"version": "0.0.0", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/fern-api/fern.git", | ||
"directory": "generators/browser-compatible-base" | ||
}, | ||
"private": true, | ||
"files": [ | ||
"lib" | ||
], | ||
"type": "module", | ||
"source": "src/index.ts", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"sideEffects": false, | ||
"scripts": { | ||
"clean": "rm -rf ./lib && tsc --build --clean", | ||
"compile": "tsc --build", | ||
"test": "vitest --passWithNoTests --run", | ||
"test:update": "vitest --passWithNoTests --run -u", | ||
"lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../.eslintignore", | ||
"lint:eslint:fix": "yarn lint:eslint --fix", | ||
"format": "prettier --write --ignore-unknown --ignore-path ../../shared/.prettierignore \"**\"", | ||
"format:check": "prettier --check --ignore-unknown --ignore-path ../../shared/.prettierignore \"**\"", | ||
"organize-imports": "organize-imports-cli tsconfig.json", | ||
"depcheck": "depcheck" | ||
}, | ||
"dependencies": { | ||
"@fern-api/logger": "workspace:*", | ||
"@fern-fern/generator-exec-sdk": "^0.0.898" | ||
}, | ||
"devDependencies": { | ||
"depcheck": "^1.4.6", | ||
"eslint": "^8.56.0", | ||
"vitest": "^2.1.4", | ||
"organize-imports-cli": "^0.10.0", | ||
"prettier": "^2.7.1", | ||
"typescript": "4.6.4" | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export * from "./AbstractGeneratorContext"; | ||
export * from "./GeneratorNotificationService"; | ||
export * from "./ast"; | ||
export * from "./utils"; | ||
export * from "./dynamic-snippets"; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions
2
generators/commons/src/utils/index.ts → ...rowser-compatible-base/src/utils/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
export { getBasename } from "./getBasename"; | ||
export { getPackageName } from "./getPackageName"; | ||
export { getSdkVersion } from "./getSdkVersion"; | ||
export { parseGeneratorConfig } from "./parseGeneratorConfig"; | ||
export { parseIR } from "./parseIR"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"extends": "../../shared/tsconfig.shared.json", | ||
"compilerOptions": { | ||
"composite": true, | ||
"outDir": "lib", | ||
"rootDir": "src" | ||
}, | ||
"include": [ | ||
"./src/**/*" | ||
], | ||
"references": [ | ||
{ | ||
"path": "../../packages/cli/logger" | ||
}, | ||
{ | ||
"path": "../../packages/commons/core-utils" | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from "../../shared/vitest.config"; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
generators/csharp/codegen/src/cli/AbstractCsharpGeneratorCli.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
generators/csharp/codegen/src/context/AbstractCsharpGeneratorContext.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.