@almadar/orb 1.17.1 → 2.44.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/README.md +57 -19
- package/bin/{almadar → orb} +30 -24
- package/package.json +9 -9
- package/scripts/postinstall.js +25 -15
- package/shells/almadar-shell/package.json +9 -2
- package/shells/almadar-shell/packages/client/eslint.config.cjs +34 -1
- package/shells/almadar-shell/packages/client/package.json +30 -22
- package/shells/almadar-shell/packages/client/src/App.tsx +1 -1
- package/shells/almadar-shell/packages/client/src/index.css +4 -20
- package/shells/almadar-shell/packages/client/src/main.tsx +1 -3
- package/shells/almadar-shell/packages/client/tailwind.config.js +12 -2
- package/shells/almadar-shell/packages/client/vite.config.ts +1 -0
- package/shells/almadar-shell/packages/server/eslint.config.cjs +4 -0
- package/shells/almadar-shell/packages/server/package.json +13 -9
- package/shells/almadar-shell/packages/server/src/app.ts +8 -3
- package/shells/almadar-shell/packages/server/src/types/express.d.ts +3 -1
- package/shells/almadar-shell/packages/shared/package.json +1 -0
- package/shells/almadar-shell/packages/shared/pnpm-lock.yaml +22 -0
- package/shells/almadar-shell/pnpm-lock.yaml +674 -272
- package/shells/almadar-shell-hono/LICENSE +72 -0
- package/shells/almadar-shell-hono/README.md +25 -0
- package/shells/almadar-shell-hono/locales/en.json +120 -0
- package/shells/almadar-shell-hono/package.json +31 -0
- package/shells/almadar-shell-hono/packages/client/eslint.config.cjs +23 -0
- package/shells/almadar-shell-hono/packages/client/index.html +13 -0
- package/shells/almadar-shell-hono/packages/client/package-lock.json +9750 -0
- package/shells/almadar-shell-hono/packages/client/package.json +61 -0
- package/shells/almadar-shell-hono/packages/client/postcss.config.js +6 -0
- package/shells/almadar-shell-hono/packages/client/src/App.tsx +84 -0
- package/shells/almadar-shell-hono/packages/client/src/config/firebase.ts +37 -0
- package/shells/almadar-shell-hono/packages/client/src/features/auth/AuthContext.tsx +139 -0
- package/shells/almadar-shell-hono/packages/client/src/features/auth/authService.ts +83 -0
- package/shells/almadar-shell-hono/packages/client/src/features/auth/components/Login.tsx +218 -0
- package/shells/almadar-shell-hono/packages/client/src/features/auth/components/ProtectedRoute.tsx +27 -0
- package/shells/almadar-shell-hono/packages/client/src/features/auth/components/UserProfile.tsx +68 -0
- package/shells/almadar-shell-hono/packages/client/src/features/auth/components/index.ts +3 -0
- package/shells/almadar-shell-hono/packages/client/src/features/auth/index.ts +13 -0
- package/shells/almadar-shell-hono/packages/client/src/features/auth/types.ts +24 -0
- package/shells/almadar-shell-hono/packages/client/src/index.css +35 -0
- package/shells/almadar-shell-hono/packages/client/src/main.tsx +8 -0
- package/shells/almadar-shell-hono/packages/client/src/navigation/index.ts +55 -0
- package/shells/almadar-shell-hono/packages/client/src/pages/index.ts +12 -0
- package/shells/almadar-shell-hono/packages/client/tailwind-preset.cjs +259 -0
- package/shells/almadar-shell-hono/packages/client/tailwind.config.js +24 -0
- package/shells/almadar-shell-hono/packages/client/tsconfig.json +33 -0
- package/shells/almadar-shell-hono/packages/client/vite.config.ts +50 -0
- package/shells/almadar-shell-hono/packages/server/eslint.config.cjs +19 -0
- package/shells/almadar-shell-hono/packages/server/package.json +38 -0
- package/shells/almadar-shell-hono/packages/server/pnpm-lock.yaml +4665 -0
- package/shells/almadar-shell-hono/packages/server/src/app.ts +31 -0
- package/shells/almadar-shell-hono/packages/server/src/index.ts +31 -0
- package/shells/almadar-shell-hono/packages/server/src/routes.ts +12 -0
- package/shells/almadar-shell-hono/packages/server/src/serve.ts +45 -0
- package/shells/almadar-shell-hono/packages/server/tsconfig.json +23 -0
- package/shells/almadar-shell-hono/packages/shared/package.json +25 -0
- package/shells/almadar-shell-hono/packages/shared/pnpm-lock.yaml +919 -0
- package/shells/almadar-shell-hono/packages/shared/src/index.ts +2 -0
- package/shells/almadar-shell-hono/packages/shared/tsconfig.json +17 -0
- package/shells/almadar-shell-hono/packages/shared/tsup.config.ts +10 -0
- package/shells/almadar-shell-hono/pnpm-lock.yaml +9441 -0
- package/shells/almadar-shell-hono/pnpm-workspace.yaml +2 -0
- package/shells/almadar-shell-hono/tsup.config.ts +13 -0
- package/shells/almadar-shell-hono/turbo.json +17 -0
- package/shells/almadar-shell-hono/vitest.config.ts +8 -0
- package/shells/orb-shell/README.md +1 -1
- package/shells/orb-shell/packages/client/package-lock.json +11390 -0
- package/shells/orb-shell/packages/client/package.json +1 -1
- package/shells/orb-shell/packages/server/package-lock.json +6323 -0
- package/shells/orb-shell/packages/shared/package-lock.json +24 -0
- package/shells/orb-shell/pnpm-lock.yaml +196 -10
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import express, { type Express } from 'express';
|
|
6
6
|
import cors from 'cors';
|
|
7
|
+
import helmet from 'helmet';
|
|
8
|
+
import rateLimit from 'express-rate-limit';
|
|
7
9
|
import {
|
|
8
10
|
env,
|
|
9
11
|
logger,
|
|
@@ -16,9 +18,12 @@ import { registerRoutes } from './routes.js';
|
|
|
16
18
|
export const app: Express = express();
|
|
17
19
|
|
|
18
20
|
// Middleware
|
|
19
|
-
app.use(
|
|
20
|
-
|
|
21
|
-
app.use(
|
|
21
|
+
app.use(helmet());
|
|
22
|
+
// CORS: env-driven allowlist (CORS_ORIGIN) — never reflect arbitrary origins with credentials.
|
|
23
|
+
app.use(cors({ origin: env.CORS_ORIGIN, credentials: true }));
|
|
24
|
+
app.use(express.json({ limit: '1mb' }));
|
|
25
|
+
app.use(express.urlencoded({ extended: true, limit: '1mb' }));
|
|
26
|
+
app.use('/api', rateLimit({ windowMs: 15 * 60 * 1000, max: 300, standardHeaders: true, legacyHeaders: false }));
|
|
22
27
|
|
|
23
28
|
// Health check
|
|
24
29
|
app.get('/health', (_req, res) => {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { EventPayloadValue } from '@almadar/core';
|
|
2
|
+
|
|
1
3
|
declare global {
|
|
2
4
|
namespace Express {
|
|
3
5
|
interface Request {
|
|
@@ -6,7 +8,7 @@ declare global {
|
|
|
6
8
|
email?: string;
|
|
7
9
|
name?: string;
|
|
8
10
|
picture?: string;
|
|
9
|
-
[key: string]:
|
|
11
|
+
[key: string]: EventPayloadValue;
|
|
10
12
|
};
|
|
11
13
|
}
|
|
12
14
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
lockfileVersion: '9.0'
|
|
2
|
+
|
|
3
|
+
settings:
|
|
4
|
+
autoInstallPeers: true
|
|
5
|
+
excludeLinksFromLockfile: false
|
|
6
|
+
|
|
7
|
+
importers:
|
|
8
|
+
|
|
9
|
+
.:
|
|
10
|
+
dependencies:
|
|
11
|
+
zod:
|
|
12
|
+
specifier: ^3.22.0
|
|
13
|
+
version: 3.25.76
|
|
14
|
+
|
|
15
|
+
packages:
|
|
16
|
+
|
|
17
|
+
zod@3.25.76:
|
|
18
|
+
resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==}
|
|
19
|
+
|
|
20
|
+
snapshots:
|
|
21
|
+
|
|
22
|
+
zod@3.25.76: {}
|