@prestack/thread 0.0.3 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/CHANGELOG.md +98 -0
  2. package/dist/core/{asking.d.ts → answers.d.ts} +6 -14
  3. package/dist/core/{asking.js → answers.js} +13 -332
  4. package/dist/core/{asking.ts → answers.ts} +14 -357
  5. package/dist/core/attach.js +2 -2
  6. package/dist/core/attach.ts +2 -3
  7. package/dist/core/chain.js +4 -11
  8. package/dist/core/chain.ts +4 -3
  9. package/dist/core/client.d.ts +57 -0
  10. package/dist/core/client.js +186 -0
  11. package/dist/core/client.ts +227 -0
  12. package/dist/core/descend.d.ts +2 -0
  13. package/dist/core/descend.js +109 -16
  14. package/dist/core/descend.ts +120 -16
  15. package/dist/core/files.d.ts +45 -0
  16. package/dist/core/files.js +95 -0
  17. package/dist/core/files.ts +137 -0
  18. package/dist/core/init.d.ts +1 -0
  19. package/dist/core/init.js +10 -2
  20. package/dist/core/init.ts +8 -2
  21. package/dist/core/invoked.js +1 -1
  22. package/dist/core/invoked.ts +1 -1
  23. package/dist/core/rows.d.ts +2 -0
  24. package/dist/core/rows.js +65 -0
  25. package/dist/core/rows.ts +58 -0
  26. package/dist/core/tree.js +1 -1
  27. package/dist/core/tree.ts +1 -1
  28. package/dist/derivation/attach.js +0 -12
  29. package/dist/derivation/attach.ts +0 -12
  30. package/dist/derivation/generators/build.js +8 -7
  31. package/dist/derivation/generators/build.ts +8 -7
  32. package/dist/derivation/generators/release.d.ts +1 -1
  33. package/dist/derivation/generators/release.js +15 -23
  34. package/dist/derivation/generators/release.ts +15 -15
  35. package/dist/integrations/attach.js +1 -19
  36. package/dist/integrations/attach.ts +1 -19
  37. package/dist/integrations/generators/read.js +2 -2
  38. package/dist/integrations/generators/read.ts +4 -4
  39. package/dist/integrations/generators/vault.js +4 -12
  40. package/dist/integrations/generators/vault.ts +4 -4
  41. package/dist/integrations/module.js +5 -3
  42. package/dist/integrations/module.ts +5 -3
  43. package/dist/integrations/vault.js +5 -5
  44. package/dist/integrations/vault.ts +5 -5
  45. package/dist/integrity/attach.js +0 -12
  46. package/dist/integrity/attach.ts +0 -12
  47. package/dist/integrity/check-threads.js +1 -1
  48. package/dist/integrity/check-threads.ts +1 -1
  49. package/dist/integrity/constraint.d.ts +11 -2
  50. package/dist/integrity/constraint.js +163 -20
  51. package/dist/integrity/constraint.ts +174 -22
  52. package/dist/integrity/generators/compiler.js +1 -1
  53. package/dist/integrity/generators/compiler.ts +1 -1
  54. package/dist/integrity/generators/gate.js +8 -16
  55. package/dist/integrity/generators/gate.ts +8 -7
  56. package/dist/integrity/generators/publish.js +14 -26
  57. package/dist/integrity/generators/publish.ts +14 -17
  58. package/dist/integrity/generators/trial.d.ts +2 -2
  59. package/dist/integrity/generators/trial.js +108 -50
  60. package/dist/integrity/generators/trial.ts +107 -48
  61. package/dist/integrity/lint.js +3 -3
  62. package/dist/integrity/lint.ts +3 -3
  63. package/dist/integrity/lsp/diagnostics.js +1 -1
  64. package/dist/integrity/lsp/diagnostics.ts +1 -1
  65. package/dist/integrity/lsp/lint.js +1 -1
  66. package/dist/integrity/lsp/lint.ts +1 -1
  67. package/dist/integrity/slopnator.d.ts +1 -14
  68. package/dist/integrity/slopnator.js +8 -40
  69. package/dist/integrity/slopnator.ts +9 -51
  70. package/dist/integrity/slopnators/sl_broken_lineage.js +4 -2
  71. package/dist/integrity/slopnators/sl_broken_lineage.ts +4 -2
  72. package/dist/integrity/slopnators/sl_declared_elsewhere.js +24 -3
  73. package/dist/integrity/slopnators/sl_declared_elsewhere.ts +24 -3
  74. package/dist/integrity/slopnators/sl_derived_drift.js +10 -4
  75. package/dist/integrity/slopnators/sl_derived_drift.ts +10 -4
  76. package/dist/integrity/slopnators/sl_inert_island.js +7 -13
  77. package/dist/integrity/slopnators/sl_inert_island.ts +7 -16
  78. package/dist/integrity/slopnators/sl_inert_slopnator.js +8 -8
  79. package/dist/integrity/slopnators/sl_inert_slopnator.ts +8 -8
  80. package/dist/integrity/slopnators/sl_missing_row.js +14 -9
  81. package/dist/integrity/slopnators/sl_missing_row.ts +14 -10
  82. package/dist/integrity/slopnators/sl_no_child_process.js +8 -8
  83. package/dist/integrity/slopnators/sl_no_child_process.ts +8 -8
  84. package/dist/integrity/slopnators/sl_no_import_cycle.js +1 -1
  85. package/dist/integrity/slopnators/sl_no_import_cycle.ts +1 -1
  86. package/dist/integrity/slopnators/sl_no_such_command.js +20 -5
  87. package/dist/integrity/slopnators/sl_no_such_command.ts +22 -5
  88. package/dist/integrity/slopnators/sl_only_takes_a_literal.js +8 -8
  89. package/dist/integrity/slopnators/sl_only_takes_a_literal.ts +8 -8
  90. package/dist/integrity/slopnators/sl_stale_path.js +91 -18
  91. package/dist/integrity/slopnators/sl_stale_path.ts +97 -18
  92. package/dist/integrity/slopnators/sl_twice_meant.js +25 -2
  93. package/dist/integrity/slopnators/sl_twice_meant.ts +28 -2
  94. package/dist/integrity/slopnators/sl_twice_parented.js +26 -5
  95. package/dist/integrity/slopnators/sl_twice_parented.ts +26 -5
  96. package/dist/integrity/slopnators/sl_undeclared_node.js +18 -2
  97. package/dist/integrity/slopnators/sl_undeclared_node.ts +18 -2
  98. package/dist/integrity/slopnators/sl_undeclared_operation.js +3 -1
  99. package/dist/integrity/slopnators/sl_undeclared_operation.ts +3 -1
  100. package/dist/integrity/slopnators/sl_undeclared_variant.js +6 -2
  101. package/dist/integrity/slopnators/sl_undeclared_variant.ts +6 -2
  102. package/dist/integrity/slopnators/sl_ungoverned_island.js +3 -4
  103. package/dist/integrity/slopnators/sl_ungoverned_island.ts +3 -4
  104. package/dist/integrity/slopnators/sl_unkept_rows.js +1 -1
  105. package/dist/integrity/slopnators/sl_unkept_rows.ts +1 -1
  106. package/dist/integrity/slopnators/sl_unpaired_member.js +13 -8
  107. package/dist/integrity/slopnators/sl_unpaired_member.ts +16 -8
  108. package/dist/integrity/slopnators/sl_unpaired_slopnator.js +16 -3
  109. package/dist/integrity/slopnators/sl_unpaired_slopnator.ts +16 -3
  110. package/dist/integrity/slopnators/sl_unthreaded.d.ts +1 -0
  111. package/dist/integrity/slopnators/sl_unthreaded.js +18 -10
  112. package/dist/integrity/slopnators/sl_unthreaded.ts +19 -11
  113. package/dist/integrity/slopnators/sl_untranslated_key.js +1 -1
  114. package/dist/integrity/slopnators/sl_untranslated_key.ts +1 -1
  115. package/dist/integrity/slopnators/sl_unversioned.js +16 -2
  116. package/dist/integrity/slopnators/sl_unversioned.ts +16 -2
  117. package/dist/integrity/sweep.js +17 -3
  118. package/dist/integrity/sweep.ts +20 -3
  119. package/dist/knowledge/attach.js +0 -6
  120. package/dist/knowledge/attach.ts +0 -6
  121. package/dist/knowledge/generators/docsgen.js +12 -3
  122. package/dist/knowledge/generators/docsgen.ts +12 -2
  123. package/dist/knowledge/generators/glossary.js +1 -1
  124. package/dist/knowledge/generators/glossary.ts +1 -1
  125. package/dist/operations/attach.js +2 -26
  126. package/dist/operations/attach.ts +2 -27
  127. package/dist/operations/dispatch.js +2 -3
  128. package/dist/operations/dispatch.ts +2 -3
  129. package/dist/operations/generators/capability.js +4 -7
  130. package/dist/operations/generators/capability.ts +3 -6
  131. package/dist/operations/generators/compile.js +8 -13
  132. package/dist/operations/generators/compile.ts +8 -4
  133. package/dist/operations/generators/permits.js +4 -13
  134. package/dist/operations/generators/permits.ts +3 -3
  135. package/dist/operations/generators/seed.js +5 -2
  136. package/dist/operations/generators/seed.ts +6 -2
  137. package/dist/operations/generators/trial.js +10 -10
  138. package/dist/operations/generators/trial.ts +10 -10
  139. package/dist/operations/http.js +4 -1
  140. package/dist/operations/http.ts +6 -1
  141. package/package.json +2 -2
  142. package/dist/core/cli.d.ts +0 -2
  143. package/dist/core/cli.js +0 -1761
  144. package/dist/core/cli.ts +0 -2004
  145. package/dist/core/generators/meta.d.ts +0 -2
  146. package/dist/core/generators/meta.js +0 -829
  147. package/dist/core/generators/meta.ts +0 -1006
  148. package/dist/derivation/generators/derivation.d.ts +0 -3
  149. package/dist/derivation/generators/derivation.js +0 -273
  150. package/dist/derivation/generators/derivation.ts +0 -347
  151. package/dist/derivation/makers/release.d.ts +0 -1
  152. package/dist/derivation/makers/release.js +0 -107
  153. package/dist/derivation/makers/release.ts +0 -135
  154. package/dist/integrations/generators/secret.d.ts +0 -1
  155. package/dist/integrations/generators/secret.js +0 -233
  156. package/dist/integrations/generators/secret.ts +0 -289
  157. package/dist/integrations/generators/target.d.ts +0 -1
  158. package/dist/integrations/generators/target.js +0 -775
  159. package/dist/integrations/generators/target.ts +0 -944
  160. package/dist/integrity/generators/rule.d.ts +0 -2
  161. package/dist/integrity/generators/rule.js +0 -213
  162. package/dist/integrity/generators/rule.ts +0 -271
  163. package/dist/integrity/generators/seal.d.ts +0 -4
  164. package/dist/integrity/generators/seal.js +0 -101
  165. package/dist/integrity/generators/seal.ts +0 -117
  166. package/dist/integrity/sealed.d.ts +0 -1
  167. package/dist/integrity/sealed.js +0 -56
  168. package/dist/integrity/sealed.ts +0 -56
  169. package/dist/knowledge/generators/skills.d.ts +0 -1
  170. package/dist/knowledge/generators/skills.js +0 -222
  171. package/dist/knowledge/generators/skills.ts +0 -263
  172. package/dist/operations/generators/grant.d.ts +0 -1
  173. package/dist/operations/generators/grant.js +0 -267
  174. package/dist/operations/generators/grant.ts +0 -336
  175. package/dist/operations/generators/operation.d.ts +0 -1
  176. package/dist/operations/generators/operation.js +0 -811
  177. package/dist/operations/generators/operation.ts +0 -972
  178. package/dist/operations/makers/capability.d.ts +0 -1
  179. package/dist/operations/makers/capability.js +0 -117
  180. package/dist/operations/makers/capability.ts +0 -166
  181. package/dist/operations/makers/trial.d.ts +0 -1
  182. package/dist/operations/makers/trial.js +0 -413
  183. package/dist/operations/makers/trial.ts +0 -520
