Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/calm-webs-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@deepdish/cli": minor
---

Hard coded the env variables for DeepDish endpoints in production.
3 changes: 3 additions & 0 deletions apps/cli/environment.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace NodeJS {
interface ProcessEnv {
COMP_LINE: string | undefined
DEEPDISH_CLOUD_ADMIN_URL: string
DEEPDISH_CLOUD_CLI_URL: string
OAUTH_AUTHORIZE_URL: string
}
}
2 changes: 1 addition & 1 deletion apps/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
],
"scripts": {
"prebuild": "tsc -p tsconfig.json",
"build": "op run --no-masking --env-file=.env.development -- tsup",
"build": "if command -v op >/dev/null 2>&1; then op run --no-masking --env-file=.env.development -- tsup; else tsup; fi",
"postbuild": "chmod +x ./dist/cli.js",
"dev": "op run --no-masking --env-file=.env.development -- tsup --watch"
},
Expand Down
9 changes: 6 additions & 3 deletions apps/cli/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ const envSchema = v.object({
// we seemingly need to structure these values manually
const values = {
/* @ts-ignore */
DEEPDISH_CLOUD_ADMIN_URL: process.env.DEEPDISH_CLOUD_ADMIN_URL,
DEEPDISH_CLOUD_ADMIN_URL:
process.env.DEEPDISH_CLOUD_ADMIN_URL || 'https://api.deepdish.app/admin',
/* @ts-ignore */
DEEPDISH_CLOUD_CLI_URL: process.env.DEEPDISH_CLOUD_CLI_URL,
DEEPDISH_CLOUD_CLI_URL:
process.env.DEEPDISH_CLOUD_CLI_URL || 'https://api.deepdish.app/cli',
/* @ts-ignore */
OAUTH_AUTHORIZE_URL: process.env.OAUTH_AUTHORIZE_URL,
OAUTH_AUTHORIZE_URL:
process.env.OAUTH_AUTHORIZE_URL || 'https://clerk.deepdish.app',
}

export const env = v.parse(envSchema, values)