@dereekb/dbx-cli 13.15.0 → 13.17.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.
Files changed (46) hide show
  1. package/eslint/index.cjs.default.js +1 -0
  2. package/eslint/index.cjs.js +1050 -0
  3. package/eslint/index.cjs.mjs +2 -0
  4. package/eslint/index.d.ts +1 -0
  5. package/eslint/index.esm.js +1046 -0
  6. package/eslint/package.json +25 -0
  7. package/eslint/rollup.alias-internal.config.d.ts +11 -0
  8. package/eslint/src/index.d.ts +1 -0
  9. package/eslint/src/lib/index.d.ts +2 -0
  10. package/eslint/src/lib/plugin.d.ts +22 -0
  11. package/eslint/src/lib/valid-dbx-route-model-tags.rule.d.ts +59 -0
  12. package/firebase-api-manifest/main.js +318 -228
  13. package/firebase-api-manifest/package.json +3 -3
  14. package/generate-firestore-indexes/main.js +37 -24
  15. package/generate-firestore-indexes/package.json +2 -2
  16. package/generate-mcp-manifest/main.js +57 -39
  17. package/generate-mcp-manifest/package.json +3 -3
  18. package/generate-route-manifest/main.js +1137 -0
  19. package/generate-route-manifest/package.json +10 -0
  20. package/index.cjs.js +4847 -1953
  21. package/index.esm.js +4827 -1954
  22. package/lint-cache/package.json +2 -2
  23. package/manifest-extract/index.cjs.js +175 -240
  24. package/manifest-extract/index.esm.js +174 -239
  25. package/manifest-extract/package.json +9 -4
  26. package/package.json +16 -6
  27. package/src/lib/index.d.ts +2 -0
  28. package/src/lib/manifest/types.d.ts +53 -0
  29. package/src/lib/mcp-scan/manifest/package-root.d.ts +17 -0
  30. package/src/lib/mcp-scan/manifest/tokens-schema.d.ts +5 -4
  31. package/src/lib/mcp-scan/scan/extract-models/assemble.d.ts +17 -0
  32. package/src/lib/route/component-resolve.d.ts +48 -0
  33. package/src/lib/route/index.d.ts +18 -0
  34. package/src/lib/route/route-build-tree.d.ts +31 -0
  35. package/src/lib/route/route-extract.d.ts +46 -0
  36. package/src/lib/route/route-load-tree.d.ts +17 -0
  37. package/src/lib/route/route-manifest.d.ts +132 -0
  38. package/src/lib/route/route-model-tag.d.ts +89 -0
  39. package/src/lib/route/route-models-extract.d.ts +22 -0
  40. package/src/lib/route/route-resolve-sources.d.ts +39 -0
  41. package/src/lib/route/route-types.d.ts +136 -0
  42. package/src/lib/route/url-match.d.ts +116 -0
  43. package/src/lib/scan-helpers/firestore-model-extract-utils.d.ts +43 -0
  44. package/test/index.cjs.js +1 -1
  45. package/test/index.esm.js +1 -1
  46. package/test/package.json +9 -9
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@dereekb/dbx-cli/eslint",
3
+ "version": "13.17.0",
4
+ "peerDependencies": {
5
+ "@dereekb/dbx-cli": "13.17.0",
6
+ "@dereekb/util": "13.17.0",
7
+ "@typescript-eslint/utils": "8.59.3"
8
+ },
9
+ "devDependencies": {
10
+ "@typescript-eslint/parser": "8.59.3",
11
+ "eslint": "10.4.0"
12
+ },
13
+ "exports": {
14
+ "./package.json": "./package.json",
15
+ ".": {
16
+ "module": "./index.esm.js",
17
+ "types": "./index.d.ts",
18
+ "import": "./index.cjs.mjs",
19
+ "default": "./index.cjs.js"
20
+ }
21
+ },
22
+ "module": "./index.esm.js",
23
+ "main": "./index.cjs.js",
24
+ "types": "./index.d.ts"
25
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @param config - The rollup config @nx/rollup hands to the hook.
3
+ * @param _options - The @nx/rollup options (unused).
4
+ * @returns The mutated rollup config.
5
+ *
6
+ * @nx /rollup `rollupConfig` hook that inlines the workspace's internal `@dereekb/*` imports into
7
+ * the published ESLint plugin bundle. Prepends an alias plugin redirecting {@link INTERNAL_ALIASES}
8
+ * to their TS sources and wraps the `external: "all"` callback so {@link BUNDLED_DEPENDENCIES} are
9
+ * treated as internal.
10
+ */
11
+ export default function applyInternalAliases(config: any, _options: any): Promise<any>;
@@ -0,0 +1 @@
1
+ export * from './lib';
@@ -0,0 +1,2 @@
1
+ export { DBX_CLI_VALID_DBX_ROUTE_MODEL_TAGS_RULE, type DbxCliValidDbxRouteModelTagsRuleDefinition } from './valid-dbx-route-model-tags.rule';
2
+ export { DBX_CLI_ESLINT_PLUGIN, dbxCliESLintPlugin, type DbxCliEslintPlugin } from './plugin';
@@ -0,0 +1,22 @@
1
+ import { type DbxCliValidDbxRouteModelTagsRuleDefinition } from './valid-dbx-route-model-tags.rule';
2
+ /**
3
+ * ESLint plugin interface for `@dereekb/dbx-cli` rules.
4
+ */
5
+ export interface DbxCliEslintPlugin {
6
+ readonly rules: {
7
+ readonly 'valid-dbx-route-model-tags': DbxCliValidDbxRouteModelTagsRuleDefinition;
8
+ };
9
+ }
10
+ /**
11
+ * ESLint plugin for `@dereekb/dbx-cli` rules.
12
+ *
13
+ * Register as a plugin in your flat ESLint config, then enable individual rules
14
+ * under the chosen plugin prefix (e.g. 'dereekb-dbx-cli/valid-dbx-route-model-tags').
15
+ */
16
+ export declare const DBX_CLI_ESLINT_PLUGIN: DbxCliEslintPlugin;
17
+ /**
18
+ * camelCase alias of {@link DBX_CLI_ESLINT_PLUGIN} matching the conventional ESLint plugin export name.
19
+ *
20
+ * @dbxAllowConstantName
21
+ */
22
+ export declare const dbxCliESLintPlugin: DbxCliEslintPlugin;
@@ -0,0 +1,59 @@
1
+ /**
2
+ * ESLint rule that validates `@dbxRouteModel` / `@dbxRouteModelList` JSDoc tag
3
+ * grammar at author time. Each tag is parsed through `@dereekb/dbx-cli`'s
4
+ * canonical {@link parseRouteModelTag} grammar — the exact parser the build-time
5
+ * route-manifest builder uses — so ESLint and the manifest generator can never
6
+ * disagree about what a valid tag is. A malformed tag (typo'd model type, bad
7
+ * key template, wrong token count, unknown `@dbxRouteModel*` name) is reported on
8
+ * its own JSDoc line with the parser's failure reason.
9
+ *
10
+ * Scope: route-model tags live on `@Component` classes in `*.component.ts` and on
11
+ * exported `Ng2StateDeclaration` consts in `*.router.ts`, so the rule visits class
12
+ * and variable declarations (anchoring to their `export` wrapper for the leading
13
+ * JSDoc). It has no auto-fix — the correct value requires human / agent judgment.
14
+ */
15
+ interface AstNode {
16
+ readonly type: string;
17
+ [key: string]: any;
18
+ }
19
+ /**
20
+ * ESLint rule definition for valid-dbx-route-model-tags.
21
+ */
22
+ export interface DbxCliValidDbxRouteModelTagsRuleDefinition {
23
+ readonly meta: {
24
+ readonly type: 'problem';
25
+ readonly docs: {
26
+ readonly description: string;
27
+ readonly recommended: boolean;
28
+ };
29
+ readonly messages: Readonly<Record<string, string>>;
30
+ readonly schema: readonly object[];
31
+ };
32
+ create(context: {
33
+ report: (descriptor: {
34
+ loc?: AstNode;
35
+ node?: AstNode;
36
+ messageId: string;
37
+ data?: Record<string, string>;
38
+ }) => void;
39
+ sourceCode: AstNode;
40
+ }): Record<string, (node: AstNode) => void>;
41
+ }
42
+ /**
43
+ * ESLint rule enforcing that `@dbxRouteModel` / `@dbxRouteModelList` tags parse
44
+ * cleanly through the canonical route-model grammar. Reuses
45
+ * {@link parseRouteModelTag} from `@dereekb/dbx-cli` so a tag that lints clean is
46
+ * a tag the build-time manifest builder will accept.
47
+ *
48
+ * Checks (delegated to the grammar parser):
49
+ *
50
+ * - `@dbxRouteModel <modelType> <keyTemplate>` has exactly two tokens with a valid
51
+ * model-type identifier and a parseable key template (`:param` / `{authUid}` /
52
+ * even-segment `gb/:id/...` form).
53
+ * - `@dbxRouteModelList <modelType>` has a single valid model-type token.
54
+ * - A `@dbxRouteModel*` tag with an unknown name is flagged.
55
+ *
56
+ * Report-only — no auto-fix, since the corrected value needs judgment.
57
+ */
58
+ export declare const DBX_CLI_VALID_DBX_ROUTE_MODEL_TAGS_RULE: DbxCliValidDbxRouteModelTagsRuleDefinition;
59
+ export {};