@@ -1,4 +1,4 @@
1
- import { existsSync, readdirSync, statSync } from 'node:fs'
1
+ import { existsSync, readdirSync, statSync } from '../../core/files.ts'
2
2
  import { resolve } from 'node:path'
3
3
 
4
4
  import type { Slopnator } from '../slopnator.ts'
@@ -6,6 +6,8 @@ import { descend } from '../../core/descend.ts'
6
6
  import { findTree } from '../../core/tree.ts'
7
7
 
8
8
  const ROOT = findTree().at
9
+ const TREE = findTree().name
10
+ const canonical = (at: string): string => (at.startsWith('threads/') ? `${TREE}/${at.slice('threads/'.length)}` : at)
9
11
  const NAMES_A_FILE = /\.[a-z]{1,5}$/
10
12
 
11
13
  /*
@@ -51,43 +53,120 @@ const ours = (): ReadonlySet<string> => {
51
53
  }
52
54
  }
53
55
 
56
+ interface Keyed {
57
+ readonly type?: string
58
+ readonly key?: { readonly name?: string; readonly value?: unknown }
59
+ readonly value?: { readonly type?: string }
60
+ readonly properties?: readonly Keyed[]
61
+ }
62
+
63
+ const named = (one: Keyed): string | undefined => one.key?.name ?? (typeof one.key?.value === 'string' ? one.key.value : undefined)
64
+
65
+ function proving(ancestors: readonly unknown[]): boolean {
66
+ for (let at = ancestors.length - 1; at >= 0; at -= 1) {
67
+ const held = ancestors[at] as Keyed
68
+ if (held.type !== 'ObjectExpression') continue
69
+ const properties = held.properties ?? []
70
+ const files = properties.some((one) => named(one) === 'files' && one.value?.type === 'ArrayExpression')
71
+ const where = properties.some((one) => named(one) === 'at' && one.value?.type === 'Literal')
72
+ if (files && where) return true
73
+ }
74
+ return false
75
+ }
76
+
54
77
  export const slopnator: Slopnator = {
55
78
  on: ['Literal'],
56
- holds: (node) => {
79
+ holds: (node, held) => {
80
+ if (proving(held.ancestors())) return false
57
81
  const value = (node as { value?: unknown }).value
58
82
  if (typeof value !== 'string' || !value.includes('/')) return false
59
83
 
84
+ const path = canonical(value)
60
85
  const tops = ours()
61
- if (tops.size === 0 || !tops.has(value.split('/')[0] ?? '')) return false
86
+ if (tops.size === 0 || !tops.has(path.split('/')[0] ?? '')) return false
62
87
 
63
- const brace = value.indexOf('{')
88
+ const brace = path.indexOf('{')
64
89
  if (brace !== -1) {
65
- const cut = value.lastIndexOf('/', brace)
66
- const dir = cut === -1 ? '.' : value.slice(0, cut)
90
+ const cut = path.lastIndexOf('/', brace)
91
+ const dir = cut === -1 ? '.' : path.slice(0, cut)
67
92
  if (statSync(resolve(ROOT, dir), { throwIfNoEntry: false })?.isDirectory() === true) return false
68
93
  return `\`${value}\` writes into \`${dir}\`, which is not a directory on disk`
69
94
  }
70
95
 
71
- if (!NAMES_A_FILE.test(value)) return false
72
- if (existsSync(resolve(ROOT, value))) return false
73
- if (derived.has(value)) return false
96
+ if (!NAMES_A_FILE.test(path)) return false
97
+ if (existsSync(resolve(ROOT, path))) return false
98
+ if (derived.has(path)) return false
74
99
  return `\`${value}\` is not on disk`
75
100
  },
76
101
  proves: {
77
102
  wrong: [
78
- "const at = 'threads/nope.ts'",
79
- "const at = 'scripts/gone.ts'",
80
- "const at = 'docs/nowhere/{page}.md'",
81
- "const at = 'migrations/gone.sql'",
82
- "const at = 'plans/gone.md'",
103
+ {
104
+ files: [
105
+ { at: 'threads/_probe_there.ts', source: 'export const THERE = 1\n' },
106
+ { at: 'probe.tsx', source: "const at = 'threads/nope.ts'\n" },
107
+ ],
108
+ at: 'probe.tsx',
109
+ },
110
+ {
111
+ files: [
112
+ { at: 'scripts/_probe_there.ts', source: 'export const THERE = 1\n' },
113
+ { at: 'probe.tsx', source: "const at = 'scripts/gone.ts'\n" },
114
+ ],
115
+ at: 'probe.tsx',
116
+ },
117
+ {
118
+ files: [
119
+ { at: 'docs/_probe_there.md', source: 'there\n' },
120
+ { at: 'probe.tsx', source: "const at = 'docs/nowhere/{page}.md'\n" },
121
+ ],
122
+ at: 'probe.tsx',
123
+ },
124
+ {
125
+ files: [
126
+ { at: 'migrations/_probe_there.sql', source: 'select 1;\n' },
127
+ { at: 'probe.tsx', source: "const at = 'migrations/gone.sql'\n" },
128
+ ],
129
+ at: 'probe.tsx',
130
+ },
131
+ {
132
+ files: [
133
+ { at: 'plans/_probe_there.md', source: 'there\n' },
134
+ { at: 'probe.tsx', source: "const at = 'plans/gone.md'\n" },
135
+ ],
136
+ at: 'probe.tsx',
137
+ },
83
138
  ],
84
139
  right: [
85
- "const at = 'packages/core/integrity/src/constraint.ts'",
86
- "const at = 'packages/core/integrity/src/lint.ts'",
87
- "const at = 'docs/reference/{page}.md'",
140
+ {
141
+ files: [
142
+ { at: 'packages/core/integrity/src/constraint.ts', source: 'export const CONSTRAINTS = []\n' },
143
+ { at: 'probe.tsx', source: "const at = 'packages/core/integrity/src/constraint.ts'\n" },
144
+ ],
145
+ at: 'probe.tsx',
146
+ },
147
+ {
148
+ files: [
149
+ { at: 'packages/core/integrity/src/lint.ts', source: 'export const plugin = {}\n' },
150
+ { at: 'probe.tsx', source: "const at = 'packages/core/integrity/src/lint.ts'\n" },
151
+ ],
152
+ at: 'probe.tsx',
153
+ },
154
+ {
155
+ files: [
156
+ { at: 'docs/reference/_probe_there.md', source: 'there\n' },
157
+ { at: 'probe.tsx', source: "const at = 'docs/reference/{page}.md'\n" },
158
+ ],
159
+ at: 'probe.tsx',
160
+ },
88
161
  "const at = 'threads/'",
89
162
  "const said = 'a sentence about packages/core/integrity/src/constraint.ts and nothing else'",
90
- "const at = 'app/layout.tsx'",
163
+ {
164
+ files: [
165
+ { at: 'app/_probe_there.tsx', source: 'export const THERE = 1\n' },
166
+ { at: 'probe.tsx', source: "const at = 'app/layout.tsx'\n" },
167
+ ],
168
+ at: 'probe.tsx',
169
+ },
91
170
  "const at = 'node_modules/thread/package.json'",
92
171
  ],
93
172
  },
@@ -18,8 +18,31 @@ export const slopnator = {
18
18
  },
19
19
  proves: {
20
20
  wrong: [
21
- "const M: Threaded = {\n declares: [\n {\n id: 'one',\n describes: 'The first thing.',\n },\n {\n id: 'one',\n describes: 'A different thing entirely.',\n },\n ],\n}",
22
- "const M: Threaded = {\n declares: [\n {\n id: 'two',\n describes: 'The stated meaning.',\n },\n {\n id: 'two',\n },\n ],\n}",
21
+ {
22
+ files: [
23
+ {
24
+ at: 'thread/core/thread.ts',
25
+ source: "export interface Threaded {\n readonly id?: string\n readonly at?: string\n readonly describes?: string\n readonly declares?: readonly Threaded[]\n readonly derives?: readonly Threaded[]\n readonly seeds?: readonly Threaded[]\n}\n",
26
+ },
27
+ {
28
+ at: 'threads/thread.ts',
29
+ source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const THREAD: Threaded = {\n declares: [\n {\n at: 'threads/_probe_meant.ts',\n },\n ],\n}\n",
30
+ },
31
+ {
32
+ at: 'threads/_probe_meant.ts',
33
+ source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const M: Threaded = {\n declares: [\n {\n id: 'one',\n describes: 'The first thing.',\n },\n {\n id: 'one',\n describes: 'A different thing entirely.',\n },\n ],\n}\n",
34
+ },
35
+ ],
36
+ at: 'threads/_probe_meant.ts',
37
+ },
38
+ {
39
+ files: [
40
+ { at: 'thread/core/thread.ts', source: "export interface Threaded {\n readonly id?: string\n readonly at?: string\n readonly describes?: string\n readonly declares?: readonly Threaded[]\n readonly derives?: readonly Threaded[]\n readonly seeds?: readonly Threaded[]\n}\n" },
41
+ { at: 'threads/thread.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const THREAD: Threaded = {\n declares: [\n {\n at: 'threads/_probe_meant_two.ts',\n },\n ],\n}\n" },
42
+ { at: 'threads/_probe_meant_two.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const M: Threaded = {\n declares: [\n {\n id: 'two',\n describes: 'The stated meaning.',\n },\n {\n id: 'two',\n },\n ],\n}\n" },
43
+ ],
44
+ at: 'threads/_probe_meant_two.ts',
45
+ },
23
46
  ],
24
47
  right: [
25
48
  "const M: Threaded = {\n declares: [\n {\n id: 'one',\n describes: 'The first thing.',\n },\n {\n id: 'one',\n describes: 'The first thing.',\n },\n ],\n}",
@@ -19,8 +19,34 @@ export const slopnator: Slopnator = {
19
19
  },
20
20
  proves: {
21
21
  wrong: [
22
- "const M: Threaded = {\n declares: [\n {\n id: 'one',\n describes: 'The first thing.',\n },\n {\n id: 'one',\n describes: 'A different thing entirely.',\n },\n ],\n}",
23
- "const M: Threaded = {\n declares: [\n {\n id: 'two',\n describes: 'The stated meaning.',\n },\n {\n id: 'two',\n },\n ],\n}",
22
+ {
23
+ files: [
24
+ {
25
+ at: 'thread/core/thread.ts',
26
+ source:
27
+ "export interface Threaded {\n readonly id?: string\n readonly at?: string\n readonly describes?: string\n readonly declares?: readonly Threaded[]\n readonly derives?: readonly Threaded[]\n readonly seeds?: readonly Threaded[]\n}\n",
28
+ },
29
+ {
30
+ at: 'threads/thread.ts',
31
+ source:
32
+ "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const THREAD: Threaded = {\n declares: [\n {\n at: 'threads/_probe_meant.ts',\n },\n ],\n}\n",
33
+ },
34
+ {
35
+ at: 'threads/_probe_meant.ts',
36
+ source:
37
+ "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const M: Threaded = {\n declares: [\n {\n id: 'one',\n describes: 'The first thing.',\n },\n {\n id: 'one',\n describes: 'A different thing entirely.',\n },\n ],\n}\n",
38
+ },
39
+ ],
40
+ at: 'threads/_probe_meant.ts',
41
+ },
42
+ {
43
+ files: [
44
+ { at: 'thread/core/thread.ts', source: "export interface Threaded {\n readonly id?: string\n readonly at?: string\n readonly describes?: string\n readonly declares?: readonly Threaded[]\n readonly derives?: readonly Threaded[]\n readonly seeds?: readonly Threaded[]\n}\n" },
45
+ { at: 'threads/thread.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const THREAD: Threaded = {\n declares: [\n {\n at: 'threads/_probe_meant_two.ts',\n },\n ],\n}\n" },
46
+ { at: 'threads/_probe_meant_two.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const M: Threaded = {\n declares: [\n {\n id: 'two',\n describes: 'The stated meaning.',\n },\n {\n id: 'two',\n },\n ],\n}\n" },
47
+ ],
48
+ at: 'threads/_probe_meant_two.ts',
49
+ },
24
50
  ],
25
51
  right: [
26
52
  "const M: Threaded = {\n declares: [\n {\n id: 'one',\n describes: 'The first thing.',\n },\n {\n id: 'one',\n describes: 'The first thing.',\n },\n ],\n}",
@@ -1,6 +1,6 @@
1
- import { atsIn, here, index, parses, unreadable } from "./sl_unthreaded.js";
1
+ import { atsIn, canonical, here, index, parses, unreadable } from "./sl_unthreaded.js";
2
2
  const ONLY_DECLARES = new Set(['declares']);
3
- const declaredIn = (text) => atsIn(text, ONLY_DECLARES);
3
+ const declaredIn = (text) => atsIn(text, ONLY_DECLARES).map(canonical);
4
4
  export const slopnator = {
5
5
  holds: (_node, at) => {
6
6
  const path = here(at.filename);
@@ -19,9 +19,30 @@ export const slopnator = {
19
19
  },
20
20
  proves: {
21
21
  wrong: [
22
- "const M: Threaded = {\n declares: [\n {\n at: 'threads/one.ts',\n },\n {\n at: 'threads/one.ts',\n },\n ],\n}",
23
- "const M: Threaded = {\n declares: [\n {\n at: 'threads/two.ts',\n },\n {\n at: 'threads/three.ts',\n },\n {\n at: 'threads/two.ts',\n },\n ],\n}",
24
- "const ROW = {\n at: 'threads/one.ts',\n}\nconst M: Threaded = {\n declares: [ROW, ROW],\n}",
22
+ {
23
+ files: [
24
+ { at: 'thread/core/thread.ts', source: "export interface Threaded {\n readonly id?: string\n readonly at?: string\n readonly describes?: string\n readonly declares?: readonly Threaded[]\n readonly derives?: readonly Threaded[]\n readonly seeds?: readonly Threaded[]\n}\n" },
25
+ { at: 'threads/thread.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const THREAD: Threaded = {\n declares: [\n {\n at: 'threads/_probe_parented.ts',\n },\n ],\n}\n" },
26
+ { at: 'threads/_probe_parented.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const M: Threaded = {\n declares: [\n {\n at: 'threads/one.ts',\n },\n {\n at: 'threads/one.ts',\n },\n ],\n}\n" },
27
+ ],
28
+ at: 'threads/_probe_parented.ts',
29
+ },
30
+ {
31
+ files: [
32
+ { at: 'thread/core/thread.ts', source: "export interface Threaded {\n readonly id?: string\n readonly at?: string\n readonly describes?: string\n readonly declares?: readonly Threaded[]\n readonly derives?: readonly Threaded[]\n readonly seeds?: readonly Threaded[]\n}\n" },
33
+ { at: 'threads/thread.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const THREAD: Threaded = {\n declares: [\n {\n at: 'threads/_probe_parented_2.ts',\n },\n ],\n}\n" },
34
+ { at: 'threads/_probe_parented_2.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const M: Threaded = {\n declares: [\n {\n at: 'threads/two.ts',\n },\n {\n at: 'threads/three.ts',\n },\n {\n at: 'threads/two.ts',\n },\n ],\n}\n" },
35
+ ],
36
+ at: 'threads/_probe_parented_2.ts',
37
+ },
38
+ {
39
+ files: [
40
+ { at: 'thread/core/thread.ts', source: "export interface Threaded {\n readonly id?: string\n readonly at?: string\n readonly describes?: string\n readonly declares?: readonly Threaded[]\n readonly derives?: readonly Threaded[]\n readonly seeds?: readonly Threaded[]\n}\n" },
41
+ { at: 'threads/thread.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const THREAD: Threaded = {\n declares: [\n {\n at: 'threads/_probe_parented_hoisted.ts',\n },\n ],\n}\n" },
42
+ { at: 'threads/_probe_parented_hoisted.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nconst ROW = {\n at: 'threads/one.ts',\n}\nconst M: Threaded = {\n declares: [ROW, ROW],\n}\n" },
43
+ ],
44
+ at: 'threads/_probe_parented_hoisted.ts',
45
+ },
25
46
  ],
26
47
  right: [
27
48
  "const M: Threaded = {\n declares: [\n {\n at: 'threads/one.ts',\n },\n {\n at: 'threads/two.ts',\n },\n ],\n}",
@@ -1,9 +1,9 @@
1
1
  import type { Slopnator } from '../slopnator.ts'
2
- import { atsIn, here, index, parses, unreadable } from './sl_unthreaded.ts'
2
+ import { atsIn, canonical, here, index, parses, unreadable } from './sl_unthreaded.ts'
3
3
 
4
4
  const ONLY_DECLARES = new Set(['declares'])
5
5
 
6
- const declaredIn = (text: string): readonly string[] => atsIn(text, ONLY_DECLARES)
6
+ const declaredIn = (text: string): readonly string[] => atsIn(text, ONLY_DECLARES).map(canonical)
7
7
 
8
8
  export const slopnator: Slopnator = {
9
9
  holds: (_node, at) => {
@@ -22,9 +22,30 @@ export const slopnator: Slopnator = {
22
22
  },
23
23
  proves: {
24
24
  wrong: [
25
- "const M: Threaded = {\n declares: [\n {\n at: 'threads/one.ts',\n },\n {\n at: 'threads/one.ts',\n },\n ],\n}",
26
- "const M: Threaded = {\n declares: [\n {\n at: 'threads/two.ts',\n },\n {\n at: 'threads/three.ts',\n },\n {\n at: 'threads/two.ts',\n },\n ],\n}",
27
- "const ROW = {\n at: 'threads/one.ts',\n}\nconst M: Threaded = {\n declares: [ROW, ROW],\n}",
25
+ {
26
+ files: [
27
+ { at: 'thread/core/thread.ts', source: "export interface Threaded {\n readonly id?: string\n readonly at?: string\n readonly describes?: string\n readonly declares?: readonly Threaded[]\n readonly derives?: readonly Threaded[]\n readonly seeds?: readonly Threaded[]\n}\n" },
28
+ { at: 'threads/thread.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const THREAD: Threaded = {\n declares: [\n {\n at: 'threads/_probe_parented.ts',\n },\n ],\n}\n" },
29
+ { at: 'threads/_probe_parented.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const M: Threaded = {\n declares: [\n {\n at: 'threads/one.ts',\n },\n {\n at: 'threads/one.ts',\n },\n ],\n}\n" },
30
+ ],
31
+ at: 'threads/_probe_parented.ts',
32
+ },
33
+ {
34
+ files: [
35
+ { at: 'thread/core/thread.ts', source: "export interface Threaded {\n readonly id?: string\n readonly at?: string\n readonly describes?: string\n readonly declares?: readonly Threaded[]\n readonly derives?: readonly Threaded[]\n readonly seeds?: readonly Threaded[]\n}\n" },
36
+ { at: 'threads/thread.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const THREAD: Threaded = {\n declares: [\n {\n at: 'threads/_probe_parented_2.ts',\n },\n ],\n}\n" },
37
+ { at: 'threads/_probe_parented_2.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const M: Threaded = {\n declares: [\n {\n at: 'threads/two.ts',\n },\n {\n at: 'threads/three.ts',\n },\n {\n at: 'threads/two.ts',\n },\n ],\n}\n" },
38
+ ],
39
+ at: 'threads/_probe_parented_2.ts',
40
+ },
41
+ {
42
+ files: [
43
+ { at: 'thread/core/thread.ts', source: "export interface Threaded {\n readonly id?: string\n readonly at?: string\n readonly describes?: string\n readonly declares?: readonly Threaded[]\n readonly derives?: readonly Threaded[]\n readonly seeds?: readonly Threaded[]\n}\n" },
44
+ { at: 'threads/thread.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const THREAD: Threaded = {\n declares: [\n {\n at: 'threads/_probe_parented_hoisted.ts',\n },\n ],\n}\n" },
45
+ { at: 'threads/_probe_parented_hoisted.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nconst ROW = {\n at: 'threads/one.ts',\n}\nconst M: Threaded = {\n declares: [ROW, ROW],\n}\n" },
46
+ ],
47
+ at: 'threads/_probe_parented_hoisted.ts',
48
+ },
28
49
  ],
29
50
  right: [
30
51
  "const M: Threaded = {\n declares: [\n {\n at: 'threads/one.ts',\n },\n {\n at: 'threads/two.ts',\n },\n ],\n}",
@@ -49,8 +49,24 @@ export const slopnator = {
49
49
  "import { node as invented } from 'nodes/nd_nowhere.ts'",
50
50
  ],
51
51
  right: [
52
- "import { node as read } from '../nodes/nd_read.ts'",
53
- "import { node as action } from '../nodes/nd_action.ts'\nimport { node as read } from '../nodes/nd_read.ts'",
52
+ {
53
+ files: [
54
+ { at: 'thread/core/thread.ts', source: "export interface Threaded {\n readonly id?: string\n readonly at?: string\n readonly describes?: string\n readonly declares?: readonly Threaded[]\n readonly derives?: readonly Threaded[]\n readonly seeds?: readonly Threaded[]\n}\n" },
55
+ { at: 'threads/thread.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const THREAD: Threaded = {\n declares: [\n {\n at: 'threads/_probe_nodes.ts',\n },\n ],\n}\n" },
56
+ { at: 'threads/_probe_nodes.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const NODES: Threaded = {\n id: 'nodes',\n declares: [\n {\n id: 'read',\n at: 'nodes/nd_read.ts',\n },\n {\n id: 'action',\n at: 'nodes/nd_action.ts',\n },\n ],\n}\n" },
57
+ { at: 'operations/_probe_read.ts', source: "import { node as read } from '../nodes/nd_read.ts'" },
58
+ ],
59
+ at: 'operations/_probe_read.ts',
60
+ },
61
+ {
62
+ files: [
63
+ { at: 'thread/core/thread.ts', source: "export interface Threaded {\n readonly id?: string\n readonly at?: string\n readonly describes?: string\n readonly declares?: readonly Threaded[]\n readonly derives?: readonly Threaded[]\n readonly seeds?: readonly Threaded[]\n}\n" },
64
+ { at: 'threads/thread.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const THREAD: Threaded = {\n declares: [\n {\n at: 'threads/_probe_nodes.ts',\n },\n ],\n}\n" },
65
+ { at: 'threads/_probe_nodes.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const NODES: Threaded = {\n id: 'nodes',\n declares: [\n {\n id: 'read',\n at: 'nodes/nd_read.ts',\n },\n {\n id: 'action',\n at: 'nodes/nd_action.ts',\n },\n ],\n}\n" },
66
+ { at: 'operations/_probe_multi.ts', source: "import { node as action } from '../nodes/nd_action.ts'\nimport { node as read } from '../nodes/nd_read.ts'" },
67
+ ],
68
+ at: 'operations/_probe_multi.ts',
69
+ },
54
70
  "import { z } from 'zod'",
55
71
  "import type { Operation } from '../../operations/operations.ts'",
56
72
  "import type { Held } from '../../operations/nodes.ts'",
@@ -59,8 +59,24 @@ export const slopnator: Slopnator = {
59
59
  "import { node as invented } from 'nodes/nd_nowhere.ts'",
60
60
  ],
61
61
  right: [
62
- "import { node as read } from '../nodes/nd_read.ts'",
63
- "import { node as action } from '../nodes/nd_action.ts'\nimport { node as read } from '../nodes/nd_read.ts'",
62
+ {
63
+ files: [
64
+ { at: 'thread/core/thread.ts', source: "export interface Threaded {\n readonly id?: string\n readonly at?: string\n readonly describes?: string\n readonly declares?: readonly Threaded[]\n readonly derives?: readonly Threaded[]\n readonly seeds?: readonly Threaded[]\n}\n" },
65
+ { at: 'threads/thread.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const THREAD: Threaded = {\n declares: [\n {\n at: 'threads/_probe_nodes.ts',\n },\n ],\n}\n" },
66
+ { at: 'threads/_probe_nodes.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const NODES: Threaded = {\n id: 'nodes',\n declares: [\n {\n id: 'read',\n at: 'nodes/nd_read.ts',\n },\n {\n id: 'action',\n at: 'nodes/nd_action.ts',\n },\n ],\n}\n" },
67
+ { at: 'operations/_probe_read.ts', source: "import { node as read } from '../nodes/nd_read.ts'" },
68
+ ],
69
+ at: 'operations/_probe_read.ts',
70
+ },
71
+ {
72
+ files: [
73
+ { at: 'thread/core/thread.ts', source: "export interface Threaded {\n readonly id?: string\n readonly at?: string\n readonly describes?: string\n readonly declares?: readonly Threaded[]\n readonly derives?: readonly Threaded[]\n readonly seeds?: readonly Threaded[]\n}\n" },
74
+ { at: 'threads/thread.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const THREAD: Threaded = {\n declares: [\n {\n at: 'threads/_probe_nodes.ts',\n },\n ],\n}\n" },
75
+ { at: 'threads/_probe_nodes.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const NODES: Threaded = {\n id: 'nodes',\n declares: [\n {\n id: 'read',\n at: 'nodes/nd_read.ts',\n },\n {\n id: 'action',\n at: 'nodes/nd_action.ts',\n },\n ],\n}\n" },
76
+ { at: 'operations/_probe_multi.ts', source: "import { node as action } from '../nodes/nd_action.ts'\nimport { node as read } from '../nodes/nd_read.ts'" },
77
+ ],
78
+ at: 'operations/_probe_multi.ts',
79
+ },
64
80
  "import { z } from 'zod'",
65
81
  "import type { Operation } from '../../operations/operations.ts'",
66
82
  "import type { Held } from '../../operations/nodes.ts'",
@@ -106,9 +106,11 @@ export const slopnator = {
106
106
  right: [
107
107
  {
108
108
  files: [
109
+ { at: 'thread/core/thread.ts', source: "export interface Threaded {\n readonly id?: string\n readonly at?: string\n readonly describes?: string\n readonly declares?: readonly Threaded[]\n readonly derives?: readonly Threaded[]\n readonly seeds?: readonly Threaded[]\n}\n" },
110
+ { at: 'threads/thread.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const THREAD: Threaded = {\n declares: [\n {\n at: 'threads/_probe_operations.ts',\n },\n ],\n}\n" },
109
111
  {
110
112
  at: 'threads/_probe_operations.ts',
111
- source: "export const OPERATIONS: Threaded = {\n id: 'operations',\n declares: [\n {\n id: 'wf_send_invoice',\n at: 'operations/wf_send_invoice.ts',\n },\n ],\n}\n",
113
+ source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const OPERATIONS: Threaded = {\n id: 'operations',\n declares: [\n {\n id: 'wf_send_invoice',\n at: 'operations/wf_send_invoice.ts',\n },\n ],\n}\n",
112
114
  },
113
115
  { at: 'app/_probe_known.tsx', source: "export const HELD = dispatch('wf_send_invoice')\n" },
114
116
  ],
@@ -132,10 +132,12 @@ export const slopnator: Slopnator = {
132
132
  right: [
133
133
  {
134
134
  files: [
135
+ { at: 'thread/core/thread.ts', source: "export interface Threaded {\n readonly id?: string\n readonly at?: string\n readonly describes?: string\n readonly declares?: readonly Threaded[]\n readonly derives?: readonly Threaded[]\n readonly seeds?: readonly Threaded[]\n}\n" },
136
+ { at: 'threads/thread.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const THREAD: Threaded = {\n declares: [\n {\n at: 'threads/_probe_operations.ts',\n },\n ],\n}\n" },
135
137
  {
136
138
  at: 'threads/_probe_operations.ts',
137
139
  source:
138
- "export const OPERATIONS: Threaded = {\n id: 'operations',\n declares: [\n {\n id: 'wf_send_invoice',\n at: 'operations/wf_send_invoice.ts',\n },\n ],\n}\n",
140
+ "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const OPERATIONS: Threaded = {\n id: 'operations',\n declares: [\n {\n id: 'wf_send_invoice',\n at: 'operations/wf_send_invoice.ts',\n },\n ],\n}\n",
139
141
  },
140
142
  { at: 'app/_probe_known.tsx', source: "export const HELD = dispatch('wf_send_invoice')\n" },
141
143
  ],
@@ -81,9 +81,11 @@ export const slopnator = {
81
81
  wrong: [
82
82
  {
83
83
  files: [
84
+ { at: 'thread/core/thread.ts', source: "export interface Threaded {\n readonly id?: string\n readonly at?: string\n readonly describes?: string\n readonly declares?: readonly Threaded[]\n readonly derives?: readonly Threaded[]\n readonly seeds?: readonly Threaded[]\n}\n" },
85
+ { at: 'threads/thread.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const THREAD: Threaded = {\n declares: [\n {\n at: 'threads/_probe_worn.ts',\n },\n ],\n}\n" },
84
86
  {
85
87
  at: 'threads/_probe_worn.ts',
86
- source: "export const ELEMENTS: Threaded = {\n id: 'element',\n declares: [\n {\n id: 'button',\n at: 'app/_probe_button.tsx',\n },\n ],\n}\n\nexport const VARIANTS: Threaded = {\n id: 'variant',\n declares: [\n {\n id: 'button-primary',\n at: 'app/_probe_variant.ts',\n wears: ['Button'],\n },\n ],\n}\n",
88
+ source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const ELEMENTS: Threaded = {\n id: 'element',\n declares: [\n {\n id: 'button',\n at: 'app/_probe_button.tsx',\n },\n ],\n}\n\nexport const VARIANTS: Threaded = {\n id: 'variant',\n declares: [\n {\n id: 'button-primary',\n at: 'app/_probe_variant.ts',\n wears: ['Button'],\n },\n ],\n}\n",
87
89
  },
88
90
  { at: 'app/_probe_undeclared.tsx', source: 'export const HELD = <Button.primary />\n' },
89
91
  ],
@@ -91,9 +93,11 @@ export const slopnator = {
91
93
  },
92
94
  {
93
95
  files: [
96
+ { at: 'thread/core/thread.ts', source: "export interface Threaded {\n readonly id?: string\n readonly at?: string\n readonly describes?: string\n readonly declares?: readonly Threaded[]\n readonly derives?: readonly Threaded[]\n readonly seeds?: readonly Threaded[]\n}\n" },
97
+ { at: 'threads/thread.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const THREAD: Threaded = {\n declares: [\n {\n at: 'threads/_probe_worn.ts',\n },\n ],\n}\n" },
94
98
  {
95
99
  at: 'threads/_probe_worn.ts',
96
- source: "export const ELEMENTS: Threaded = {\n id: 'element',\n declares: [\n {\n id: 'button',\n at: 'app/_probe_button.tsx',\n },\n {\n id: 'badge',\n at: 'app/_probe_badge.tsx',\n },\n ],\n}\n\nexport const VARIANTS: Threaded = {\n id: 'variant',\n declares: [\n {\n id: 'chip',\n at: 'app/_probe_chip.ts',\n wears: ['Badge'],\n },\n ],\n}\n",
100
+ source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const ELEMENTS: Threaded = {\n id: 'element',\n declares: [\n {\n id: 'button',\n at: 'app/_probe_button.tsx',\n },\n {\n id: 'badge',\n at: 'app/_probe_badge.tsx',\n },\n ],\n}\n\nexport const VARIANTS: Threaded = {\n id: 'variant',\n declares: [\n {\n id: 'chip',\n at: 'app/_probe_chip.ts',\n wears: ['Badge'],\n },\n ],\n}\n",
97
101
  },
98
102
  { at: 'app/_probe_mispaired.tsx', source: 'export const HELD = <Button.chip />\n' },
99
103
  ],
@@ -109,10 +109,12 @@ export const slopnator: Slopnator = {
109
109
  wrong: [
110
110
  {
111
111
  files: [
112
+ { at: 'thread/core/thread.ts', source: "export interface Threaded {\n readonly id?: string\n readonly at?: string\n readonly describes?: string\n readonly declares?: readonly Threaded[]\n readonly derives?: readonly Threaded[]\n readonly seeds?: readonly Threaded[]\n}\n" },
113
+ { at: 'threads/thread.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const THREAD: Threaded = {\n declares: [\n {\n at: 'threads/_probe_worn.ts',\n },\n ],\n}\n" },
112
114
  {
113
115
  at: 'threads/_probe_worn.ts',
114
116
  source:
115
- "export const ELEMENTS: Threaded = {\n id: 'element',\n declares: [\n {\n id: 'button',\n at: 'app/_probe_button.tsx',\n },\n ],\n}\n\nexport const VARIANTS: Threaded = {\n id: 'variant',\n declares: [\n {\n id: 'button-primary',\n at: 'app/_probe_variant.ts',\n wears: ['Button'],\n },\n ],\n}\n",
117
+ "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const ELEMENTS: Threaded = {\n id: 'element',\n declares: [\n {\n id: 'button',\n at: 'app/_probe_button.tsx',\n },\n ],\n}\n\nexport const VARIANTS: Threaded = {\n id: 'variant',\n declares: [\n {\n id: 'button-primary',\n at: 'app/_probe_variant.ts',\n wears: ['Button'],\n },\n ],\n}\n",
116
118
  },
117
119
  { at: 'app/_probe_undeclared.tsx', source: 'export const HELD = <Button.primary />\n' },
118
120
  ],
@@ -120,10 +122,12 @@ export const slopnator: Slopnator = {
120
122
  },
121
123
  {
122
124
  files: [
125
+ { at: 'thread/core/thread.ts', source: "export interface Threaded {\n readonly id?: string\n readonly at?: string\n readonly describes?: string\n readonly declares?: readonly Threaded[]\n readonly derives?: readonly Threaded[]\n readonly seeds?: readonly Threaded[]\n}\n" },
126
+ { at: 'threads/thread.ts', source: "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const THREAD: Threaded = {\n declares: [\n {\n at: 'threads/_probe_worn.ts',\n },\n ],\n}\n" },
123
127
  {
124
128
  at: 'threads/_probe_worn.ts',
125
129
  source:
126
- "export const ELEMENTS: Threaded = {\n id: 'element',\n declares: [\n {\n id: 'button',\n at: 'app/_probe_button.tsx',\n },\n {\n id: 'badge',\n at: 'app/_probe_badge.tsx',\n },\n ],\n}\n\nexport const VARIANTS: Threaded = {\n id: 'variant',\n declares: [\n {\n id: 'chip',\n at: 'app/_probe_chip.ts',\n wears: ['Badge'],\n },\n ],\n}\n",
130
+ "import type { Threaded } from '../thread/core/thread.ts'\n\nexport const ELEMENTS: Threaded = {\n id: 'element',\n declares: [\n {\n id: 'button',\n at: 'app/_probe_button.tsx',\n },\n {\n id: 'badge',\n at: 'app/_probe_badge.tsx',\n },\n ],\n}\n\nexport const VARIANTS: Threaded = {\n id: 'variant',\n declares: [\n {\n id: 'chip',\n at: 'app/_probe_chip.ts',\n wears: ['Badge'],\n },\n ],\n}\n",
127
131
  },
128
132
  { at: 'app/_probe_mispaired.tsx', source: 'export const HELD = <Button.chip />\n' },
129
133
  ],
@@ -37,10 +37,9 @@ export const slopnator = {
37
37
  right: [
38
38
  {
39
39
  files: [
40
- {
41
- at: 'threads/_governed_probe.ts',
42
- source: "export const L: Constraint = {\n id: 'a-law',\n governs: 'entities',\n}\n",
43
- },
40
+ { at: 'threads/thread.ts', source: "export const THREAD: Threaded = {\n declares: [\n { id: 'entities', at: 'src/islands/entities.ts', governs: ['app/_declare/entities.ts'] },\n ],\n}\n" },
41
+ { at: 'src/islands/entities.ts', source: 'export const EntitiesIslandSchema = {}\nexport function defineEntities() {}\n' },
42
+ { at: 'threads/_governed_probe.ts', source: "export const L: Constraint = {\n id: 'a-law',\n governs: 'entities',\n}\n" },
44
43
  ],
45
44
  at: 'threads/_governed_probe.ts',
46
45
  },
@@ -40,10 +40,9 @@ export const slopnator: Slopnator = {
40
40
  right: [
41
41
  {
42
42
  files: [
43
- {
44
- at: 'threads/_governed_probe.ts',
45
- source: "export const L: Constraint = {\n id: 'a-law',\n governs: 'entities',\n}\n",
46
- },
43
+ { at: 'threads/thread.ts', source: "export const THREAD: Threaded = {\n declares: [\n { id: 'entities', at: 'src/islands/entities.ts', governs: ['app/_declare/entities.ts'] },\n ],\n}\n" },
44
+ { at: 'src/islands/entities.ts', source: 'export const EntitiesIslandSchema = {}\nexport function defineEntities() {}\n' },
45
+ { at: 'threads/_governed_probe.ts', source: "export const L: Constraint = {\n id: 'a-law',\n governs: 'entities',\n}\n" },
47
46
  ],
48
47
  at: 'threads/_governed_probe.ts',
49
48
  },
@@ -1,4 +1,4 @@
1
- import { existsSync, readdirSync, readFileSync } from 'node:fs';
1
+ import { existsSync, readdirSync, readFileSync } from "../../core/files.js";
2
2
  import { resolve } from 'node:path';
3
3
  const STORES = 'src/stores';
4
4
  /* What hands an operation its seams, seeded once and then the app's own. */
