@almadar/orb 3.0.0 → 3.1.0
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/package.json +6 -6
- package/shells/almadar-shell/package.json +1 -1
- package/shells/almadar-shell/packages/client/package.json +6 -6
- package/shells/almadar-shell/packages/client/src/App.tsx +22 -0
- package/shells/almadar-shell/packages/client/src/config/mockAuth.ts +257 -0
- package/shells/almadar-shell/packages/client/src/features/auth/AuthContext.tsx +13 -5
- package/shells/almadar-shell/packages/client/src/features/auth/authService.ts +19 -1
- package/shells/almadar-shell/packages/client/src/features/auth/components/PersonaSwitcher.tsx +50 -0
- package/shells/almadar-shell/packages/client/src/features/auth/index.ts +2 -1
- package/shells/almadar-shell/packages/client/src/features/auth/types.ts +18 -2
- package/shells/almadar-shell/packages/server/package.json +7 -7
- package/shells/almadar-shell/packages/server/src/app.ts +6 -0
- package/shells/almadar-shell/packages/server/src/index.ts +9 -1
- package/shells/almadar-shell/packages/shared/package.json +1 -1
- package/shells/almadar-shell/pnpm-lock.yaml +776 -97
- package/shells/almadar-shell-hono/package.json +1 -1
- package/shells/almadar-shell-hono/packages/client/package.json +5 -5
- package/shells/almadar-shell-hono/packages/server/package.json +5 -5
- package/shells/almadar-shell-hono/packages/server/src/index.ts +9 -1
- package/shells/almadar-shell-hono/packages/server/src/serve.ts +4 -2
- package/shells/almadar-shell-hono/pnpm-lock.yaml +778 -106
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"test:watch": "vitest"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@almadar/ui": "^5.
|
|
17
|
-
"@almadar/syntax": "^1.
|
|
18
|
-
"@almadar/evaluator": "^2.
|
|
16
|
+
"@almadar/ui": "^5.146.2",
|
|
17
|
+
"@almadar/syntax": "^1.14.0",
|
|
18
|
+
"@almadar/evaluator": "^2.40.0",
|
|
19
19
|
"@almadar/patterns": "^2.101.0",
|
|
20
|
-
"@almadar/core": "^10.
|
|
20
|
+
"@almadar/core": "^10.55.0",
|
|
21
21
|
"firebase": "^11.4.0",
|
|
22
22
|
"@tanstack/react-query": "^5.67.3",
|
|
23
23
|
"react": "^19.0.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"postprocessing": "^6.39.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@almadar/eslint-plugin": "^2.
|
|
45
|
+
"@almadar/eslint-plugin": "^2.15.0",
|
|
46
46
|
"@typescript-eslint/parser": "8.56.0",
|
|
47
47
|
"eslint": "10.0.0",
|
|
48
48
|
"@testing-library/react": "^16.1.0",
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"test:watch": "vitest"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@almadar/server-hono": "^0.4.
|
|
17
|
-
"@almadar/evaluator": "^2.
|
|
18
|
-
"@almadar/core": "^10.
|
|
19
|
-
"@almadar/integrations": "^2.
|
|
16
|
+
"@almadar/server-hono": "^0.4.11",
|
|
17
|
+
"@almadar/evaluator": "^2.40.0",
|
|
18
|
+
"@almadar/core": "^10.55.0",
|
|
19
|
+
"@almadar/integrations": "^2.22.0",
|
|
20
20
|
"hono": "^4.7.0",
|
|
21
21
|
"@hono/node-server": "^1.14.0",
|
|
22
22
|
"@hono/zod-validator": "^0.4.0",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"zod": "^3.22.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@almadar/eslint-plugin": "^2.
|
|
28
|
+
"@almadar/eslint-plugin": "^2.15.0",
|
|
29
29
|
"@typescript-eslint/parser": "8.56.0",
|
|
30
30
|
"@types/bun": "^1.1.0",
|
|
31
31
|
"@types/node": "^20.17.19",
|
|
@@ -10,7 +10,15 @@ import { initializeFirebase, env, logger } from '@almadar/server-hono';
|
|
|
10
10
|
try {
|
|
11
11
|
initializeFirebase();
|
|
12
12
|
} catch (e) {
|
|
13
|
-
|
|
13
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
14
|
+
// In production the real data source IS Firebase (env.ts refuses to boot with
|
|
15
|
+
// USE_MOCK_DATA=true there), so swallowing this leaves a server that starts
|
|
16
|
+
// cleanly and then throws on the first request. Fail at boot instead.
|
|
17
|
+
if (env.NODE_ENV === 'production') {
|
|
18
|
+
logger.error(`Firebase is required when NODE_ENV=production — refusing to start: ${message}`);
|
|
19
|
+
throw e;
|
|
20
|
+
}
|
|
21
|
+
logger.warn(`Firebase not configured — auth/db routes disabled: ${message}`);
|
|
14
22
|
}
|
|
15
23
|
|
|
16
24
|
import { serve } from '@hono/node-server';
|
|
@@ -15,8 +15,10 @@ import { join } from 'path';
|
|
|
15
15
|
const PORT = Number(env.PORT) || 3030;
|
|
16
16
|
const clientDist = join(import.meta.dir, '../../client/dist');
|
|
17
17
|
|
|
18
|
-
// Seed mock data
|
|
19
|
-
|
|
18
|
+
// Seed mock data. Gated on USE_MOCK_DATA alone, matching the three other server
|
|
19
|
+
// entry points — "not production" is a different question from "is the data
|
|
20
|
+
// source mock", and conflating them seeds a store nothing reads.
|
|
21
|
+
if (env.USE_MOCK_DATA) {
|
|
20
22
|
try {
|
|
21
23
|
const { initializeMockData } = await import(/* @vite-ignore */ './seedMockData.js' as string);
|
|
22
24
|
await initializeMockData();
|