@orkestrel/scaffold 0.0.86 → 0.0.88
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/dist/agents/skills/orkestrel-harden/scripts/discovery.js +9 -4
- package/dist/bin/main.js +3 -3
- package/dist/bin/main.js.map +1 -1
- package/dist/host/agents/skills/orkestrel-harden/scripts/discovery.ts +12 -3
- package/dist/host/claude/agents/orkestrel.md +3 -3
- package/dist/host/claude/rules/architecture.md +19 -6
- package/dist/host/claude/rules/names.md +13 -11
- package/dist/host/configs/policy.ts +96 -27
- package/dist/host/dotfiles/oxlintrc.json +1 -0
- package/dist/host/guides/browser.md +2626 -1195
- package/dist/host/guides/contract.md +1 -1
- package/dist/host/guides/guide.md +13 -8
- package/dist/host/manifest.json +11 -11
- package/dist/host/tests/config.test.ts +176 -0
- package/dist/src/core/index.cjs +10 -3
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +7 -7
- package/dist/src/core/index.d.ts +7 -7
- package/dist/src/core/index.js +10 -3
- package/dist/src/core/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -473,7 +473,7 @@ Direct declaration populations are dense data arrays too. A sparse literal is re
|
|
|
473
473
|
|
|
474
474
|
The precedence below assumes a readable node. A readable malformed keyword is ignored and widens according to the listed rule; a keyword access, enumeration, or recursive traversal that throws is not malformed schema vocabulary and is refused with `ContractError { code: 'structure', context: { shape: 'schema' } }`.
|
|
475
475
|
|
|
476
|
-
`schemaToShape`'s precedence, top-down at each node (every keyword read is type-guarded; a malformed keyword is IGNORED, not thrown): (1) `enum` (≥ 1 string/number/boolean entry) → `literalShape`. (2) `oneOf` (≥ 1 record entry) → `oneOfShape` over the recursed variants, PROVIDED the record-entry count is at or under `INFER_BREADTH_LIMIT`; over the cap, building a subset union would be strictly narrower than the schema's full union, so the node widens to `rawShape` instead of sampling a subset. (3) `anyOf` identically → `unionShape`, with the same over-cap widen-to-`rawShape` rule rather than a subset union. (4) `type: 'string'/'number'/'integer'/'boolean'/'null'` → the matching primitive shape, with `minLength`/`maxLength`/`minimum`/`maximum` bounds kept only when well-formed and non-contradictory (a malformed or `min > max` pair drops to unbounded — widening, never narrowing). (
|
|
476
|
+
`schemaToShape`'s precedence, top-down at each node (every keyword read is type-guarded; a malformed keyword is IGNORED, not thrown): (1) `enum` (≥ 1 string/number/boolean entry) → `literalShape`. (2) `oneOf` (≥ 1 record entry) → `oneOfShape` over the recursed variants, PROVIDED the record-entry count is at or under `INFER_BREADTH_LIMIT`; over the cap, building a subset union would be strictly narrower than the schema's full union, so the node widens to `rawShape` instead of sampling a subset. (3) `anyOf` identically → `unionShape`, with the same over-cap widen-to-`rawShape` rule rather than a subset union. (4) An array-valued `type` → `unionShape` over each distinct recognized name, converting `{ ...schema, type: member }` at the same depth so bounds, `items`, `properties`, and `description` apply to each member. A single distinct name returns its shape directly. An empty array or any unrecognized member widens the whole node to `rawShape`, even when `properties` is present; no member is dropped to narrow the union. The distinct-name count is checked against `INFER_BREADTH_LIMIT`; the recognized vocabulary fits below that cap, so repeated names do not exhaust it. This is runtime conversion support: the declared `JSONSchema.type` remains a single name because direct raw-schema validation supports only that vocabulary. (5) `type: 'string'/'number'/'integer'/'boolean'/'null'` → the matching primitive shape, with `minLength`/`maxLength`/`minimum`/`maximum` bounds kept only when well-formed and non-contradictory (a malformed or `min > max` pair drops to unbounded — widening, never narrowing). (6) `type: 'array'` → `arrayShape`, recursing into a record-valued `items` (else `rawShape`), with `minItems`/`maxItems` bounds. (7) `type: 'object'` (or no `type`/`enum`/`oneOf`/`anyOf` but a record `properties`) → `objectShape`: a property not listed in `required` is wrapped `optionalShape`; `additionalProperties: false` closes, a record value recurses into it (`objectShape` validates extras against that shape directly — no widening needed), and `true` / ABSENT / anything malformed leaves it open (`true`) — absent matches JSON Schema's own default, and `valueToSchema` / `samplesToSchema` always emit the keyword explicitly, so an absent value only arises from a hand-written schema. When `properties` has MORE keys than `INFER_BREADTH_LIMIT`, the schema's own `additionalProperties` is OVERRIDDEN and forced open (`true`) regardless of `false` or a record value — a key dropped past the sampling cap was never checked against a closed or record-valued rest shape, so forcing the object open is the only sound widening — mirroring the inferers' own `truncated ? true : !closed` rule. (8) Everything else — `{}`, an unrecognized `type`, exhausted depth (`INFER_DEPTH_LIMIT`), or a cyclic re-encounter — widens to `rawShape` (NOT `jsonShape`: `{}` is JSON Schema’s accept-anything schema, and `rawShape` is its exact inverse — its guard accepts every defined value and it re-emits `{}` verbatim, whereas `jsonShape`’s `isJSONValue` guard would reject the exotic originals (`Map`, `Set`, a class instance, a function, `NaN`) whose inferred schema is exactly `{}`). A `WeakMap` memo (keyed by schema-node identity + remaining depth), mirroring the inferers, guards a shared-reference schema DAG against exponential re-conversion. **Its key does not carry the active-ancestor set, and that is observable**: a node first reached through a CYCLIC path is cached with the shape it widened to at the back-edge, and a later ACYCLIC path is served that cached shape instead of descending further. Two schemas differing only in which sibling holds the cyclic node therefore convert to different shapes. Every such difference is a WIDENING — an accept-anything `rawShape` — so no value is wrongly rejected and the round-trip law is unaffected; what it costs is determinism ACROSS graphs, not within one, since the same input always converts the same way. This is stated as a limit rather than repaired because both repairs (dropping the ancestor set, or threading a cycle-affected flag through three public signatures) change the published surface.
|
|
477
477
|
|
|
478
478
|
**Round-trip law:** for any READABLE value `v` — including `NaN`, `±Infinity`, a `Map`, a `Set`, a class instance, a function, a symbol, a bigint, and readable cyclic hosts — `compileGuard(schemaToShape(valueToSchema(v)))(v) === true`, with widening as the ONLY source of looseness, never narrowing. An unreadable host is refused before the law produces a schema. The law otherwise retains its three limits: JSON absence, `Date` serialization, and unstable reads between inference and validation. A widened node cannot be auto-generated: `createContract(schemaToShape(x)).generate()` throws when the conversion widened anywhere; its parser returns `undefined` for readable invalid input and propagates the shared coded refusal when a required read fails.
|
|
479
479
|
|
|
@@ -129,7 +129,7 @@ directly.
|
|
|
129
129
|
| `extractSourceLines` | function | `(source: string) => readonly SourceLine[]` | Extracts aligned physical source-line records in one character traversal. Real line and block comments and complete template tokens become spaces in `SourceLine.code`, while ordinary code, quoted strings, and recognized regex literals retain their columns. Genuine JSDoc opened from reflection code is retained span by span at its exact physical column in `SourceLine.jsdoc`; faux openers in comments and templates are excluded. Membership remains each consumer's separate anchored grammar. |
|
|
130
130
|
| `extractExports` | function | `(source: string) => readonly SurfaceSymbol[]` | Extracts the module-scope exports declared in one file's source text — the declaration keys `collectKeys` reports, each split back into the keyword and name that built it, deduped by (keyword, name). |
|
|
131
131
|
| `extractHidden` | function | `(source: string) => readonly SurfaceSymbol[]` | Extracts the module-scope declarations lacking the `export` keyword in one file's source text — the mirror image of `extractExports`'s grammar, anchored the same way (column 0, so an indented inner declaration never matches). |
|
|
132
|
-
| `joinHead` | function | `(lines: readonly string[], start: number) => DeclarationHead \| undefined` | Joins the declaration head starting at `start` into one space-separated line, consuming lines until the first that ends with `{`.
|
|
132
|
+
| `joinHead` | function | `(lines: readonly string[], start: number) => DeclarationHead \| undefined` | Joins the declaration head starting at `start` into one space-separated line, consuming lines until the first that opens a body: one that ends with `{`, or one that closes an empty body with `{}` or `{ }`. |
|
|
133
133
|
| `escapeRegExp` | function | `(value: string) => string` | Escapes every regex metacharacter in a literal string so it reads as text inside a larger `RegExp` source rather than as syntax. |
|
|
134
134
|
| `collectDeclarations` | function | `(source: string) => ReadonlyMap<string, Declaration>` | Collects every `export class` / `export interface` declaration one file's source text declares, each keyed `${keyword} ${name}` and carrying the body lines and the base identifiers read from its own head, so a body and a heritage clause always come from the same declaration. |
|
|
135
135
|
| `extractDeclaration` | function | `(source: string, keyword: DeclarationKeyword, name: string) => Declaration \| undefined` | Locates the named `export class` / `export interface` declaration in one file's source text and returns its body lines and its base identifiers read from that one head, so a body and a heritage clause always come from the same declaration, or `undefined` when the file declares no such head. |
|
|
@@ -577,7 +577,9 @@ keyed `${keyword} ${name}`. One collector is what keeps a body and a heritage cl
|
|
|
577
577
|
declaration. The identifier is the head's own run up to its generic parameter list or its heritage
|
|
578
578
|
clause, so it enters the key as literal text: a name carrying a regex metacharacter reaches no
|
|
579
579
|
`RegExp`, and a lookup of that name matches the character rather than a wildcard. A head that opens
|
|
580
|
-
no column-zero close records nothing,
|
|
580
|
+
no column-zero close records nothing, a head whose last line closes its own body with `{}` or
|
|
581
|
+
`{ }` records an empty body, and a later head of a key already collected adds nothing unless the
|
|
582
|
+
earlier head recorded neither a body nor bases, which the later head then replaces.
|
|
581
583
|
`extractDeclaration` is the named lookup over that map: it spells the `${keyword} ${name}` key so a
|
|
582
584
|
consumer reading one name never writes that convention, and it collects the file afresh on every
|
|
583
585
|
call. A consumer reading many names from one file calls `collectDeclarations` once and reads the
|
|
@@ -592,12 +594,15 @@ reads as `Base`, and a class's `implements` clause is excluded. `Source.methods(
|
|
|
592
594
|
located declaration's own members with those of every declaration it extends, following each base
|
|
593
595
|
through the same module scope and keeping the keyword it started from — an interface chain resolves
|
|
594
596
|
through interfaces, a class chain through classes, so an interface extending a name only a class
|
|
595
|
-
declares gets nothing from it. One declaration answers
|
|
596
|
-
in sorted key order, and the first one whose located head has a body or has bases supplies
|
|
597
|
-
members and the bases; a head with neither a body nor bases does not count as declared, so
|
|
598
|
-
`export interface X {}` is skipped and the scan continues to a later file
|
|
599
|
-
|
|
600
|
-
|
|
597
|
+
declares gets nothing from it. One declaration answers under each keyword: the module scope's files
|
|
598
|
+
are read in sorted key order, and the first one whose located head has a body or has bases supplies
|
|
599
|
+
both the members and the bases; a head with neither a body nor bases does not count as declared, so
|
|
600
|
+
an empty `export interface X {}` is skipped and the scan continues to a later file, and a second
|
|
601
|
+
file declaring the same name under that keyword adds nothing. The interface answers for a name, and
|
|
602
|
+
the class answers when no interface declares it. Where one file declares a name as both an interface
|
|
603
|
+
and a class, which TypeScript merges into one type, both answer: each shape's own members come ahead
|
|
604
|
+
of inherited ones, the interface's own first. Shapes from two files stay separate declarations, and
|
|
605
|
+
Parity lets the class of a merge the barrel exports answer for its interface half. The inventory is the further bound: a base the selected directories do not declare, whether it is
|
|
601
606
|
imported from another package or written as a qualified name such as `external.Store`, contributes
|
|
602
607
|
no members and is not an error, and one visited set per call collapses a cycle and a diamond to a
|
|
603
608
|
single visit. `Source.examples(name)` is deliberately asymmetric with it — it reads only the named
|
package/dist/host/manifest.json
CHANGED
|
@@ -280,7 +280,7 @@
|
|
|
280
280
|
"storage": "agents/skills/orkestrel-harden/scripts/discovery.ts",
|
|
281
281
|
"destination": ".agents/skills/orkestrel-harden/scripts/discovery.ts",
|
|
282
282
|
"executable": false,
|
|
283
|
-
"digest": "
|
|
283
|
+
"digest": "06128d912f79de527522075e7ebb3ccf24be864fad1015f4db5e456744201f7d"
|
|
284
284
|
},
|
|
285
285
|
{
|
|
286
286
|
"storage": "agents/skills/orkestrel-journey/SKILL.md",
|
|
@@ -496,7 +496,7 @@
|
|
|
496
496
|
"storage": "claude/agents/orkestrel.md",
|
|
497
497
|
"destination": ".claude/agents/orkestrel.md",
|
|
498
498
|
"executable": false,
|
|
499
|
-
"digest": "
|
|
499
|
+
"digest": "565dee392dced6c3e1e632295739eeb9465ca4828d26c18d02b57f106fdc5f38"
|
|
500
500
|
},
|
|
501
501
|
{
|
|
502
502
|
"storage": "claude/agents/planner.md",
|
|
@@ -538,7 +538,7 @@
|
|
|
538
538
|
"storage": "claude/rules/architecture.md",
|
|
539
539
|
"destination": ".claude/rules/architecture.md",
|
|
540
540
|
"executable": false,
|
|
541
|
-
"digest": "
|
|
541
|
+
"digest": "5fb146c532f74910f5afa88070a7da03fd782c2f420f07d9581d2635d768807b"
|
|
542
542
|
},
|
|
543
543
|
{
|
|
544
544
|
"storage": "claude/rules/browser.md",
|
|
@@ -556,7 +556,7 @@
|
|
|
556
556
|
"storage": "claude/rules/names.md",
|
|
557
557
|
"destination": ".claude/rules/names.md",
|
|
558
558
|
"executable": false,
|
|
559
|
-
"digest": "
|
|
559
|
+
"digest": "6606f4f8b219c6631029235f4081f29b055952a635e76477dfd6febdbe61afe2"
|
|
560
560
|
},
|
|
561
561
|
{
|
|
562
562
|
"storage": "claude/rules/patterns.md",
|
|
@@ -772,7 +772,7 @@
|
|
|
772
772
|
"storage": "configs/policy.ts",
|
|
773
773
|
"destination": "configs/policy.ts",
|
|
774
774
|
"executable": false,
|
|
775
|
-
"digest": "
|
|
775
|
+
"digest": "bf4ba1f29a04040f9bf953ad4641af08a2b0662e2dd6d6f8f3d7ae8282587158"
|
|
776
776
|
},
|
|
777
777
|
{
|
|
778
778
|
"storage": "cursor/mcp.json",
|
|
@@ -826,7 +826,7 @@
|
|
|
826
826
|
"storage": "dotfiles/oxlintrc.json",
|
|
827
827
|
"destination": ".oxlintrc.json",
|
|
828
828
|
"executable": false,
|
|
829
|
-
"digest": "
|
|
829
|
+
"digest": "043a5c3eb0fb52d6cd841590e77c94ce03797b4b6a742fd57127bc9b9242153c"
|
|
830
830
|
},
|
|
831
831
|
{
|
|
832
832
|
"storage": "dotfiles/prettierignore",
|
|
@@ -862,7 +862,7 @@
|
|
|
862
862
|
"storage": "guides/browser.md",
|
|
863
863
|
"destination": "guides/browser.md",
|
|
864
864
|
"executable": false,
|
|
865
|
-
"digest": "
|
|
865
|
+
"digest": "4dd8f7377b165d840dd3060f0af955458fff193612f833aadd04d37c34734afe"
|
|
866
866
|
},
|
|
867
867
|
{
|
|
868
868
|
"storage": "guides/budget.md",
|
|
@@ -886,7 +886,7 @@
|
|
|
886
886
|
"storage": "guides/contract.md",
|
|
887
887
|
"destination": "guides/contract.md",
|
|
888
888
|
"executable": false,
|
|
889
|
-
"digest": "
|
|
889
|
+
"digest": "5339c1ba3a1ffe9ffe5415d70bd4868a73f9ef2661c4ce97e22dc8a30054569c"
|
|
890
890
|
},
|
|
891
891
|
{
|
|
892
892
|
"storage": "guides/csv.md",
|
|
@@ -916,7 +916,7 @@
|
|
|
916
916
|
"storage": "guides/guide.md",
|
|
917
917
|
"destination": "guides/guide.md",
|
|
918
918
|
"executable": false,
|
|
919
|
-
"digest": "
|
|
919
|
+
"digest": "4749d6a2a7da1d8d89a8c3ee3b60c5f21fcfb112074db80d7b1a2edcdef93afd"
|
|
920
920
|
},
|
|
921
921
|
{
|
|
922
922
|
"storage": "guides/html.md",
|
|
@@ -1168,7 +1168,7 @@
|
|
|
1168
1168
|
"storage": "tests/config.test.ts",
|
|
1169
1169
|
"destination": "tests/config.test.ts",
|
|
1170
1170
|
"executable": false,
|
|
1171
|
-
"digest": "
|
|
1171
|
+
"digest": "5cb647597fb27442d2be85a75b446805dd33d05b9ca93808595497ab7587387f"
|
|
1172
1172
|
},
|
|
1173
1173
|
{
|
|
1174
1174
|
"storage": "tests/policy.test.ts",
|
|
@@ -2144,5 +2144,5 @@
|
|
|
2144
2144
|
]
|
|
2145
2145
|
}
|
|
2146
2146
|
],
|
|
2147
|
-
"digest": "
|
|
2147
|
+
"digest": "e53117186fbcf5d34fce9dcecef09fc8581335b11561f9ccd264a0d9f7fb52f3"
|
|
2148
2148
|
}
|
|
@@ -36,6 +36,7 @@ import policyPlugin, {
|
|
|
36
36
|
MOCKING_RULE,
|
|
37
37
|
NESTED_RULE,
|
|
38
38
|
PARSER_RULE,
|
|
39
|
+
PLUGIN_RULE,
|
|
39
40
|
POLICY_BANNED_TERMS,
|
|
40
41
|
POLICY_ENDING_GLOBS,
|
|
41
42
|
POLICY_JUDGED_TERMS,
|
|
@@ -1614,6 +1615,12 @@ createSomething({
|
|
|
1614
1615
|
code: 'const COUNT = 1',
|
|
1615
1616
|
errors: [{ messageId: 'hidden' }],
|
|
1616
1617
|
},
|
|
1618
|
+
{
|
|
1619
|
+
name: 'rejects a hidden plugin factory [membership: declarations in a centralized file without an export]',
|
|
1620
|
+
filename: 'src/worker/plugins.ts',
|
|
1621
|
+
code: 'function createModalPlugin(): void {}',
|
|
1622
|
+
errors: [{ messageId: 'hidden' }],
|
|
1623
|
+
},
|
|
1617
1624
|
],
|
|
1618
1625
|
})
|
|
1619
1626
|
|
|
@@ -1721,6 +1728,11 @@ createSomething({
|
|
|
1721
1728
|
filename: 'src/worker/helpers.ts',
|
|
1722
1729
|
code: 'export function buildValue(): void {}',
|
|
1723
1730
|
},
|
|
1731
|
+
{
|
|
1732
|
+
name: 'accepts a plugin factory in plugins.ts',
|
|
1733
|
+
filename: 'src/worker/plugins.ts',
|
|
1734
|
+
code: 'export function createModalPlugin(): void {}',
|
|
1735
|
+
},
|
|
1724
1736
|
{
|
|
1725
1737
|
name: 'accepts a module in a registered function domain',
|
|
1726
1738
|
filename: 'app/browser/composables/useTheme.ts',
|
|
@@ -1871,6 +1883,18 @@ createSomething({
|
|
|
1871
1883
|
code: 'export const coerceValue = () => undefined',
|
|
1872
1884
|
errors: [{ messageId: 'parser' }],
|
|
1873
1885
|
},
|
|
1886
|
+
{
|
|
1887
|
+
name: 'rejects an unprefixed export alias [membership: parsers.ts functions whose name does not start with parse]',
|
|
1888
|
+
filename: 'app/edge/parsers.ts',
|
|
1889
|
+
code: 'function parseValue(): void {}\nexport { parseValue as coerceValue }',
|
|
1890
|
+
errors: [{ messageId: 'parser' }],
|
|
1891
|
+
},
|
|
1892
|
+
{
|
|
1893
|
+
name: 'rejects an unprefixed exported import alias [membership: parsers.ts functions whose name does not start with parse]',
|
|
1894
|
+
filename: 'app/edge/parsers.ts',
|
|
1895
|
+
code: 'export import coerceValue = Values.parseValue',
|
|
1896
|
+
errors: [{ messageId: 'parser' }],
|
|
1897
|
+
},
|
|
1874
1898
|
],
|
|
1875
1899
|
})
|
|
1876
1900
|
|
|
@@ -1900,6 +1924,150 @@ createSomething({
|
|
|
1900
1924
|
code: 'export const buildValue = () => undefined',
|
|
1901
1925
|
errors: [{ messageId: 'factory' }],
|
|
1902
1926
|
},
|
|
1927
|
+
{
|
|
1928
|
+
name: 'rejects an unprefixed export alias [membership: factories.ts functions whose name does not start with create]',
|
|
1929
|
+
filename: 'app/edge/factories.ts',
|
|
1930
|
+
code: 'function createValue(): void {}\nexport { createValue as buildValue }',
|
|
1931
|
+
errors: [{ messageId: 'factory' }],
|
|
1932
|
+
},
|
|
1933
|
+
{
|
|
1934
|
+
name: 'rejects an unprefixed exported import alias [membership: factories.ts functions whose name does not start with create]',
|
|
1935
|
+
filename: 'app/edge/factories.ts',
|
|
1936
|
+
code: 'export import buildValue = Values.createValue',
|
|
1937
|
+
errors: [{ messageId: 'factory' }],
|
|
1938
|
+
},
|
|
1939
|
+
],
|
|
1940
|
+
})
|
|
1941
|
+
|
|
1942
|
+
tester.run('no-misnamed-plugin', PLUGIN_RULE, {
|
|
1943
|
+
valid: [
|
|
1944
|
+
{
|
|
1945
|
+
name: 'accepts a create-prefixed plugin factory',
|
|
1946
|
+
filename: 'src/edge/plugins.ts',
|
|
1947
|
+
code: 'export function createModalPlugin(): void {}',
|
|
1948
|
+
},
|
|
1949
|
+
{
|
|
1950
|
+
name: 'accepts a create-prefixed plugin collection factory',
|
|
1951
|
+
filename: 'src/edge/plugins.ts',
|
|
1952
|
+
code: 'export const createBootstrapPlugins = () => undefined',
|
|
1953
|
+
},
|
|
1954
|
+
{
|
|
1955
|
+
name: 'accepts a plugin-suffixed name outside plugins.ts',
|
|
1956
|
+
filename: 'src/edge/helpers.ts',
|
|
1957
|
+
code: 'export function registerPlugin(): void {}',
|
|
1958
|
+
},
|
|
1959
|
+
{
|
|
1960
|
+
name: 'reads no binding nested inside a plugin factory',
|
|
1961
|
+
filename: 'src/edge/plugins.ts',
|
|
1962
|
+
code: 'export function createModalPlugin(): void {\n\tfunction build(): void {}\n\tbuild()\n}',
|
|
1963
|
+
},
|
|
1964
|
+
{
|
|
1965
|
+
name: 'accepts an export specifier in the plugin form',
|
|
1966
|
+
filename: 'src/edge/plugins.ts',
|
|
1967
|
+
code: 'function createModalPlugin(): void {}\nexport { createModalPlugin as createDialogPlugin }',
|
|
1968
|
+
},
|
|
1969
|
+
{
|
|
1970
|
+
name: 'accepts an exported import alias in the plugin form',
|
|
1971
|
+
filename: 'src/edge/plugins.ts',
|
|
1972
|
+
code: 'export import createDialogPlugin = Factories.createModalPlugin',
|
|
1973
|
+
},
|
|
1974
|
+
{
|
|
1975
|
+
name: 'accepts an exported import alias outside plugins.ts',
|
|
1976
|
+
filename: 'src/edge/helpers.ts',
|
|
1977
|
+
code: 'export import registerModal = Factories.createModalPlugin',
|
|
1978
|
+
},
|
|
1979
|
+
],
|
|
1980
|
+
invalid: [
|
|
1981
|
+
{
|
|
1982
|
+
name: 'rejects a plugin-suffixed name without the create prefix [membership: plugins.ts functions whose name is not create…Plugin or create…Plugins]',
|
|
1983
|
+
filename: 'src/edge/plugins.ts',
|
|
1984
|
+
code: 'export function registerModalPlugin(): void {}',
|
|
1985
|
+
errors: [{ messageId: 'plugin' }],
|
|
1986
|
+
},
|
|
1987
|
+
{
|
|
1988
|
+
name: 'rejects a lowercase segment before the plugin suffix [membership: plugins.ts functions whose name is not create…Plugin or create…Plugins]',
|
|
1989
|
+
filename: 'src/edge/plugins.ts',
|
|
1990
|
+
code: 'export function createmodalPlugin(): void {}',
|
|
1991
|
+
errors: [{ messageId: 'plugin' }],
|
|
1992
|
+
},
|
|
1993
|
+
{
|
|
1994
|
+
name: 'rejects a name that runs past the plugin suffix [membership: plugins.ts functions whose name is not create…Plugin or create…Plugins]',
|
|
1995
|
+
filename: 'src/edge/plugins.ts',
|
|
1996
|
+
code: 'export function createModalPluginHost(): void {}',
|
|
1997
|
+
errors: [{ messageId: 'plugin' }],
|
|
1998
|
+
},
|
|
1999
|
+
{
|
|
2000
|
+
name: 'rejects a plugin factory with no entity segment [membership: plugins.ts functions whose name is not create…Plugin or create…Plugins]',
|
|
2001
|
+
filename: 'src/edge/plugins.ts',
|
|
2002
|
+
code: 'export function createPlugin(): void {}',
|
|
2003
|
+
errors: [{ messageId: 'plugin' }],
|
|
2004
|
+
},
|
|
2005
|
+
{
|
|
2006
|
+
name: 'rejects a misnamed declared signature [membership: plugins.ts functions whose name is not create…Plugin or create…Plugins]',
|
|
2007
|
+
filename: 'src/edge/plugins.ts',
|
|
2008
|
+
code: 'export declare function registerModal(): void',
|
|
2009
|
+
errors: [{ messageId: 'plugin' }],
|
|
2010
|
+
},
|
|
2011
|
+
{
|
|
2012
|
+
name: 'rejects an anonymous default function [membership: plugins.ts functions whose name is not create…Plugin or create…Plugins]',
|
|
2013
|
+
filename: 'src/edge/plugins.ts',
|
|
2014
|
+
code: 'export default function (): void {}',
|
|
2015
|
+
errors: [{ messageId: 'plugin' }],
|
|
2016
|
+
},
|
|
2017
|
+
{
|
|
2018
|
+
name: 'rejects an export alias outside the plugin form [membership: plugins.ts functions whose name is not create…Plugin or create…Plugins]',
|
|
2019
|
+
filename: 'src/edge/plugins.ts',
|
|
2020
|
+
code: 'function createModalPlugin(): void {}\nexport { createModalPlugin as registerModal }',
|
|
2021
|
+
errors: [{ messageId: 'plugin' }],
|
|
2022
|
+
},
|
|
2023
|
+
{
|
|
2024
|
+
name: 'rejects a re-export outside the plugin form [membership: plugins.ts functions whose name is not create…Plugin or create…Plugins]',
|
|
2025
|
+
filename: 'src/edge/plugins.ts',
|
|
2026
|
+
code: "export { registerModal } from './modal.js'",
|
|
2027
|
+
errors: [{ messageId: 'plugin' }],
|
|
2028
|
+
},
|
|
2029
|
+
{
|
|
2030
|
+
name: 'rejects a star re-export whose names the form cannot read [membership: plugins.ts functions whose name is not create…Plugin or create…Plugins]',
|
|
2031
|
+
filename: 'src/edge/plugins.ts',
|
|
2032
|
+
code: "export * from './modal.js'",
|
|
2033
|
+
errors: [{ messageId: 'plugin' }],
|
|
2034
|
+
},
|
|
2035
|
+
{
|
|
2036
|
+
name: 'rejects a register-prefixed plugin factory [membership: plugins.ts functions whose name is not create…Plugin or create…Plugins]',
|
|
2037
|
+
filename: 'src/edge/plugins.ts',
|
|
2038
|
+
code: 'export function registerModal(): void {}',
|
|
2039
|
+
errors: [{ messageId: 'plugin' }],
|
|
2040
|
+
},
|
|
2041
|
+
{
|
|
2042
|
+
name: 'rejects a create-prefixed name without the plugin suffix [membership: plugins.ts functions whose name is not create…Plugin or create…Plugins]',
|
|
2043
|
+
filename: 'src/edge/plugins.ts',
|
|
2044
|
+
code: 'export const createModal = () => undefined',
|
|
2045
|
+
errors: [{ messageId: 'plugin' }],
|
|
2046
|
+
},
|
|
2047
|
+
{
|
|
2048
|
+
name: 'rejects a bare plugin-suffixed name [membership: plugins.ts functions whose name is not create…Plugin or create…Plugins]',
|
|
2049
|
+
filename: 'src/edge/plugins.ts',
|
|
2050
|
+
code: 'export function modalPlugin(): void {}',
|
|
2051
|
+
errors: [{ messageId: 'plugin' }],
|
|
2052
|
+
},
|
|
2053
|
+
{
|
|
2054
|
+
name: 'rejects a lowercase entity after create [membership: plugins.ts functions whose name is not create…Plugin or create…Plugins]',
|
|
2055
|
+
filename: 'src/edge/plugins.ts',
|
|
2056
|
+
code: 'export function createplugin(): void {}',
|
|
2057
|
+
errors: [{ messageId: 'plugin' }],
|
|
2058
|
+
},
|
|
2059
|
+
{
|
|
2060
|
+
name: 'rejects an underscore in the entity segment [membership: plugins.ts functions whose name is not create…Plugin or create…Plugins]',
|
|
2061
|
+
filename: 'src/edge/plugins.ts',
|
|
2062
|
+
code: 'export function createModal_Plugin(): void {}',
|
|
2063
|
+
errors: [{ messageId: 'plugin' }],
|
|
2064
|
+
},
|
|
2065
|
+
{
|
|
2066
|
+
name: 'rejects an exported import alias outside the plugin form [membership: plugins.ts functions whose name is not create…Plugin or create…Plugins]',
|
|
2067
|
+
filename: 'src/edge/plugins.ts',
|
|
2068
|
+
code: 'export import registerModal = Factories.createModalPlugin',
|
|
2069
|
+
errors: [{ messageId: 'plugin' }],
|
|
2070
|
+
},
|
|
1903
2071
|
],
|
|
1904
2072
|
})
|
|
1905
2073
|
|
|
@@ -2385,6 +2553,12 @@ createSomething({
|
|
|
2385
2553
|
expect(CENTRAL_SOURCE_FILES).toContain('handlers.ts')
|
|
2386
2554
|
})
|
|
2387
2555
|
|
|
2556
|
+
it('registers plugins as a central function kind', () => {
|
|
2557
|
+
expect(FUNCTION_SOURCE_FILES).toContain('plugins.ts')
|
|
2558
|
+
expect(CENTRAL_SOURCE_FILES).toContain('plugins.ts')
|
|
2559
|
+
expect(DATA_SOURCE_FILES).not.toContain('plugins.ts')
|
|
2560
|
+
})
|
|
2561
|
+
|
|
2388
2562
|
it('matches every isolated import pattern with refused and admitted fixtures', () => {
|
|
2389
2563
|
const fixture = createPolicyScratch({ prefix: 'propagation-patterns-' })
|
|
2390
2564
|
const scratch = fixture.path
|
|
@@ -2734,6 +2908,7 @@ createSomething({
|
|
|
2734
2908
|
)
|
|
2735
2909
|
scratch.write('src/violations/parsers.ts', 'export function coerceValue(): void {}\n')
|
|
2736
2910
|
scratch.write('src/violations/factories.ts', 'export function buildValue(): void {}\n')
|
|
2911
|
+
scratch.write('src/violations/plugins.ts', 'export function registerModal(): void {}\n')
|
|
2737
2912
|
scratch.write('src/violations/constants.ts', 'export const values = []\n')
|
|
2738
2913
|
scratch.write('src/violations/composables.ts', "export const READY = 'yes'\n")
|
|
2739
2914
|
scratch.write('app/browser/composables/useTheme.ts', 'export function useMode(): void {}\n')
|
|
@@ -2837,6 +3012,7 @@ createSomething({
|
|
|
2837
3012
|
{ code: 'policy(no-hidden-declaration)', filename: 'src/violations/helpers.ts' },
|
|
2838
3013
|
{ code: 'policy(no-misnamed-parser)', filename: 'src/violations/parsers.ts' },
|
|
2839
3014
|
{ code: 'policy(no-misnamed-factory)', filename: 'src/violations/factories.ts' },
|
|
3015
|
+
{ code: 'policy(no-misnamed-plugin)', filename: 'src/violations/plugins.ts' },
|
|
2840
3016
|
{ code: 'policy(no-malformed-constant)', filename: 'src/violations/constants.ts' },
|
|
2841
3017
|
{ code: 'policy(no-malformed-domain)', filename: 'src/violations/composables.ts' },
|
|
2842
3018
|
{
|
package/dist/src/core/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@ let _orkestrel_template = require("@orkestrel/template");
|
|
|
4
4
|
let _orkestrel_emitter = require("@orkestrel/emitter");
|
|
5
5
|
var package_default = {
|
|
6
6
|
name: "@orkestrel/scaffold",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.88",
|
|
8
8
|
description: "Scaffold workspaces with commands: new, audit, repair, catalog, and overwrite.",
|
|
9
9
|
keywords: [
|
|
10
10
|
"audit",
|
|
@@ -103,8 +103,8 @@ var package_default = {
|
|
|
103
103
|
},
|
|
104
104
|
devDependencies: {
|
|
105
105
|
"@microsoft/api-extractor": "^7.59.3",
|
|
106
|
-
"@orkestrel/browser": "^0.0.
|
|
107
|
-
"@orkestrel/guide": "^0.0.
|
|
106
|
+
"@orkestrel/browser": "^0.0.21",
|
|
107
|
+
"@orkestrel/guide": "^0.0.24",
|
|
108
108
|
"@orkestrel/html": "^0.0.12",
|
|
109
109
|
"@orkestrel/probe": "^0.0.19",
|
|
110
110
|
"@orkestrel/test": "^0.0.24",
|
|
@@ -900,6 +900,7 @@ function isNamedPlugin(plugin: PluginOption): plugin is { name: string } {
|
|
|
900
900
|
instances: [{ browser: 'chromium', headless: true }],
|
|
901
901
|
},
|
|
902
902
|
fileParallelism: false,
|
|
903
|
+
sequence: { groupOrder: 1 },
|
|
903
904
|
},
|
|
904
905
|
}
|
|
905
906
|
return mergeOverride(project, override)
|
|
@@ -959,6 +960,7 @@ export function srcVue(override?: UserConfig): UserConfig {
|
|
|
959
960
|
instances: [{ browser: 'chromium', headless: true }],
|
|
960
961
|
},
|
|
961
962
|
fileParallelism: false,
|
|
963
|
+
sequence: { groupOrder: 1 },
|
|
962
964
|
},
|
|
963
965
|
}
|
|
964
966
|
return mergeOverride(project, override)
|
|
@@ -1001,6 +1003,7 @@ export function srcBrowser(override?: UserConfig): UserConfig {
|
|
|
1001
1003
|
instances: [{ browser: 'chromium', headless: true }],
|
|
1002
1004
|
},
|
|
1003
1005
|
fileParallelism: false,
|
|
1006
|
+
sequence: { groupOrder: 1 },
|
|
1004
1007
|
},
|
|
1005
1008
|
}
|
|
1006
1009
|
return mergeOverride(project, override)
|
|
@@ -1135,6 +1138,7 @@ export function srcBin(override?: UserConfig): UserConfig {
|
|
|
1135
1138
|
instances: [{ browser: 'chromium', headless: true }],
|
|
1136
1139
|
},
|
|
1137
1140
|
fileParallelism: false,
|
|
1141
|
+
sequence: { groupOrder: 1 },
|
|
1138
1142
|
},
|
|
1139
1143
|
}
|
|
1140
1144
|
return mergeOverride(project, override)
|
|
@@ -1428,6 +1432,7 @@ export function service(override?: UserConfig): UserConfig {
|
|
|
1428
1432
|
testTimeout: 120_000,
|
|
1429
1433
|
hookTimeout: 120_000,
|
|
1430
1434
|
fileParallelism: false,
|
|
1435
|
+
sequence: { groupOrder: 1 },
|
|
1431
1436
|
},
|
|
1432
1437
|
}
|
|
1433
1438
|
return mergeOverride(project, override)
|
|
@@ -1444,6 +1449,7 @@ export function service(override?: UserConfig): UserConfig {
|
|
|
1444
1449
|
testTimeout: 120_000,
|
|
1445
1450
|
hookTimeout: 120_000,
|
|
1446
1451
|
fileParallelism: false,
|
|
1452
|
+
sequence: { groupOrder: 1 },
|
|
1447
1453
|
},
|
|
1448
1454
|
}
|
|
1449
1455
|
return mergeOverride(project, override)
|
|
@@ -1464,6 +1470,7 @@ export function probe(override?: UserConfig): UserConfig {
|
|
|
1464
1470
|
environment: 'node',
|
|
1465
1471
|
browser: { enabled: false },
|
|
1466
1472
|
fileParallelism: false,
|
|
1473
|
+
sequence: { groupOrder: 1 },
|
|
1467
1474
|
pool: 'threads',
|
|
1468
1475
|
benchmark: { include: ['tmp/probes/**/*.test.ts', 'tests/**/*.test.ts'] },
|
|
1469
1476
|
},
|