@erclx/canon 5.32.0 → 5.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/claude/.claude-plugin/plugin.json +1 -1
- package/claude/skills/api-design/REQUIREMENT.md +1 -2
- package/claude/skills/api-design/SKILL.md +2 -3
- package/claude/skills/api-design/references/adopted.md +1 -1
- package/claude/skills/auto-ship/SKILL.md +1 -1
- package/claude/skills/auto-ship/references/worktree-name.md +1 -1
- package/claude/skills/backlog-triage/REQUIREMENT.md +2 -2
- package/claude/skills/backlog-triage/SKILL.md +1 -1
- package/claude/skills/canon-cli/REQUIREMENT.md +16 -13
- package/claude/skills/canon-cli/SKILL.md +75 -32
- package/claude/skills/canon-feedback/REQUIREMENT.md +1 -0
- package/claude/skills/canon-feedback/SKILL.md +11 -29
- package/claude/skills/canon-feedback/references/template.md +53 -0
- package/claude/skills/{canvas → canvas-board}/REQUIREMENT.md +2 -2
- package/claude/skills/{canvas → canvas-board}/SKILL.md +6 -3
- package/claude/skills/{canvas → canvas-board}/references/canvas.md +26 -3
- package/{standards → claude/skills/canvas-board/references}/design.md +11 -2
- package/claude/skills/code-craft/REQUIREMENT.md +1 -1
- package/claude/skills/code-craft/SKILL.md +0 -1
- package/claude/skills/context-fold/REQUIREMENT.md +25 -33
- package/claude/skills/context-fold/SKILL.md +25 -70
- package/claude/skills/context-fold/references/classify.md +3 -3
- package/claude/skills/context-fold/references/completion-report.md +4 -4
- package/claude/skills/context-fold/references/context-refresh.md +5 -5
- package/{standards → claude/skills/context-fold/references}/context.md +16 -5
- package/claude/skills/context-fold/references/unusable-baseline.md +3 -5
- package/claude/skills/create-rule/SKILL.md +3 -3
- package/{standards → claude/skills/create-rule/references}/rule.md +15 -6
- package/claude/skills/create-skill/SKILL.md +2 -2
- package/{standards → claude/skills/create-skill/references}/skill.md +18 -15
- package/claude/skills/design-taste/REQUIREMENT.md +3 -3
- package/claude/skills/design-taste/SKILL.md +1 -1
- package/claude/skills/docs-sync/REQUIREMENT.md +1 -1
- package/claude/skills/docs-sync/SKILL.md +3 -3
- package/{standards → claude/skills/docs-sync/references}/docs.md +11 -0
- package/{standards → claude/skills/docs-sync/references}/readme.md +9 -2
- package/claude/skills/draft-and-pick/SKILL.md +5 -5
- package/claude/skills/draft-doc/SKILL.md +6 -6
- package/claude/skills/draft-figure/REQUIREMENT.md +2 -2
- package/claude/skills/draft-figure/SKILL.md +2 -2
- package/claude/skills/draft-figure/references/hand-drawn.md +1 -1
- package/claude/skills/draft-figure/references/mermaid-path.md +1 -1
- package/claude/skills/draft-identity/REQUIREMENT.md +2 -2
- package/claude/skills/draft-identity/SKILL.md +2 -2
- package/claude/skills/draft-ready/SKILL.md +1 -1
- package/claude/skills/git-branch/SKILL.md +1 -1
- package/{standards → claude/skills/git-branch/references}/branch.md +1 -1
- package/claude/skills/git-commit/SKILL.md +2 -2
- package/claude/skills/git-followup/REQUIREMENT.md +1 -1
- package/claude/skills/git-followup/SKILL.md +1 -1
- package/claude/skills/git-issue/SKILL.md +1 -1
- package/claude/skills/git-issue/references/issue.md +4 -1
- package/claude/skills/git-pr/SKILL.md +13 -13
- package/claude/skills/git-pr/references/evidence.md +2 -2
- package/claude/skills/git-pr/references/final-command.md +38 -14
- package/claude/skills/git-pr/references/labels.md +5 -1
- package/{standards → claude/skills/git-pr/references}/pr.md +19 -9
- package/{standards → claude/skills/git-pr/references}/publish.md +4 -2
- package/claude/skills/git-pr/references/task-number.md +1 -1
- package/claude/skills/git-ship/SKILL.md +15 -14
- package/claude/skills/git-split/SKILL.md +3 -3
- package/claude/skills/git-stage/SKILL.md +1 -1
- package/claude/skills/plan-feature/REQUIREMENT.md +1 -1
- package/claude/skills/review-address/SKILL.md +1 -1
- package/claude/skills/review-address/references/post-review-findings.md +1 -1
- package/claude/skills/review-craft/references/ui.md +1 -1
- package/claude/skills/review-pr/REQUIREMENT.md +1 -1
- package/claude/skills/review-pr/SKILL.md +3 -3
- package/claude/skills/review-pr/references/body-variants.md +2 -2
- package/claude/skills/review-pr/references/key-changes.md +3 -3
- package/claude/skills/review-pr/references/post.md +4 -2
- package/claude/skills/review-ui/REQUIREMENT.md +1 -1
- package/claude/skills/review-ui/SKILL.md +8 -6
- package/claude/skills/review-ui/references/driving.md +8 -8
- package/claude/skills/review-ui/references/post.md +53 -17
- package/claude/skills/role-orchestrator/REQUIREMENT.md +3 -0
- package/claude/skills/role-orchestrator/SKILL.md +2 -2
- package/claude/skills/role-orchestrator/references/orchestrator-dispatch.md +2 -2
- package/claude/skills/role-orchestrator/references/orchestrator-handoff.md +8 -5
- package/claude/skills/role-orchestrator/references/orchestrator-launch.md +32 -1
- package/claude/skills/role-orchestrator/references/orchestrator-refill.md +2 -2
- package/claude/skills/role-orchestrator/references/orchestrator-resume.md +3 -0
- package/claude/skills/role-planner/REQUIREMENT.md +2 -1
- package/claude/skills/role-planner/SKILL.md +13 -2
- package/claude/skills/role-reviewer/SKILL.md +1 -1
- package/claude/skills/role-worker/REQUIREMENT.md +1 -0
- package/claude/skills/role-worker/SKILL.md +9 -1
- package/claude/skills/session-map/SKILL.md +1 -1
- package/claude/skills/session-resume/REQUIREMENT.md +2 -2
- package/claude/skills/session-worktree/SKILL.md +5 -5
- package/claude/skills/target-setup/SKILL.md +10 -4
- package/claude/skills/target-setup/references/detect.md +20 -3
- package/claude/skills/task-board/REQUIREMENT.md +7 -12
- package/claude/skills/task-board/SKILL.md +5 -17
- package/claude/skills/task-board/references/tasks.md +2 -2
- package/claude/skills/task-complete/REQUIREMENT.md +47 -0
- package/claude/skills/task-complete/SKILL.md +86 -0
- package/claude/skills/{task-board → task-complete}/references/archive.md +4 -4
- package/claude/skills/{context-fold → task-complete}/references/receipt-sweep.md +5 -5
- package/claude/skills/task-complete/references/unusable-baseline.md +19 -0
- package/claude/skills/teach-workspace/REQUIREMENT.md +6 -2
- package/claude/skills/teach-workspace/SKILL.md +8 -4
- package/claude/skills/teach-workspace/references/lesson-craft.md +1 -1
- package/claude/skills/{context-fold/references/promoted-pages.md → teach-workspace/references/promotion-fold.md} +3 -3
- package/claude/skills/teach-workspace/references/promotion.md +3 -3
- package/claude/skills/test-craft/REQUIREMENT.md +2 -3
- package/claude/skills/test-craft/SKILL.md +15 -3
- package/claude/skills/ui-checklist/SKILL.md +1 -1
- package/claude/skills/ux-audit/SKILL.md +1 -1
- package/claude/skills/ux-measure/SKILL.md +1 -1
- package/docs/agents/canvas.md +6 -2
- package/docs/agents/commands.md +4 -3
- package/docs/agents/context-audit-checks.md +4 -4
- package/docs/agents/gov-detect.md +47 -0
- package/docs/agents/index.md +7 -4
- package/docs/agents/indexes.md +1 -1
- package/docs/agents/install-and-sync.md +10 -11
- package/docs/agents/key-changes.md +5 -5
- package/docs/agents/label-coverage.md +11 -0
- package/docs/agents/migrate.md +1 -1
- package/docs/agents/pr-evidence-layout.md +70 -0
- package/docs/agents/pr-evidence.md +8 -9
- package/docs/agents/pr-frames.md +7 -2
- package/docs/agents/pr-lift.md +132 -0
- package/docs/agents/records-push.md +2 -2
- package/docs/agents/records-stale.md +12 -47
- package/docs/agents/records-validate.md +3 -7
- package/docs/agents/records.md +5 -27
- package/docs/agents/rule-citations.md +1 -1
- package/docs/agents/sandbox.md +4 -4
- package/docs/agents/scripting.md +2 -1
- package/docs/agents/skills-audit.md +1 -1
- package/docs/agents/tasks-plans.md +2 -2
- package/docs/agents/tasks.md +2 -2
- package/docs/target/migrations.md +10 -2
- package/docs/target/projects.md +4 -4
- package/docs/target/sync.md +1 -1
- package/docs/workflow/operating-model.md +2 -2
- package/docs/workflow/parallel-features.md +7 -7
- package/docs/workflow/skill-map-on-request.md +9 -9
- package/docs/workflow/skill-map.md +12 -11
- package/docs/workflow/visual-design-workflow.md +2 -2
- package/governance/detect.toml +201 -0
- package/governance/renames.toml +0 -11
- package/governance/rules/canon/context.md +13 -0
- package/governance/rules/claude/skill.md +17 -0
- package/governance/rules/code/000-code.md +1 -13
- package/governance/rules/code/010-testing.md +2 -30
- package/governance/rules/ui/400-ui.md +1 -1
- package/governance/rules/ui/480-canvas.md +13 -0
- package/governance/stacks/base.toml +2 -4
- package/package.json +4 -4
- package/scripts/core/install-check.sh +3 -3
- package/scripts/core/regen-hero.ts +0 -6
- package/scripts/lib/ui.sh +0 -168
- package/src/audits/catalog.ts +0 -1
- package/src/canvas/arrange.ts +66 -0
- package/src/canvas/capture.ts +20 -6
- package/src/canvas/content.ts +39 -0
- package/src/canvas/fit.ts +238 -0
- package/src/canvas/tokens.ts +28 -10
- package/src/capture/frame-values.ts +2 -32
- package/src/claude/cases/misc.ts +1 -1
- package/src/claude/cases/setup.ts +4 -0
- package/src/claude/cases/workflow.ts +6 -1
- package/src/claude/seeds.ts +1 -1
- package/src/claude/skills-audit.ts +2 -2
- package/src/cli/help.ts +3 -1
- package/src/cli/ui.ts +2 -3
- package/src/commands/canvas.ts +179 -1
- package/src/commands/claude.ts +1 -1
- package/src/commands/gov.ts +146 -16
- package/src/commands/labels.ts +326 -7
- package/src/commands/migrate.ts +6 -1
- package/src/commands/pr.ts +377 -2
- package/src/commands/records.ts +13 -399
- package/src/commands/sandbox.ts +3 -6
- package/src/commands/tasks.ts +3 -3
- package/src/context/audit.ts +5 -5
- package/src/context/folders.ts +1 -1
- package/src/design/budget.ts +1 -1
- package/src/design/components.ts +1 -1
- package/src/design/document.ts +1 -1
- package/src/design/regen.ts +1 -1
- package/src/design/render.ts +1 -1
- package/src/feedback/body.ts +26 -5
- package/src/gate/measures.ts +59 -45
- package/src/gate/sequencer.ts +56 -1
- package/src/gate/stages.ts +4 -11
- package/src/gov/detect.ts +301 -0
- package/src/gov/install.ts +2 -3
- package/src/gov/list.ts +23 -2
- package/src/gov/stacks.ts +10 -1
- package/src/hooks/post-merge.ts +1 -1
- package/src/labels/apply.ts +39 -0
- package/src/labels/format.ts +3 -3
- package/src/labels/phase.ts +3 -3
- package/src/labels/sections.ts +43 -0
- package/src/migrate/skill-names.ts +20 -1
- package/src/pr/evidence.ts +218 -45
- package/src/pr/frames.ts +23 -3
- package/src/pr/lift.ts +418 -0
- package/src/pr/paths.ts +4 -4
- package/src/pr/rest.ts +3 -0
- package/src/pr/review-scope.ts +76 -0
- package/src/records/backup.ts +16 -6
- package/src/records/stale-canonical.ts +31 -1
- package/src/records/validate.ts +2 -188
- package/src/sandbox/census.ts +1 -1
- package/src/sandbox/coverage.ts +2 -6
- package/src/sandbox/equivalence.ts +19 -51
- package/src/sandbox/expect.ts +4 -4
- package/src/sandbox/provision.ts +13 -36
- package/src/sandbox/scenario.ts +26 -48
- package/src/sandbox/tree.ts +2 -6
- package/src/standards/read.ts +14 -1
- package/src/sync/git.ts +1 -1
- package/src/tasks/archive.ts +5 -5
- package/src/tasks/branch.ts +3 -3
- package/src/tasks/label.ts +1 -1
- package/src/tasks/record.ts +2 -2
- package/src/tasks/validate.ts +1 -1
- package/standards/index.md +0 -13
- package/standards/standard.md +1 -7
- package/tooling/base/reference.md +1 -1
- package/tooling/base/seeds/.github/pull_request_template.md +2 -2
- package/tooling/claude/reference.md +1 -1
- package/tooling/claude/seeds/.claude/hooks/pr-create-log.sh +9 -1
- package/tooling/claude/seeds/.claude/hooks/review-post-scan.sh +171 -0
- package/tooling/claude/seeds/.claude/settings.json +9 -0
- package/governance/rules/standards/context.md +0 -14
- package/governance/rules/standards/design.md +0 -12
- package/governance/rules/standards/readme.md +0 -12
- package/governance/rules/standards/rule.md +0 -13
- package/governance/rules/standards/skill.md +0 -21
- package/governance/rules/standards/standard.md +0 -13
- package/scripts/config.sh +0 -11
- package/scripts/lib/gov.sh +0 -14
- package/scripts/lib/sandbox-fixtures.sh +0 -191
- package/scripts/lib/sandbox-git.sh +0 -125
- package/scripts/lib/sandbox-path.sh +0 -50
- package/scripts/sandbox-hook.sh +0 -99
- package/src/gov/standard-rules.ts +0 -179
- package/src/records/migrate.ts +0 -78
- package/src/records/stale.ts +0 -243
- package/src/sandbox/hooks.ts +0 -128
- /package/{standards → claude/skills/draft-figure/references}/figures.md +0 -0
- /package/{standards → claude/skills/git-branch/references}/slug.md +0 -0
- /package/{standards → claude/skills/git-commit/references}/commit.md +0 -0
- /package/{standards → claude/skills/git-commit/references}/versioning.md +0 -0
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import { existsSync, readdirSync, readFileSync } from 'node:fs'
|
|
2
|
-
import { mkdir, rm, writeFile } from 'node:fs/promises'
|
|
3
|
-
import { basename, join, relative } from 'node:path'
|
|
4
|
-
import { listRuleSourcePaths, rulesSourceDir } from '@/gov/install'
|
|
5
|
-
import { parseFrontmatter } from '@/indexes/frontmatter'
|
|
6
|
-
|
|
7
|
-
const STANDARDS_REL = 'standards'
|
|
8
|
-
|
|
9
|
-
/** The band the generated rules ship in, named for what they point at. */
|
|
10
|
-
export const STANDARD_RULES_BAND = 'standards'
|
|
11
|
-
|
|
12
|
-
export type StandardRulesResult =
|
|
13
|
-
| { readonly ok: true; readonly written: readonly string[] }
|
|
14
|
-
| { readonly ok: false; readonly reason: string }
|
|
15
|
-
|
|
16
|
-
interface StandardRule {
|
|
17
|
-
readonly name: string
|
|
18
|
-
readonly sourceRel: string
|
|
19
|
-
readonly title: string
|
|
20
|
-
readonly description: string
|
|
21
|
-
readonly paths: readonly string[]
|
|
22
|
-
readonly bullets: readonly string[]
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export function standardRulesDir(root: string): string {
|
|
26
|
-
return join(rulesSourceDir(root), STANDARD_RULES_BAND)
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Generates one path-scoped rule per standard whose frontmatter carries
|
|
31
|
-
* `paths:`. The standard owns the glob and the operative bullets, so the rule
|
|
32
|
-
* is output, committed beside the authored bands so every reader of
|
|
33
|
-
* `governance/rules/` sees it as an ordinary file.
|
|
34
|
-
*
|
|
35
|
-
* Every standard is read and checked before anything is written, so a refusal
|
|
36
|
-
* leaves the previous output whole rather than half cleared.
|
|
37
|
-
*/
|
|
38
|
-
export async function regenStandardRules(
|
|
39
|
-
root: string,
|
|
40
|
-
): Promise<StandardRulesResult> {
|
|
41
|
-
const standardsDir = join(root, STANDARDS_REL)
|
|
42
|
-
if (!existsSync(standardsDir)) return { ok: true, written: [] }
|
|
43
|
-
|
|
44
|
-
const reserved = reservedNames(root)
|
|
45
|
-
const rules: StandardRule[] = []
|
|
46
|
-
|
|
47
|
-
for (const file of readdirSync(standardsDir).sort()) {
|
|
48
|
-
if (!file.endsWith('.md')) continue
|
|
49
|
-
const read = readStandard(root, file, reserved)
|
|
50
|
-
if (typeof read === 'string') return { ok: false, reason: read }
|
|
51
|
-
if (read !== undefined) rules.push(read)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const dir = standardRulesDir(root)
|
|
55
|
-
await rm(dir, { recursive: true, force: true })
|
|
56
|
-
if (rules.length > 0) await mkdir(dir, { recursive: true })
|
|
57
|
-
|
|
58
|
-
const written: string[] = []
|
|
59
|
-
for (const rule of rules) {
|
|
60
|
-
const dest = join(dir, `${rule.name}.md`)
|
|
61
|
-
await writeFile(dest, renderStandardRule(rule))
|
|
62
|
-
written.push(relative(root, dest))
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return { ok: true, written }
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Band folders and authored rule basenames. A bare-word rule name equal to a
|
|
70
|
-
* band would install the whole band through `--add`, and one equal to an
|
|
71
|
-
* authored rule would shadow it in the name index.
|
|
72
|
-
*/
|
|
73
|
-
function reservedNames(root: string): {
|
|
74
|
-
readonly bands: ReadonlySet<string>
|
|
75
|
-
readonly rules: ReadonlySet<string>
|
|
76
|
-
} {
|
|
77
|
-
const bands = new Set<string>([STANDARD_RULES_BAND])
|
|
78
|
-
const rules = new Set<string>()
|
|
79
|
-
|
|
80
|
-
for (const rel of listRuleSourcePaths(root)) {
|
|
81
|
-
const segments = rel.split('/')
|
|
82
|
-
if (segments.length > 1) bands.add(segments[0])
|
|
83
|
-
if (segments[0] === STANDARD_RULES_BAND) continue
|
|
84
|
-
rules.add(basename(rel, '.md'))
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return { bands, rules }
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/** A rule to render, `undefined` for a standard with no `paths:`, or a reason. */
|
|
91
|
-
function readStandard(
|
|
92
|
-
root: string,
|
|
93
|
-
file: string,
|
|
94
|
-
reserved: ReturnType<typeof reservedNames>,
|
|
95
|
-
): StandardRule | string | undefined {
|
|
96
|
-
const sourceRel = `${STANDARDS_REL}/${file}`
|
|
97
|
-
const fields = parseFrontmatter(
|
|
98
|
-
readFileSync(join(root, STANDARDS_REL, file), 'utf8'),
|
|
99
|
-
)?.fields
|
|
100
|
-
if (fields === undefined || fields.paths === undefined) return undefined
|
|
101
|
-
|
|
102
|
-
const name = basename(file, '.md')
|
|
103
|
-
if (!isStringList(fields.paths)) {
|
|
104
|
-
return `${sourceRel}: paths must be a list of strings`
|
|
105
|
-
}
|
|
106
|
-
if (fields.rule !== undefined && !isStringList(fields.rule)) {
|
|
107
|
-
return `${sourceRel}: rule must be a list of strings`
|
|
108
|
-
}
|
|
109
|
-
if (reserved.bands.has(name)) {
|
|
110
|
-
return `${sourceRel}: name collides with a rule band folder`
|
|
111
|
-
}
|
|
112
|
-
if (reserved.rules.has(name)) {
|
|
113
|
-
return `${sourceRel}: name collides with an authored rule`
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
return {
|
|
117
|
-
name,
|
|
118
|
-
sourceRel,
|
|
119
|
-
title: typeof fields.title === 'string' ? fields.title : name,
|
|
120
|
-
description:
|
|
121
|
-
typeof fields.description === 'string' ? fields.description : '',
|
|
122
|
-
paths: fields.paths,
|
|
123
|
-
bullets: fields.rule ?? [],
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
function isStringList(value: unknown): value is string[] {
|
|
128
|
-
return (
|
|
129
|
-
Array.isArray(value) && value.every((entry) => typeof entry === 'string')
|
|
130
|
-
)
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
function renderStandardRule(rule: StandardRule): string {
|
|
134
|
-
const scope = rule.description.replace(/\.$/, '')
|
|
135
|
-
const pointer = [
|
|
136
|
-
`Follow the ${rule.name} standard for ${lowerFirst(scope)}.`,
|
|
137
|
-
'It is the single source.',
|
|
138
|
-
`Read it with \`canon standards ${rule.name}\`.`,
|
|
139
|
-
].join(' ')
|
|
140
|
-
|
|
141
|
-
return [
|
|
142
|
-
'---',
|
|
143
|
-
`# Generated by \`canon gov regen\` from ${rule.sourceRel}. Edit that frontmatter, not this file.`,
|
|
144
|
-
`description: ${yamlScalar(rule.description)}`,
|
|
145
|
-
'paths:',
|
|
146
|
-
...rule.paths.map((glob) => ` - ${yamlQuoted(glob)}`),
|
|
147
|
-
'---',
|
|
148
|
-
'',
|
|
149
|
-
`# ${rule.title.replace(/\breference$/, 'standards')}`,
|
|
150
|
-
'',
|
|
151
|
-
'## Authority',
|
|
152
|
-
'',
|
|
153
|
-
...[pointer, ...rule.bullets].map((bullet) => `- ${bullet}`),
|
|
154
|
-
'',
|
|
155
|
-
].join('\n')
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
function lowerFirst(text: string): string {
|
|
159
|
-
return text.charAt(0).toLowerCase() + text.slice(1)
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/** Plain when YAML would read it back unchanged, single-quoted otherwise. */
|
|
163
|
-
function yamlScalar(text: string): string {
|
|
164
|
-
const isPlain =
|
|
165
|
-
text !== '' &&
|
|
166
|
-
!/^[-?:,[\]{}#&*!|>'"%@`\s]/.test(text) &&
|
|
167
|
-
!/: |\s#|:$|\s$/.test(text)
|
|
168
|
-
return isPlain ? text : yamlQuoted(text)
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Quoted the way Prettier's `singleQuote` leaves YAML, so the drift check
|
|
173
|
-
* never fights the formatter: single quotes unless the text holds one and
|
|
174
|
-
* double quotes would need no escape.
|
|
175
|
-
*/
|
|
176
|
-
function yamlQuoted(text: string): string {
|
|
177
|
-
if (text.includes("'") && !/["\\]/.test(text)) return `"${text}"`
|
|
178
|
-
return `'${text.replaceAll("'", "''")}'`
|
|
179
|
-
}
|
package/src/records/migrate.ts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { parseFrontmatter, readField } from '@/indexes/frontmatter'
|
|
2
|
-
import {
|
|
3
|
-
CATEGORY_BY_TYPE,
|
|
4
|
-
type FindingRemedy,
|
|
5
|
-
MEMORY_NAME,
|
|
6
|
-
memoryType,
|
|
7
|
-
} from '@/records/validate'
|
|
8
|
-
|
|
9
|
-
export const MIGRATE_REFUSALS = ['field-unrecoverable'] as const
|
|
10
|
-
|
|
11
|
-
export type MigrateRefusal = (typeof MIGRATE_REFUSALS)[number]
|
|
12
|
-
|
|
13
|
-
export interface MigrateRepair {
|
|
14
|
-
readonly ok: true
|
|
15
|
-
readonly text: string
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface MigrateRefused {
|
|
19
|
-
readonly ok: false
|
|
20
|
-
readonly reason: MigrateRefusal
|
|
21
|
-
readonly message: string
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export type MigrateOutcome = MigrateRepair | MigrateRefused
|
|
25
|
-
|
|
26
|
-
function refuse(message: string): MigrateRefused {
|
|
27
|
-
return { ok: false, reason: 'field-unrecoverable', message }
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Repairs the one recoverable shape of `frontmatter-incomplete`: a memory
|
|
32
|
-
* record missing `category` alone. The value sits in the filename's type
|
|
33
|
-
* prefix already, which is the same fact `checkMemory` derives it from, so a
|
|
34
|
-
* repair here writes back what the record already states rather than a value
|
|
35
|
-
* a transform invented. It re-reads the file rather than trusting a value
|
|
36
|
-
* carried on the `Finding`, so a transform and the check it repairs cannot
|
|
37
|
-
* drift apart.
|
|
38
|
-
*/
|
|
39
|
-
function categoryFromName(name: string, text: string): MigrateOutcome {
|
|
40
|
-
const frontmatter = parseFrontmatter(text)
|
|
41
|
-
if (!frontmatter) {
|
|
42
|
-
return refuse(`${name} carries no frontmatter block to add category to.`)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
if (readField(frontmatter, 'category')) {
|
|
46
|
-
return refuse(`${name} already carries a category.`)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const match = MEMORY_NAME.exec(name)
|
|
50
|
-
const type = match ? memoryType(match[1]) : undefined
|
|
51
|
-
if (!type) {
|
|
52
|
-
return refuse(
|
|
53
|
-
`${name} is not named <type>-<slug>.md, so category has no type to derive from.`,
|
|
54
|
-
)
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const rewritten = frontmatter.raw.replace(
|
|
58
|
-
/\n---$/,
|
|
59
|
-
`\ncategory: ${CATEGORY_BY_TYPE[type]}\n---`,
|
|
60
|
-
)
|
|
61
|
-
|
|
62
|
-
return { ok: true, text: rewritten + text.slice(frontmatter.raw.length) }
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const TRANSFORMS: Readonly<
|
|
66
|
-
Record<FindingRemedy, (name: string, text: string) => MigrateOutcome>
|
|
67
|
-
> = {
|
|
68
|
-
'category-from-name': categoryFromName,
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/** Applies the transform a finding's `remedy` names against its own text. */
|
|
72
|
-
export function migrateRecord(
|
|
73
|
-
remedy: FindingRemedy,
|
|
74
|
-
name: string,
|
|
75
|
-
text: string,
|
|
76
|
-
): MigrateOutcome {
|
|
77
|
-
return TRANSFORMS[remedy](name, text)
|
|
78
|
-
}
|
package/src/records/stale.ts
DELETED
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
import { existsSync } from 'node:fs'
|
|
2
|
-
import { readdir, readFile } from 'node:fs/promises'
|
|
3
|
-
import { join, relative } from 'node:path'
|
|
4
|
-
import { parseFrontmatter, readField } from '@/indexes/frontmatter'
|
|
5
|
-
import {
|
|
6
|
-
CREATION_ROOT,
|
|
7
|
-
RECORD_ROOTS,
|
|
8
|
-
recordDir,
|
|
9
|
-
SCRATCH,
|
|
10
|
-
spell,
|
|
11
|
-
} from '@/roots/record'
|
|
12
|
-
|
|
13
|
-
/** The window after which a reviewed entry is due again, in days. */
|
|
14
|
-
export const DEFAULT_REVIEW_DAYS = 30
|
|
15
|
-
|
|
16
|
-
const DAY_MS = 24 * 60 * 60 * 1000
|
|
17
|
-
|
|
18
|
-
const MEMORY_INDEX = 'index.md'
|
|
19
|
-
|
|
20
|
-
export interface StaleEntry {
|
|
21
|
-
/** The filename stem, which is what a review names an entry by. */
|
|
22
|
-
readonly name: string
|
|
23
|
-
readonly category: string | null
|
|
24
|
-
/** `YYYY-MM-DD`, or null when the entry carries no readable review date. */
|
|
25
|
-
readonly reviewed: string | null
|
|
26
|
-
/** The raw value of a `reviewed` field that is not a date, present only then. */
|
|
27
|
-
readonly invalidReviewed?: string
|
|
28
|
-
readonly due: boolean
|
|
29
|
-
/** Backticked paths the entry cites that the project root does not hold. */
|
|
30
|
-
readonly unresolved: readonly string[]
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface StaleReport {
|
|
34
|
-
readonly ok: true
|
|
35
|
-
readonly root: string
|
|
36
|
-
/** The pen read, relative to the root. */
|
|
37
|
-
readonly folder: string
|
|
38
|
-
readonly days: number
|
|
39
|
-
readonly total: number
|
|
40
|
-
readonly due: number
|
|
41
|
-
readonly entries: readonly StaleEntry[]
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export const STALE_REFUSALS = ['no-folder'] as const
|
|
45
|
-
|
|
46
|
-
export type StaleRefusal = (typeof STALE_REFUSALS)[number]
|
|
47
|
-
|
|
48
|
-
export interface StaleRefused {
|
|
49
|
-
readonly ok: false
|
|
50
|
-
readonly reason: StaleRefusal
|
|
51
|
-
readonly message: string
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export type StaleOutcome = StaleReport | StaleRefused
|
|
55
|
-
|
|
56
|
-
const REVIEWED_FIELD = /^reviewed:[ \t]*(.*?)[ \t]*$/m
|
|
57
|
-
const ISO_DATE = /^\d{4}-\d{2}-\d{2}$/
|
|
58
|
-
const RAW_FRONTMATTER = /^---\n([\s\S]*?)\n---/
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Reads `reviewed` off the raw block rather than the parsed fields, for the
|
|
62
|
-
* reason `hasOpeningDate` in the validator gives: a YAML parser resolves a
|
|
63
|
-
* bare `YYYY-MM-DD` to a date on one schema and a string on another.
|
|
64
|
-
*
|
|
65
|
-
* A value that is not a calendar date reads as never reviewed and is carried
|
|
66
|
-
* back so the review can see it, rather than throwing over one hand edit.
|
|
67
|
-
*/
|
|
68
|
-
export function readReviewed(
|
|
69
|
-
text: string,
|
|
70
|
-
): Pick<StaleEntry, 'reviewed' | 'invalidReviewed'> {
|
|
71
|
-
const block = RAW_FRONTMATTER.exec(text)?.[1]
|
|
72
|
-
const match = block ? REVIEWED_FIELD.exec(block) : null
|
|
73
|
-
if (!match) return { reviewed: null }
|
|
74
|
-
|
|
75
|
-
const value = match[1].replace(/^(['"])(.*)\1$/, '$2')
|
|
76
|
-
const parsed = Date.parse(`${value}T00:00:00Z`)
|
|
77
|
-
const isDate =
|
|
78
|
-
ISO_DATE.test(value) &&
|
|
79
|
-
Number.isFinite(parsed) &&
|
|
80
|
-
new Date(parsed).toISOString().slice(0, 10) === value
|
|
81
|
-
|
|
82
|
-
return isDate
|
|
83
|
-
? { reviewed: value }
|
|
84
|
-
: { reviewed: null, invalidReviewed: value }
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Tokens that name a session record, scratch at either root, or a checkout,
|
|
89
|
-
* none of which a tree commits. The scratch spellings come from `spell` so the
|
|
90
|
-
* legacy root's variant is stated in one place.
|
|
91
|
-
*/
|
|
92
|
-
const UNTRACKED_PREFIXES = [
|
|
93
|
-
...RECORD_ROOTS.map((at) => `${at}/${spell(at, SCRATCH)}/`),
|
|
94
|
-
`${CREATION_ROOT}/`,
|
|
95
|
-
'.claude/worktrees/',
|
|
96
|
-
]
|
|
97
|
-
|
|
98
|
-
const INLINE_CODE = /`([^`\n]+)`/g
|
|
99
|
-
const LINE_ANCHOR = /:\d+(?:[-:]\d+)*$/
|
|
100
|
-
const FILE_EXTENSION = /\.[A-Za-z0-9]+$/
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Reduces one backticked token to the repository path it cites, or undefined
|
|
104
|
-
* when it cites none.
|
|
105
|
-
*
|
|
106
|
-
* A path is a token carrying a `/` and ending in a file extension once any
|
|
107
|
-
* line or heading anchor is stripped. A placeholder, an elided path, a glob, a
|
|
108
|
-
* variable, a URL, and a path outside the project all look like paths and
|
|
109
|
-
* resolve against nothing in the tree, so each is dropped rather than reported.
|
|
110
|
-
*/
|
|
111
|
-
function toCitedPath(token: string): string | undefined {
|
|
112
|
-
if (/\s/.test(token) || token.includes('://')) return undefined
|
|
113
|
-
if (/[<*{$]/.test(token) || token.includes('...')) return undefined
|
|
114
|
-
if (/^(?:\/|~|\.\.\/)/.test(token)) return undefined
|
|
115
|
-
|
|
116
|
-
const path = token
|
|
117
|
-
.replace(/#.*$/, '')
|
|
118
|
-
.replace(LINE_ANCHOR, '')
|
|
119
|
-
.replace(/^\.\//, '')
|
|
120
|
-
|
|
121
|
-
if (!path.includes('/') || !FILE_EXTENSION.test(path)) return undefined
|
|
122
|
-
if (UNTRACKED_PREFIXES.some((prefix) => path.startsWith(prefix)))
|
|
123
|
-
return undefined
|
|
124
|
-
|
|
125
|
-
return path
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/** Every distinct repository path a body cites in inline code, in order. */
|
|
129
|
-
export function citedPaths(body: string): string[] {
|
|
130
|
-
const paths = new Set<string>()
|
|
131
|
-
|
|
132
|
-
for (const match of body.matchAll(INLINE_CODE)) {
|
|
133
|
-
const path = toCitedPath(match[1])
|
|
134
|
-
if (path) paths.add(path)
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
return [...paths]
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
function isDue(reviewed: string | null, days: number, now: number): boolean {
|
|
141
|
-
if (reviewed === null) return true
|
|
142
|
-
return now - Date.parse(`${reviewed}T00:00:00`) > days * DAY_MS
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
async function readEntry(
|
|
146
|
-
root: string,
|
|
147
|
-
dir: string,
|
|
148
|
-
file: string,
|
|
149
|
-
days: number,
|
|
150
|
-
now: number,
|
|
151
|
-
): Promise<StaleEntry> {
|
|
152
|
-
const text = (await readFile(join(dir, file), 'utf8')).replaceAll(
|
|
153
|
-
'\r\n',
|
|
154
|
-
'\n',
|
|
155
|
-
)
|
|
156
|
-
const frontmatter = parseFrontmatter(text)
|
|
157
|
-
const review = readReviewed(text)
|
|
158
|
-
const body = text.slice(RAW_FRONTMATTER.exec(text)?.[0].length ?? 0)
|
|
159
|
-
|
|
160
|
-
return {
|
|
161
|
-
name: file.replace(/\.md$/, ''),
|
|
162
|
-
category: readField(frontmatter, 'category') ?? null,
|
|
163
|
-
...review,
|
|
164
|
-
due: isDue(review.reviewed, days, now),
|
|
165
|
-
unresolved: citedPaths(body).filter(
|
|
166
|
-
(path) => !existsSync(join(root, path)),
|
|
167
|
-
),
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* The order a review takes a batch in: due entries first, and among them the
|
|
173
|
-
* ones citing a tree that moved, then the longest unreviewed, then by name so
|
|
174
|
-
* two runs over one pen agree.
|
|
175
|
-
*/
|
|
176
|
-
function compareEntries(left: StaleEntry, right: StaleEntry): number {
|
|
177
|
-
if (left.due !== right.due) return left.due ? -1 : 1
|
|
178
|
-
|
|
179
|
-
const leftMoved = left.unresolved.length > 0
|
|
180
|
-
const rightMoved = right.unresolved.length > 0
|
|
181
|
-
if (leftMoved !== rightMoved) return leftMoved ? -1 : 1
|
|
182
|
-
|
|
183
|
-
if (left.reviewed !== right.reviewed) {
|
|
184
|
-
if (left.reviewed === null) return -1
|
|
185
|
-
if (right.reviewed === null) return 1
|
|
186
|
-
return left.reviewed < right.reviewed ? -1 : 1
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
return left.name.localeCompare(right.name)
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* Reports each memory entry's review state and the paths it cites that the
|
|
194
|
-
* project no longer holds, ordered so a caller takes the first N as a batch.
|
|
195
|
-
*
|
|
196
|
-
* It reads the top level of the pen alone. `review/` holds receipts and
|
|
197
|
-
* `archive/` holds retirements, and neither is an entry a review would queue.
|
|
198
|
-
* Paths resolve against the project root rather than the entry's folder, since
|
|
199
|
-
* an entry cites the tree it was written about. It reports and never writes.
|
|
200
|
-
*
|
|
201
|
-
* `now` is a parameter so a test can pin the window against fixture dates.
|
|
202
|
-
*/
|
|
203
|
-
export async function staleMemory(
|
|
204
|
-
root: string,
|
|
205
|
-
days: number = DEFAULT_REVIEW_DAYS,
|
|
206
|
-
now: number = Date.now(),
|
|
207
|
-
): Promise<StaleOutcome> {
|
|
208
|
-
const dir = recordDir(root, 'memory')
|
|
209
|
-
|
|
210
|
-
if (!existsSync(dir)) {
|
|
211
|
-
return {
|
|
212
|
-
ok: false,
|
|
213
|
-
reason: 'no-folder',
|
|
214
|
-
message: `No memory folder at ${dir}, so there are no entries to read.`,
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
const listed = await readdir(dir, { withFileTypes: true })
|
|
219
|
-
const files = listed
|
|
220
|
-
.filter(
|
|
221
|
-
(entry) =>
|
|
222
|
-
entry.isFile() &&
|
|
223
|
-
entry.name.endsWith('.md') &&
|
|
224
|
-
entry.name !== MEMORY_INDEX,
|
|
225
|
-
)
|
|
226
|
-
.map((entry) => entry.name)
|
|
227
|
-
|
|
228
|
-
const entries = (
|
|
229
|
-
await Promise.all(
|
|
230
|
-
files.map((file) => readEntry(root, dir, file, days, now)),
|
|
231
|
-
)
|
|
232
|
-
).toSorted(compareEntries)
|
|
233
|
-
|
|
234
|
-
return {
|
|
235
|
-
ok: true,
|
|
236
|
-
root,
|
|
237
|
-
folder: relative(root, dir),
|
|
238
|
-
days,
|
|
239
|
-
total: entries.length,
|
|
240
|
-
due: entries.filter((entry) => entry.due).length,
|
|
241
|
-
entries,
|
|
242
|
-
}
|
|
243
|
-
}
|
package/src/sandbox/hooks.ts
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { spawnSync } from 'node:child_process'
|
|
2
|
-
import { existsSync, mkdtempSync, readFileSync, rmSync } from 'node:fs'
|
|
3
|
-
import { tmpdir } from 'node:os'
|
|
4
|
-
import { join } from 'node:path'
|
|
5
|
-
import { PROJECT_ROOT } from '@/roots/project'
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* The bash entry a scenario's hooks run through. Scenarios and the library they
|
|
9
|
-
* call stay bash, so this contract is the whole of what the TypeScript harness
|
|
10
|
-
* knows about one: which hooks it declares and what `use_config` exports.
|
|
11
|
-
*/
|
|
12
|
-
const HOOK_SCRIPT = join(PROJECT_ROOT, 'scripts', 'sandbox-hook.sh')
|
|
13
|
-
|
|
14
|
-
const ANCHOR_RECORD = '@anchor='
|
|
15
|
-
|
|
16
|
-
export interface Probe {
|
|
17
|
-
readonly exports: Readonly<Record<string, string>>
|
|
18
|
-
readonly isAnchor: boolean
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export type ProbeResult =
|
|
22
|
-
| ({ readonly ok: true } & Probe)
|
|
23
|
-
| { readonly ok: false; readonly status: number }
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Reads the NUL-separated `NAME=value` pairs the probe prints. NUL rather than a
|
|
27
|
-
* newline, since an exported value can hold one. The anchor record closes every
|
|
28
|
-
* well-formed probe, so output missing it is a probe that did not finish.
|
|
29
|
-
*/
|
|
30
|
-
export function parseProbe(stdout: string): Probe {
|
|
31
|
-
const { exports, anchor } = parsePairs(stdout)
|
|
32
|
-
if (anchor === undefined)
|
|
33
|
-
throw new Error('the probe printed no anchor record')
|
|
34
|
-
|
|
35
|
-
return { exports, isAnchor: anchor === '1' }
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function parsePairs(text: string): {
|
|
39
|
-
exports: Record<string, string>
|
|
40
|
-
anchor: string | undefined
|
|
41
|
-
} {
|
|
42
|
-
const exports: Record<string, string> = {}
|
|
43
|
-
let anchor: string | undefined
|
|
44
|
-
|
|
45
|
-
for (const record of text.split('\0')) {
|
|
46
|
-
if (record.startsWith(ANCHOR_RECORD)) {
|
|
47
|
-
anchor = record.slice(ANCHOR_RECORD.length)
|
|
48
|
-
continue
|
|
49
|
-
}
|
|
50
|
-
const split = record.indexOf('=')
|
|
51
|
-
if (split > 0) exports[record.slice(0, split)] = record.slice(split + 1)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
return { exports, anchor }
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Runs `use_config` and `use_anchor` in a child and returns what they exported.
|
|
59
|
-
* Stderr is inherited by default, so a hook that fails narrates into the same
|
|
60
|
-
* frame the harness writes. A non-zero status passes through rather than being
|
|
61
|
-
* flattened, since the harness exits with it.
|
|
62
|
-
*/
|
|
63
|
-
export function probeScenario(
|
|
64
|
-
file: string,
|
|
65
|
-
env: NodeJS.ProcessEnv,
|
|
66
|
-
stderr: 'inherit' | 'pipe' = 'inherit',
|
|
67
|
-
): ProbeResult {
|
|
68
|
-
const result = spawnSync('bash', [HOOK_SCRIPT, 'probe', file], {
|
|
69
|
-
env,
|
|
70
|
-
encoding: 'utf8',
|
|
71
|
-
stdio: ['ignore', 'pipe', stderr],
|
|
72
|
-
})
|
|
73
|
-
const status = result.status ?? 1
|
|
74
|
-
if (status !== 0) return { ok: false, status }
|
|
75
|
-
|
|
76
|
-
return { ok: true, ...parseProbe(result.stdout) }
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* How `stage_setup` ended. The retired dispatcher ran it in its own shell, so
|
|
81
|
-
* an `exit` there ended provisioning through the frame-closing trap, and an
|
|
82
|
-
* `exec` replaced the harness outright, leaving its program's frame as the last
|
|
83
|
-
* one written. The harness reproduces both from this.
|
|
84
|
-
*/
|
|
85
|
-
export type StageEnding = 'returned' | 'exited' | 'replaced'
|
|
86
|
-
|
|
87
|
-
export interface StageResult {
|
|
88
|
-
readonly status: number
|
|
89
|
-
readonly ending: StageEnding
|
|
90
|
-
readonly exports: Readonly<Record<string, string>>
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
const EXITED_RECORD = '@exited'
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Runs `stage_setup` inside the tree with every stream inherited, so a scenario
|
|
97
|
-
* prompting through `select_or_route_scenario` still reaches a terminal and its
|
|
98
|
-
* narration lands in order with the harness's own.
|
|
99
|
-
*
|
|
100
|
-
* The exports `stage_setup` changed come back through a file rather than a
|
|
101
|
-
* pipe. Stdout belongs to the scenario, and a background process a scenario
|
|
102
|
-
* starts would hold an extra pipe open past the child's exit.
|
|
103
|
-
*/
|
|
104
|
-
export function stageScenario(
|
|
105
|
-
file: string,
|
|
106
|
-
env: NodeJS.ProcessEnv,
|
|
107
|
-
stdio: 'inherit' | 'ignore' = 'inherit',
|
|
108
|
-
): StageResult {
|
|
109
|
-
const scratch = mkdtempSync(join(tmpdir(), 'canon-sandbox-hook-'))
|
|
110
|
-
const report = join(scratch, 'exports')
|
|
111
|
-
|
|
112
|
-
try {
|
|
113
|
-
const result = spawnSync('bash', [HOOK_SCRIPT, 'stage', file, report], {
|
|
114
|
-
env,
|
|
115
|
-
stdio,
|
|
116
|
-
})
|
|
117
|
-
const status = result.status ?? 1
|
|
118
|
-
if (!existsSync(report)) return { status, ending: 'replaced', exports: {} }
|
|
119
|
-
|
|
120
|
-
const text = readFileSync(report, 'utf8')
|
|
121
|
-
if (text.split('\0').includes(EXITED_RECORD))
|
|
122
|
-
return { status, ending: 'exited', exports: {} }
|
|
123
|
-
|
|
124
|
-
return { status, ending: 'returned', exports: parsePairs(text).exports }
|
|
125
|
-
} finally {
|
|
126
|
-
rmSync(scratch, { recursive: true, force: true })
|
|
127
|
-
}
|
|
128
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|