laymos 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/architecture-analysis-schema/architecture-analysis-schema.d.ts +4 -0
- package/dist/architecture-analysis-schema/architecture-analysis-schema.d.ts.map +1 -1
- package/dist/architecture-analysis-schema/documentation-schema.d.ts +36 -0
- package/dist/architecture-analysis-schema/documentation-schema.d.ts.map +1 -0
- package/dist/architecture-analysis-schema/documentation-schema.js +19 -0
- package/dist/architecture-analysis-schema/index.d.ts +2 -0
- package/dist/architecture-analysis-schema/index.d.ts.map +1 -1
- package/dist/architecture-analysis-schema/index.js +1 -0
- package/dist/architecture-analysis-schema/project-config-schema.d.ts +9 -0
- package/dist/architecture-analysis-schema/project-config-schema.d.ts.map +1 -1
- package/dist/architecture-analysis-schema/project-config-schema.js +13 -0
- package/dist/change-set-schema/change-set-schema.d.ts +6 -0
- package/dist/change-set-schema/change-set-schema.d.ts.map +1 -1
- package/dist/change-set-schema/change-set-schema.js +8 -0
- package/dist/change-set-schema/index.d.ts +2 -2
- package/dist/change-set-schema/index.d.ts.map +1 -1
- package/dist/change-set-schema/index.js +1 -1
- package/dist/cli/lint/lint.d.ts.map +1 -1
- package/dist/cli/lint/lint.js +11 -1
- package/dist/cli/lint/stories/index.d.ts +2 -0
- package/dist/cli/lint/stories/index.d.ts.map +1 -0
- package/dist/cli/lint/stories/index.js +2 -0
- package/dist/cli/lint/stories/report.d.ts +4 -0
- package/dist/cli/lint/stories/report.d.ts.map +1 -0
- package/dist/cli/lint/stories/report.js +24 -0
- package/dist/domain/project-config/project-config.d.ts +4 -0
- package/dist/domain/project-config/project-config.d.ts.map +1 -1
- package/dist/domain/project-config/validation/paths.js +20 -4
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -2
- package/dist/orchestrator/analyze-project/analyze-project.d.ts +4 -0
- package/dist/orchestrator/analyze-project/analyze-project.d.ts.map +1 -1
- package/dist/orchestrator/inspect/inspect.d.ts +6 -0
- package/dist/orchestrator/inspect/inspect.d.ts.map +1 -1
- package/dist/orchestrator/load-changes/index.d.ts +1 -1
- package/dist/orchestrator/load-changes/index.d.ts.map +1 -1
- package/dist/orchestrator/load-changes/index.js +1 -1
- package/dist/orchestrator/load-changes/load-changes.d.ts +2 -1
- package/dist/orchestrator/load-changes/load-changes.d.ts.map +1 -1
- package/dist/orchestrator/load-changes/load-changes.js +6 -0
- package/dist/orchestrator/load-documentation/errors.d.ts +18 -0
- package/dist/orchestrator/load-documentation/errors.d.ts.map +1 -0
- package/dist/orchestrator/load-documentation/errors.js +5 -0
- package/dist/orchestrator/load-documentation/index.d.ts +2 -0
- package/dist/orchestrator/load-documentation/index.d.ts.map +1 -0
- package/dist/orchestrator/load-documentation/index.js +1 -0
- package/dist/orchestrator/load-documentation/load-documentation.d.ts +23 -0
- package/dist/orchestrator/load-documentation/load-documentation.d.ts.map +1 -0
- package/dist/orchestrator/load-documentation/load-documentation.js +66 -0
- package/dist/orchestrator/load-project/load-project.d.ts +4 -0
- package/dist/orchestrator/load-project/load-project.d.ts.map +1 -1
- package/dist/orchestrator/load-source-files/errors.d.ts +10 -0
- package/dist/orchestrator/load-source-files/errors.d.ts.map +1 -0
- package/dist/orchestrator/load-source-files/errors.js +3 -0
- package/dist/orchestrator/load-source-files/index.d.ts +2 -0
- package/dist/orchestrator/load-source-files/index.d.ts.map +1 -0
- package/dist/orchestrator/load-source-files/index.js +1 -0
- package/dist/orchestrator/load-source-files/load-source-files.d.ts +16 -0
- package/dist/orchestrator/load-source-files/load-source-files.d.ts.map +1 -0
- package/dist/orchestrator/load-source-files/load-source-files.js +30 -0
- package/dist/orchestrator/run-stories/errors.d.ts +1 -1
- package/dist/orchestrator/run-stories/errors.d.ts.map +1 -1
- package/dist/orchestrator/run-stories/run-stories.d.ts.map +1 -1
- package/dist/orchestrator/run-stories/run-stories.js +128 -13
- package/dist/services/git/changed-paths.d.ts +2 -1
- package/dist/services/git/changed-paths.d.ts.map +1 -1
- package/dist/services/git/changed-paths.js +16 -1
- package/dist/services/git/git.d.ts +2 -1
- package/dist/services/git/git.d.ts.map +1 -1
- package/dist/services/git/git.js +5 -1
- package/dist/story/schema/index.d.ts +2 -2
- package/dist/story/schema/index.d.ts.map +1 -1
- package/dist/story/schema/index.js +1 -1
- package/dist/story/schema/story-report-schema.d.ts +0 -30
- package/dist/story/schema/story-report-schema.d.ts.map +1 -1
- package/dist/story/schema/story-tree-schema.d.ts +13 -0
- package/dist/story/schema/story-tree-schema.d.ts.map +1 -1
- package/dist/story/schema/story-tree-schema.js +14 -2
- package/dist/story/story.d.ts +12 -3
- package/dist/story/story.d.ts.map +1 -1
- package/dist/story/story.js +8 -4
- package/package.json +2 -2
- package/schema.json +31 -0
package/dist/services/git/git.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Context, Effect, Layer } from 'effect';
|
|
2
|
-
import { readChangeSet, readFileDiff } from './changed-paths.js';
|
|
2
|
+
import { listBranches, readChangeSet, readFileDiff } from './changed-paths.js';
|
|
3
3
|
import { GitError } from './errors.js';
|
|
4
4
|
export class Git extends Context.Service()('Git') {
|
|
5
5
|
}
|
|
@@ -15,6 +15,10 @@ export const GitLive = Layer.succeed(Git)({
|
|
|
15
15
|
}),
|
|
16
16
|
catch: (cause) => asGitError(cause, baseDir),
|
|
17
17
|
}),
|
|
18
|
+
branches: (baseDir) => Effect.tryPromise({
|
|
19
|
+
try: () => listBranches(baseDir),
|
|
20
|
+
catch: (cause) => asGitError(cause, baseDir),
|
|
21
|
+
}),
|
|
18
22
|
});
|
|
19
23
|
function asGitError(cause, baseDir) {
|
|
20
24
|
return cause instanceof GitError
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { CapturedTraceSchema, QuestionReportSchema, QuestionSectionSchema, RecordedFlowSchema, StoryAssertionSchema, StoryReportSchema, StoryVerdictSchema, } from './story-report-schema.js';
|
|
2
2
|
export type { CapturedTrace, JsonValue, QuestionReport, QuestionSection, RecordedFlow, StoryAssertion, StoryReport, StoryVerdict, } from './story-report-schema.js';
|
|
3
3
|
export { slugifyQuestion } from './slug.js';
|
|
4
|
-
export { QuestionLeafSchema, StoryLeafSchema, StorySourceSchema, StoryTreeGroupSchema, StoryTreeSchema, } from './story-tree-schema.js';
|
|
5
|
-
export type { QuestionLeaf, StoryLeaf, StorySource, StoryTree, StoryTreeGroup, } from './story-tree-schema.js';
|
|
4
|
+
export { QuestionLeafSchema, StoryLeafSchema, StoryPageSchema, StorySourceSchema, StoryTreeGroupSchema, StoryTreeSchema, } from './story-tree-schema.js';
|
|
5
|
+
export type { QuestionLeaf, StoryLeaf, StoryPage, StorySource, StoryTree, StoryTreeGroup, } from './story-tree-schema.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/story/schema/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,aAAa,EACb,SAAS,EACT,cAAc,EACd,eAAe,EACf,YAAY,EACZ,cAAc,EACd,WAAW,EACX,YAAY,GACb,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,GAChB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,YAAY,EACZ,SAAS,EACT,WAAW,EACX,SAAS,EACT,cAAc,GACf,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/story/schema/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,aAAa,EACb,SAAS,EACT,cAAc,EACd,eAAe,EACf,YAAY,EACZ,cAAc,EACd,WAAW,EACX,YAAY,GACb,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,GAChB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,YAAY,EACZ,SAAS,EACT,SAAS,EACT,WAAW,EACX,SAAS,EACT,cAAc,GACf,MAAM,wBAAwB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// RPC transports and renderers use this browser-safe Story report contract.
|
|
2
2
|
export { CapturedTraceSchema, QuestionReportSchema, QuestionSectionSchema, RecordedFlowSchema, StoryAssertionSchema, StoryReportSchema, StoryVerdictSchema, } from './story-report-schema.js';
|
|
3
3
|
export { slugifyQuestion } from './slug.js';
|
|
4
|
-
export { QuestionLeafSchema, StoryLeafSchema, StorySourceSchema, StoryTreeGroupSchema, StoryTreeSchema, } from './story-tree-schema.js';
|
|
4
|
+
export { QuestionLeafSchema, StoryLeafSchema, StoryPageSchema, StorySourceSchema, StoryTreeGroupSchema, StoryTreeSchema, } from './story-tree-schema.js';
|
|
@@ -120,16 +120,6 @@ export declare const QuestionSectionSchema: Schema.Union<readonly [Schema.Struct
|
|
|
120
120
|
readonly destination: Schema.String;
|
|
121
121
|
readonly messageId: Schema.String;
|
|
122
122
|
readonly replyTo: Schema.optional<Schema.String>;
|
|
123
|
-
}>, Schema.Struct<{
|
|
124
|
-
readonly id: Schema.String;
|
|
125
|
-
readonly participantName: Schema.String;
|
|
126
|
-
readonly name: Schema.String;
|
|
127
|
-
readonly timestamp: Schema.Number;
|
|
128
|
-
readonly attributes: Schema.optional<Schema.$Record<Schema.String, Schema.Codec<import("@pkishorez/effect-tracer/flow").RecordedFlowAttributeValue, import("@pkishorez/effect-tracer/flow").RecordedFlowAttributeValue, never, never>>>;
|
|
129
|
-
readonly kind: Schema.Literal<"state">;
|
|
130
|
-
readonly severity: Schema.Literals<readonly ["debug", "error", "info", "warning"]>;
|
|
131
|
-
readonly state: Schema.$Record<Schema.String, Schema.Codec<import("@pkishorez/effect-tracer/flow").RecordedFlowAttributeValue, import("@pkishorez/effect-tracer/flow").RecordedFlowAttributeValue, never, never>>;
|
|
132
|
-
readonly merged: Schema.$Record<Schema.String, Schema.Codec<import("@pkishorez/effect-tracer/flow").RecordedFlowAttributeValue, import("@pkishorez/effect-tracer/flow").RecordedFlowAttributeValue, never, never>>;
|
|
133
123
|
}>]>>;
|
|
134
124
|
readonly activations: Schema.$Array<Schema.Struct<{
|
|
135
125
|
readonly participantName: Schema.String;
|
|
@@ -243,16 +233,6 @@ export declare const QuestionReportSchema: Schema.Struct<{
|
|
|
243
233
|
readonly destination: Schema.String;
|
|
244
234
|
readonly messageId: Schema.String;
|
|
245
235
|
readonly replyTo: Schema.optional<Schema.String>;
|
|
246
|
-
}>, Schema.Struct<{
|
|
247
|
-
readonly id: Schema.String;
|
|
248
|
-
readonly participantName: Schema.String;
|
|
249
|
-
readonly name: Schema.String;
|
|
250
|
-
readonly timestamp: Schema.Number;
|
|
251
|
-
readonly attributes: Schema.optional<Schema.$Record<Schema.String, Schema.Codec<import("@pkishorez/effect-tracer/flow").RecordedFlowAttributeValue, import("@pkishorez/effect-tracer/flow").RecordedFlowAttributeValue, never, never>>>;
|
|
252
|
-
readonly kind: Schema.Literal<"state">;
|
|
253
|
-
readonly severity: Schema.Literals<readonly ["debug", "error", "info", "warning"]>;
|
|
254
|
-
readonly state: Schema.$Record<Schema.String, Schema.Codec<import("@pkishorez/effect-tracer/flow").RecordedFlowAttributeValue, import("@pkishorez/effect-tracer/flow").RecordedFlowAttributeValue, never, never>>;
|
|
255
|
-
readonly merged: Schema.$Record<Schema.String, Schema.Codec<import("@pkishorez/effect-tracer/flow").RecordedFlowAttributeValue, import("@pkishorez/effect-tracer/flow").RecordedFlowAttributeValue, never, never>>;
|
|
256
236
|
}>]>>;
|
|
257
237
|
readonly activations: Schema.$Array<Schema.Struct<{
|
|
258
238
|
readonly participantName: Schema.String;
|
|
@@ -369,16 +349,6 @@ export declare const StoryReportSchema: Schema.Struct<{
|
|
|
369
349
|
readonly destination: Schema.String;
|
|
370
350
|
readonly messageId: Schema.String;
|
|
371
351
|
readonly replyTo: Schema.optional<Schema.String>;
|
|
372
|
-
}>, Schema.Struct<{
|
|
373
|
-
readonly id: Schema.String;
|
|
374
|
-
readonly participantName: Schema.String;
|
|
375
|
-
readonly name: Schema.String;
|
|
376
|
-
readonly timestamp: Schema.Number;
|
|
377
|
-
readonly attributes: Schema.optional<Schema.$Record<Schema.String, Schema.Codec<import("@pkishorez/effect-tracer/flow").RecordedFlowAttributeValue, import("@pkishorez/effect-tracer/flow").RecordedFlowAttributeValue, never, never>>>;
|
|
378
|
-
readonly kind: Schema.Literal<"state">;
|
|
379
|
-
readonly severity: Schema.Literals<readonly ["debug", "error", "info", "warning"]>;
|
|
380
|
-
readonly state: Schema.$Record<Schema.String, Schema.Codec<import("@pkishorez/effect-tracer/flow").RecordedFlowAttributeValue, import("@pkishorez/effect-tracer/flow").RecordedFlowAttributeValue, never, never>>;
|
|
381
|
-
readonly merged: Schema.$Record<Schema.String, Schema.Codec<import("@pkishorez/effect-tracer/flow").RecordedFlowAttributeValue, import("@pkishorez/effect-tracer/flow").RecordedFlowAttributeValue, never, never>>;
|
|
382
352
|
}>]>>;
|
|
383
353
|
readonly activations: Schema.$Array<Schema.Struct<{
|
|
384
354
|
readonly participantName: Schema.String;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"story-report-schema.d.ts","sourceRoot":"","sources":["../../../src/story/schema/story-report-schema.ts"],"names":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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW/B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQ5B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAC;AAC5D,MAAM,MAAM,YAAY,GAAG,OAAO,kBAAkB,CAAC,IAAI,CAAC;AAC1D,MAAM,MAAM,cAAc,GAAG,OAAO,oBAAoB,CAAC,IAAI,CAAC;AAC9D,MAAM,MAAM,eAAe,GAAG,OAAO,qBAAqB,CAAC,IAAI,CAAC;AAChE,MAAM,MAAM,cAAc,GAAG,OAAO,oBAAoB,CAAC,IAAI,CAAC;AAC9D,MAAM,MAAM,YAAY,GAAG,OAAO,kBAAkB,CAAC,IAAI,CAAC;AAC1D,MAAM,MAAM,WAAW,GAAG,OAAO,iBAAiB,CAAC,IAAI,CAAC"}
|
|
@@ -3,6 +3,10 @@ export declare const StorySourceSchema: Schema.Struct<{
|
|
|
3
3
|
readonly path: Schema.String;
|
|
4
4
|
readonly content: Schema.String;
|
|
5
5
|
}>;
|
|
6
|
+
export declare const StoryPageSchema: Schema.Struct<{
|
|
7
|
+
readonly path: Schema.String;
|
|
8
|
+
readonly content: Schema.String;
|
|
9
|
+
}>;
|
|
6
10
|
export declare const QuestionLeafSchema: Schema.Struct<{
|
|
7
11
|
readonly slug: Schema.String;
|
|
8
12
|
readonly question: Schema.String;
|
|
@@ -12,6 +16,12 @@ export declare const QuestionLeafSchema: Schema.Struct<{
|
|
|
12
16
|
export declare const StoryLeafSchema: Schema.Struct<{
|
|
13
17
|
readonly id: Schema.String;
|
|
14
18
|
readonly title: Schema.String;
|
|
19
|
+
readonly description: Schema.String;
|
|
20
|
+
readonly spine: Schema.Boolean;
|
|
21
|
+
readonly page: Schema.NullOr<Schema.Struct<{
|
|
22
|
+
readonly path: Schema.String;
|
|
23
|
+
readonly content: Schema.String;
|
|
24
|
+
}>>;
|
|
15
25
|
readonly setup: Schema.NullOr<Schema.String>;
|
|
16
26
|
readonly questions: Schema.$Array<Schema.Struct<{
|
|
17
27
|
readonly slug: Schema.String;
|
|
@@ -30,6 +40,8 @@ export declare const StoryLeafSchema: Schema.Struct<{
|
|
|
30
40
|
}>;
|
|
31
41
|
export interface StoryTreeGroup {
|
|
32
42
|
readonly title: string;
|
|
43
|
+
readonly description: string;
|
|
44
|
+
readonly page: typeof StoryPageSchema.Type | null;
|
|
33
45
|
readonly groups: readonly StoryTreeGroup[];
|
|
34
46
|
readonly stories: readonly (typeof StoryLeafSchema.Type)[];
|
|
35
47
|
}
|
|
@@ -38,5 +50,6 @@ export declare const StoryTreeSchema: Schema.Codec<StoryTreeGroup, StoryTreeGrou
|
|
|
38
50
|
export type QuestionLeaf = typeof QuestionLeafSchema.Type;
|
|
39
51
|
export type StoryLeaf = typeof StoryLeafSchema.Type;
|
|
40
52
|
export type StorySource = typeof StorySourceSchema.Type;
|
|
53
|
+
export type StoryPage = typeof StoryPageSchema.Type;
|
|
41
54
|
export type StoryTree = StoryTreeGroup;
|
|
42
55
|
//# sourceMappingURL=story-tree-schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"story-tree-schema.d.ts","sourceRoot":"","sources":["../../../src/story/schema/story-tree-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,eAAO,MAAM,iBAAiB;;;EAO5B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;EAS7B,CAAC;AAEH,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"story-tree-schema.d.ts","sourceRoot":"","sources":["../../../src/story/schema/story-tree-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,eAAO,MAAM,iBAAiB;;;EAO5B,CAAC;AAEH,eAAO,MAAM,eAAe;;;EAO1B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;EAS7B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;EAc1B,CAAC;AAEH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,OAAO,eAAe,CAAC,IAAI,GAAG,IAAI,CAAC;IAClD,QAAQ,CAAC,MAAM,EAAE,SAAS,cAAc,EAAE,CAAC;IAC3C,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;CAC5D;AAED,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,KAAK,CAAC,cAAc,CAYjB,CAAC;AAE9C,eAAO,MAAM,eAAe,4DAI1B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,OAAO,kBAAkB,CAAC,IAAI,CAAC;AAC1D,MAAM,MAAM,SAAS,GAAG,OAAO,eAAe,CAAC,IAAI,CAAC;AACpD,MAAM,MAAM,WAAW,GAAG,OAAO,iBAAiB,CAAC,IAAI,CAAC;AACxD,MAAM,MAAM,SAAS,GAAG,OAAO,eAAe,CAAC,IAAI,CAAC;AACpD,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC"}
|
|
@@ -6,6 +6,13 @@ export const StorySourceSchema = Schema.Struct({
|
|
|
6
6
|
title: 'Story Source',
|
|
7
7
|
description: 'The full text of a project file backing a Story: the file the Story was authored in, or the support file its proofs import.',
|
|
8
8
|
});
|
|
9
|
+
export const StoryPageSchema = Schema.Struct({
|
|
10
|
+
path: Schema.String,
|
|
11
|
+
content: Schema.String,
|
|
12
|
+
}).annotate({
|
|
13
|
+
title: 'Story Page',
|
|
14
|
+
description: "The markdown page narrating a Story or a Story Group: a Story's sibling `.md` file, or a Story Group's `index.md`. Null when the author wrote none.",
|
|
15
|
+
});
|
|
9
16
|
export const QuestionLeafSchema = Schema.Struct({
|
|
10
17
|
slug: Schema.String,
|
|
11
18
|
question: Schema.String,
|
|
@@ -18,21 +25,26 @@ export const QuestionLeafSchema = Schema.Struct({
|
|
|
18
25
|
export const StoryLeafSchema = Schema.Struct({
|
|
19
26
|
id: Schema.String,
|
|
20
27
|
title: Schema.String,
|
|
28
|
+
description: Schema.String,
|
|
29
|
+
spine: Schema.Boolean,
|
|
30
|
+
page: Schema.NullOr(StoryPageSchema),
|
|
21
31
|
setup: Schema.NullOr(Schema.String),
|
|
22
32
|
questions: Schema.Array(QuestionLeafSchema),
|
|
23
33
|
source: StorySourceSchema,
|
|
24
34
|
support: Schema.NullOr(StorySourceSchema),
|
|
25
35
|
}).annotate({
|
|
26
36
|
title: 'Story Leaf',
|
|
27
|
-
description: 'One Story in the Story tree: its derived id, the shared setup snippet, its Questions in authored order, and the support file its proofs import. Never carries results.',
|
|
37
|
+
description: 'One Story in the Story tree: its derived id, its one-line description, whether it sits on the spine, its markdown page, the shared setup snippet, its Questions in authored order, and the support file its proofs import. Never carries results.',
|
|
28
38
|
});
|
|
29
39
|
export const StoryTreeGroupSchema = Schema.Struct({
|
|
30
40
|
title: Schema.String,
|
|
41
|
+
description: Schema.String,
|
|
42
|
+
page: Schema.NullOr(StoryPageSchema),
|
|
31
43
|
groups: Schema.Array(Schema.suspend(() => StoryTreeGroupSchema)),
|
|
32
44
|
stories: Schema.Array(StoryLeafSchema),
|
|
33
45
|
}).annotate({
|
|
34
46
|
title: 'Story Group',
|
|
35
|
-
description: 'One node of the Story tree: a title over any mix of subgroups and Story leaves.',
|
|
47
|
+
description: 'One node of the Story tree: a title, a one-line description, its markdown page, over any mix of subgroups and Story leaves.',
|
|
36
48
|
});
|
|
37
49
|
export const StoryTreeSchema = StoryTreeGroupSchema.annotate({
|
|
38
50
|
title: 'Story Tree',
|
package/dist/story/story.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Context, Effect } from 'effect';
|
|
1
|
+
import { Context, Duration, Effect } from 'effect';
|
|
2
2
|
import type { QuestionSection } from './schema/index.js';
|
|
3
3
|
declare const StoryContext_base: Context.ServiceClass<StoryContext, "StoryContext", {
|
|
4
4
|
readonly beginSection: (section: QuestionSection) => Effect.Effect<void>;
|
|
@@ -13,21 +13,30 @@ export interface StoryQuestion {
|
|
|
13
13
|
}
|
|
14
14
|
export interface Story {
|
|
15
15
|
readonly title: string;
|
|
16
|
+
readonly description: string;
|
|
17
|
+
readonly spine: boolean;
|
|
16
18
|
readonly sourceUrl: string;
|
|
17
19
|
readonly questions: readonly StoryQuestion[];
|
|
20
|
+
/** How long this Story may run before it is failed; overrides the config-wide Story timeout. */
|
|
21
|
+
readonly timeout?: Duration.Input;
|
|
18
22
|
}
|
|
19
23
|
export interface StoryGroup {
|
|
20
24
|
readonly title: string;
|
|
25
|
+
readonly description: string;
|
|
21
26
|
readonly children: readonly StoryNode[];
|
|
22
27
|
}
|
|
23
28
|
export type StoryNode = Story | StoryGroup;
|
|
24
29
|
export declare const Story: {
|
|
25
|
-
make(story: Story
|
|
30
|
+
make(story: Omit<Story, 'spine'> & {
|
|
31
|
+
readonly spine?: boolean;
|
|
32
|
+
}): Story;
|
|
26
33
|
question(question: string, options: {
|
|
27
34
|
readonly answer: string;
|
|
28
35
|
readonly proof: Effect.Effect<unknown, unknown, StoryContext>;
|
|
29
36
|
}): StoryQuestion;
|
|
30
|
-
group(title: string,
|
|
37
|
+
group(title: string, options: {
|
|
38
|
+
readonly description: string;
|
|
39
|
+
}, children: readonly StoryNode[]): StoryGroup;
|
|
31
40
|
trace<A, E, R>(effect: Effect.Effect<A, E, R>): Effect.Effect<A, E, R | StoryContext>;
|
|
32
41
|
flow<A, E, R>(effect: Effect.Effect<A, E, R>): Effect.Effect<A, E, R | StoryContext>;
|
|
33
42
|
assert(description: string, passed: boolean): Effect.Effect<void, never, StoryContext>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"story.d.ts","sourceRoot":"","sources":["../../src/story/story.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"story.d.ts","sourceRoot":"","sources":["../../src/story/story.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;;2BAK9B,CAAC,OAAO,EAAE,eAAe,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;qBACvD,CACf,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,OAAO,KACZ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;;AAP5B,qBAAa,YAAa,SAAQ,iBASf;CAAG;AAEtB,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;CAC/D;AAED,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,SAAS,aAAa,EAAE,CAAC;IAC7C,gGAAgG;IAChG,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC;CACn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,GAAG,KAAK,IAAI,KAAK,CAgBtD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAWhE"}
|
package/dist/story/story.js
CHANGED
|
@@ -4,13 +4,13 @@ export class StoryContext extends Context.Service()('StoryContext') {
|
|
|
4
4
|
}
|
|
5
5
|
export const Story = {
|
|
6
6
|
make(story) {
|
|
7
|
-
return story;
|
|
7
|
+
return { ...story, spine: story.spine ?? false };
|
|
8
8
|
},
|
|
9
9
|
question(question, options) {
|
|
10
10
|
return { question, answer: options.answer, proof: options.proof };
|
|
11
11
|
},
|
|
12
|
-
group(title, children) {
|
|
13
|
-
return { title, children };
|
|
12
|
+
group(title, options, children) {
|
|
13
|
+
return { title, description: options.description, children };
|
|
14
14
|
},
|
|
15
15
|
trace(effect) {
|
|
16
16
|
return Effect.gen(function* () {
|
|
@@ -39,6 +39,8 @@ export function isStory(value) {
|
|
|
39
39
|
return false;
|
|
40
40
|
const story = value;
|
|
41
41
|
return (typeof story.title === 'string' &&
|
|
42
|
+
typeof story.description === 'string' &&
|
|
43
|
+
typeof story.spine === 'boolean' &&
|
|
42
44
|
typeof story.sourceUrl === 'string' &&
|
|
43
45
|
Array.isArray(story.questions) &&
|
|
44
46
|
story.questions.every((question) => typeof question.question === 'string' &&
|
|
@@ -49,7 +51,9 @@ export function isStoryGroup(value) {
|
|
|
49
51
|
if (typeof value !== 'object' || value === null)
|
|
50
52
|
return false;
|
|
51
53
|
const group = value;
|
|
52
|
-
if (typeof group.title !== 'string' ||
|
|
54
|
+
if (typeof group.title !== 'string' ||
|
|
55
|
+
typeof group.description !== 'string' ||
|
|
56
|
+
!Array.isArray(group.children)) {
|
|
53
57
|
return false;
|
|
54
58
|
}
|
|
55
59
|
return group.children.every((child) => isStory(child) || isStoryGroup(child));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "laymos",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Enforces architectural dependency rules and explores source dependencies.",
|
|
6
6
|
"repository": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"oxc-resolver": "11.24.2",
|
|
54
54
|
"tsx": "4.23.12",
|
|
55
55
|
"yoctocolors": "2.2.0",
|
|
56
|
-
"@pkishorez/effect-tracer": "0.0.
|
|
56
|
+
"@pkishorez/effect-tracer": "0.0.8"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/node": "26.2.0",
|
package/schema.json
CHANGED
|
@@ -43,6 +43,17 @@
|
|
|
43
43
|
],
|
|
44
44
|
"description": "Canonical project-relative folder holding every Story file and the index.ts entry point exposing the Story Collection. Implicitly an Ignored path."
|
|
45
45
|
},
|
|
46
|
+
"storyTimeout": {
|
|
47
|
+
"anyOf": [
|
|
48
|
+
{
|
|
49
|
+
"type": "string"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "null"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"description": "How long one Story may run before it is failed as timed out, as an Effect Duration string (e.g. \"10 seconds\"). Defaults to 10 seconds; a Story may override it with its own timeout."
|
|
56
|
+
},
|
|
46
57
|
"layers": {
|
|
47
58
|
"type": "object",
|
|
48
59
|
"additionalProperties": {
|
|
@@ -71,6 +82,9 @@
|
|
|
71
82
|
],
|
|
72
83
|
"description": "Human-readable summary of this Layer."
|
|
73
84
|
},
|
|
85
|
+
"docsPath": {
|
|
86
|
+
"$ref": "#/definitions/Union_"
|
|
87
|
+
},
|
|
74
88
|
"modules": {
|
|
75
89
|
"type": "object",
|
|
76
90
|
"additionalProperties": {
|
|
@@ -98,6 +112,9 @@
|
|
|
98
112
|
"type": "string",
|
|
99
113
|
"description": "Canonical project-relative directory rooting this Module Graph. Every member lives below it and every file below it must belong to a member."
|
|
100
114
|
},
|
|
115
|
+
"docsPath": {
|
|
116
|
+
"$ref": "#/definitions/Union_"
|
|
117
|
+
},
|
|
101
118
|
"modules": {
|
|
102
119
|
"type": "object",
|
|
103
120
|
"additionalProperties": {
|
|
@@ -162,6 +179,9 @@
|
|
|
162
179
|
],
|
|
163
180
|
"description": "Human-readable summary of this LayerGraph."
|
|
164
181
|
},
|
|
182
|
+
"docsPath": {
|
|
183
|
+
"$ref": "#/definitions/Union_"
|
|
184
|
+
},
|
|
165
185
|
"rules": {
|
|
166
186
|
"type": "object",
|
|
167
187
|
"additionalProperties": {
|
|
@@ -192,6 +212,17 @@
|
|
|
192
212
|
"title": "Laymos Config",
|
|
193
213
|
"description": "Declares a project's Layers, their Modules and Module Graphs, and its LayerGraphs.",
|
|
194
214
|
"definitions": {
|
|
215
|
+
"Union_": {
|
|
216
|
+
"anyOf": [
|
|
217
|
+
{
|
|
218
|
+
"type": "string"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"type": "null"
|
|
222
|
+
}
|
|
223
|
+
],
|
|
224
|
+
"description": "Canonical project-relative path to a markdown file documenting this entity. Read-only: Laymos never writes to it."
|
|
225
|
+
},
|
|
195
226
|
"Objects_": {
|
|
196
227
|
"type": "object",
|
|
197
228
|
"properties": {
|