@ontrails/trails 1.0.0-beta.18 → 1.0.0-beta.19
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/CHANGELOG.md +117 -0
- package/README.md +7 -10
- package/package.json +13 -12
- package/src/app.ts +14 -4
- package/src/cli.ts +16 -0
- package/src/lifecycle-source-io.ts +33 -0
- package/src/project-writes.ts +62 -5
- package/src/retired-topo-command.ts +36 -0
- package/src/run-adapter-check.ts +76 -0
- package/src/run-collision.ts +1 -0
- package/src/trails/adapter-check.ts +244 -0
- package/src/trails/add-surface.ts +18 -18
- package/src/trails/add-trail.ts +3 -2
- package/src/trails/add-verify.ts +30 -6
- package/src/trails/{topo-compile.ts → compile.ts} +16 -8
- package/src/trails/completions-complete.ts +1 -1
- package/src/trails/create-adapter.ts +1084 -0
- package/src/trails/create-scaffold.ts +243 -29
- package/src/trails/create.ts +118 -17
- package/src/trails/deprecate.ts +59 -0
- package/src/trails/dev-clean.ts +2 -2
- package/src/trails/dev-reset.ts +2 -2
- package/src/trails/dev-stats.ts +1 -1
- package/src/trails/doctor.ts +56 -0
- package/src/trails/draft-promote.ts +1 -0
- package/src/trails/guide.ts +2 -2
- package/src/trails/revise.ts +53 -0
- package/src/trails/run-example.ts +12 -7
- package/src/trails/run-examples.ts +3 -3
- package/src/trails/run.ts +7 -4
- package/src/trails/survey.ts +332 -25
- package/src/trails/topo-history.ts +1 -1
- package/src/trails/topo-output-schemas.ts +30 -1
- package/src/trails/topo-pin.ts +3 -2
- package/src/trails/topo-read-support.ts +49 -8
- package/src/trails/topo-reports.ts +39 -22
- package/src/trails/topo-store-support.ts +62 -16
- package/src/trails/topo-support.ts +1 -1
- package/src/trails/topo-unpin.ts +2 -2
- package/src/trails/topo.ts +2 -2
- package/src/trails/{topo-verify.ts → validate.ts} +7 -7
- package/src/trails/version-lifecycle-support.ts +945 -0
- package/src/trails/warden-guide.ts +8 -0
- package/src/trails/warden.ts +18 -2
- package/src/versions.ts +4 -1
|
@@ -4,6 +4,8 @@ import {
|
|
|
4
4
|
buildWardenGuideManifest,
|
|
5
5
|
formatWardenGuide,
|
|
6
6
|
wardenDepthValues,
|
|
7
|
+
wardenFixClasses,
|
|
8
|
+
wardenFixSafeties,
|
|
7
9
|
wardenGuideFormatValues,
|
|
8
10
|
wardenRuleConcerns,
|
|
9
11
|
wardenRuleLifecycleStates,
|
|
@@ -31,6 +33,12 @@ const wardenRuleGuideEntrySchema = z.object({
|
|
|
31
33
|
depth: z.enum(wardenDepthValues),
|
|
32
34
|
description: z.string(),
|
|
33
35
|
docs: z.array(wardenGuidanceLinkSchema).readonly(),
|
|
36
|
+
fix: z
|
|
37
|
+
.object({
|
|
38
|
+
class: z.enum(wardenFixClasses),
|
|
39
|
+
safety: z.enum(wardenFixSafeties),
|
|
40
|
+
})
|
|
41
|
+
.optional(),
|
|
34
42
|
guidance: wardenGuidanceSchema.optional(),
|
|
35
43
|
id: z.string(),
|
|
36
44
|
invariant: z.string(),
|
package/src/trails/warden.ts
CHANGED
|
@@ -23,6 +23,10 @@ import { resolveTrailRootDir } from './root-dir.js';
|
|
|
23
23
|
// ---------------------------------------------------------------------------
|
|
24
24
|
|
|
25
25
|
const wardenInputSchema = z.object({
|
|
26
|
+
adapterCheck: z
|
|
27
|
+
.boolean()
|
|
28
|
+
.default(false)
|
|
29
|
+
.describe('Run shared adapter authoring checks'),
|
|
26
30
|
apps: z
|
|
27
31
|
.array(z.string())
|
|
28
32
|
.optional()
|
|
@@ -40,6 +44,7 @@ const wardenInputSchema = z.object({
|
|
|
40
44
|
.default(false)
|
|
41
45
|
.describe('Alias for --drafts exclude'),
|
|
42
46
|
failOn: z.enum(wardenFailOnValues).optional().describe('Failure threshold'),
|
|
47
|
+
fix: z.boolean().default(false).describe('Apply safe source fixes'),
|
|
43
48
|
format: z.enum(wardenFormatValues).optional().describe('Output format'),
|
|
44
49
|
github: z.boolean().default(false).describe('Alias for --format github'),
|
|
45
50
|
includeDrafts: z
|
|
@@ -129,6 +134,8 @@ export const buildWardenCommandArgs = (
|
|
|
129
134
|
pushValue(args, '--drafts', input.drafts);
|
|
130
135
|
}
|
|
131
136
|
pushFlag(args, input.noLockMutation, '--no-lock-mutation');
|
|
137
|
+
pushFlag(args, input.fix, '--fix');
|
|
138
|
+
pushFlag(args, input.adapterCheck, '--adapter-check');
|
|
132
139
|
pushValue(args, '--config-path', input.configPath);
|
|
133
140
|
pushApps(args, input.apps);
|
|
134
141
|
|
|
@@ -139,7 +146,7 @@ export const wardenTrail = trail('warden', {
|
|
|
139
146
|
blaze: async (input, ctx) => {
|
|
140
147
|
const rootDirResult = resolveTrailRootDir(input.rootDir, ctx.cwd);
|
|
141
148
|
if (rootDirResult.isErr()) {
|
|
142
|
-
return
|
|
149
|
+
return rootDirResult;
|
|
143
150
|
}
|
|
144
151
|
const rootDir = rootDirResult.value;
|
|
145
152
|
const result = await runWardenCommand({
|
|
@@ -153,6 +160,7 @@ export const wardenTrail = trail('warden', {
|
|
|
153
160
|
diagnostics: [...report.diagnostics],
|
|
154
161
|
drift: report.drift,
|
|
155
162
|
errorCount: report.errorCount,
|
|
163
|
+
fixes: report.fixes,
|
|
156
164
|
formatted: result.output,
|
|
157
165
|
passed: report.passed,
|
|
158
166
|
warnCount: report.warnCount,
|
|
@@ -174,7 +182,7 @@ export const wardenTrail = trail('warden', {
|
|
|
174
182
|
},
|
|
175
183
|
],
|
|
176
184
|
input: wardenInputSchema,
|
|
177
|
-
intent: '
|
|
185
|
+
intent: 'write',
|
|
178
186
|
output: z.object({
|
|
179
187
|
diagnostics: z.array(
|
|
180
188
|
diagnosticSchema.extend({ topoName: z.string().optional() })
|
|
@@ -188,8 +196,16 @@ export const wardenTrail = trail('warden', {
|
|
|
188
196
|
})
|
|
189
197
|
.nullable(),
|
|
190
198
|
errorCount: z.number(),
|
|
199
|
+
fixes: z
|
|
200
|
+
.object({
|
|
201
|
+
applied: z.number(),
|
|
202
|
+
filesChanged: z.number(),
|
|
203
|
+
skipped: z.number(),
|
|
204
|
+
})
|
|
205
|
+
.optional(),
|
|
191
206
|
formatted: z.string(),
|
|
192
207
|
passed: z.boolean(),
|
|
193
208
|
warnCount: z.number(),
|
|
194
209
|
}),
|
|
210
|
+
permit: 'public',
|
|
195
211
|
});
|
package/src/versions.ts
CHANGED
|
@@ -23,6 +23,9 @@ export const trailsPackageVersion = requireVersion(
|
|
|
23
23
|
'@ontrails/trails'
|
|
24
24
|
);
|
|
25
25
|
|
|
26
|
-
export const ontrailsPackageRange =
|
|
26
|
+
export const ontrailsPackageRange = requireVersion(
|
|
27
|
+
trailsPackageVersion,
|
|
28
|
+
'@ontrails/* scaffold package range'
|
|
29
|
+
);
|
|
27
30
|
|
|
28
31
|
export { scaffoldDependencyVersions };
|