@ontrails/trails 1.0.0-beta.14 → 1.0.0-beta.15
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/.turbo/turbo-lint.log +1 -1
- package/CHANGELOG.md +13 -0
- package/__tests__/examples.test.ts +29 -4
- package/dist/src/app.js +2 -2
- package/dist/src/app.js.map +1 -1
- package/dist/src/clack.d.ts +1 -1
- package/dist/src/clack.js +1 -1
- package/dist/src/cli.js +4 -3
- package/dist/src/cli.js.map +1 -1
- package/dist/src/trails/add-surface.d.ts +3 -3
- package/dist/src/trails/add-surface.d.ts.map +1 -1
- package/dist/src/trails/add-surface.js +46 -24
- package/dist/src/trails/add-surface.js.map +1 -1
- package/dist/src/trails/add-trail.d.ts +3 -1
- package/dist/src/trails/add-trail.d.ts.map +1 -1
- package/dist/src/trails/add-trail.js +38 -11
- package/dist/src/trails/add-trail.js.map +1 -1
- package/dist/src/trails/add-trailhead.d.ts +1 -1
- package/dist/src/trails/add-trailhead.d.ts.map +1 -1
- package/dist/src/trails/add-trailhead.js +4 -4
- package/dist/src/trails/add-verify.d.ts +1 -1
- package/dist/src/trails/add-verify.d.ts.map +1 -1
- package/dist/src/trails/add-verify.js +7 -6
- package/dist/src/trails/add-verify.js.map +1 -1
- package/dist/src/trails/create-scaffold.d.ts +1 -1
- package/dist/src/trails/create-scaffold.d.ts.map +1 -1
- package/dist/src/trails/create-scaffold.js +10 -3
- package/dist/src/trails/create-scaffold.js.map +1 -1
- package/dist/src/trails/create.d.ts +10 -14
- package/dist/src/trails/create.d.ts.map +1 -1
- package/dist/src/trails/create.js +42 -37
- package/dist/src/trails/create.js.map +1 -1
- package/dist/src/trails/dev-clean.d.ts +4 -4
- package/dist/src/trails/dev-clean.d.ts.map +1 -1
- package/dist/src/trails/dev-clean.js +22 -21
- package/dist/src/trails/dev-clean.js.map +1 -1
- package/dist/src/trails/dev-reset.d.ts +1 -1
- package/dist/src/trails/dev-reset.d.ts.map +1 -1
- package/dist/src/trails/dev-reset.js +3 -2
- package/dist/src/trails/dev-reset.js.map +1 -1
- package/dist/src/trails/dev-stats.d.ts +4 -4
- package/dist/src/trails/dev-stats.d.ts.map +1 -1
- package/dist/src/trails/dev-stats.js +19 -19
- package/dist/src/trails/dev-stats.js.map +1 -1
- package/dist/src/trails/dev-support.d.ts +17 -17
- package/dist/src/trails/dev-support.d.ts.map +1 -1
- package/dist/src/trails/dev-support.js +60 -57
- package/dist/src/trails/dev-support.js.map +1 -1
- package/dist/src/trails/draft-promote.d.ts +1 -1
- package/dist/src/trails/draft-promote.d.ts.map +1 -1
- package/dist/src/trails/draft-promote.js +30 -16
- package/dist/src/trails/draft-promote.js.map +1 -1
- package/dist/src/trails/guide.d.ts +2 -2
- package/dist/src/trails/guide.d.ts.map +1 -1
- package/dist/src/trails/guide.js +1 -4
- package/dist/src/trails/guide.js.map +1 -1
- package/dist/src/trails/load-app.d.ts +7 -1
- package/dist/src/trails/load-app.d.ts.map +1 -1
- package/dist/src/trails/load-app.js +374 -26
- package/dist/src/trails/load-app.js.map +1 -1
- package/dist/src/trails/survey.d.ts +5 -5
- package/dist/src/trails/survey.d.ts.map +1 -1
- package/dist/src/trails/survey.js +51 -29
- package/dist/src/trails/survey.js.map +1 -1
- package/dist/src/trails/topo-export.d.ts +5 -4
- package/dist/src/trails/topo-export.d.ts.map +1 -1
- package/dist/src/trails/topo-export.js +4 -7
- package/dist/src/trails/topo-export.js.map +1 -1
- package/dist/src/trails/topo-history.d.ts +6 -10
- package/dist/src/trails/topo-history.d.ts.map +1 -1
- package/dist/src/trails/topo-history.js +7 -8
- package/dist/src/trails/topo-history.js.map +1 -1
- package/dist/src/trails/topo-pin.d.ts +5 -9
- package/dist/src/trails/topo-pin.d.ts.map +1 -1
- package/dist/src/trails/topo-pin.js +5 -9
- package/dist/src/trails/topo-pin.js.map +1 -1
- package/dist/src/trails/topo-read-support.d.ts +12 -8
- package/dist/src/trails/topo-read-support.d.ts.map +1 -1
- package/dist/src/trails/topo-read-support.js +71 -82
- package/dist/src/trails/topo-read-support.js.map +1 -1
- package/dist/src/trails/topo-reports.d.ts +15 -11
- package/dist/src/trails/topo-reports.d.ts.map +1 -1
- package/dist/src/trails/topo-reports.js +40 -34
- package/dist/src/trails/topo-reports.js.map +1 -1
- package/dist/src/trails/topo-show.d.ts +4 -4
- package/dist/src/trails/topo-show.d.ts.map +1 -1
- package/dist/src/trails/topo-show.js +8 -12
- package/dist/src/trails/topo-show.js.map +1 -1
- package/dist/src/trails/topo-store-support.d.ts +2 -2
- package/dist/src/trails/topo-store-support.d.ts.map +1 -1
- package/dist/src/trails/topo-store-support.js +22 -22
- package/dist/src/trails/topo-store-support.js.map +1 -1
- package/dist/src/trails/topo-support.d.ts +19 -30
- package/dist/src/trails/topo-support.d.ts.map +1 -1
- package/dist/src/trails/topo-support.js +63 -96
- package/dist/src/trails/topo-support.js.map +1 -1
- package/dist/src/trails/topo-unpin.d.ts +9 -4
- package/dist/src/trails/topo-unpin.d.ts.map +1 -1
- package/dist/src/trails/topo-unpin.js +9 -4
- package/dist/src/trails/topo-unpin.js.map +1 -1
- package/dist/src/trails/topo-verify.d.ts +2 -2
- package/dist/src/trails/topo-verify.d.ts.map +1 -1
- package/dist/src/trails/topo-verify.js +1 -5
- package/dist/src/trails/topo-verify.js.map +1 -1
- package/dist/src/trails/topo.d.ts +2 -2
- package/dist/src/trails/topo.d.ts.map +1 -1
- package/dist/src/trails/topo.js +6 -10
- package/dist/src/trails/topo.js.map +1 -1
- package/dist/src/trails/warden.d.ts +3 -2
- package/dist/src/trails/warden.d.ts.map +1 -1
- package/dist/src/trails/warden.js +11 -2
- package/dist/src/trails/warden.js.map +1 -1
- package/dist/src/versions.d.ts +12 -0
- package/dist/src/versions.d.ts.map +1 -0
- package/dist/src/versions.js +23 -0
- package/dist/src/versions.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/src/__tests__/add-trail.test.ts +97 -0
- package/src/__tests__/create.test.ts +91 -27
- package/src/__tests__/guide.test.ts +10 -5
- package/src/__tests__/load-app.test.ts +365 -4
- package/src/__tests__/survey.test.ts +143 -67
- package/src/__tests__/topo-dev.test.ts +48 -46
- package/src/app.ts +2 -2
- package/src/clack.ts +1 -1
- package/src/cli.ts +4 -3
- package/src/trails/add-surface.ts +150 -0
- package/src/trails/add-trail.ts +46 -10
- package/src/trails/add-verify.ts +11 -6
- package/src/trails/create-scaffold.ts +16 -3
- package/src/trails/create.ts +76 -71
- package/src/trails/dev-clean.ts +25 -21
- package/src/trails/dev-reset.ts +3 -2
- package/src/trails/dev-stats.ts +22 -19
- package/src/trails/dev-support.ts +88 -86
- package/src/trails/draft-promote.ts +70 -35
- package/src/trails/guide.ts +1 -4
- package/src/trails/load-app.ts +511 -32
- package/src/trails/survey.ts +60 -35
- package/src/trails/topo-export.ts +5 -9
- package/src/trails/topo-history.ts +8 -10
- package/src/trails/topo-pin.ts +9 -13
- package/src/trails/topo-read-support.ts +103 -106
- package/src/trails/topo-reports.ts +54 -47
- package/src/trails/topo-show.ts +8 -12
- package/src/trails/topo-store-support.ts +36 -28
- package/src/trails/topo-support.ts +90 -134
- package/src/trails/topo-unpin.ts +11 -6
- package/src/trails/topo-verify.ts +1 -5
- package/src/trails/topo.ts +6 -10
- package/src/trails/warden.ts +12 -3
- package/src/versions.ts +43 -0
- package/tsconfig.tests.json +10 -0
- package/src/trails/add-trailhead.ts +0 -121
|
@@ -1,49 +1,47 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Read-only topo store consumer helpers.
|
|
3
3
|
*
|
|
4
|
-
* Extracted from topo-support.ts
|
|
5
|
-
* keeping
|
|
4
|
+
* Extracted from topo-support.ts to isolate read-only store consumer helpers,
|
|
5
|
+
* keeping module boundaries clean.
|
|
6
6
|
*/
|
|
7
7
|
import { existsSync } from 'node:fs';
|
|
8
8
|
import { join } from 'node:path';
|
|
9
|
-
import { ConflictError, createTopoStore, InternalError, NotFoundError, Result, } from '@ontrails/core';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { readTrailheadLockData } from '@ontrails/schema';
|
|
9
|
+
import { ConflictError, createTopoStore, InternalError, listTopoSnapshots, NotFoundError, Result, } from '@ontrails/core';
|
|
10
|
+
import { deriveTrailsDbPath, deriveTrailsDir, } from '@ontrails/core/internal/trails-db';
|
|
11
|
+
import { readSurfaceLockData } from '@ontrails/schema';
|
|
13
12
|
import { REPORT_CONTRACT_VERSION, REPORT_VERSION } from './topo-constants.js';
|
|
14
|
-
import {
|
|
13
|
+
import { createCurrentTopoSnapshot, deriveRootDir, LOCK_PATH, } from './topo-support.js';
|
|
15
14
|
// ---------------------------------------------------------------------------
|
|
16
15
|
// Store helpers
|
|
17
16
|
// ---------------------------------------------------------------------------
|
|
18
|
-
const topoStoreRef = (
|
|
19
|
-
const hasCommittedLock = (trailsDir) => existsSync(join(trailsDir, 'trails.lock'))
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const trails = store.trails.list({ save: ref });
|
|
17
|
+
const topoStoreRef = (snapshotId) => ({ snapshotId });
|
|
18
|
+
const hasCommittedLock = (trailsDir) => existsSync(join(trailsDir, 'trails.lock'));
|
|
19
|
+
const readSurfaceEntries = (surfaceMapJson) => JSON.parse(surfaceMapJson).entries;
|
|
20
|
+
const buildBriefReportFromStore = (app, store, ref, snapshot) => {
|
|
21
|
+
const trails = store.trails.list({ snapshot: ref });
|
|
24
22
|
const exportRecord = store.exports.get(ref);
|
|
25
23
|
const trailEntries = exportRecord === undefined
|
|
26
24
|
? []
|
|
27
|
-
:
|
|
25
|
+
: readSurfaceEntries(exportRecord.surfaceMapJson).filter((entry) => entry.kind === 'trail');
|
|
28
26
|
return {
|
|
29
27
|
contractVersion: REPORT_CONTRACT_VERSION,
|
|
30
28
|
features: {
|
|
31
|
-
detours: trailEntries.some((entry) => (
|
|
29
|
+
detours: trailEntries.some((entry) => (entry.detours ?? []).length > 0),
|
|
32
30
|
examples: trails.some((trail) => trail.hasExamples),
|
|
33
31
|
outputSchemas: trails.some((trail) => trail.hasOutput),
|
|
34
|
-
|
|
35
|
-
signals:
|
|
32
|
+
resources: snapshot.resourceCount > 0,
|
|
33
|
+
signals: snapshot.signalCount > 0,
|
|
36
34
|
},
|
|
37
35
|
name: app.name,
|
|
38
|
-
|
|
39
|
-
signals:
|
|
40
|
-
trails:
|
|
36
|
+
resources: snapshot.resourceCount,
|
|
37
|
+
signals: snapshot.signalCount,
|
|
38
|
+
trails: snapshot.trailCount,
|
|
41
39
|
version: REPORT_VERSION,
|
|
42
40
|
};
|
|
43
41
|
};
|
|
44
42
|
const buildSurveyListFromStore = (store, ref) => {
|
|
45
|
-
const trails = store.trails.list({
|
|
46
|
-
const
|
|
43
|
+
const trails = store.trails.list({ snapshot: ref });
|
|
44
|
+
const resources = store.resources.list({ snapshot: ref });
|
|
47
45
|
return {
|
|
48
46
|
count: trails.length,
|
|
49
47
|
entries: trails.map((trail) => ({
|
|
@@ -52,35 +50,36 @@ const buildSurveyListFromStore = (store, ref) => {
|
|
|
52
50
|
kind: trail.kind,
|
|
53
51
|
safety: trail.safety,
|
|
54
52
|
})),
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
description:
|
|
58
|
-
health:
|
|
59
|
-
id:
|
|
60
|
-
kind:
|
|
61
|
-
lifetime:
|
|
62
|
-
usedBy:
|
|
53
|
+
resourceCount: resources.length,
|
|
54
|
+
resources: resources.map((resource) => ({
|
|
55
|
+
description: resource.description,
|
|
56
|
+
health: resource.health,
|
|
57
|
+
id: resource.id,
|
|
58
|
+
kind: resource.kind,
|
|
59
|
+
lifetime: resource.lifetime,
|
|
60
|
+
usedBy: resource.usedBy,
|
|
63
61
|
})),
|
|
64
62
|
};
|
|
65
63
|
};
|
|
66
64
|
const buildTrailDetailFromStore = (detail) => ({
|
|
67
|
-
crosses: [...
|
|
68
|
-
description: detail
|
|
69
|
-
detours: detail
|
|
70
|
-
examples: [...
|
|
71
|
-
id: detail
|
|
72
|
-
intent: detail
|
|
73
|
-
kind: detail
|
|
74
|
-
|
|
75
|
-
|
|
65
|
+
crosses: [...detail.crosses],
|
|
66
|
+
description: detail.description,
|
|
67
|
+
detours: detail.detours,
|
|
68
|
+
examples: [...detail.examples],
|
|
69
|
+
id: detail.id,
|
|
70
|
+
intent: detail.intent,
|
|
71
|
+
kind: detail.kind,
|
|
72
|
+
pattern: detail.pattern,
|
|
73
|
+
resources: [...detail.resources],
|
|
74
|
+
safety: detail.safety,
|
|
76
75
|
});
|
|
77
|
-
const
|
|
78
|
-
description:
|
|
79
|
-
health:
|
|
80
|
-
id:
|
|
81
|
-
kind:
|
|
82
|
-
lifetime:
|
|
83
|
-
usedBy: [...
|
|
76
|
+
const buildResourceDetailFromStore = (resource) => ({
|
|
77
|
+
description: resource.description,
|
|
78
|
+
health: resource.health,
|
|
79
|
+
id: resource.id,
|
|
80
|
+
kind: resource.kind,
|
|
81
|
+
lifetime: resource.lifetime,
|
|
82
|
+
usedBy: [...resource.usedBy],
|
|
84
83
|
});
|
|
85
84
|
// ---------------------------------------------------------------------------
|
|
86
85
|
// withCurrentTopoStore
|
|
@@ -88,52 +87,42 @@ const buildProvisionDetailFromStore = (provision) => ({
|
|
|
88
87
|
/**
|
|
89
88
|
* Run a read callback against the latest topo store state.
|
|
90
89
|
*
|
|
91
|
-
* Uses the most recent existing
|
|
92
|
-
* when no prior
|
|
90
|
+
* Uses the most recent existing snapshot when available, only creating a new
|
|
91
|
+
* snapshot when no prior snapshot exists. This avoids unbounded snapshot
|
|
92
|
+
* accumulation from
|
|
93
93
|
* read-only operations like survey, guide, and show.
|
|
94
94
|
*/
|
|
95
95
|
const withCurrentTopoStore = (app, rootDir, read) => {
|
|
96
|
-
const
|
|
97
|
-
const
|
|
98
|
-
? (() => {
|
|
99
|
-
const db = openReadTrailsDb({ rootDir });
|
|
100
|
-
try {
|
|
101
|
-
return listTopoSaves(db)[0];
|
|
102
|
-
}
|
|
103
|
-
finally {
|
|
104
|
-
db.close();
|
|
105
|
-
}
|
|
106
|
-
})()
|
|
107
|
-
: undefined;
|
|
108
|
-
const save = existingSave ?? createCurrentTopoSave(app, { rootDir });
|
|
96
|
+
const [existingSnapshot] = listTopoSnapshots({ limit: 1, rootDir });
|
|
97
|
+
const snapshot = existingSnapshot ?? createCurrentTopoSnapshot(app, { rootDir });
|
|
109
98
|
const store = createTopoStore({ rootDir });
|
|
110
|
-
return read(store, topoStoreRef(
|
|
99
|
+
return read(store, topoStoreRef(snapshot.id), snapshot);
|
|
111
100
|
};
|
|
112
101
|
// ---------------------------------------------------------------------------
|
|
113
102
|
// Public read-only consumers
|
|
114
103
|
// ---------------------------------------------------------------------------
|
|
115
104
|
export const buildTopoSummary = (app, options) => {
|
|
116
|
-
const rootDir =
|
|
117
|
-
const trailsDir =
|
|
118
|
-
return withCurrentTopoStore(app, rootDir, (store, ref,
|
|
119
|
-
app: buildBriefReportFromStore(app, store, ref,
|
|
120
|
-
dbPath:
|
|
105
|
+
const rootDir = deriveRootDir(options?.rootDir);
|
|
106
|
+
const trailsDir = deriveTrailsDir({ rootDir });
|
|
107
|
+
return withCurrentTopoStore(app, rootDir, (store, ref, snapshot) => ({
|
|
108
|
+
app: buildBriefReportFromStore(app, store, ref, snapshot),
|
|
109
|
+
dbPath: deriveTrailsDbPath({ rootDir }),
|
|
121
110
|
list: buildSurveyListFromStore(store, ref),
|
|
122
111
|
lockExists: hasCommittedLock(trailsDir),
|
|
123
112
|
lockPath: LOCK_PATH,
|
|
124
113
|
}));
|
|
125
114
|
};
|
|
126
115
|
export const buildCurrentTopoBrief = (app, options) => {
|
|
127
|
-
const rootDir =
|
|
128
|
-
return withCurrentTopoStore(app, rootDir, (store, ref,
|
|
116
|
+
const rootDir = deriveRootDir(options?.rootDir);
|
|
117
|
+
return withCurrentTopoStore(app, rootDir, (store, ref, snapshot) => buildBriefReportFromStore(app, store, ref, snapshot));
|
|
129
118
|
};
|
|
130
119
|
export const buildCurrentTopoList = (app, options) => {
|
|
131
|
-
const rootDir =
|
|
120
|
+
const rootDir = deriveRootDir(options?.rootDir);
|
|
132
121
|
return withCurrentTopoStore(app, rootDir, (store, ref) => buildSurveyListFromStore(store, ref));
|
|
133
122
|
};
|
|
134
123
|
export const buildCurrentGuideEntries = (app, options) => {
|
|
135
|
-
const rootDir =
|
|
136
|
-
return withCurrentTopoStore(app, rootDir, (store, ref) => store.trails.list({
|
|
124
|
+
const rootDir = deriveRootDir(options?.rootDir);
|
|
125
|
+
return withCurrentTopoStore(app, rootDir, (store, ref) => store.trails.list({ snapshot: ref }).map((trail) => ({
|
|
137
126
|
description: trail.description ?? '(no description)',
|
|
138
127
|
exampleCount: trail.exampleCount,
|
|
139
128
|
id: trail.id,
|
|
@@ -141,29 +130,29 @@ export const buildCurrentGuideEntries = (app, options) => {
|
|
|
141
130
|
})));
|
|
142
131
|
};
|
|
143
132
|
export const buildCurrentTopoDetail = (app, id, options) => {
|
|
144
|
-
const rootDir =
|
|
133
|
+
const rootDir = deriveRootDir(options?.rootDir);
|
|
145
134
|
return withCurrentTopoStore(app, rootDir, (store, ref) => {
|
|
146
|
-
const trail = store.trails.get(id, {
|
|
135
|
+
const trail = store.trails.get(id, { snapshot: ref });
|
|
147
136
|
if (trail !== undefined) {
|
|
148
137
|
return buildTrailDetailFromStore(trail);
|
|
149
138
|
}
|
|
150
|
-
const
|
|
151
|
-
return
|
|
139
|
+
const resource = store.resources.get(id, { snapshot: ref });
|
|
140
|
+
return resource === undefined
|
|
152
141
|
? undefined
|
|
153
|
-
:
|
|
142
|
+
: buildResourceDetailFromStore(resource);
|
|
154
143
|
});
|
|
155
144
|
};
|
|
156
145
|
export const verifyCurrentTopo = async (app, options) => {
|
|
157
|
-
const rootDir =
|
|
158
|
-
const committedLock = await
|
|
159
|
-
dir:
|
|
146
|
+
const rootDir = deriveRootDir(options?.rootDir);
|
|
147
|
+
const committedLock = await readSurfaceLockData({
|
|
148
|
+
dir: deriveTrailsDir({ rootDir }),
|
|
160
149
|
});
|
|
161
150
|
if (committedLock === null) {
|
|
162
151
|
return Result.err(new NotFoundError('No committed trails.lock found. Run `trails topo export` first.'));
|
|
163
152
|
}
|
|
164
|
-
const currentHash = withCurrentTopoStore(app, rootDir, (store, ref) => store.exports.get(ref)?.
|
|
153
|
+
const currentHash = withCurrentTopoStore(app, rootDir, (store, ref) => store.exports.get(ref)?.surfaceHash);
|
|
165
154
|
if (currentHash === undefined) {
|
|
166
|
-
return Result.err(new InternalError('No stored topo export found for the current topo
|
|
155
|
+
return Result.err(new InternalError('No stored topo export found for the current topo snapshot'));
|
|
167
156
|
}
|
|
168
157
|
if (committedLock.hash !== currentHash) {
|
|
169
158
|
return Result.err(new ConflictError('trails.lock is stale. Run `trails topo export` to refresh it.'));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topo-read-support.js","sourceRoot":"","sources":["../../../src/trails/topo-read-support.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"topo-read-support.js","sourceRoot":"","sources":["../../../src/trails/topo-read-support.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EACL,aAAa,EACb,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,MAAM,GACP,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,kBAAkB,EAClB,eAAe,GAChB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EACL,yBAAyB,EACzB,aAAa,EACb,SAAS,GACV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,CAAC,IAAI;QACjC,WAAW;QACX,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,KAAK;KACb,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -4,7 +4,7 @@ export interface BriefReport {
|
|
|
4
4
|
readonly version: string;
|
|
5
5
|
readonly contractVersion: string;
|
|
6
6
|
readonly features: {
|
|
7
|
-
readonly
|
|
7
|
+
readonly resources: boolean;
|
|
8
8
|
readonly outputSchemas: boolean;
|
|
9
9
|
readonly examples: boolean;
|
|
10
10
|
readonly detours: boolean;
|
|
@@ -12,7 +12,7 @@ export interface BriefReport {
|
|
|
12
12
|
};
|
|
13
13
|
readonly trails: number;
|
|
14
14
|
readonly signals: number;
|
|
15
|
-
readonly
|
|
15
|
+
readonly resources: number;
|
|
16
16
|
}
|
|
17
17
|
export interface SurveyListReport {
|
|
18
18
|
readonly count: number;
|
|
@@ -22,29 +22,33 @@ export interface SurveyListReport {
|
|
|
22
22
|
readonly kind: string;
|
|
23
23
|
readonly safety: string;
|
|
24
24
|
}[];
|
|
25
|
-
readonly
|
|
26
|
-
readonly
|
|
25
|
+
readonly resourceCount: number;
|
|
26
|
+
readonly resources: readonly {
|
|
27
27
|
readonly description: string | null;
|
|
28
28
|
readonly health: 'available' | 'none';
|
|
29
29
|
readonly id: string;
|
|
30
|
-
readonly kind: '
|
|
30
|
+
readonly kind: 'resource';
|
|
31
31
|
readonly lifetime: 'singleton';
|
|
32
32
|
readonly usedBy: readonly string[];
|
|
33
33
|
}[];
|
|
34
34
|
}
|
|
35
35
|
export interface TrailDetailReport {
|
|
36
36
|
readonly description: string | null;
|
|
37
|
-
readonly detours:
|
|
37
|
+
readonly detours: readonly {
|
|
38
|
+
readonly on: string;
|
|
39
|
+
readonly maxAttempts: number;
|
|
40
|
+
}[] | null;
|
|
38
41
|
readonly examples: readonly unknown[];
|
|
39
42
|
readonly crosses: readonly string[];
|
|
40
43
|
readonly id: string;
|
|
41
44
|
readonly intent: 'read' | 'write' | 'destroy';
|
|
42
45
|
readonly kind: string;
|
|
46
|
+
readonly pattern: string | null;
|
|
43
47
|
readonly safety: string;
|
|
44
|
-
readonly
|
|
48
|
+
readonly resources: readonly string[];
|
|
45
49
|
}
|
|
46
|
-
export declare const
|
|
47
|
-
export declare const
|
|
48
|
-
export declare const
|
|
49
|
-
export declare const
|
|
50
|
+
export declare const deriveBriefReport: (app: Topo) => BriefReport;
|
|
51
|
+
export declare const deriveResourceDetail: (app: Topo, resourceId: string) => object;
|
|
52
|
+
export declare const deriveSurveyList: (app: Topo) => SurveyListReport;
|
|
53
|
+
export declare const deriveTrailDetail: (item: Trail<unknown, unknown>) => TrailDetailReport;
|
|
50
54
|
//# sourceMappingURL=topo-reports.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topo-reports.d.ts","sourceRoot":"","sources":["../../../src/trails/topo-reports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAIlD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE;QACjB,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"topo-reports.d.ts","sourceRoot":"","sources":["../../../src/trails/topo-reports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAIlD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE;QACjB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;QAC5B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KAAE,EAAE,GAChE,IAAI,CAAC;IACT,QAAQ,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AAgCD,eAAO,MAAM,iBAAiB,GAAI,KAAK,IAAI,KAAG,WAmB7C,CAAC;AAwCF,eAAO,MAAM,oBAAoB,GAAI,KAAK,IAAI,EAAE,YAAY,MAAM,KAAG,MAYpE,CAAC;AAiBF,eAAO,MAAM,gBAAgB,GAAI,KAAK,IAAI,KAAG,gBA4B5C,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,MAAM,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,KAC5B,iBAuBF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { REPORT_CONTRACT_VERSION, REPORT_VERSION } from './topo-constants.js';
|
|
2
2
|
const trailHas = (raw, key) => {
|
|
3
|
-
if (key === 'examples') {
|
|
3
|
+
if (key === 'examples' || key === 'detours') {
|
|
4
4
|
return Array.isArray(raw[key]) && raw[key].length > 0;
|
|
5
5
|
}
|
|
6
6
|
return Boolean(raw[key]);
|
|
@@ -11,23 +11,23 @@ const detectFeatures = (app) => {
|
|
|
11
11
|
hasDetours: trails.some((r) => trailHas(r, 'detours')),
|
|
12
12
|
hasExamples: trails.some((r) => trailHas(r, 'examples')),
|
|
13
13
|
hasOutputSchemas: trails.some((r) => trailHas(r, 'output')),
|
|
14
|
-
|
|
15
|
-
r['
|
|
14
|
+
hasResources: trails.some((r) => Array.isArray(r['resources']) &&
|
|
15
|
+
r['resources'].length > 0),
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
export const
|
|
19
|
-
const { hasDetours, hasExamples, hasOutputSchemas,
|
|
18
|
+
export const deriveBriefReport = (app) => {
|
|
19
|
+
const { hasDetours, hasExamples, hasOutputSchemas, hasResources } = detectFeatures(app);
|
|
20
20
|
return {
|
|
21
21
|
contractVersion: REPORT_CONTRACT_VERSION,
|
|
22
22
|
features: {
|
|
23
23
|
detours: hasDetours,
|
|
24
24
|
examples: hasExamples,
|
|
25
25
|
outputSchemas: hasOutputSchemas,
|
|
26
|
-
|
|
26
|
+
resources: hasResources,
|
|
27
27
|
signals: app.signals.size > 0,
|
|
28
28
|
},
|
|
29
29
|
name: app.name,
|
|
30
|
-
|
|
30
|
+
resources: app.resources.size,
|
|
31
31
|
signals: app.signals.size,
|
|
32
32
|
trails: app.trails.size,
|
|
33
33
|
version: REPORT_VERSION,
|
|
@@ -45,45 +45,45 @@ const safetyLabel = (entry) => {
|
|
|
45
45
|
}
|
|
46
46
|
return '-';
|
|
47
47
|
};
|
|
48
|
-
const
|
|
48
|
+
const buildResourceUsage = (app) => {
|
|
49
49
|
const usage = new Map();
|
|
50
50
|
for (const trailDef of app.list()) {
|
|
51
|
-
for (const
|
|
52
|
-
const users = usage.get(
|
|
51
|
+
for (const declaredResource of trailDef.resources) {
|
|
52
|
+
const users = usage.get(declaredResource.id) ?? [];
|
|
53
53
|
users.push(trailDef.id);
|
|
54
|
-
usage.set(
|
|
54
|
+
usage.set(declaredResource.id, users);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
return new Map([...usage.entries()].map(([id, users]) => [id, users.toSorted()]));
|
|
58
58
|
};
|
|
59
|
-
const
|
|
60
|
-
export const
|
|
61
|
-
const item = app.
|
|
62
|
-
const usedBy =
|
|
59
|
+
const resourceHealthStatus = (resource) => resource.health === undefined ? 'none' : 'available';
|
|
60
|
+
export const deriveResourceDetail = (app, resourceId) => {
|
|
61
|
+
const item = app.getResource(resourceId);
|
|
62
|
+
const usedBy = buildResourceUsage(app).get(resourceId) ?? [];
|
|
63
63
|
return {
|
|
64
64
|
description: item?.description ?? null,
|
|
65
|
-
health: item ?
|
|
66
|
-
id:
|
|
67
|
-
kind: '
|
|
65
|
+
health: item ? resourceHealthStatus(item) : 'none',
|
|
66
|
+
id: resourceId,
|
|
67
|
+
kind: 'resource',
|
|
68
68
|
lifetime: 'singleton',
|
|
69
69
|
usedBy,
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
|
-
const
|
|
73
|
-
const usage =
|
|
72
|
+
const formatResourceList = (app) => {
|
|
73
|
+
const usage = buildResourceUsage(app);
|
|
74
74
|
return app
|
|
75
|
-
.
|
|
76
|
-
.map((
|
|
77
|
-
description:
|
|
78
|
-
health:
|
|
79
|
-
id:
|
|
80
|
-
kind:
|
|
75
|
+
.listResources()
|
|
76
|
+
.map((resource) => ({
|
|
77
|
+
description: resource.description ?? null,
|
|
78
|
+
health: resourceHealthStatus(resource),
|
|
79
|
+
id: resource.id,
|
|
80
|
+
kind: resource.kind,
|
|
81
81
|
lifetime: 'singleton',
|
|
82
|
-
usedBy: usage.get(
|
|
82
|
+
usedBy: usage.get(resource.id) ?? [],
|
|
83
83
|
}))
|
|
84
84
|
.toSorted((a, b) => a.id.localeCompare(b.id));
|
|
85
85
|
};
|
|
86
|
-
export const
|
|
86
|
+
export const deriveSurveyList = (app) => {
|
|
87
87
|
const items = app.list();
|
|
88
88
|
const entries = items.map((item) => {
|
|
89
89
|
const safety = safetyLabel(item);
|
|
@@ -97,25 +97,31 @@ export const generateSurveyList = (app) => {
|
|
|
97
97
|
safety,
|
|
98
98
|
};
|
|
99
99
|
});
|
|
100
|
-
const
|
|
100
|
+
const resources = formatResourceList(app);
|
|
101
101
|
return {
|
|
102
102
|
count: items.length,
|
|
103
103
|
entries,
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
resourceCount: resources.length,
|
|
105
|
+
resources,
|
|
106
106
|
};
|
|
107
107
|
};
|
|
108
|
-
export const
|
|
108
|
+
export const deriveTrailDetail = (item) => {
|
|
109
109
|
const safety = safetyLabel(item);
|
|
110
110
|
return {
|
|
111
111
|
crosses: item.crosses.toSorted(),
|
|
112
112
|
description: item.description ?? null,
|
|
113
|
-
detours: item.detours
|
|
113
|
+
detours: item.detours.length > 0
|
|
114
|
+
? item.detours.map((d) => ({
|
|
115
|
+
maxAttempts: d.maxAttempts ?? 1,
|
|
116
|
+
on: d.on.name,
|
|
117
|
+
}))
|
|
118
|
+
: null,
|
|
114
119
|
examples: item.examples ?? [],
|
|
115
120
|
id: item.id,
|
|
116
121
|
intent: item.intent,
|
|
117
122
|
kind: item.kind,
|
|
118
|
-
|
|
123
|
+
pattern: item.pattern ?? null,
|
|
124
|
+
resources: item.resources.map((resource) => resource.id).toSorted(),
|
|
119
125
|
safety,
|
|
120
126
|
};
|
|
121
127
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topo-reports.js","sourceRoot":"","sources":["../../../src/trails/topo-reports.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"topo-reports.js","sourceRoot":"","sources":["../../../src/trails/topo-reports.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAoD9E,MAAM,QAAQ,GAAG,CAAC,GAA4B,EAAE,GAAW,EAAW,EAAE;IACtE,IAAI,GAAG,KAAK,UAAU,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QAC5C,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAK,GAAG,CAAC,GAAG,CAAe,CAAC,MAAM,GAAG,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,OAAO,CAAC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,EAAE,CAAC,CAAC;gBACvB,WAAW,EAAE,CAAC,CAAC,WAAW,IAAI,CAAC;gBAC/B,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI;aACd,CAAC,CAAC;YACL,CAAC,CAAC,IAAI;QACV,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,EAAE;QAC7B,EAAE,EAAE,IAAI,CAAC,EAAE;QACX,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,IAAI;QAC7B,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;QACnE,MAAM;KACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const topoShowTrail: import("@ontrails/core").Trail<{
|
|
2
2
|
id: string;
|
|
3
|
-
module
|
|
3
|
+
module?: string | undefined;
|
|
4
4
|
rootDir?: string | undefined;
|
|
5
5
|
}, {
|
|
6
6
|
crosses: string[];
|
|
@@ -10,14 +10,14 @@ export declare const topoShowTrail: import("@ontrails/core").Trail<{
|
|
|
10
10
|
id: string;
|
|
11
11
|
intent: "read" | "write" | "destroy";
|
|
12
12
|
kind: string;
|
|
13
|
-
|
|
13
|
+
resources: string[];
|
|
14
14
|
safety: string;
|
|
15
15
|
} | {
|
|
16
16
|
description: string | null;
|
|
17
17
|
health: "available" | "none";
|
|
18
18
|
id: string;
|
|
19
|
-
kind: "
|
|
19
|
+
kind: "resource";
|
|
20
20
|
lifetime: "singleton";
|
|
21
21
|
usedBy: string[];
|
|
22
|
-
}>;
|
|
22
|
+
}, never>;
|
|
23
23
|
//# sourceMappingURL=topo-show.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topo-show.d.ts","sourceRoot":"","sources":["../../../src/trails/topo-show.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"topo-show.d.ts","sourceRoot":"","sources":["../../../src/trails/topo-show.ts"],"names":[],"mappings":"AA2BA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;SA0BxB,CAAC"}
|
|
@@ -2,7 +2,6 @@ import { NotFoundError, Result, trail } from '@ontrails/core';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { loadApp } from './load-app.js';
|
|
4
4
|
import { buildCurrentTopoDetail } from './topo-read-support.js';
|
|
5
|
-
import { DEFAULT_APP_MODULE } from './topo-support.js';
|
|
6
5
|
const trailDetailOutput = z.object({
|
|
7
6
|
crosses: z.array(z.string()),
|
|
8
7
|
description: z.unknown().nullable(),
|
|
@@ -11,14 +10,14 @@ const trailDetailOutput = z.object({
|
|
|
11
10
|
id: z.string(),
|
|
12
11
|
intent: z.enum(['read', 'write', 'destroy']),
|
|
13
12
|
kind: z.string(),
|
|
14
|
-
|
|
13
|
+
resources: z.array(z.string()),
|
|
15
14
|
safety: z.string(),
|
|
16
15
|
});
|
|
17
|
-
const
|
|
16
|
+
const resourceDetailOutput = z.object({
|
|
18
17
|
description: z.string().nullable(),
|
|
19
18
|
health: z.enum(['available', 'none']),
|
|
20
19
|
id: z.string(),
|
|
21
|
-
kind: z.literal('
|
|
20
|
+
kind: z.literal('resource'),
|
|
22
21
|
lifetime: z.literal('singleton'),
|
|
23
22
|
usedBy: z.array(z.string()),
|
|
24
23
|
});
|
|
@@ -30,9 +29,9 @@ export const topoShowTrail = trail('topo.show', {
|
|
|
30
29
|
if (detail !== undefined) {
|
|
31
30
|
return Result.ok(detail);
|
|
32
31
|
}
|
|
33
|
-
return Result.err(new NotFoundError(`Trail or
|
|
32
|
+
return Result.err(new NotFoundError(`Trail or resource not found: ${input.id}`));
|
|
34
33
|
},
|
|
35
|
-
description: 'Show detail for a current trail or
|
|
34
|
+
description: 'Show detail for a current trail or resource',
|
|
36
35
|
examples: [
|
|
37
36
|
{
|
|
38
37
|
input: { id: 'topo' },
|
|
@@ -40,14 +39,11 @@ export const topoShowTrail = trail('topo.show', {
|
|
|
40
39
|
},
|
|
41
40
|
],
|
|
42
41
|
input: z.object({
|
|
43
|
-
id: z.string().describe('Trail or
|
|
44
|
-
module: z
|
|
45
|
-
.string()
|
|
46
|
-
.default(DEFAULT_APP_MODULE)
|
|
47
|
-
.describe('Path to the app module'),
|
|
42
|
+
id: z.string().describe('Trail or resource ID to inspect'),
|
|
43
|
+
module: z.string().optional().describe('Path to the app module'),
|
|
48
44
|
rootDir: z.string().optional().describe('Workspace root directory'),
|
|
49
45
|
}),
|
|
50
46
|
intent: 'read',
|
|
51
|
-
output: z.union([trailDetailOutput,
|
|
47
|
+
output: z.union([trailDetailOutput, resourceDetailOutput]),
|
|
52
48
|
});
|
|
53
49
|
//# sourceMappingURL=topo-show.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topo-show.js","sourceRoot":"","sources":["../../../src/trails/topo-show.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"topo-show.js","sourceRoot":"","sources":["../../../src/trails/topo-show.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAA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