@@ -1,4 +1,4 @@
1
- import { existsSync, readdirSync, readFileSync } from 'node:fs'
1
+ import { existsSync, readdirSync, readFileSync } from '../../core/files.ts'
2
2
  import { resolve } from 'node:path'
3
3
 
4
4
  import type { Slopnator } from '../slopnator.ts'
@@ -1,4 +1,4 @@
1
- import { existsSync, readFileSync, readdirSync } from 'node:fs';
1
+ import { existsSync, readFileSync, readdirSync } from "../../core/files.js";
2
2
  import { resolve } from 'node:path';
3
3
  import { foldersGoverned, here, islandsDeclared, rowsIn } from "./sl_unthreaded.js";
4
4
  import { findTree } from "../../core/tree.js";
@@ -47,6 +47,13 @@ function declaredNames(one) {
47
47
  return [];
48
48
  }
49
49
  }
50
+ const ISLAND = [
51
+ {
52
+ at: 'threads/thread.ts',
53
+ source: "export const THREAD: Threaded = {\n declares: [\n { id: 'operations', at: 'src/islands/operations.ts', governs: ['operations/'] },\n { id: 'operation', at: 'threads/operations.ts' },\n ],\n}\n",
54
+ },
55
+ { at: 'src/islands/operations.ts', source: 'export const OperationsIslandSchema = {}\n' },
56
+ ];
50
57
  export const slopnator = {
51
58
  holds: (_node, at) => {
52
59
  const path = here(at.filename);
@@ -88,25 +95,23 @@ export const slopnator = {
88
95
  wrong: [
89
96
  {
90
97
  files: [
91
- {
92
- at: 'threads/_member_probe.ts',
93
- source: "export const OPERATIONS: readonly Member[] = [\n {\n id: 'wf_unseeded_probe',\n at: 'threads/operations.ts',\n },\n]\n",
94
- },
98
+ ...ISLAND,
99
+ { at: 'threads/_member_probe.ts', source: "export const OPERATIONS: readonly Threaded[] = [\n {\n id: 'wf_unseeded_probe',\n },\n]\n" },
95
100
  ],
96
101
  at: 'threads/_member_probe.ts',
97
102
  },
98
103
  {
99
- files: [{ at: 'operations/wf_undeclared_probe.ts', source: 'export const operation = { id: 1 }\n' }],
104
+ files: [...ISLAND, { at: 'operations/wf_undeclared_probe.ts', source: 'export const operation = { id: 1 }\n' }],
100
105
  at: 'operations/wf_undeclared_probe.ts',
101
106
  },
102
107
  ],
103
108
  right: [
104
109
  {
105
- files: [{ at: 'threads/_member_probe.ts', source: 'export const OPERATIONS: readonly Member[] = []\n' }],
110
+ files: [...ISLAND, { at: 'threads/_member_probe.ts', source: 'export const OPERATIONS: readonly Threaded[] = []\n' }],
106
111
  at: 'threads/_member_probe.ts',
107
112
  },
108
113
  {
109
- files: [{ at: 'threads/_member_quiet.ts', source: 'export const NOTHING = []\n' }],
114
+ files: [...ISLAND, { at: 'threads/_member_quiet.ts', source: 'export const NOTHING = []\n' }],
110
115
  at: 'threads/_member_quiet.ts',
111
116
  },
112
117
  ],