@almadar/orb 6.13.0 → 6.15.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/orb",
3
- "version": "6.13.0",
3
+ "version": "6.15.0",
4
4
  "description": "Orb CLI - deterministic when it can be, intelligent when it needs to be",
5
5
  "license": "BSL-1.1",
6
6
  "repository": {
@@ -49,10 +49,10 @@
49
49
  "node": ">=16.0.0"
50
50
  },
51
51
  "optionalDependencies": {
52
- "@almadar/orb-darwin-x64": "6.13.0",
53
- "@almadar/orb-darwin-arm64": "6.13.0",
54
- "@almadar/orb-linux-x64": "6.13.0",
55
- "@almadar/orb-linux-arm64": "6.13.0",
56
- "@almadar/orb-windows-x64": "6.13.0"
52
+ "@almadar/orb-darwin-x64": "6.15.0",
53
+ "@almadar/orb-darwin-arm64": "6.15.0",
54
+ "@almadar/orb-linux-x64": "6.15.0",
55
+ "@almadar/orb-linux-arm64": "6.15.0",
56
+ "@almadar/orb-windows-x64": "6.15.0"
57
57
  }
58
58
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/shell",
3
- "version": "2.13.19",
3
+ "version": "2.14.0",
4
4
  "private": false,
5
5
  "description": "Minimal full-stack shell template for Almadar applications",
6
6
  "packageManager": "pnpm@10.30.3",
@@ -1,11 +1,31 @@
1
1
  "use strict";
2
2
  const tsParser = require("@typescript-eslint/parser");
3
3
  const almadarPlugin = require("@almadar/eslint-plugin");
4
+ // react-hooks plugin registered so the codegen-emitted
5
+ // `// eslint-disable-next-line react-hooks/exhaustive-deps` comments are
6
+ // well-formed (eslint errors on disable directives that reference
7
+ // unknown rules). The actual rules are left off — enabling them would
8
+ // surface a backlog of dep-array warnings the codegen knows are
9
+ // intentional. Tightening is a separate codegen-fix pass.
10
+ let reactHooksPlugin;
11
+ try {
12
+ reactHooksPlugin = require("eslint-plugin-react-hooks");
13
+ } catch (_) {
14
+ reactHooksPlugin = { rules: { "exhaustive-deps": { meta: {}, create: () => ({}) }, "rules-of-hooks": { meta: {}, create: () => ({}) } } };
15
+ }
4
16
 
5
17
  module.exports = [
6
18
  { ignores: ["dist/**", "node_modules/**", "**/*.test.ts", "**/*.test.tsx"] },
7
19
  {
8
20
  files: ["src/**/*.ts", "src/**/*.tsx"],
21
+ // The codegen emits `// eslint-disable-next-line react-hooks/exhaustive-deps`
22
+ // ahead of every mount-only effect's `[]` dep array. Until the real
23
+ // `eslint-plugin-react-hooks` is wired (it would fire the rule and
24
+ // make these directives meaningful), the shim's no-op create() means
25
+ // the rule never reports — so ESLint flags the directives as
26
+ // "Unused eslint-disable directive". That's a false alarm at this
27
+ // stage; suppress it so the strict-error rule set still hard-fails.
28
+ linterOptions: { reportUnusedDisableDirectives: "off" },
9
29
  languageOptions: {
10
30
  parser: tsParser,
11
31
  parserOptions: {
@@ -14,9 +34,22 @@ module.exports = [
14
34
  sourceType: "module",
15
35
  },
16
36
  },
17
- plugins: { almadar: almadarPlugin },
37
+ plugins: { almadar: almadarPlugin, "react-hooks": reactHooksPlugin },
18
38
  rules: {
39
+ // Zero escape hatches in emitted shell code. Each rule pairs with a
40
+ // codegen-template fix in orbital-rust (see docs/Almadar_Compiler_Gaps.md):
41
+ // - no-as-any: catches `as any` casts.
42
+ // - no-unknown-type: catches `: unknown` annotations.
43
+ // Service results are typed via the integrations
44
+ // contract; every other "unknown" is a typed
45
+ // shape the codegen knows.
46
+ // - no-record-string-unknown: catches `as Record<string, unknown>` casts
47
+ // the codegen used to index into entity rows by
48
+ // string key. The entity has a typed interface
49
+ // — emit against that.
19
50
  "almadar/no-as-any": "error",
51
+ "almadar/no-unknown-type": "error",
52
+ "almadar/no-record-string-unknown": "error",
20
53
  "almadar/no-import-generated": "error",
21
54
  },
22
55
  },
@@ -7,7 +7,7 @@
7
7
  "dev": "vite",
8
8
  "build": "tsc && vite build",
9
9
  "typecheck": "tsc --noEmit",
10
- "lint": "eslint src/",
10
+ "lint": "eslint --max-warnings 0 src/",
11
11
  "preview": "vite preview",
12
12
  "test": "vitest run --passWithNoTests",
13
13
  "test:watch": "vitest"
@@ -12,7 +12,11 @@ module.exports = [
12
12
  },
13
13
  plugins: { almadar: almadarPlugin },
14
14
  rules: {
15
+ // Zero escape hatches in emitted shell code — same rule set as client;
16
+ // see docs/Almadar_Compiler_Gaps.md for the per-rule codegen fix.
15
17
  "almadar/no-as-any": "error",
18
+ "almadar/no-unknown-type": "error",
19
+ "almadar/no-record-string-unknown": "error",
16
20
  "almadar/no-import-generated": "error",
17
21
  },
18
22
  },
@@ -8,7 +8,7 @@
8
8
  "build": "esbuild src/index.ts --bundle --platform=node --format=esm --packages=external --outfile=dist/index.js",
9
9
  "start": "node dist/index.js",
10
10
  "typecheck": "tsc --noEmit",
11
- "lint": "eslint src/",
11
+ "lint": "eslint --max-warnings 0 src/",
12
12
  "test": "vitest run --passWithNoTests",
13
13
  "test:watch": "vitest"
14
14
  },
@@ -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]: unknown;
11
+ [key: string]: EventPayloadValue;
10
12
  };
11
13
  }
12
14
  }