@astrale-os/cli 1.0.0-beta.2 → 1.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/dist/astrale.js +501 -396
- package/dist/public/connect-core.js +49 -12
- package/dist/public/keys/index.js +1 -1
- package/dist/public/paths/index.js +1 -1
- package/dist/types/lib/admin-target.d.ts +6 -2
- package/dist/types/lib/proc.d.ts +43 -0
- package/dist/types/lib/update.d.ts +101 -0
- package/package.json +4 -4
- package/src/admin/__tests__/binding.test.ts +38 -0
- package/src/admin/binding.ts +9 -159
- package/src/lib/__tests__/admin-target.test.ts +12 -0
- package/src/lib/__tests__/idp.test.ts +9 -4
- package/src/lib/admin-target.ts +21 -2
- package/src/lib/idp.ts +5 -2
- package/viewer/dist/main.js +1 -1
package/src/lib/idp.ts
CHANGED
|
@@ -214,6 +214,7 @@ export type IdpConfig = {
|
|
|
214
214
|
|
|
215
215
|
export const BUILTIN_WORKOS_IDP_NAME = 'workos'
|
|
216
216
|
const DEFAULT_WORKOS_API_HOST = 'https://api.workos.com'
|
|
217
|
+
const DEFAULT_WORKOS_CLIENT_ID = 'client_01KC29HET5F3QAQ8GNTPZ7F320'
|
|
217
218
|
const WORKOS_CLIENT_ID_ENV_NAMES = ['WORKOS_CLIENT_ID', 'VITE_WORKOS_CLIENT_ID'] as const
|
|
218
219
|
|
|
219
220
|
export function idpDir(name: string): string {
|
|
@@ -413,8 +414,10 @@ export function builtinIdpConfig(
|
|
|
413
414
|
}
|
|
414
415
|
|
|
415
416
|
export function workosClientIdFromEnv(env: NodeJS.ProcessEnv = process.env): string | undefined {
|
|
416
|
-
return
|
|
417
|
-
(
|
|
417
|
+
return (
|
|
418
|
+
WORKOS_CLIENT_ID_ENV_NAMES.map((name) => env[name]?.trim()).find(
|
|
419
|
+
(value): value is string => typeof value === 'string' && value.length > 0,
|
|
420
|
+
) ?? DEFAULT_WORKOS_CLIENT_ID
|
|
418
421
|
)
|
|
419
422
|
}
|
|
420
423
|
|