@usine/config 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +35 -1
- package/dist/frontmatter.d.ts +10 -0
- package/dist/frontmatter.d.ts.map +1 -0
- package/dist/frontmatter.js +51 -0
- package/dist/frontmatter.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/instance-folder.d.ts +13 -0
- package/dist/instance-folder.d.ts.map +1 -0
- package/dist/instance-folder.js +81 -0
- package/dist/instance-folder.js.map +1 -0
- package/dist/model.d.ts +257 -0
- package/dist/model.d.ts.map +1 -0
- package/dist/model.js +238 -0
- package/dist/model.js.map +1 -0
- package/dist/parser.d.ts +20 -0
- package/dist/parser.d.ts.map +1 -0
- package/dist/parser.js +165 -0
- package/dist/parser.js.map +1 -0
- package/dist/payload-slices.d.ts +16 -0
- package/dist/payload-slices.d.ts.map +1 -0
- package/dist/payload-slices.js +218 -0
- package/dist/payload-slices.js.map +1 -0
- package/dist/selector.d.ts +5 -0
- package/dist/selector.d.ts.map +1 -0
- package/dist/selector.js +17 -0
- package/dist/selector.js.map +1 -0
- package/dist/yaml/document.d.ts +9 -0
- package/dist/yaml/document.d.ts.map +1 -0
- package/dist/yaml/document.js +38 -0
- package/dist/yaml/document.js.map +1 -0
- package/dist/yaml/writer.d.ts +14 -0
- package/dist/yaml/writer.d.ts.map +1 -0
- package/dist/yaml/writer.js +31 -0
- package/dist/yaml/writer.js.map +1 -0
- package/package.json +46 -4
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { Repository } from "@usine/core";
|
|
2
|
+
import { Environment, ObjectField, ObjectType, TypeReference, Variable } from "@usine/expression";
|
|
3
|
+
import { Schema } from "effect";
|
|
4
|
+
const reference = Schema.decodeUnknownSync(TypeReference);
|
|
5
|
+
const objectType = (name, fields) => new ObjectType({
|
|
6
|
+
name,
|
|
7
|
+
fields: fields.map(([fieldName, fieldType]) => new ObjectField({ name: fieldName, type: reference(fieldType) })),
|
|
8
|
+
});
|
|
9
|
+
const actor = objectType("Actor", [["login", "string"]]);
|
|
10
|
+
const label = objectType("Label", [["name", "string"]]);
|
|
11
|
+
const milestone = objectType("Milestone", [["title", "string"]]);
|
|
12
|
+
const issueType = objectType("IssueType", [["name", "string"]]);
|
|
13
|
+
const commit = objectType("Commit", [["oid", "string"]]);
|
|
14
|
+
const repo = objectType("RepoContext", [
|
|
15
|
+
["name", "string"],
|
|
16
|
+
["owner", "string"],
|
|
17
|
+
["url", "string"],
|
|
18
|
+
]);
|
|
19
|
+
const labels = objectType("Labels", [
|
|
20
|
+
["totalCount", "int"],
|
|
21
|
+
["nodes", "list<Label>"],
|
|
22
|
+
]);
|
|
23
|
+
const assignees = objectType("Assignees", [
|
|
24
|
+
["totalCount", "int"],
|
|
25
|
+
["nodes", "list<Actor>"],
|
|
26
|
+
]);
|
|
27
|
+
const issueComment = objectType("IssueComment", [
|
|
28
|
+
["author", "Actor"],
|
|
29
|
+
["body", "string"],
|
|
30
|
+
["createdAt", "string"],
|
|
31
|
+
]);
|
|
32
|
+
const issueComments = objectType("IssueComments", [
|
|
33
|
+
["totalCount", "int"],
|
|
34
|
+
["nodes", "list<IssueComment>"],
|
|
35
|
+
]);
|
|
36
|
+
const pullRequestReference = objectType("PullRequestReference", [
|
|
37
|
+
["number", "int"],
|
|
38
|
+
["state", "string"],
|
|
39
|
+
["isDraft", "bool"],
|
|
40
|
+
["url", "string"],
|
|
41
|
+
]);
|
|
42
|
+
const pullRequestReferences = objectType("PullRequestReferences", [
|
|
43
|
+
["totalCount", "int"],
|
|
44
|
+
["nodes", "list<PullRequestReference>"],
|
|
45
|
+
]);
|
|
46
|
+
const issue = objectType("IssuePayload", [
|
|
47
|
+
["number", "int"],
|
|
48
|
+
["title", "string"],
|
|
49
|
+
["body", "string"],
|
|
50
|
+
["url", "string"],
|
|
51
|
+
["state", "string"],
|
|
52
|
+
["stateReason", "string"],
|
|
53
|
+
["createdAt", "string"],
|
|
54
|
+
["updatedAt", "string"],
|
|
55
|
+
["closedAt", "string"],
|
|
56
|
+
["author", "Actor"],
|
|
57
|
+
["issueType", "IssueType"],
|
|
58
|
+
["milestone", "Milestone"],
|
|
59
|
+
["labels", "Labels"],
|
|
60
|
+
["assignees", "Assignees"],
|
|
61
|
+
["comments", "IssueComments"],
|
|
62
|
+
["closedByPullRequestsReferences", "PullRequestReferences"],
|
|
63
|
+
]);
|
|
64
|
+
const requestedReviewer = objectType("RequestedReviewer", [["login", "string"]]);
|
|
65
|
+
const reviewRequest = objectType("ReviewRequest", [["requestedReviewer", "RequestedReviewer"]]);
|
|
66
|
+
const reviewRequests = objectType("ReviewRequests", [
|
|
67
|
+
["totalCount", "int"],
|
|
68
|
+
["nodes", "list<ReviewRequest>"],
|
|
69
|
+
]);
|
|
70
|
+
const review = objectType("Review", [
|
|
71
|
+
["author", "Actor"],
|
|
72
|
+
["state", "string"],
|
|
73
|
+
["body", "string"],
|
|
74
|
+
["submittedAt", "string"],
|
|
75
|
+
["commit", "Commit"],
|
|
76
|
+
]);
|
|
77
|
+
const reviews = objectType("Reviews", [
|
|
78
|
+
["totalCount", "int"],
|
|
79
|
+
["nodes", "list<Review>"],
|
|
80
|
+
]);
|
|
81
|
+
const reviewThreadComment = objectType("ReviewThreadComment", [
|
|
82
|
+
["author", "Actor"],
|
|
83
|
+
["body", "string"],
|
|
84
|
+
]);
|
|
85
|
+
const reviewThreadComments = objectType("ReviewThreadComments", [
|
|
86
|
+
["totalCount", "int"],
|
|
87
|
+
["nodes", "list<ReviewThreadComment>"],
|
|
88
|
+
]);
|
|
89
|
+
const reviewThread = objectType("ReviewThread", [
|
|
90
|
+
["isResolved", "bool"],
|
|
91
|
+
["isOutdated", "bool"],
|
|
92
|
+
["path", "string"],
|
|
93
|
+
["comments", "ReviewThreadComments"],
|
|
94
|
+
]);
|
|
95
|
+
const reviewThreads = objectType("ReviewThreads", [
|
|
96
|
+
["totalCount", "int"],
|
|
97
|
+
["nodes", "list<ReviewThread>"],
|
|
98
|
+
]);
|
|
99
|
+
const pullRequestComment = objectType("PullRequestComment", [
|
|
100
|
+
["author", "Actor"],
|
|
101
|
+
["body", "string"],
|
|
102
|
+
["createdAt", "string"],
|
|
103
|
+
]);
|
|
104
|
+
const pullRequestComments = objectType("PullRequestComments", [
|
|
105
|
+
["totalCount", "int"],
|
|
106
|
+
["nodes", "list<PullRequestComment>"],
|
|
107
|
+
]);
|
|
108
|
+
const closingIssueReference = objectType("ClosingIssueReference", [
|
|
109
|
+
["number", "int"],
|
|
110
|
+
["state", "string"],
|
|
111
|
+
]);
|
|
112
|
+
const closingIssueReferences = objectType("ClosingIssueReferences", [
|
|
113
|
+
["totalCount", "int"],
|
|
114
|
+
["nodes", "list<ClosingIssueReference>"],
|
|
115
|
+
]);
|
|
116
|
+
const statusCheckRollup = objectType("StatusCheckRollup", [["state", "string"]]);
|
|
117
|
+
const pullRequest = objectType("PullRequestPayload", [
|
|
118
|
+
["number", "int"],
|
|
119
|
+
["title", "string"],
|
|
120
|
+
["body", "string"],
|
|
121
|
+
["url", "string"],
|
|
122
|
+
["state", "string"],
|
|
123
|
+
["isDraft", "bool"],
|
|
124
|
+
["merged", "bool"],
|
|
125
|
+
["createdAt", "string"],
|
|
126
|
+
["updatedAt", "string"],
|
|
127
|
+
["mergedAt", "string"],
|
|
128
|
+
["author", "Actor"],
|
|
129
|
+
["baseRefName", "string"],
|
|
130
|
+
["headRefName", "string"],
|
|
131
|
+
["headRefOid", "string"],
|
|
132
|
+
["additions", "int"],
|
|
133
|
+
["deletions", "int"],
|
|
134
|
+
["changedFiles", "int"],
|
|
135
|
+
["reviewDecision", "string"],
|
|
136
|
+
["statusCheckRollup", "StatusCheckRollup"],
|
|
137
|
+
["labels", "Labels"],
|
|
138
|
+
["reviewRequests", "ReviewRequests"],
|
|
139
|
+
["reviews", "Reviews"],
|
|
140
|
+
["reviewThreads", "ReviewThreads"],
|
|
141
|
+
["comments", "PullRequestComments"],
|
|
142
|
+
["closingIssuesReferences", "ClosingIssueReferences"],
|
|
143
|
+
]);
|
|
144
|
+
const tick = objectType("Tick", [
|
|
145
|
+
["scheduledAt", "string"],
|
|
146
|
+
["scheduledAtLocal", "string"],
|
|
147
|
+
["cron", "string"],
|
|
148
|
+
["tz", "string"],
|
|
149
|
+
]);
|
|
150
|
+
const schedule = objectType("SchedulePayload", [["tick", "Tick"]]);
|
|
151
|
+
const environment = (types, itemType) => new Environment({
|
|
152
|
+
types: [repo, ...types],
|
|
153
|
+
variables: [
|
|
154
|
+
new Variable({ name: "repo", type: reference("RepoContext") }),
|
|
155
|
+
new Variable({ name: "item", type: reference(itemType) }),
|
|
156
|
+
],
|
|
157
|
+
});
|
|
158
|
+
/** Exact v1 issue payload slice descriptor recorded by issue #11. */
|
|
159
|
+
export const issueEnvironment = environment([
|
|
160
|
+
actor,
|
|
161
|
+
label,
|
|
162
|
+
milestone,
|
|
163
|
+
issueType,
|
|
164
|
+
labels,
|
|
165
|
+
assignees,
|
|
166
|
+
issueComment,
|
|
167
|
+
issueComments,
|
|
168
|
+
pullRequestReference,
|
|
169
|
+
pullRequestReferences,
|
|
170
|
+
issue,
|
|
171
|
+
], "IssuePayload");
|
|
172
|
+
/** Exact v1 pull-request payload slice descriptor recorded by issue #11. */
|
|
173
|
+
export const pullRequestEnvironment = environment([
|
|
174
|
+
actor,
|
|
175
|
+
label,
|
|
176
|
+
commit,
|
|
177
|
+
labels,
|
|
178
|
+
requestedReviewer,
|
|
179
|
+
reviewRequest,
|
|
180
|
+
reviewRequests,
|
|
181
|
+
review,
|
|
182
|
+
reviews,
|
|
183
|
+
reviewThreadComment,
|
|
184
|
+
reviewThreadComments,
|
|
185
|
+
reviewThread,
|
|
186
|
+
reviewThreads,
|
|
187
|
+
pullRequestComment,
|
|
188
|
+
pullRequestComments,
|
|
189
|
+
closingIssueReference,
|
|
190
|
+
closingIssueReferences,
|
|
191
|
+
statusCheckRollup,
|
|
192
|
+
pullRequest,
|
|
193
|
+
], "PullRequestPayload");
|
|
194
|
+
/** Schedule payload slice: item.tick = { scheduledAt, scheduledAtLocal, cron, tz }. */
|
|
195
|
+
export const scheduleEnvironment = environment([tick, schedule], "SchedulePayload");
|
|
196
|
+
export const environmentFor = (stream) => {
|
|
197
|
+
switch (stream) {
|
|
198
|
+
case "issue":
|
|
199
|
+
return issueEnvironment;
|
|
200
|
+
case "pr":
|
|
201
|
+
return pullRequestEnvironment;
|
|
202
|
+
case "schedule":
|
|
203
|
+
return scheduleEnvironment;
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
/**
|
|
207
|
+
* The CEL `repo` variable, built beside the `RepoContext` type it must match —
|
|
208
|
+
* a field added to one belongs in the other.
|
|
209
|
+
*/
|
|
210
|
+
export const repositoryContext = (repository) => {
|
|
211
|
+
const { owner } = Repository.parts(repository.name);
|
|
212
|
+
return {
|
|
213
|
+
name: repository.name,
|
|
214
|
+
owner,
|
|
215
|
+
url: `https://github.com/${repository.name}`,
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
//# sourceMappingURL=payload-slices.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload-slices.js","sourceRoot":"","sources":["../src/payload-slices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClG,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,MAAM,SAAS,GAAG,MAAM,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAC;AAI1D,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,MAAuC,EAAc,EAAE,CACvF,IAAI,UAAU,CAAC;IACb,IAAI;IACJ,MAAM,EAAE,MA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,KAAK,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACpD,OAAO;QACL,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,KAAK;QACL,GAAG,EAAE,sBAAsB,UAAU,CAAC,IAAI,EAAE;KAC7C,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Option } from "effect";
|
|
2
|
+
import type { ManagedRepo, Selector } from "./model.ts";
|
|
3
|
+
/** Match both selector axes when both are present; an omitted selector matches every repo. */
|
|
4
|
+
export declare const matchesSelector: (selector: Option.Option<Selector>, repo: ManagedRepo) => boolean;
|
|
5
|
+
//# sourceMappingURL=selector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selector.d.ts","sourceRoot":"","sources":["../src/selector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAExD,8FAA8F;AAC9F,eAAO,MAAM,eAAe,aAAc,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,WAAW,KAAG,OAcnF,CAAC"}
|
package/dist/selector.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Option } from "effect";
|
|
2
|
+
/** Match both selector axes when both are present; an omitted selector matches every repo. */
|
|
3
|
+
export const matchesSelector = (selector, repo) => Option.match(selector, {
|
|
4
|
+
onNone: () => true,
|
|
5
|
+
onSome: (value) => {
|
|
6
|
+
const matchesRepo = Option.match(value.repos, {
|
|
7
|
+
onNone: () => true,
|
|
8
|
+
onSome: (repos) => repos.includes(repo.name),
|
|
9
|
+
});
|
|
10
|
+
const matchesTag = Option.match(value.tags, {
|
|
11
|
+
onNone: () => true,
|
|
12
|
+
onSome: (tags) => tags.some((tag) => repo.tags.includes(tag)),
|
|
13
|
+
});
|
|
14
|
+
return matchesRepo && matchesTag;
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=selector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selector.js","sourceRoot":"","sources":["../src/selector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,8FAA8F;AAC9F,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,QAAiC,EAAE,IAAiB,EAAW,EAAE,CAC/F,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE;IACrB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI;IAClB,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;QAChB,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE;YAC5C,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI;YAClB,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;SAC7C,CAAC,CAAC;QACH,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE;YAC1C,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI;YAClB,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;SAC9D,CAAC,CAAC;QACH,OAAO,WAAW,IAAI,UAAU,CAAC;IACnC,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { type Document } from "yaml";
|
|
3
|
+
import { ConfigFileError, type InstancePath } from "../model.ts";
|
|
4
|
+
/**
|
|
5
|
+
* Parse YAML source into its Document AST, strictly (unique keys, warnings
|
|
6
|
+
* are errors), with source tokens retained so surgical edits keep formatting.
|
|
7
|
+
*/
|
|
8
|
+
export declare const parseYamlDocument: (file: InstancePath, source: string) => Effect.Effect<Document.Parsed, ConfigFileError>;
|
|
9
|
+
//# sourceMappingURL=document.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../src/yaml/document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAkB,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,KAAK,QAAQ,EAAiB,MAAM,MAAM,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAWjE;;;GAGG;AACH,eAAO,MAAM,iBAAiB,SACtB,YAAY,UACV,MAAM,KACb,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,eAAe,CA4B7C,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Effect, Option, Schema } from "effect";
|
|
2
|
+
import { parseDocument } from "yaml";
|
|
3
|
+
import { ConfigFileError } from "../model.js";
|
|
4
|
+
const causeMessage = (cause) => Option.match(Schema.decodeUnknownOption(Schema.Struct({ message: Schema.NonEmptyString }))(cause), {
|
|
5
|
+
onNone: () => "Unknown YAML parsing failure",
|
|
6
|
+
onSome: ({ message }) => message,
|
|
7
|
+
});
|
|
8
|
+
/**
|
|
9
|
+
* Parse YAML source into its Document AST, strictly (unique keys, warnings
|
|
10
|
+
* are errors), with source tokens retained so surgical edits keep formatting.
|
|
11
|
+
*/
|
|
12
|
+
export const parseYamlDocument = (file, source) => Effect.gen(function* () {
|
|
13
|
+
const document = yield* Effect.try({
|
|
14
|
+
try: () => parseDocument(source, {
|
|
15
|
+
keepSourceTokens: true,
|
|
16
|
+
prettyErrors: true,
|
|
17
|
+
strict: true,
|
|
18
|
+
uniqueKeys: true,
|
|
19
|
+
}),
|
|
20
|
+
catch: (cause) => new ConfigFileError({
|
|
21
|
+
file,
|
|
22
|
+
stage: "yaml",
|
|
23
|
+
expression: Option.none(),
|
|
24
|
+
message: causeMessage(cause),
|
|
25
|
+
}),
|
|
26
|
+
});
|
|
27
|
+
const syntaxIssue = document.errors[0] ?? document.warnings[0];
|
|
28
|
+
if (syntaxIssue !== undefined) {
|
|
29
|
+
return yield* new ConfigFileError({
|
|
30
|
+
file,
|
|
31
|
+
stage: "yaml",
|
|
32
|
+
expression: Option.none(),
|
|
33
|
+
message: syntaxIssue.message,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return document;
|
|
37
|
+
});
|
|
38
|
+
//# sourceMappingURL=document.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document.js","sourceRoot":"","sources":["../../src/yaml/document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAiB,aAAa,EAAE,MAAM,MAAM,CAAC;AACpD,OAAO,EAAE,eAAe,EAAqB,MAAM,aAAa,CAAC;AAEjE,MAAM,YAAY,GAAG,CAAC,KAAc,EAAU,EAAE,CAC9C,MAAM,CAAC,KAAK,CACV,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,EACpF;IACE,MAAM,EAAE,GAAG,EAAE,CAAC,8BAA8B;IAC5C,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO;CACjC,CACF,CAAC;AAEJ;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,IAAkB,EAClB,MAAc,EACmC,EAAE,CACnD,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;QACjC,GAAG,EAAE,GAAG,EAAE,CACR,aAAa,CAAC,MAAM,EAAE;YACpB,gBAAgB,EAAE,IAAI;YACtB,YAAY,EAAE,IAAI;YAClB,MAAM,EAAE,IAAI;YACZ,UAAU,EAAE,IAAI;SACjB,CAAC;QACJ,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CACf,IAAI,eAAe,CAAC;YAClB,IAAI;YACJ,KAAK,EAAE,MAAM;YACb,UAAU,EAAE,MAAM,CAAC,IAAI,EAAE;YACzB,OAAO,EAAE,YAAY,CAAC,KAAK,CAAC;SAC7B,CAAC;KACL,CAAC,CAAC;IACH,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC/D,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC,CAAC,IAAI,eAAe,CAAC;YAChC,IAAI;YACJ,KAAK,EAAE,MAAM;YACb,UAAU,EAAE,MAAM,CAAC,IAAI,EAAE;YACzB,OAAO,EAAE,WAAW,CAAC,OAAO;SAC7B,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
|
+
import type { ConfigFileError } from "../model.ts";
|
|
3
|
+
declare const YamlEdit_base: Schema.Class<YamlEdit, Schema.Struct<{
|
|
4
|
+
readonly path: Schema.$Array<Schema.NonEmptyString>;
|
|
5
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
6
|
+
}>, {}>;
|
|
7
|
+
export declare class YamlEdit extends YamlEdit_base {
|
|
8
|
+
}
|
|
9
|
+
/** Mutate one YAML path through the Document AST, retaining comments and key order. */
|
|
10
|
+
export declare const updateYaml: (file: string & import("effect/Brand").Brand<"InstancePath">, source: string, edit: YamlEdit) => Effect.Effect<string, ConfigFileError, never>;
|
|
11
|
+
/** Apply the same surgical mutation to the YAML half of a Markdown config file. */
|
|
12
|
+
export declare const updateFrontmatter: (file: string & import("effect/Brand").Brand<"InstancePath">, source: string, edit: YamlEdit) => Effect.Effect<string, ConfigFileError, never>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=writer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../../src/yaml/writer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,aAAa,CAAC;;;;;AAIjE,qBAAa,QAAS,SAAQ,aAG5B;CAAG;AAOL,uFAAuF;AACvF,eAAO,MAAM,UAAU,gJAQtB,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,iBAAiB,gJAe7B,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
|
+
import { splitMarkdown } from "../frontmatter.js";
|
|
3
|
+
import { parseYamlDocument } from "./document.js";
|
|
4
|
+
export class YamlEdit extends Schema.Class("@usine/config/YamlEdit")({
|
|
5
|
+
path: Schema.Array(Schema.NonEmptyString).check(Schema.isNonEmpty()),
|
|
6
|
+
value: Schema.Json,
|
|
7
|
+
}) {
|
|
8
|
+
}
|
|
9
|
+
const restoreNewlines = (text, newline) => {
|
|
10
|
+
const normalized = text.replaceAll("\r\n", "\n");
|
|
11
|
+
return newline === "\r\n" ? normalized.replaceAll("\n", "\r\n") : normalized;
|
|
12
|
+
};
|
|
13
|
+
/** Mutate one YAML path through the Document AST, retaining comments and key order. */
|
|
14
|
+
export const updateYaml = Effect.fn("YamlWriter.updateYaml")((file, source, edit) => Effect.gen(function* () {
|
|
15
|
+
const document = yield* parseYamlDocument(file, source);
|
|
16
|
+
document.setIn(edit.path, edit.value);
|
|
17
|
+
// The AST stringifier always emits LF; restore the authored style.
|
|
18
|
+
return restoreNewlines(document.toString(), source.includes("\r\n") ? "\r\n" : "\n");
|
|
19
|
+
}));
|
|
20
|
+
/** Apply the same surgical mutation to the YAML half of a Markdown config file. */
|
|
21
|
+
export const updateFrontmatter = Effect.fn("YamlWriter.updateFrontmatter")((file, source, edit) => Effect.gen(function* () {
|
|
22
|
+
const markdown = yield* splitMarkdown(file, source);
|
|
23
|
+
// A one-line YAML half carries no newline of its own, so the file's
|
|
24
|
+
// delimiter style — not the half's content — decides the output style.
|
|
25
|
+
const updated = restoreNewlines(yield* updateYaml(file, markdown.yaml, edit), markdown.newline);
|
|
26
|
+
const yaml = updated.endsWith(markdown.newline)
|
|
27
|
+
? updated.slice(0, -markdown.newline.length)
|
|
28
|
+
: updated;
|
|
29
|
+
return `---${markdown.newline}${yaml}${markdown.newline}---${markdown.newline}${markdown.body}`;
|
|
30
|
+
}));
|
|
31
|
+
//# sourceMappingURL=writer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writer.js","sourceRoot":"","sources":["../../src/yaml/writer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,MAAM,OAAO,QAAS,SAAQ,MAAM,CAAC,KAAK,CAAW,wBAAwB,CAAC,CAAC;IAC7E,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;IACpE,KAAK,EAAE,MAAM,CAAC,IAAI;CACnB,CAAC;CAAG;AAEL,MAAM,eAAe,GAAG,CAAC,IAAY,EAAE,OAAsB,EAAU,EAAE;IACvE,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EA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,CAAC,QAAQ,CAAC,OAAO,CAAC;QAC7C,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;QAC5C,CAAC,CAAC,OAAO,CAAC;IACZ,OAAO,MAAM,QAAQ,CAAC,OAAO,GAAG,IAAI,GAAG,QAAQ,CAAC,OAAO,MAAM,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;AAClG,CAAC,CAAC,CACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,49 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usine/config",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Config file machinery for usine: parse, validate, and surgically rewrite the instance repo's files — usine.yaml, loop files, agent files.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"repository": {
|
|
7
|
-
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/basaltbytes/usine.git",
|
|
9
|
+
"directory": "packages/config"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"type": "module",
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"default": "./dist/index.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"yaml": "2.8.1",
|
|
27
|
+
"@usine/core": "0.1.0",
|
|
28
|
+
"@usine/expression": "0.1.0"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@effect/platform-node": "4.0.0-rc.111",
|
|
32
|
+
"@effect/vitest": "4.0.0-rc.111",
|
|
33
|
+
"effect": "4.0.0-rc.111",
|
|
34
|
+
"typescript": "7.0.2",
|
|
35
|
+
"vitest": "4.1.11",
|
|
36
|
+
"@usine/tsconfig": "0.0.0"
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"effect": "4.0.0-rc.111"
|
|
40
|
+
},
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=22"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "tsc -b",
|
|
46
|
+
"check": "tsc -p tsconfig.check.json",
|
|
47
|
+
"test": "vitest run"
|
|
48
|
+
}
|
|
49
|
+
}
|