-
Notifications
You must be signed in to change notification settings - Fork 619
Update engine API #7427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update engine API #7427
Changes from 1 commit
f82a048
592b3e2
35677ba
1529d25
0b92758
56d7dd5
8d9b5c0
baec17f
a02f3bb
d0df911
c0748be
9f38c04
e15b660
df90927
73bf33c
f834a9a
1098ddf
f544086
2547ca0
e58d5f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -1,7 +1,8 @@ | ||||||||
| import { defineConfig } from "@hey-api/openapi-ts"; | ||||||||
|
|
||||||||
| export default defineConfig({ | ||||||||
| input: "https://engine.thirdweb.com/openapi", | ||||||||
| output: { format: "biome", lint: "biome", path: "src/client" }, | ||||||||
| plugins: ["@hey-api/client-fetch"], | ||||||||
| // input: "https://engine.thirdweb.com/openapi", | ||||||||
| input: "http://localhost:3009/openapi", | ||||||||
|
||||||||
| // input: "https://engine.thirdweb.com/openapi", | |
| input: "http://localhost:3009/openapi", | |
| input: process.env.OPENAPI_INPUT_URL || "https://engine.thirdweb.com/openapi", |
🤖 Prompt for AI Agents
In packages/engine/openapi-ts.config.ts around lines 4 to 5, the input URL is
hardcoded to localhost, which risks incorrect URLs in different environments.
Replace the hardcoded URL with a dynamic value sourced from environment
variables, such as process.env.API_BASE_URL, and provide a fallback if needed.
This ensures the input URL adapts based on the deployment environment and avoids
accidental production misconfigurations.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,41 +1,36 @@ | ||
| { | ||
| "name": "@thirdweb-dev/engine", | ||
| "version": "3.0.3", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/thirdweb-dev/js.git#main" | ||
| }, | ||
| "license": "Apache-2.0", | ||
| "author": "thirdweb eng <[email protected]>", | ||
| "bugs": { | ||
| "url": "https://github.com/thirdweb-dev/js/issues" | ||
| }, | ||
| "author": "thirdweb eng <[email protected]>", | ||
| "type": "module", | ||
| "main": "./dist/cjs/exports/thirdweb.js", | ||
| "module": "./dist/esm/exports/thirdweb.js", | ||
| "types": "./dist/types/exports/thirdweb.d.ts", | ||
| "typings": "./dist/types/exports/thirdweb.d.ts", | ||
| "dependencies": { | ||
| "@hey-api/client-fetch": "0.10.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@biomejs/biome": "2.0.4", | ||
| "@hey-api/openapi-ts": "0.72.1", | ||
| "rimraf": "6.0.1", | ||
| "tslib": "^2.8.1" | ||
| }, | ||
| "engines": { | ||
| "node": ">=18" | ||
| }, | ||
| "exports": { | ||
| ".": { | ||
| "types": "./dist/types/exports/thirdweb.d.ts", | ||
| "default": "./dist/cjs/exports/thirdweb.js", | ||
| "import": "./dist/esm/exports/thirdweb.js", | ||
| "default": "./dist/cjs/exports/thirdweb.js" | ||
| "types": "./dist/types/exports/thirdweb.d.ts" | ||
| }, | ||
| "./package.json": "./package.json" | ||
| }, | ||
| "files": [ | ||
| "dist/*", | ||
| "src/*" | ||
| ], | ||
| "dependencies": { | ||
| "@hey-api/client-fetch": "0.10.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@biomejs/biome": "2.0.4", | ||
| "@hey-api/openapi-ts": "0.72.1", | ||
| "rimraf": "6.0.1", | ||
| "tslib": "^2.8.1" | ||
| }, | ||
| "license": "Apache-2.0", | ||
| "main": "./dist/cjs/exports/thirdweb.js", | ||
| "module": "./dist/esm/exports/thirdweb.js", | ||
| "name": "@thirdweb-dev/engine", | ||
| "peerDependencies": { | ||
| "typescript": ">=5.0.4" | ||
| }, | ||
|
|
@@ -44,18 +39,23 @@ | |
| "optional": true | ||
| } | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/thirdweb-dev/js.git#main" | ||
| }, | ||
| "scripts": { | ||
| "format": "biome format ./src --write", | ||
| "lint": "biome check ./src", | ||
| "fix": "biome check ./src --fix", | ||
| "build": "pnpm clean && pnpm build:cjs && pnpm build:esm && pnpm build:types", | ||
| "build:cjs": "tsc --project ./tsconfig.build.json --module commonjs --outDir ./dist/cjs --verbatimModuleSyntax false && printf '{\"type\":\"commonjs\"}' > ./dist/cjs/package.json", | ||
| "build:esm": "tsc --project ./tsconfig.build.json --module es2020 --outDir ./dist/esm && printf '{\"type\": \"module\",\"sideEffects\":false}' > ./dist/esm/package.json", | ||
| "build:generate": "openapi-ts && pnpm format", | ||
| "build:types": "tsc --project ./tsconfig.build.json --module esnext --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", | ||
| "clean": "rimraf dist", | ||
| "build:generate": "openapi-ts && pnpm format" | ||
| "fix": "biome check ./src --fix", | ||
| "format": "biome format ./src --write", | ||
| "lint": "biome check ./src" | ||
| }, | ||
| "engines": { | ||
| "node": ">=18" | ||
| } | ||
| "type": "module", | ||
| "types": "./dist/types/exports/thirdweb.d.ts", | ||
| "typings": "./dist/types/exports/thirdweb.d.ts", | ||
| "version": "3.0.3" | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.