@happyvertical/smrt-scanner 0.57.46 → 0.57.47
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/AGENTS.md +7 -6
- package/dist/chunks/{scanner-QMkE5DFY.js → scanner-D-vcuXjW.js} +77 -7
- package/dist/chunks/scanner-D-vcuXjW.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/discovery.d.ts.map +1 -1
- package/dist/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/dist/manifest-adapter.d.ts +12 -1
- package/dist/manifest-adapter.d.ts.map +1 -1
- package/dist/oxc-parser.d.ts +20 -0
- package/dist/oxc-parser.d.ts.map +1 -1
- package/dist/types.d.ts +12 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/verify-completeness.d.ts +7 -0
- package/dist/verify-completeness.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/chunks/scanner-QMkE5DFY.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { r as ManifestAdapter, t as OxcScanner } from "./chunks/scanner-
|
|
2
|
+
import { r as ManifestAdapter, t as OxcScanner } from "./chunks/scanner-D-vcuXjW.js";
|
|
3
3
|
import { readFileSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { dirname, resolve } from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
package/dist/discovery.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../src/discovery.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,MAAM,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../src/discovery.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,MAAM,EAAE,CAAC,CA6EnB;AAED,iFAAiF;AACjF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAmCtE;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,aAAa,aAAM,GAClB,MAAM,CAIR"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as isPrunedAgentSurfacePath, E as sourceMayDeclareAgentSurface, S as isAgentSurfaceSourcePath, T as scanSvelteAgentSurface, _ as normalizeGlobSeparators, a as extractSmrtImports, b as emptyAgentSurface, c as parseRecipeFile, d as extractRecipes, f as resolveRecipes, g as discoverSourceFiles, h as resolveEnumValues, i as defaultCollectionName, l as parseSource, m as InheritanceResolver, n as parseUiSelectorsFile, o as parseAgentSurfaceFile, p as sourceMayDeclareRecipe, r as ManifestAdapter, s as parseFile, t as OxcScanner, u as deriveHelpFieldRefs, v as relativeGlobToCwd, w as mergeAgentSurfaces, x as extractAgentSurface, y as checkAgentSurfaceToolNames } from "./chunks/scanner-
|
|
1
|
+
import { C as isPrunedAgentSurfacePath, E as sourceMayDeclareAgentSurface, S as isAgentSurfaceSourcePath, T as scanSvelteAgentSurface, _ as normalizeGlobSeparators, a as extractSmrtImports, b as emptyAgentSurface, c as parseRecipeFile, d as extractRecipes, f as resolveRecipes, g as discoverSourceFiles, h as resolveEnumValues, i as defaultCollectionName, l as parseSource, m as InheritanceResolver, n as parseUiSelectorsFile, o as parseAgentSurfaceFile, p as sourceMayDeclareRecipe, r as ManifestAdapter, s as parseFile, t as OxcScanner, u as deriveHelpFieldRefs, v as relativeGlobToCwd, w as mergeAgentSurfaces, x as extractAgentSurface, y as checkAgentSurfaceToolNames } from "./chunks/scanner-D-vcuXjW.js";
|
|
2
2
|
import "./types.js";
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import { basename, resolve } from "node:path";
|
|
@@ -194,7 +194,7 @@ async function verifyManifestCompleteness(options) {
|
|
|
194
194
|
reason: "framework infrastructure package (does not use scanner manifest)"
|
|
195
195
|
};
|
|
196
196
|
const manifestPath = resolveManifestPath(packageDir, pkgJson);
|
|
197
|
-
if (!manifestPath) return {
|
|
197
|
+
if (!manifestPath && !options.requireManifestExport) return {
|
|
198
198
|
status: "skipped",
|
|
199
199
|
packageName,
|
|
200
200
|
missing: [],
|
|
@@ -215,7 +215,7 @@ async function verifyManifestCompleteness(options) {
|
|
|
215
215
|
return {
|
|
216
216
|
status: "scan-error",
|
|
217
217
|
packageName,
|
|
218
|
-
manifestPath,
|
|
218
|
+
manifestPath: manifestPath ?? void 0,
|
|
219
219
|
missing: [],
|
|
220
220
|
expectedCount: 0,
|
|
221
221
|
distCount: 0,
|
|
@@ -231,11 +231,19 @@ async function verifyManifestCompleteness(options) {
|
|
|
231
231
|
if (expectedKeys.length === 0) return {
|
|
232
232
|
status: "skipped",
|
|
233
233
|
packageName,
|
|
234
|
-
manifestPath,
|
|
234
|
+
manifestPath: manifestPath ?? void 0,
|
|
235
235
|
missing: [],
|
|
236
236
|
expectedCount: 0,
|
|
237
237
|
distCount: 0,
|
|
238
|
-
reason: "no @smrt() objects found in source"
|
|
238
|
+
reason: manifestPath ? "no @smrt() objects found in source" : "package does not publish a ./manifest export and declares no @smrt() objects"
|
|
239
|
+
};
|
|
240
|
+
if (!manifestPath) return {
|
|
241
|
+
status: "missing-manifest",
|
|
242
|
+
packageName,
|
|
243
|
+
missing: expectedKeys,
|
|
244
|
+
expectedCount: expectedKeys.length,
|
|
245
|
+
distCount: 0,
|
|
246
|
+
reason: `source declares ${expectedKeys.length} @smrt() object(s) but package.json publishes no ./manifest export`
|
|
239
247
|
};
|
|
240
248
|
if (!existsSync(manifestPath)) return {
|
|
241
249
|
status: "missing-manifest",
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/numeric-precision-lint.ts","../src/verify-completeness.ts"],"sourcesContent":["/**\n * Numeric-precision lint for money and rate fields (#2361).\n *\n * SMRT infers a `number` field's column type from the *initializer literal*:\n * `= 0` compiles to INTEGER and `= 0.0` compiles to DECIMAL\n * (`manifest-adapter.ts`, inference steps 3 and 3.5). The rule is silent, and\n * SQLite's type affinity happily stores a REAL in an INTEGER column — so a\n * mistyped field passes every SQLite suite and then behaves differently in\n * production on PostgreSQL.\n *\n * Two vocabularies, opposite answers:\n *\n * - **Money is exact**, so it is stored as *integer minor units* — cents,\n * satoshis. `$19.99` is `1999`. A money field declared `= 0.0` becomes a\n * float column, which reintroduces binary-fraction error into amounts that\n * must balance, and invites callers to write major units.\n * - **Rates are inherently fractional** — `taxRate`, `confidence`, a percentage\n * — so they must be DECIMAL. INTEGER would truncate every meaningful value\n * (a confidence in `[0, 1]` collapses to 0 or 1) and PostgreSQL rejects the\n * write outright with `22P02`.\n *\n * Matching is head-noun based rather than substring based, which is what keeps\n * it usable as a repo-wide gate: `amountCents` and `totalTokensUsed` name a\n * unit or a count as their head and are left alone, while `totalAmount`,\n * `amountPaid` and a bare `total` are money. JSDoc prose is deliberately NOT\n * matched — the head-noun signal is precise, and scanning prose for the same\n * vocabulary would make the gate fire on documentation wording.\n */\n\nimport type { RawClassDefinition, RawFieldDefinition } from './types.js';\n\n/**\n * Head nouns that denote an exact monetary quantity, stored as integer minor\n * units.\n *\n * `tax` is money (a tax *amount*); `taxRate` is not, and the rate vocabulary\n * below wins whenever both appear, so the two never collide.\n */\nconst MONEY_HEAD_WORDS = new Set([\n 'amount',\n 'balance',\n 'cost',\n 'discount',\n 'due',\n 'fee',\n 'paid',\n 'price',\n 'subtotal',\n 'tax',\n 'total',\n]);\n\n/**\n * Head nouns that denote an inherently fractional quantity, stored as DECIMAL.\n *\n * A name carrying any of these is a rate even when it also carries a money word\n * (`taxRate`, `feePercentage`), because the rate is what the value *is*.\n */\nconst RATE_WORDS = new Set([\n 'confidence',\n 'credibility',\n 'probability',\n 'rate',\n 'ratio',\n]);\n\n/**\n * Deliberately NOT rate words: `weight`, `score`, `factor`, `percent`.\n *\n * Each is commonly a whole number — an ad-rotation `weight` of 1, a score out\n * of 100, a percent as 0–100 — so treating them as necessarily fractional\n * produces false positives on correct code. `AdVariation.weight = 1` is the\n * worked example. They are left unclassified rather than guessed at.\n */\n\n/**\n * Words that may trail a head noun without displacing it.\n *\n * `amountPaid` is still an amount; `amountCents` is not — its head noun already\n * names the exact unit — which is why this is an allowlist rather than a\n * blocklist of unit words.\n */\nconst TRAILING_QUALIFIERS = new Set([\n 'applied',\n 'billed',\n 'charged',\n 'collected',\n 'earned',\n 'gross',\n 'net',\n 'outstanding',\n 'owed',\n 'refunded',\n 'remaining',\n]);\n\n/** Base classes whose fields become table columns even without `@smrt()`. */\nconst PERSISTED_BASE_CLASSES = new Set([\n 'SmrtObject',\n 'SmrtJunction',\n 'SmrtJunctionBase',\n 'SmrtHierarchical',\n 'SmrtPolymorphicAssociation',\n]);\n\n/** Which rule a field falls under, if any. */\nexport type NumericPrecisionKind = 'money' | 'rate';\n\n/** One field whose declared precision contradicts its name. */\nexport interface NumericPrecisionFinding {\n /** `money` wants INTEGER minor units; `rate` wants DECIMAL. */\n kind: NumericPrecisionKind;\n /** Declaring class, e.g. `Invoice`. */\n className: string;\n /** Field name, e.g. `totalAmount`. */\n fieldName: string;\n /** File the class was scanned from. */\n filePath: string;\n /**\n * 1-based line of the field declaration, or `0` when it could not be\n * resolved. The OXC AST nodes this scanner consumes do not carry `loc`, so\n * the line is recovered from the source text when a caller passes it to\n * {@link lintNumericPrecision}.\n */\n line: number;\n /** The initializer that triggered the finding. */\n initializer: string;\n /** Human-readable explanation naming the rule. */\n message: string;\n /** The accepted fixes. */\n remedy: string;\n}\n\n/**\n * Split an identifier into lowercase words on camelCase, PascalCase, digits,\n * and underscores. `totalAmountCents` → `['total', 'amount', 'cents']`.\n */\nexport function splitIdentifierWords(name: string): string[] {\n return name\n .replace(/([a-z0-9])([A-Z])/g, '$1 $2')\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2')\n .split(/[\\s_$]+/)\n .filter(Boolean)\n .map((word) => word.toLowerCase());\n}\n\n/**\n * Classify an identifier as money, a rate, or neither.\n *\n * The head noun is the last word, or the last word before a trailing qualifier\n * such as `Paid`. A rate word anywhere in the name wins outright: `taxRate` is\n * a rate even though `tax` is money, and that precedence is what stops the two\n * vocabularies from fighting over the same field.\n */\nexport function classifyNumericFieldName(\n name: string,\n): NumericPrecisionKind | undefined {\n const words = splitIdentifierWords(name);\n if (words.some((word) => RATE_WORDS.has(word))) return 'rate';\n for (let index = words.length - 1; index >= 0; index -= 1) {\n const word = words[index];\n if (MONEY_HEAD_WORDS.has(word)) return 'money';\n if (!TRAILING_QUALIFIERS.has(word)) return undefined;\n }\n return undefined;\n}\n\n/**\n * Text a file must contain before it can declare a field this lint reports.\n *\n * `@smrt` is matched without requiring parentheses because the parser accepts\n * the bare identifier form too, and the decorator name is never resolved\n * through an import alias — so the literal text is always present.\n */\nconst PERSISTED_CLASS_MARKER = /@smrt\\b|extends\\s+Smrt/;\n\n/** Any numeric initializer. Deliberately does not require a terminator. */\nconst NUMERIC_INITIALIZER = /=\\s*-?\\d/;\n\nconst ALL_WORDS = [...MONEY_HEAD_WORDS, ...RATE_WORDS];\n\n/**\n * A relevant word starting an identifier — any case, since `Price` and `price`\n * are both legal there. Case-insensitivity also matches prose in comments,\n * which costs a parse and nothing else.\n */\nconst WORD_AT_START = new RegExp(\n `(?<![A-Za-z])(?:${ALL_WORDS.join('|')})`,\n 'i',\n);\n\n/**\n * A relevant word after a camel hump (`unitPrice`, `USDPrice`), where it is\n * necessarily capitalized and necessarily preceded by an identifier character.\n * This arm cannot be case-insensitive: `generate` would then match on `rate`.\n *\n * Together the two arms cover exactly the boundaries {@link splitIdentifierWords}\n * cuts on, which is what makes the filter conservative rather than plausible.\n */\nconst WORD_AFTER_HUMP = new RegExp(\n `(?<=[A-Za-z0-9])(?:${ALL_WORDS.map(\n (word) => word[0].toUpperCase() + word.slice(1),\n ).join('|')})`,\n);\n\n/**\n * Cheap pre-filter so callers can skip parsing files that cannot produce a\n * finding.\n *\n * Conservative by construction: every condition here is textually implied by a\n * finding. A reported field lives in a class carrying `@smrt` or\n * `extends Smrt…`, is initialized to a number, and has a money or rate word at\n * one of the boundaries the head-noun splitter cuts on. It may still return\n * `true` for a file the AST pass then clears — that is the intended direction.\n *\n * @param source - Full file contents.\n * @returns `false` only when the file provably cannot produce a finding.\n */\nexport function sourceMayContainNumericPrecisionIssue(source: string): boolean {\n return (\n PERSISTED_CLASS_MARKER.test(source) &&\n NUMERIC_INITIALIZER.test(source) &&\n (WORD_AT_START.test(source) || WORD_AFTER_HUMP.test(source))\n );\n}\n\n/**\n * Blank out string-literal contents so option *keys* can be matched without\n * prose inside a value masquerading as one.\n *\n * `@field({ description: 'Discount type: percent or flat' })` otherwise reads\n * as an explicit `type:` and silently suppresses a real finding — and\n * `description` is a shipped option (#2046), so this is reachable, not\n * hypothetical. Quote characters are preserved to keep offsets stable.\n */\nfunction blankStringLiterals(text: string): string {\n return text.replace(/(['\"`])(?:\\\\.|(?!\\1)[\\s\\S])*\\1/g, (match) =>\n match[0].repeat(match.length),\n );\n}\n\n/** Does any decorator on this field state the column type explicitly? */\nfunction hasExplicitTypeDecorator(field: RawFieldDefinition): boolean {\n for (const decorator of field.decorators) {\n // Relationship decorators own the column type outright.\n if (\n decorator.name === 'foreignKey' ||\n decorator.name === 'crossPackageRef' ||\n decorator.name === 'oneToMany' ||\n decorator.name === 'manyToMany' ||\n decorator.name === 'tenantId'\n ) {\n return true;\n }\n if (decorator.name !== 'field') continue;\n const args = blankStringLiterals(decorator.arguments.join(' '));\n // An explicit declaration of intent is exactly what this lint asks for,\n // whichever type was chosen.\n if (/\\btype\\s*:/.test(args)) return true;\n // A transient field is never persisted, so no column type is inferred.\n if (/\\btransient\\s*:\\s*true\\b/.test(args)) return true;\n }\n return false;\n}\n\n/** Fields stored in the STI `_meta_data` JSON blob get no typed column. */\nfunction isMetaField(field: RawFieldDefinition): boolean {\n if (field.decorators.some((decorator) => decorator.name === 'meta')) {\n return true;\n }\n return /^Meta\\s*</.test(field.typeAnnotation ?? '');\n}\n\n/** Is this a plain `number` column whose type came from the literal? */\nfunction usesLiteralInference(field: RawFieldDefinition): boolean {\n if (field.numericValue === null) return false;\n const annotation = (field.typeAnnotation ?? '').replace(/\\s/g, '');\n if (annotation === '') return true; // `price = 0` — inference step 3.5\n return annotation === 'number' || annotation === 'number|null';\n}\n\n/** Are this class's fields materialized as table columns? */\nfunction isPersistedClass(cls: RawClassDefinition): boolean {\n if (cls.hasSmartDecorator) return true;\n return PERSISTED_BASE_CLASSES.has(cls.extendsClause ?? '');\n}\n\n/**\n * Recover a field's 1-based declaration line from source text.\n *\n * The scanner's raw field records carry `line: 0` because the OXC AST nodes\n * have no `loc`, and a finding that cannot point at a line is much harder to\n * act on — so callers that already hold the file contents get a real line.\n */\nfunction resolveDeclarationLine(\n sourceText: string | undefined,\n fieldName: string,\n fallback: number,\n): number {\n if (fallback > 0 || !sourceText) return fallback;\n // `$` is a legal identifier character and a regex anchor, so the name has to\n // be escaped rather than interpolated raw.\n const escapedName = fieldName.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n const declaration = new RegExp(\n `^\\\\s*(?:(?:public|private|protected|readonly|declare|override)\\\\s+)*${escapedName}\\\\s*[?!]?\\\\s*(?::[^=;]+)?=\\\\s*-?\\\\d`,\n );\n const lines = sourceText.split('\\n');\n for (let index = 0; index < lines.length; index += 1) {\n if (declaration.test(lines[index])) return index + 1;\n }\n return 0;\n}\n\nfunction describeMoneyFinding(\n cls: RawClassDefinition,\n field: RawFieldDefinition,\n): Pick<NumericPrecisionFinding, 'message' | 'remedy'> {\n const whole = Math.trunc(field.numericValue ?? 0);\n return {\n message:\n `${cls.className}.${field.name} is a money field with a decimal ` +\n `initializer (= ${field.initializer ?? field.numericValue}), so SMRT ` +\n 'compiles it to a floating-point column. Money is exact and is stored ' +\n 'as integer minor units (cents, satoshis) — $19.99 is 1999 — so a float ' +\n 'column reintroduces binary-fraction error into amounts that must ' +\n 'balance.',\n remedy:\n `Write an integer initializer (\\`${field.name} = ${whole}\\`) and treat ` +\n 'the value as minor units, or state the intent explicitly with ' +\n \"`@field({ type: 'decimal' })` when the value really is fractional.\",\n };\n}\n\nfunction describeRateFinding(\n cls: RawClassDefinition,\n field: RawFieldDefinition,\n): Pick<NumericPrecisionFinding, 'message' | 'remedy'> {\n return {\n message:\n `${cls.className}.${field.name} is a rate with an integer initializer ` +\n `(= ${field.numericValue}), so SMRT compiles it to an INTEGER column. A ` +\n 'rate is inherently fractional, so every meaningful value truncates; ' +\n 'PostgreSQL rejects the save with 22P02 while SQLite silently accepts it.',\n remedy:\n `Write a decimal initializer (\\`${field.name} = ${field.numericValue}.0\\`) ` +\n 'to get a DECIMAL column, or state the intent explicitly with ' +\n \"`@field({ type: 'integer' })` when the value really is a whole count.\",\n };\n}\n\n/**\n * Report every persisted `number` field whose declared precision contradicts\n * its name — money declared decimal, or a rate declared integer.\n *\n * @param classes - Raw class definitions from `parseFile` / `OxcScanner`.\n * @param sourceText - Optional contents of the scanned file, used only to\n * recover declaration line numbers the AST does not carry.\n * @returns One finding per offending field, in declaration order.\n */\nexport function lintNumericPrecision(\n classes: RawClassDefinition[],\n sourceText?: string,\n): NumericPrecisionFinding[] {\n const findings: NumericPrecisionFinding[] = [];\n for (const cls of classes) {\n if (!isPersistedClass(cls)) continue;\n for (const field of cls.fields) {\n if (field.isStatic) continue;\n if (!usesLiteralInference(field)) continue;\n const kind = classifyNumericFieldName(field.name);\n if (!kind) continue;\n // Money wants an integer literal; a rate wants a decimal one. A field\n // already on the right side of its rule is fine.\n if (kind === 'money' && !field.hasDecimalPoint) continue;\n if (kind === 'rate' && field.hasDecimalPoint) continue;\n if (isMetaField(field)) continue;\n if (hasExplicitTypeDecorator(field)) continue;\n findings.push({\n kind,\n className: cls.className,\n fieldName: field.name,\n filePath: cls.filePath,\n line: resolveDeclarationLine(sourceText, field.name, field.line),\n initializer: field.initializer ?? String(field.numericValue),\n ...(kind === 'money'\n ? describeMoneyFinding(cls, field)\n : describeRateFinding(cls, field)),\n });\n }\n }\n return findings;\n}\n","/**\n * Manifest completeness verification.\n *\n * Re-scans a package's `src/` with the same OXC scanner the build uses and\n * asserts that every `@smrt()`-decorated object (and its collection) is present\n * in the package's published `dist/manifest.json`. This is a publish-time guard:\n * downstream schema migration is manifest-driven, so a stale manifest that omits\n * an object means consumers can never create its table via `smrt db:migrate`.\n *\n * Root cause it guards against (issue #1483): `@happyvertical/smrt-jobs@0.27.41`\n * shipped a `dist/manifest.json` generated before `SmrtWorker` existed. The\n * source, exports, and `__smrt-register__` path were all correct, but the\n * published manifest had only 4 of 6 objects, so `_smrt_workers` was never\n * created and `TaskRunner.start()` threw on every consumer that upgraded.\n *\n * The check compares object-key SETS only. The downstream manifest-enrichment\n * passes (schema/validation/agent generation) mutate object entries but never\n * add or remove object keys, so the scanner + adapter object set is the source\n * of truth for \"which objects the published manifest must contain\". The\n * comparison is `expected ⊆ dist`: enrichment passes that add keys to `dist`\n * (e.g. STI children) never trigger a false failure.\n *\n * Parse errors are handled before the set comparison: a syntactically broken\n * source file drops its objects from `expected` AND `dist` symmetrically, which\n * a naive `expected ⊆ dist` would wave through as `ok`. The scan's\n * `severity:'error'` entries therefore short-circuit to a distinct `scan-error`\n * status so a broken source can never masquerade as a complete manifest.\n *\n * @see https://github.com/happyvertical/smrt/issues/1483\n */\n\nimport { existsSync, readFileSync } from 'node:fs';\nimport { basename, resolve } from 'node:path';\nimport { ManifestAdapter } from './manifest-adapter.js';\nimport { OxcScanner } from './scanner.js';\n\n/**\n * Source globs for the completeness scan. The build (`vite.config.base.ts`)\n * passes `include: ['src/**\\/*.ts']` and excludes `*.test.ts` / `*.spec.ts` (the\n * plugin also drops `*.svelte`); we reproduce that so the expected object set\n * matches what the build would publish. We additionally exclude\n * `**\\/__tests__\\/**` so any `@smrt()` fixtures in non-test helper modules under\n * `src/__tests__/` (e.g. `src/__tests__/helpers/*.ts`) are never required in the\n * published manifest. These extra exclusions can only shrink `expected` relative\n * to the build, so they can never cause a false failure — the check is\n * `expected ⊆ dist`.\n */\nconst DEFAULT_INCLUDE = ['src/**/*.ts'];\nconst DEFAULT_EXCLUDE = [\n '**/*.test.ts',\n '**/*.spec.ts',\n '**/__tests__/**',\n '**/*.svelte',\n '**/node_modules/**',\n '**/dist/**',\n '**/*.d.ts',\n];\n\n/**\n * Framework-infrastructure packages whose published manifest is NOT produced by\n * the OXC scanner path (e.g. `@happyvertical/smrt-core` ships a curated static\n * manifest). Mirrors `skipSmrtPlugin` in `vite.config.base.ts`. Keyed by package\n * directory basename.\n */\nconst DEFAULT_SKIP_PACKAGES = [\n 'core',\n 'types',\n 'config',\n 'scanner',\n 'vitest',\n 'smrt-playground',\n];\n\nexport type VerifyManifestStatus =\n | 'ok'\n | 'incomplete'\n | 'missing-manifest'\n | 'scan-error'\n | 'skipped';\n\nexport interface VerifyManifestCompletenessOptions {\n /** Absolute or relative path to the package directory to verify. */\n packageDir: string;\n /** Source include globs (default mirrors the build). */\n include?: string[];\n /** Source exclude globs (default mirrors the build). */\n exclude?: string[];\n /** Package directory basenames to skip (default: framework infrastructure). */\n skipPackages?: string[];\n}\n\nexport interface VerifyManifestCompletenessResult {\n status: VerifyManifestStatus;\n packageName?: string;\n manifestPath?: string;\n /** Qualified object keys present in source but missing from the manifest. */\n missing: string[];\n /** Number of objects the source is expected to contribute. */\n expectedCount: number;\n /** Number of objects present in the published manifest. */\n distCount: number;\n /** Human-readable explanation for `skipped` / `missing-manifest`. */\n reason?: string;\n}\n\ninterface MinimalPackageJson {\n name?: string;\n version?: string;\n exports?: Record<string, unknown>;\n}\n\n/**\n * Resolve the `./manifest` (or `./manifest.json`) export target to an absolute\n * path. Returns `null` when the package does not publish a manifest.\n */\nfunction resolveManifestPath(\n packageDir: string,\n pkgJson: MinimalPackageJson,\n): string | null {\n const exportsMap = pkgJson.exports ?? {};\n const entry = exportsMap['./manifest'] ?? exportsMap['./manifest.json'];\n\n let relativeTarget: string | undefined;\n if (typeof entry === 'string') {\n relativeTarget = entry;\n } else if (entry && typeof entry === 'object') {\n const conditional = entry as Record<string, unknown>;\n const candidate =\n conditional.default ?? conditional.import ?? conditional.types;\n if (typeof candidate === 'string') {\n relativeTarget = candidate;\n }\n }\n\n if (!relativeTarget) {\n return null;\n }\n\n return resolve(packageDir, relativeTarget);\n}\n\n/**\n * Verify that `dist/manifest.json` contains every `@smrt()` object declared in\n * the package source. See module docs for the rationale and guarantees.\n */\nexport async function verifyManifestCompleteness(\n options: VerifyManifestCompletenessOptions,\n): Promise<VerifyManifestCompletenessResult> {\n const packageDir = resolve(options.packageDir);\n const include = options.include ?? DEFAULT_INCLUDE;\n const exclude = options.exclude ?? DEFAULT_EXCLUDE;\n const skipPackages = options.skipPackages ?? DEFAULT_SKIP_PACKAGES;\n\n const packageJsonPath = resolve(packageDir, 'package.json');\n if (!existsSync(packageJsonPath)) {\n return {\n status: 'skipped',\n missing: [],\n expectedCount: 0,\n distCount: 0,\n reason: `no package.json at ${packageDir}`,\n };\n }\n\n const pkgJson: MinimalPackageJson = JSON.parse(\n readFileSync(packageJsonPath, 'utf-8'),\n );\n const packageName = pkgJson.name;\n\n if (skipPackages.includes(basename(packageDir))) {\n return {\n status: 'skipped',\n packageName,\n missing: [],\n expectedCount: 0,\n distCount: 0,\n reason:\n 'framework infrastructure package (does not use scanner manifest)',\n };\n }\n\n const manifestPath = resolveManifestPath(packageDir, pkgJson);\n if (!manifestPath) {\n return {\n status: 'skipped',\n packageName,\n missing: [],\n expectedCount: 0,\n distCount: 0,\n reason: 'package does not publish a ./manifest export',\n };\n }\n\n // Derive the object set the source SHOULD produce, using the same scanner and\n // adapter the build uses (vite-plugin scanWithOxc).\n const scanner = new OxcScanner({ cwd: packageDir, include, exclude });\n const { results, resolved } = await scanner.scanAndResolve();\n\n // A source file with a syntax error parses to `errors:[...], body:[]`, so any\n // @smrt() class in it is dropped from BOTH the re-scanned `expected` set and\n // (having never built) the published `dist`. Because the completeness check is\n // `expected ⊆ dist`, the object vanishes symmetrically and the guard would\n // return `ok` — silently defeating the #1483 guarantee for the exact case\n // (broken source) that most needs catching. Surface scan errors as a distinct\n // non-`ok` status instead of computing `expected` from a partial scan.\n const scanErrors = results.errors.filter((e) => e.severity === 'error');\n if (scanErrors.length > 0) {\n const detail = scanErrors\n .map((e) => {\n const where = e.line ? `${e.filePath}:${e.line}` : e.filePath;\n return `${where} — ${e.message}`;\n })\n .join('; ');\n return {\n status: 'scan-error',\n packageName,\n manifestPath,\n missing: [],\n expectedCount: 0,\n distCount: 0,\n reason: `source scan reported ${scanErrors.length} parse error(s): ${detail}`,\n };\n }\n\n const adapter = new ManifestAdapter();\n const expected = adapter.toManifest(resolved, {\n packageName,\n packageVersion: pkgJson.version,\n typeAliases: results.typeAliases,\n });\n const expectedKeys = Object.keys(expected.objects);\n\n // Nothing to verify if the package declares no SMRT objects (e.g. a package\n // that publishes ./manifest but only ships base classes).\n if (expectedKeys.length === 0) {\n return {\n status: 'skipped',\n packageName,\n manifestPath,\n missing: [],\n expectedCount: 0,\n distCount: 0,\n reason: 'no @smrt() objects found in source',\n };\n }\n\n if (!existsSync(manifestPath)) {\n return {\n status: 'missing-manifest',\n packageName,\n manifestPath,\n missing: expectedKeys,\n expectedCount: expectedKeys.length,\n distCount: 0,\n reason: `published manifest not found at ${manifestPath}`,\n };\n }\n\n let distObjects: Record<string, unknown> = {};\n try {\n const distManifest = JSON.parse(readFileSync(manifestPath, 'utf-8'));\n distObjects =\n distManifest && typeof distManifest.objects === 'object'\n ? distManifest.objects\n : {};\n } catch (error) {\n return {\n status: 'missing-manifest',\n packageName,\n manifestPath,\n missing: expectedKeys,\n expectedCount: expectedKeys.length,\n distCount: 0,\n reason: `published manifest is not valid JSON: ${(error as Error).message}`,\n };\n }\n\n const distKeys = new Set(Object.keys(distObjects));\n const missing = expectedKeys.filter((key) => !distKeys.has(key));\n\n return {\n status: missing.length > 0 ? 'incomplete' : 'ok',\n packageName,\n manifestPath,\n missing,\n expectedCount: expectedKeys.length,\n distCount: distKeys.size,\n };\n}\n"],"mappings":";;;;;AAsCA,IAAM,mCAAmB,IAAI,IAAI;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AAQD,IAAM,6BAAa,IAAI,IAAI;CACzB;CACA;CACA;CACA;CACA;AACF,CAAC;AAkBD,IAAM,sCAAsB,IAAI,IAAI;CAClC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AAGD,IAAM,yCAAyB,IAAI,IAAI;CACrC;CACA;CACA;CACA;CACA;AACF,CAAC;AAkCM,SAAS,qBAAqB,MAAwB;CAC3D,OAAO,KACJ,QAAQ,sBAAsB,OAAO,CAAA,CACrC,QAAQ,yBAAyB,OAAO,CAAA,CACxC,MAAM,SAAS,CAAA,CACf,OAAO,OAAO,CAAA,CACd,KAAK,SAAS,KAAK,YAAY,CAAC;AACrC;AAUO,SAAS,yBACd,MACkC;CAClC,MAAM,QAAQ,qBAAqB,IAAI;CACvC,IAAI,MAAM,MAAM,SAAS,WAAW,IAAI,IAAI,CAAC,GAAG,OAAO;CACvD,KAAA,IAAS,QAAQ,MAAM,SAAS,GAAG,SAAS,GAAG,SA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AAe;EACf,WAAW;EACX,QAAQ;CACV;CAGF,IAAI,CAAC,WAAW,YAAY,GAC1B,OAAO;EACL,QAAQ;EACR;EACA;EACA,SAAS;EACT,eAAe,aAAa;EAC5B,WAAW;EACX,QAAQ,mCAAmC;CAC7C;CAGF,IAAI,cAAuC,CAAC;CAC5C,IAAI;EACF,MAAM,eAAe,KAAK,MAAM,aAAa,cAAc,OAAO,CAAC;EACnE,cACE,gBAAgB,OAAO,aAAa,YAAY,WAC5C,aAAa,UACb,CAAC;CACT,SAAS,OAAO;EACd,OAAO;GACL,QAAQ;GACR;GACA;GACA,SAAS;GACT,eAAe,aAAa;GAC5B,WAAW;GACX,QAAQ,yCAA0C,MAAgB;EACpE;CACF;CAEA,MAAM,WAAW,IAAI,IAAI,OAAO,KAAK,WAAW,CAAC;CACjD,MAAM,UAAU,aAAa,QAAQ,QAAQ,CAAC,SAAS,IAAI,GAAG,CAAC;CAE/D,OAAO;EACL,QAAQ,QAAQ,SAAS,IAAI,eAAe;EAC5C;EACA;EACA;EACA,eAAe,aAAa;EAC5B,WAAW,SAAS;CACtB;AACF"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/numeric-precision-lint.ts","../src/verify-completeness.ts"],"sourcesContent":["/**\n * Numeric-precision lint for money and rate fields (#2361).\n *\n * SMRT infers a `number` field's column type from the *initializer literal*:\n * `= 0` compiles to INTEGER and `= 0.0` compiles to DECIMAL\n * (`manifest-adapter.ts`, inference steps 3 and 3.5). The rule is silent, and\n * SQLite's type affinity happily stores a REAL in an INTEGER column — so a\n * mistyped field passes every SQLite suite and then behaves differently in\n * production on PostgreSQL.\n *\n * Two vocabularies, opposite answers:\n *\n * - **Money is exact**, so it is stored as *integer minor units* — cents,\n * satoshis. `$19.99` is `1999`. A money field declared `= 0.0` becomes a\n * float column, which reintroduces binary-fraction error into amounts that\n * must balance, and invites callers to write major units.\n * - **Rates are inherently fractional** — `taxRate`, `confidence`, a percentage\n * — so they must be DECIMAL. INTEGER would truncate every meaningful value\n * (a confidence in `[0, 1]` collapses to 0 or 1) and PostgreSQL rejects the\n * write outright with `22P02`.\n *\n * Matching is head-noun based rather than substring based, which is what keeps\n * it usable as a repo-wide gate: `amountCents` and `totalTokensUsed` name a\n * unit or a count as their head and are left alone, while `totalAmount`,\n * `amountPaid` and a bare `total` are money. JSDoc prose is deliberately NOT\n * matched — the head-noun signal is precise, and scanning prose for the same\n * vocabulary would make the gate fire on documentation wording.\n */\n\nimport type { RawClassDefinition, RawFieldDefinition } from './types.js';\n\n/**\n * Head nouns that denote an exact monetary quantity, stored as integer minor\n * units.\n *\n * `tax` is money (a tax *amount*); `taxRate` is not, and the rate vocabulary\n * below wins whenever both appear, so the two never collide.\n */\nconst MONEY_HEAD_WORDS = new Set([\n 'amount',\n 'balance',\n 'cost',\n 'discount',\n 'due',\n 'fee',\n 'paid',\n 'price',\n 'subtotal',\n 'tax',\n 'total',\n]);\n\n/**\n * Head nouns that denote an inherently fractional quantity, stored as DECIMAL.\n *\n * A name carrying any of these is a rate even when it also carries a money word\n * (`taxRate`, `feePercentage`), because the rate is what the value *is*.\n */\nconst RATE_WORDS = new Set([\n 'confidence',\n 'credibility',\n 'probability',\n 'rate',\n 'ratio',\n]);\n\n/**\n * Deliberately NOT rate words: `weight`, `score`, `factor`, `percent`.\n *\n * Each is commonly a whole number — an ad-rotation `weight` of 1, a score out\n * of 100, a percent as 0–100 — so treating them as necessarily fractional\n * produces false positives on correct code. `AdVariation.weight = 1` is the\n * worked example. They are left unclassified rather than guessed at.\n */\n\n/**\n * Words that may trail a head noun without displacing it.\n *\n * `amountPaid` is still an amount; `amountCents` is not — its head noun already\n * names the exact unit — which is why this is an allowlist rather than a\n * blocklist of unit words.\n */\nconst TRAILING_QUALIFIERS = new Set([\n 'applied',\n 'billed',\n 'charged',\n 'collected',\n 'earned',\n 'gross',\n 'net',\n 'outstanding',\n 'owed',\n 'refunded',\n 'remaining',\n]);\n\n/** Base classes whose fields become table columns even without `@smrt()`. */\nconst PERSISTED_BASE_CLASSES = new Set([\n 'SmrtObject',\n 'SmrtJunction',\n 'SmrtJunctionBase',\n 'SmrtHierarchical',\n 'SmrtPolymorphicAssociation',\n]);\n\n/** Which rule a field falls under, if any. */\nexport type NumericPrecisionKind = 'money' | 'rate';\n\n/** One field whose declared precision contradicts its name. */\nexport interface NumericPrecisionFinding {\n /** `money` wants INTEGER minor units; `rate` wants DECIMAL. */\n kind: NumericPrecisionKind;\n /** Declaring class, e.g. `Invoice`. */\n className: string;\n /** Field name, e.g. `totalAmount`. */\n fieldName: string;\n /** File the class was scanned from. */\n filePath: string;\n /**\n * 1-based line of the field declaration, or `0` when it could not be\n * resolved. The OXC AST nodes this scanner consumes do not carry `loc`, so\n * the line is recovered from the source text when a caller passes it to\n * {@link lintNumericPrecision}.\n */\n line: number;\n /** The initializer that triggered the finding. */\n initializer: string;\n /** Human-readable explanation naming the rule. */\n message: string;\n /** The accepted fixes. */\n remedy: string;\n}\n\n/**\n * Split an identifier into lowercase words on camelCase, PascalCase, digits,\n * and underscores. `totalAmountCents` → `['total', 'amount', 'cents']`.\n */\nexport function splitIdentifierWords(name: string): string[] {\n return name\n .replace(/([a-z0-9])([A-Z])/g, '$1 $2')\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2')\n .split(/[\\s_$]+/)\n .filter(Boolean)\n .map((word) => word.toLowerCase());\n}\n\n/**\n * Classify an identifier as money, a rate, or neither.\n *\n * The head noun is the last word, or the last word before a trailing qualifier\n * such as `Paid`. A rate word anywhere in the name wins outright: `taxRate` is\n * a rate even though `tax` is money, and that precedence is what stops the two\n * vocabularies from fighting over the same field.\n */\nexport function classifyNumericFieldName(\n name: string,\n): NumericPrecisionKind | undefined {\n const words = splitIdentifierWords(name);\n if (words.some((word) => RATE_WORDS.has(word))) return 'rate';\n for (let index = words.length - 1; index >= 0; index -= 1) {\n const word = words[index];\n if (MONEY_HEAD_WORDS.has(word)) return 'money';\n if (!TRAILING_QUALIFIERS.has(word)) return undefined;\n }\n return undefined;\n}\n\n/**\n * Text a file must contain before it can declare a field this lint reports.\n *\n * `@smrt` is matched without requiring parentheses because the parser accepts\n * the bare identifier form too, and the decorator name is never resolved\n * through an import alias — so the literal text is always present.\n */\nconst PERSISTED_CLASS_MARKER = /@smrt\\b|extends\\s+Smrt/;\n\n/** Any numeric initializer. Deliberately does not require a terminator. */\nconst NUMERIC_INITIALIZER = /=\\s*-?\\d/;\n\nconst ALL_WORDS = [...MONEY_HEAD_WORDS, ...RATE_WORDS];\n\n/**\n * A relevant word starting an identifier — any case, since `Price` and `price`\n * are both legal there. Case-insensitivity also matches prose in comments,\n * which costs a parse and nothing else.\n */\nconst WORD_AT_START = new RegExp(\n `(?<![A-Za-z])(?:${ALL_WORDS.join('|')})`,\n 'i',\n);\n\n/**\n * A relevant word after a camel hump (`unitPrice`, `USDPrice`), where it is\n * necessarily capitalized and necessarily preceded by an identifier character.\n * This arm cannot be case-insensitive: `generate` would then match on `rate`.\n *\n * Together the two arms cover exactly the boundaries {@link splitIdentifierWords}\n * cuts on, which is what makes the filter conservative rather than plausible.\n */\nconst WORD_AFTER_HUMP = new RegExp(\n `(?<=[A-Za-z0-9])(?:${ALL_WORDS.map(\n (word) => word[0].toUpperCase() + word.slice(1),\n ).join('|')})`,\n);\n\n/**\n * Cheap pre-filter so callers can skip parsing files that cannot produce a\n * finding.\n *\n * Conservative by construction: every condition here is textually implied by a\n * finding. A reported field lives in a class carrying `@smrt` or\n * `extends Smrt…`, is initialized to a number, and has a money or rate word at\n * one of the boundaries the head-noun splitter cuts on. It may still return\n * `true` for a file the AST pass then clears — that is the intended direction.\n *\n * @param source - Full file contents.\n * @returns `false` only when the file provably cannot produce a finding.\n */\nexport function sourceMayContainNumericPrecisionIssue(source: string): boolean {\n return (\n PERSISTED_CLASS_MARKER.test(source) &&\n NUMERIC_INITIALIZER.test(source) &&\n (WORD_AT_START.test(source) || WORD_AFTER_HUMP.test(source))\n );\n}\n\n/**\n * Blank out string-literal contents so option *keys* can be matched without\n * prose inside a value masquerading as one.\n *\n * `@field({ description: 'Discount type: percent or flat' })` otherwise reads\n * as an explicit `type:` and silently suppresses a real finding — and\n * `description` is a shipped option (#2046), so this is reachable, not\n * hypothetical. Quote characters are preserved to keep offsets stable.\n */\nfunction blankStringLiterals(text: string): string {\n return text.replace(/(['\"`])(?:\\\\.|(?!\\1)[\\s\\S])*\\1/g, (match) =>\n match[0].repeat(match.length),\n );\n}\n\n/** Does any decorator on this field state the column type explicitly? */\nfunction hasExplicitTypeDecorator(field: RawFieldDefinition): boolean {\n for (const decorator of field.decorators) {\n // Relationship decorators own the column type outright.\n if (\n decorator.name === 'foreignKey' ||\n decorator.name === 'crossPackageRef' ||\n decorator.name === 'oneToMany' ||\n decorator.name === 'manyToMany' ||\n decorator.name === 'tenantId'\n ) {\n return true;\n }\n if (decorator.name !== 'field') continue;\n const args = blankStringLiterals(decorator.arguments.join(' '));\n // An explicit declaration of intent is exactly what this lint asks for,\n // whichever type was chosen.\n if (/\\btype\\s*:/.test(args)) return true;\n // A transient field is never persisted, so no column type is inferred.\n if (/\\btransient\\s*:\\s*true\\b/.test(args)) return true;\n }\n return false;\n}\n\n/** Fields stored in the STI `_meta_data` JSON blob get no typed column. */\nfunction isMetaField(field: RawFieldDefinition): boolean {\n if (field.decorators.some((decorator) => decorator.name === 'meta')) {\n return true;\n }\n return /^Meta\\s*</.test(field.typeAnnotation ?? '');\n}\n\n/** Is this a plain `number` column whose type came from the literal? */\nfunction usesLiteralInference(field: RawFieldDefinition): boolean {\n if (field.numericValue === null) return false;\n const annotation = (field.typeAnnotation ?? '').replace(/\\s/g, '');\n if (annotation === '') return true; // `price = 0` — inference step 3.5\n return annotation === 'number' || annotation === 'number|null';\n}\n\n/** Are this class's fields materialized as table columns? */\nfunction isPersistedClass(cls: RawClassDefinition): boolean {\n if (cls.hasSmartDecorator) return true;\n return PERSISTED_BASE_CLASSES.has(cls.extendsClause ?? '');\n}\n\n/**\n * Recover a field's 1-based declaration line from source text.\n *\n * The scanner's raw field records carry `line: 0` because the OXC AST nodes\n * have no `loc`, and a finding that cannot point at a line is much harder to\n * act on — so callers that already hold the file contents get a real line.\n */\nfunction resolveDeclarationLine(\n sourceText: string | undefined,\n fieldName: string,\n fallback: number,\n): number {\n if (fallback > 0 || !sourceText) return fallback;\n // `$` is a legal identifier character and a regex anchor, so the name has to\n // be escaped rather than interpolated raw.\n const escapedName = fieldName.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n const declaration = new RegExp(\n `^\\\\s*(?:(?:public|private|protected|readonly|declare|override)\\\\s+)*${escapedName}\\\\s*[?!]?\\\\s*(?::[^=;]+)?=\\\\s*-?\\\\d`,\n );\n const lines = sourceText.split('\\n');\n for (let index = 0; index < lines.length; index += 1) {\n if (declaration.test(lines[index])) return index + 1;\n }\n return 0;\n}\n\nfunction describeMoneyFinding(\n cls: RawClassDefinition,\n field: RawFieldDefinition,\n): Pick<NumericPrecisionFinding, 'message' | 'remedy'> {\n const whole = Math.trunc(field.numericValue ?? 0);\n return {\n message:\n `${cls.className}.${field.name} is a money field with a decimal ` +\n `initializer (= ${field.initializer ?? field.numericValue}), so SMRT ` +\n 'compiles it to a floating-point column. Money is exact and is stored ' +\n 'as integer minor units (cents, satoshis) — $19.99 is 1999 — so a float ' +\n 'column reintroduces binary-fraction error into amounts that must ' +\n 'balance.',\n remedy:\n `Write an integer initializer (\\`${field.name} = ${whole}\\`) and treat ` +\n 'the value as minor units, or state the intent explicitly with ' +\n \"`@field({ type: 'decimal' })` when the value really is fractional.\",\n };\n}\n\nfunction describeRateFinding(\n cls: RawClassDefinition,\n field: RawFieldDefinition,\n): Pick<NumericPrecisionFinding, 'message' | 'remedy'> {\n return {\n message:\n `${cls.className}.${field.name} is a rate with an integer initializer ` +\n `(= ${field.numericValue}), so SMRT compiles it to an INTEGER column. A ` +\n 'rate is inherently fractional, so every meaningful value truncates; ' +\n 'PostgreSQL rejects the save with 22P02 while SQLite silently accepts it.',\n remedy:\n `Write a decimal initializer (\\`${field.name} = ${field.numericValue}.0\\`) ` +\n 'to get a DECIMAL column, or state the intent explicitly with ' +\n \"`@field({ type: 'integer' })` when the value really is a whole count.\",\n };\n}\n\n/**\n * Report every persisted `number` field whose declared precision contradicts\n * its name — money declared decimal, or a rate declared integer.\n *\n * @param classes - Raw class definitions from `parseFile` / `OxcScanner`.\n * @param sourceText - Optional contents of the scanned file, used only to\n * recover declaration line numbers the AST does not carry.\n * @returns One finding per offending field, in declaration order.\n */\nexport function lintNumericPrecision(\n classes: RawClassDefinition[],\n sourceText?: string,\n): NumericPrecisionFinding[] {\n const findings: NumericPrecisionFinding[] = [];\n for (const cls of classes) {\n if (!isPersistedClass(cls)) continue;\n for (const field of cls.fields) {\n if (field.isStatic) continue;\n if (!usesLiteralInference(field)) continue;\n const kind = classifyNumericFieldName(field.name);\n if (!kind) continue;\n // Money wants an integer literal; a rate wants a decimal one. A field\n // already on the right side of its rule is fine.\n if (kind === 'money' && !field.hasDecimalPoint) continue;\n if (kind === 'rate' && field.hasDecimalPoint) continue;\n if (isMetaField(field)) continue;\n if (hasExplicitTypeDecorator(field)) continue;\n findings.push({\n kind,\n className: cls.className,\n fieldName: field.name,\n filePath: cls.filePath,\n line: resolveDeclarationLine(sourceText, field.name, field.line),\n initializer: field.initializer ?? String(field.numericValue),\n ...(kind === 'money'\n ? describeMoneyFinding(cls, field)\n : describeRateFinding(cls, field)),\n });\n }\n }\n return findings;\n}\n","/**\n * Manifest completeness verification.\n *\n * Re-scans a package's `src/` with the same OXC scanner the build uses and\n * asserts that every `@smrt()`-decorated object (and its collection) is present\n * in the package's published `dist/manifest.json`. This is a publish-time guard:\n * downstream schema migration is manifest-driven, so a stale manifest that omits\n * an object means consumers can never create its table via `smrt db:migrate`.\n *\n * Root cause it guards against (issue #1483): `@happyvertical/smrt-jobs@0.27.41`\n * shipped a `dist/manifest.json` generated before `SmrtWorker` existed. The\n * source, exports, and `__smrt-register__` path were all correct, but the\n * published manifest had only 4 of 6 objects, so `_smrt_workers` was never\n * created and `TaskRunner.start()` threw on every consumer that upgraded.\n *\n * The check compares object-key SETS only. The downstream manifest-enrichment\n * passes (schema/validation/agent generation) mutate object entries but never\n * add or remove object keys, so the scanner + adapter object set is the source\n * of truth for \"which objects the published manifest must contain\". The\n * comparison is `expected ⊆ dist`: enrichment passes that add keys to `dist`\n * (e.g. STI children) never trigger a false failure.\n *\n * Parse errors are handled before the set comparison: a syntactically broken\n * source file drops its objects from `expected` AND `dist` symmetrically, which\n * a naive `expected ⊆ dist` would wave through as `ok`. The scan's\n * `severity:'error'` entries therefore short-circuit to a distinct `scan-error`\n * status so a broken source can never masquerade as a complete manifest.\n *\n * @see https://github.com/happyvertical/smrt/issues/1483\n */\n\nimport { existsSync, readFileSync } from 'node:fs';\nimport { basename, resolve } from 'node:path';\nimport { ManifestAdapter } from './manifest-adapter.js';\nimport { OxcScanner } from './scanner.js';\n\n/**\n * Source globs for the completeness scan. The build (`vite.config.base.ts`)\n * passes `include: ['src/**\\/*.ts']` and excludes `*.test.ts` / `*.spec.ts` (the\n * plugin also drops `*.svelte`); we reproduce that so the expected object set\n * matches what the build would publish. We additionally exclude\n * `**\\/__tests__\\/**` so any `@smrt()` fixtures in non-test helper modules under\n * `src/__tests__/` (e.g. `src/__tests__/helpers/*.ts`) are never required in the\n * published manifest. These extra exclusions can only shrink `expected` relative\n * to the build, so they can never cause a false failure — the check is\n * `expected ⊆ dist`.\n */\nconst DEFAULT_INCLUDE = ['src/**/*.ts'];\nconst DEFAULT_EXCLUDE = [\n '**/*.test.ts',\n '**/*.spec.ts',\n '**/__tests__/**',\n '**/*.svelte',\n '**/node_modules/**',\n '**/dist/**',\n '**/*.d.ts',\n];\n\n/**\n * Framework-infrastructure packages whose published manifest is NOT produced by\n * the OXC scanner path (e.g. `@happyvertical/smrt-core` ships a curated static\n * manifest). Mirrors `skipSmrtPlugin` in `vite.config.base.ts`. Keyed by package\n * directory basename.\n */\nconst DEFAULT_SKIP_PACKAGES = [\n 'core',\n 'types',\n 'config',\n 'scanner',\n 'vitest',\n 'smrt-playground',\n];\n\nexport type VerifyManifestStatus =\n | 'ok'\n | 'incomplete'\n | 'missing-manifest'\n | 'scan-error'\n | 'skipped';\n\nexport interface VerifyManifestCompletenessOptions {\n /** Absolute or relative path to the package directory to verify. */\n packageDir: string;\n /** Source include globs (default mirrors the build). */\n include?: string[];\n /** Source exclude globs (default mirrors the build). */\n exclude?: string[];\n /** Package directory basenames to skip (default: framework infrastructure). */\n skipPackages?: string[];\n /**\n * Release mode (issue #2853): when the package publishes no `./manifest`\n * export, scan its source anyway and report `missing-manifest` if it declares\n * `@smrt()` objects, instead of skipping. Without this, a package can leave\n * the guard by omitting the export, and consumers never discover its objects.\n */\n requireManifestExport?: boolean;\n}\n\nexport interface VerifyManifestCompletenessResult {\n status: VerifyManifestStatus;\n packageName?: string;\n manifestPath?: string;\n /** Qualified object keys present in source but missing from the manifest. */\n missing: string[];\n /** Number of objects the source is expected to contribute. */\n expectedCount: number;\n /** Number of objects present in the published manifest. */\n distCount: number;\n /** Human-readable explanation for `skipped` / `missing-manifest`. */\n reason?: string;\n}\n\ninterface MinimalPackageJson {\n name?: string;\n version?: string;\n exports?: Record<string, unknown>;\n}\n\n/**\n * Resolve the `./manifest` (or `./manifest.json`) export target to an absolute\n * path. Returns `null` when the package does not publish a manifest.\n */\nfunction resolveManifestPath(\n packageDir: string,\n pkgJson: MinimalPackageJson,\n): string | null {\n const exportsMap = pkgJson.exports ?? {};\n const entry = exportsMap['./manifest'] ?? exportsMap['./manifest.json'];\n\n let relativeTarget: string | undefined;\n if (typeof entry === 'string') {\n relativeTarget = entry;\n } else if (entry && typeof entry === 'object') {\n const conditional = entry as Record<string, unknown>;\n const candidate =\n conditional.default ?? conditional.import ?? conditional.types;\n if (typeof candidate === 'string') {\n relativeTarget = candidate;\n }\n }\n\n if (!relativeTarget) {\n return null;\n }\n\n return resolve(packageDir, relativeTarget);\n}\n\n/**\n * Verify that `dist/manifest.json` contains every `@smrt()` object declared in\n * the package source. See module docs for the rationale and guarantees.\n */\nexport async function verifyManifestCompleteness(\n options: VerifyManifestCompletenessOptions,\n): Promise<VerifyManifestCompletenessResult> {\n const packageDir = resolve(options.packageDir);\n const include = options.include ?? DEFAULT_INCLUDE;\n const exclude = options.exclude ?? DEFAULT_EXCLUDE;\n const skipPackages = options.skipPackages ?? DEFAULT_SKIP_PACKAGES;\n\n const packageJsonPath = resolve(packageDir, 'package.json');\n if (!existsSync(packageJsonPath)) {\n return {\n status: 'skipped',\n missing: [],\n expectedCount: 0,\n distCount: 0,\n reason: `no package.json at ${packageDir}`,\n };\n }\n\n const pkgJson: MinimalPackageJson = JSON.parse(\n readFileSync(packageJsonPath, 'utf-8'),\n );\n const packageName = pkgJson.name;\n\n if (skipPackages.includes(basename(packageDir))) {\n return {\n status: 'skipped',\n packageName,\n missing: [],\n expectedCount: 0,\n distCount: 0,\n reason:\n 'framework infrastructure package (does not use scanner manifest)',\n };\n }\n\n const manifestPath = resolveManifestPath(packageDir, pkgJson);\n if (!manifestPath && !options.requireManifestExport) {\n return {\n status: 'skipped',\n packageName,\n missing: [],\n expectedCount: 0,\n distCount: 0,\n reason: 'package does not publish a ./manifest export',\n };\n }\n\n // Derive the object set the source SHOULD produce, using the same scanner and\n // adapter the build uses (vite-plugin scanWithOxc).\n const scanner = new OxcScanner({ cwd: packageDir, include, exclude });\n const { results, resolved } = await scanner.scanAndResolve();\n\n // A source file with a syntax error parses to `errors:[...], body:[]`, so any\n // @smrt() class in it is dropped from BOTH the re-scanned `expected` set and\n // (having never built) the published `dist`. Because the completeness check is\n // `expected ⊆ dist`, the object vanishes symmetrically and the guard would\n // return `ok` — silently defeating the #1483 guarantee for the exact case\n // (broken source) that most needs catching. Surface scan errors as a distinct\n // non-`ok` status instead of computing `expected` from a partial scan.\n const scanErrors = results.errors.filter((e) => e.severity === 'error');\n if (scanErrors.length > 0) {\n const detail = scanErrors\n .map((e) => {\n const where = e.line ? `${e.filePath}:${e.line}` : e.filePath;\n return `${where} — ${e.message}`;\n })\n .join('; ');\n return {\n status: 'scan-error',\n packageName,\n manifestPath: manifestPath ?? undefined,\n missing: [],\n expectedCount: 0,\n distCount: 0,\n reason: `source scan reported ${scanErrors.length} parse error(s): ${detail}`,\n };\n }\n\n const adapter = new ManifestAdapter();\n const expected = adapter.toManifest(resolved, {\n packageName,\n packageVersion: pkgJson.version,\n typeAliases: results.typeAliases,\n });\n const expectedKeys = Object.keys(expected.objects);\n\n // Nothing to verify if the package declares no SMRT objects (e.g. a package\n // that publishes ./manifest but only ships base classes).\n if (expectedKeys.length === 0) {\n return {\n status: 'skipped',\n packageName,\n manifestPath: manifestPath ?? undefined,\n missing: [],\n expectedCount: 0,\n distCount: 0,\n reason: manifestPath\n ? 'no @smrt() objects found in source'\n : 'package does not publish a ./manifest export and declares no @smrt() objects',\n };\n }\n\n if (!manifestPath) {\n return {\n status: 'missing-manifest',\n packageName,\n missing: expectedKeys,\n expectedCount: expectedKeys.length,\n distCount: 0,\n reason: `source declares ${expectedKeys.length} @smrt() object(s) but package.json publishes no ./manifest export`,\n };\n }\n\n if (!existsSync(manifestPath)) {\n return {\n status: 'missing-manifest',\n packageName,\n manifestPath,\n missing: expectedKeys,\n expectedCount: expectedKeys.length,\n distCount: 0,\n reason: `published manifest not found at ${manifestPath}`,\n };\n }\n\n let distObjects: Record<string, unknown> = {};\n try {\n const distManifest = JSON.parse(readFileSync(manifestPath, 'utf-8'));\n distObjects =\n distManifest && typeof distManifest.objects === 'object'\n ? distManifest.objects\n : {};\n } catch (error) {\n return {\n status: 'missing-manifest',\n packageName,\n manifestPath,\n missing: expectedKeys,\n expectedCount: expectedKeys.length,\n distCount: 0,\n reason: `published manifest is not valid JSON: ${(error as Error).message}`,\n };\n }\n\n const distKeys = new Set(Object.keys(distObjects));\n const missing = expectedKeys.filter((key) => !distKeys.has(key));\n\n return {\n status: missing.length > 0 ? 'incomplete' : 'ok',\n packageName,\n manifestPath,\n missing,\n expectedCount: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nE,cACE,gBAAgB,OAAO,aAAa,YAAY,WAC5C,aAAa,UACb,CAAC;CACT,SAAS,OAAO;EACd,OAAO;GACL,QAAQ;GACR;GACA;GACA,SAAS;GACT,eAAe,aAAa;GAC5B,WAAW;GACX,QAAQ,yCAA0C,MAAgB;EACpE;CACF;CAEA,MAAM,WAAW,IAAI,IAAI,OAAO,KAAK,WAAW,CAAC;CACjD,MAAM,UAAU,aAAa,QAAQ,QAAQ,CAAC,SAAS,IAAI,GAAG,CAAC;CAE/D,OAAO;EACL,QAAQ,QAAQ,SAAS,IAAI,eAAe;EAC5C;EACA;EACA;EACA,eAAe,aAAa;EAC5B,WAAW,SAAS;CACtB;AACF"}
|
|
@@ -50,6 +50,10 @@ interface MethodDefinition {
|
|
|
50
50
|
memberTypes?: string[];
|
|
51
51
|
/** See `RawParameterDefinition.unionBranches` (#2686). */
|
|
52
52
|
unionBranches?: ParameterTypeBranch[];
|
|
53
|
+
/** See `RawParameterDefinition.resolvedType` (#4327). */
|
|
54
|
+
resolvedType?: string;
|
|
55
|
+
/** See `RawParameterDefinition.aliasUnresolved` (#4327). */
|
|
56
|
+
aliasUnresolved?: boolean;
|
|
53
57
|
}>;
|
|
54
58
|
returnType: string;
|
|
55
59
|
description?: string;
|
|
@@ -292,7 +296,10 @@ export declare class ManifestAdapter {
|
|
|
292
296
|
* and type alias resolution (up to depth 5).
|
|
293
297
|
* 4. **Numeric literal without annotation** — `version = 1` → `integer`.
|
|
294
298
|
* 5. **Boolean literal without annotation** — `isRead = false` → `boolean`.
|
|
295
|
-
* 6. **
|
|
299
|
+
* 6. **Boolean `@field({ default })` with no annotation or initializer** —
|
|
300
|
+
* `@field({ default: false }) archived;` → `boolean`, matching runtime
|
|
301
|
+
* decorator-only inference (#4295; code step 3.7).
|
|
302
|
+
* 7. **Default** — falls back to `text`.
|
|
296
303
|
*
|
|
297
304
|
* @param field - The raw field definition to analyse.
|
|
298
305
|
* @returns A {@link FieldTypeInference} describing the inferred type,
|
|
@@ -312,6 +319,10 @@ export declare class ManifestAdapter {
|
|
|
312
319
|
* - Use @foreignKey(), @oneToMany(), @manyToMany() decorators for relationships
|
|
313
320
|
*/
|
|
314
321
|
private inferFromHelper;
|
|
322
|
+
/**
|
|
323
|
+
* The boolean `default` of a `@field()` decorator on `field`, if any.
|
|
324
|
+
*/
|
|
325
|
+
private decoratorBooleanDefault;
|
|
315
326
|
/**
|
|
316
327
|
* Infer type from field decorator
|
|
317
328
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-adapter.d.ts","sourceRoot":"","sources":["../src/manifest-adapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,kBAAkB,CAAC;AAGrE,OAAO,KAAK,EACV,kBAAkB,EAElB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAMpB;;;GAGG;AACH,KAAK,kBAAkB,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC;AAEhD,UAAU,eAAe;IACvB,IAAI,EACA,MAAM,GACN,SAAS,GACT,SAAS,GACT,SAAS,GACT,UAAU,GACV,MAAM,GACN,YAAY,GACZ,iBAAiB,GACjB,WAAW,GACX,YAAY,GACZ,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,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,KAAK,EAAE,kBAAkB,GAAG,eAAe,GAAG,IAAI;IAwI/D;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,cAAc,CAAC,KAAK,EAAE,kBAAkB,GAAG,kBAAkB;IAwE7D;;;;;;;OAOG;IACH,OAAO,CAAC,eAAe;IAIvB;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAa/B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAyP1B,OAAO,CAAC,4BAA4B;IAuBpC,OAAO,CAAC,yBAAyB;IA2FjC,mFAAmF;IACnF,OAAO,CAAC,oBAAoB;IAa5B,OAAO,CAAC,0BAA0B;IAalC,OAAO,CAAC,kBAAkB;IAqB1B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAkM3B;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IAgBxB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IA+BzB;;;;;;;;;;OAUG;IACH,aAAa,CAAC,MAAM,EAAE,mBAAmB,GAAG,gBAAgB,GAAG,IAAI;CAoCpE"}
|
package/dist/oxc-parser.d.ts
CHANGED
|
@@ -451,6 +451,26 @@ export declare function extractSmrtImports(body: Statement[]): Map<string, Set<s
|
|
|
451
451
|
* @internal Exported for testing
|
|
452
452
|
*/
|
|
453
453
|
export declare function extractTypeAliases(body: Statement[]): Record<string, string>;
|
|
454
|
+
/**
|
|
455
|
+
* Resolve a method parameter whose declared type is a bare identifier naming
|
|
456
|
+
* a type alias (or enum) declared in the SAME module (#4327).
|
|
457
|
+
*
|
|
458
|
+
* The manifest keeps the authored name in `type` (generated code and docs
|
|
459
|
+
* still read it) and records the alias target as `resolvedType`, which the
|
|
460
|
+
* schema and coercion consumers read instead. Only the declaring module's own
|
|
461
|
+
* aliases are consulted -- never the project-wide flattened map -- so a
|
|
462
|
+
* same-named alias in another file or package cannot leak in, and an
|
|
463
|
+
* inherited method keeps the resolution made in its declaring file. A cyclic
|
|
464
|
+
* or over-long chain sets `aliasUnresolved` instead of guessing. An imported
|
|
465
|
+
* or otherwise unknown name is left untouched.
|
|
466
|
+
*
|
|
467
|
+
* @internal Exported for testing
|
|
468
|
+
*/
|
|
469
|
+
export declare function resolveParameterAlias(type: string | null, aliases: Record<string, string>): {
|
|
470
|
+
resolvedType: string;
|
|
471
|
+
} | {
|
|
472
|
+
aliasUnresolved: true;
|
|
473
|
+
} | undefined;
|
|
454
474
|
/**
|
|
455
475
|
* A spread inside an `@smrt()` or `@method()` config that could not be
|
|
456
476
|
* resolved statically.
|
package/dist/oxc-parser.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oxc-parser.d.ts","sourceRoot":"","sources":["../src/oxc-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAQH,OAAO,EAEL,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EAOd,SAAS,EACV,MAAM,YAAY,CAAC;AAYpB,OAAO,EAAE,aAAa,EAAE,CAAC;AAMzB,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,cAAc;IACtB,KAAK,EAAE,QAAQ,CAAC;IAChB,GAAG,EAAE,QAAQ,CAAC;CACf;AAED,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAgCD,UAAU,iBAAkB,SAAQ,QAAQ;IAC1C,IAAI,EAAE,mBAAmB,CAAC;IAC1B,UAAU,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACnC,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,CAA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GAUG;AACH,UAAU,gBAAgB;IACxB,6DAA6D;IAC7D,UAAU,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,gBAAgB,EAAE,gBAAgB,EAAE,CAAC;IACrC,YAAY,EAAE,KAAK,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;CACJ;AA+BD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,SAAS,EAAE,EACjB,UAAU,EAAE,MAAM,GACjB,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAiD7B;AAimBD;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EAAE,GAChB,MAAM,GAAG,SAAS,CASpB;AAED,sCAAsC;AACtC,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAChB,MAAM,GAAG,SAAS,CA+CpB"}
|
package/dist/types.d.ts
CHANGED
|
@@ -211,6 +211,18 @@ export interface RawParameterDefinition {
|
|
|
211
211
|
* before #2686.
|
|
212
212
|
*/
|
|
213
213
|
unionBranches?: ParameterTypeBranch[];
|
|
214
|
+
/**
|
|
215
|
+
* Target of a same-module type alias when `type` is a bare alias name
|
|
216
|
+
* (`type ActionOptions = Record<string, unknown>` gives
|
|
217
|
+
* `'Record<string, unknown>'`), following alias chains (#4327). Absent for
|
|
218
|
+
* every other parameter, so manifests for ordinary parameters are unchanged.
|
|
219
|
+
*/
|
|
220
|
+
resolvedType?: string;
|
|
221
|
+
/**
|
|
222
|
+
* `type` names a same-module alias whose chain is cyclic or too deep to
|
|
223
|
+
* follow. Schema consumers must not guess a type for it (#4327).
|
|
224
|
+
*/
|
|
225
|
+
aliasUnresolved?: boolean;
|
|
214
226
|
}
|
|
215
227
|
/** One branch of a top-level union parameter type (#2686). */
|
|
216
228
|
export interface ParameterTypeBranch {
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAM9C;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,uCAAuC;IACvC,SAAS,EAAE,MAAM,CAAC;IAElB,mCAAmC;IACnC,QAAQ,EAAE,MAAM,CAAC;IAEjB,2DAA2D;IAC3D,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,wFAAwF;IACxF,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,oDAAoD;IACpD,eAAe,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAE3C,4BAA4B;IAC5B,iBAAiB,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,8BAA8B;IAC9B,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAE7B,oBAAoB;IACpB,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAE/B,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAElB,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC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AAM,WAAW,kBAAkB;IACjC,yBAAyB;IACzB,IAAI,EAAE,iBAAiB,CAAC;IAExB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,mCAAmC;IACnC,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,gCAAgC;IAChC,QAAQ,EAAE,OAAO,CAAC;IAElB,qCAAqC;IACrC,MAAM,EAAE,QAAQ,GAAG,WAAW,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS,CAAC;IAExE,2EAA2E;IAC3E,cAAc,CAAC,EAAE,iBAAiB,CAAC;IAEnC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC"}
|
|
@@ -38,6 +38,13 @@ export interface VerifyManifestCompletenessOptions {
|
|
|
38
38
|
exclude?: string[];
|
|
39
39
|
/** Package directory basenames to skip (default: framework infrastructure). */
|
|
40
40
|
skipPackages?: string[];
|
|
41
|
+
/**
|
|
42
|
+
* Release mode (issue #2853): when the package publishes no `./manifest`
|
|
43
|
+
* export, scan its source anyway and report `missing-manifest` if it declares
|
|
44
|
+
* `@smrt()` objects, instead of skipping. Without this, a package can leave
|
|
45
|
+
* the guard by omitting the export, and consumers never discover its objects.
|
|
46
|
+
*/
|
|
47
|
+
requireManifestExport?: boolean;
|
|
41
48
|
}
|
|
42
49
|
export interface VerifyManifestCompletenessResult {
|
|
43
50
|
status: VerifyManifestStatus;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-completeness.d.ts","sourceRoot":"","sources":["../src/verify-completeness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AA4CH,MAAM,MAAM,oBAAoB,GAC5B,IAAI,GACJ,YAAY,GACZ,kBAAkB,GAClB,YAAY,GACZ,SAAS,CAAC;AAEd,MAAM,WAAW,iCAAiC;IAChD,oEAAoE;IACpE,UAAU,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,+EAA+E;IAC/E,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"verify-completeness.d.ts","sourceRoot":"","sources":["../src/verify-completeness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AA4CH,MAAM,MAAM,oBAAoB,GAC5B,IAAI,GACJ,YAAY,GACZ,kBAAkB,GAClB,YAAY,GACZ,SAAS,CAAC;AAEd,MAAM,WAAW,iCAAiC;IAChD,oEAAoE;IACpE,UAAU,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,+EAA+E;IAC/E,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,MAAM,WAAW,gCAAgC;IAC/C,MAAM,EAAE,oBAAoB,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6EAA6E;IAC7E,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,8DAA8D;IAC9D,aAAa,EAAE,MAAM,CAAC;IACtB,2DAA2D;IAC3D,SAAS,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAsCD;;;GAGG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,iCAAiC,GACzC,OAAO,CAAC,gCAAgC,CAAC,CA0J3C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-scanner",
|
|
3
|
-
"version": "0.57.
|
|
3
|
+
"version": "0.57.47",
|
|
4
4
|
"description": "High-performance TypeScript scanner using OXC for SMRT manifest generation",
|
|
5
5
|
"author": "HappyVertical",
|
|
6
6
|
"type": "module",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@happyvertical/smrt-types": "0.57.
|
|
37
|
+
"@happyvertical/smrt-types": "0.57.47",
|
|
38
38
|
"minimatch": "10.2.6",
|
|
39
39
|
"oxc-parser": "^0.150.0",
|
|
40
40
|
"oxc-resolver": "^11.24.2",
|