@intentius/chant 0.109.0 → 0.111.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/dist/cli/main.d.ts.map +1 -1
- package/dist/discovery/fold-import.d.ts.map +1 -1
- package/dist/discovery/param-deps.d.ts +30 -2
- package/dist/discovery/param-deps.d.ts.map +1 -1
- package/dist/fold/subset.d.ts +9 -2
- package/dist/fold/subset.d.ts.map +1 -1
- package/dist/fold-provenance.d.ts +14 -2
- package/dist/fold-provenance.d.ts.map +1 -1
- package/dist/import/ir-utils.d.ts.map +1 -1
- package/dist/import/parser.d.ts +8 -0
- package/dist/import/parser.d.ts.map +1 -1
- package/dist/op/activities/factory.d.ts.map +1 -1
- package/dist/provenance.d.ts +11 -0
- package/dist/provenance.d.ts.map +1 -1
- package/dist/serializer-walker.d.ts.map +1 -1
- package/dist/stack-output.d.ts +5 -0
- package/dist/stack-output.d.ts.map +1 -1
- package/dist/workspace/box-cli.d.ts +3 -2
- package/dist/workspace/box-cli.d.ts.map +1 -1
- package/dist/workspace/box-factory-write.d.ts +71 -0
- package/dist/workspace/box-factory-write.d.ts.map +1 -0
- package/dist/workspace/box-intent.d.ts +6 -0
- package/dist/workspace/box-intent.d.ts.map +1 -1
- package/dist/workspace/declaration-write-cli.d.ts +11 -0
- package/dist/workspace/declaration-write-cli.d.ts.map +1 -0
- package/dist/workspace/declaration-write.d.ts +78 -0
- package/dist/workspace/declaration-write.d.ts.map +1 -0
- package/dist/workspace/declaration.d.ts +8 -0
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/json-edit.d.ts +11 -0
- package/dist/workspace/json-edit.d.ts.map +1 -1
- package/dist/workspace/ls.d.ts +8 -0
- package/dist/workspace/ls.d.ts.map +1 -1
- package/dist/workspace/reason-codes.d.ts +4 -0
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/status.d.ts.map +1 -1
- package/dist/workspace/write-scope.d.ts +10 -0
- package/dist/workspace/write-scope.d.ts.map +1 -1
- package/dist/yaml.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/cli/commands/import.test.ts +5 -4
- package/src/cli/main.test.ts +2 -0
- package/src/cli/main.ts +18 -0
- package/src/discovery/fold-composite.test.ts +22 -0
- package/src/discovery/fold-host-composite.test.ts +23 -0
- package/src/discovery/fold-import.ts +73 -21
- package/src/discovery/fold-project-provenance.test.ts +52 -0
- package/src/discovery/param-deps.test.ts +43 -2
- package/src/discovery/param-deps.ts +101 -2
- package/src/fold/subset.ts +9 -2
- package/src/fold-provenance.test.ts +11 -0
- package/src/fold-provenance.ts +22 -2
- package/src/import/ir-utils.ts +6 -1
- package/src/import/parser.ts +8 -0
- package/src/op/activities/factory.ts +3 -1
- package/src/op/factory.e2e.test.ts +3 -1
- package/src/provenance.ts +13 -1
- package/src/serializer-walker.test.ts +10 -0
- package/src/serializer-walker.ts +17 -1
- package/src/stack-output.ts +6 -1
- package/src/workspace/box-cli.ts +35 -4
- package/src/workspace/box-factory-write.schema.json +342 -0
- package/src/workspace/box-factory-write.test.ts +108 -0
- package/src/workspace/box-factory-write.ts +226 -0
- package/src/workspace/box-intent.test.ts +14 -4
- package/src/workspace/box-intent.ts +9 -1
- package/src/workspace/declaration-extensions.test.ts +79 -0
- package/src/workspace/declaration-write-cli.ts +82 -0
- package/src/workspace/declaration-write.test.ts +155 -0
- package/src/workspace/declaration-write.ts +275 -0
- package/src/workspace/declaration.ts +19 -1
- package/src/workspace/json-edit.ts +71 -0
- package/src/workspace/ls-contract.test.ts +53 -0
- package/src/workspace/ls.schema.json +11 -0
- package/src/workspace/ls.ts +18 -0
- package/src/workspace/member-write.schema.json +193 -0
- package/src/workspace/reason-codes.test.ts +4 -0
- package/src/workspace/reason-codes.ts +6 -0
- package/src/workspace/status.schema.json +10 -1
- package/src/workspace/status.ts +25 -6
- package/src/workspace/write-scope.ts +17 -0
- package/src/yaml.test.ts +6 -0
- package/src/yaml.ts +4 -0
package/dist/cli/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AAMA,OAAO,EAAkB,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAwG9E;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CA6pBpD;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AAMA,OAAO,EAAkB,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAwG9E;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CA6pBpD;AAk6BD;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAuBzE;AAID;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,UAAU,EAwKvC,CAAC;AA4KF;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fold-import.d.ts","sourceRoot":"","sources":["../../src/discovery/fold-import.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAMjC,OAAO,EAAsC,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAkC,KAAK,iBAAiB,EAAyB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"fold-import.d.ts","sourceRoot":"","sources":["../../src/discovery/fold-import.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAMjC,OAAO,EAAsC,KAAK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,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,UAAU,GAAE,SAAS,YAAY,EAAO,EACxC,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAkE1C"}
|
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
import * as ts from "typescript";
|
|
2
|
-
import type { ArgumentLocation, PathOrigin, SourceLocation } from "../provenance.js";
|
|
2
|
+
import type { ArgumentLocation, HostOriginReason, PathOrigin, SourceLocation } from "../provenance.js";
|
|
3
|
+
/**
|
|
4
|
+
* What a file binds to host code, for {@link hostReadOf} (INTENTIUS/typescript-as-data#248).
|
|
5
|
+
*/
|
|
6
|
+
export interface HostBindings {
|
|
7
|
+
/** Local names bound to a value a lexicon package exports. */
|
|
8
|
+
values: ReadonlySet<string>;
|
|
9
|
+
/** Local names of eager lexicon helpers: a call to one is evaluated by host code at fold time. */
|
|
10
|
+
eagerCalls: ReadonlySet<string>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The first host read in `expr`, following this file's own top-level consts,
|
|
14
|
+
* or `undefined` when it reads none (INTENTIUS/typescript-as-data#248).
|
|
15
|
+
*
|
|
16
|
+
* A method called on a receiver is `host-call` whatever the receiver is, since
|
|
17
|
+
* fold calls the real method on it; so is a call to an eager lexicon helper. An
|
|
18
|
+
* identifier bound to a lexicon export is `host-value`. A call fold reduces to
|
|
19
|
+
* an envelope (an authoring helper, a call-form intrinsic) or evaluates itself
|
|
20
|
+
* (a project function) is not host code, and only its arguments are read.
|
|
21
|
+
*
|
|
22
|
+
* Syntactic, like {@link readParams}, so it over-reports in one place: both
|
|
23
|
+
* arms of a conditional are read although only one is taken. That errs toward
|
|
24
|
+
* `unknown`, which never licenses an edit `direct` would not.
|
|
25
|
+
*/
|
|
26
|
+
export declare function hostReadOf(expr: ts.Expression, consts: ReadonlyMap<string, ts.Expression>, paramLocals: ReadonlySet<string>, host: HostBindings): HostOriginReason | undefined;
|
|
3
27
|
/**
|
|
4
28
|
* Path → build-parameter origin for one resource's props object literal.
|
|
5
29
|
*
|
|
@@ -12,8 +36,12 @@ import type { ArgumentLocation, PathOrigin, SourceLocation } from "../provenance
|
|
|
12
36
|
* A spread is attributed to the object it spreads INTO, at that object's own
|
|
13
37
|
* path (the entity root for a top-level spread), since which keys it
|
|
14
38
|
* contributes is not knowable here.
|
|
39
|
+
*
|
|
40
|
+
* With `host`, a path whose expression reads host code ({@link hostReadOf})
|
|
41
|
+
* is recorded `host` instead, and that outranks a build parameter it also
|
|
42
|
+
* reads: the value is what host code returned, whatever the parameter was.
|
|
15
43
|
*/
|
|
16
|
-
export declare function collectParamDependencies(props: ts.ObjectLiteralExpression, consts: ReadonlyMap<string, ts.Expression>, paramLocals: ReadonlySet<string
|
|
44
|
+
export declare function collectParamDependencies(props: ts.ObjectLiteralExpression, consts: ReadonlyMap<string, ts.Expression>, paramLocals: ReadonlySet<string>, host?: HostBindings): Record<string, PathOrigin>;
|
|
17
45
|
/**
|
|
18
46
|
* The factory-parameter names in scope inside one composite body (chant #2161).
|
|
19
47
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"param-deps.d.ts","sourceRoot":"","sources":["../../src/discovery/param-deps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"param-deps.d.ts","sourceRoot":"","sources":["../../src/discovery/param-deps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAsHpG;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,8DAA8D;IAC9D,MAAM,EAAE,WAAW,CAAC,MA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EAAE,CAAC,uBAAuB,EACjC,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,EAC1C,KAAK,EAAE,mBAAmB,EAC1B,SAAS,EAAE,MAAM,EACjB,IAAI,CAAC,EAAE,iBAAiB,GACvB,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAkD5B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAC/B,cAAc,EAAE,SAAS,EAAE,CAAC,UAAU,EAAE,EACxC,MAAM,EAAE,aAAa,CAAC,SAAS,MAAM,EAAE,CAAC,EACxC,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,EAC1C,KAAK,EAAE,mBAAmB,EAC1B,SAAS,EAAE,MAAM,EACjB,IAAI,CAAC,EAAE,iBAAiB,GACvB,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAqB5B"}
|
package/dist/fold/subset.d.ts
CHANGED
|
@@ -176,7 +176,7 @@ import { type IntrinsicDef } from "../lexicon.js";
|
|
|
176
176
|
* `spec/VERSION` in the specification repository carries the same string, and
|
|
177
177
|
* the conformance adapter reads this one to fill its `specVersion` field.
|
|
178
178
|
*
|
|
179
|
-
* ## Why 2.
|
|
179
|
+
* ## Why 2.3, and what each version since 1.0 asked for (chant#2445)
|
|
180
180
|
*
|
|
181
181
|
* Raising this is the last step of adopting a rule set, so each version was
|
|
182
182
|
* checked against what chant does rather than against whether the suite is
|
|
@@ -225,6 +225,13 @@ import { type IntrinsicDef } from "../lexicon.js";
|
|
|
225
225
|
* chant already did: a call-bound local exported by name (`export { x }`)
|
|
226
226
|
* resolves by F-Call as the single declarator does, and a same-file call's
|
|
227
227
|
* result read inside an F-Call argument resolves once per file (#3329).
|
|
228
|
+
* - **2.3** says a value host code produced, written at an export or into a
|
|
229
|
+
* field, has an unknown origin and never a direct one. chant reports
|
|
230
|
+
* `host-call` and `host-value` for resource fields since
|
|
231
|
+
* typescript-as-data#248. 2.3 also lets `F-Host-Composite` interpret a
|
|
232
|
+
* composite an active package publishes as TypeScript source, which chant
|
|
233
|
+
* has done since #3247, and adds fixtures for a call result read inside an
|
|
234
|
+
* argument, which chant passes since #3610.
|
|
228
235
|
*
|
|
229
236
|
* `scripts/check-docs-citations.ts` refuses to run when this constant and the
|
|
230
237
|
* rules it loads disagree, so this and the `@intentius/tsad-conformance`
|
|
@@ -236,7 +243,7 @@ import { type IntrinsicDef } from "../lexicon.js";
|
|
|
236
243
|
* Until chant#2470 the rules came from a commit `docs-check.yml` checked out;
|
|
237
244
|
* now they come from the published package, so bumping it is what moves this.
|
|
238
245
|
*/
|
|
239
|
-
export declare const SPEC_VERSION = "2.
|
|
246
|
+
export declare const SPEC_VERSION = "2.3";
|
|
240
247
|
/** The two EVL rule ids a shape violation can be attributed to. */
|
|
241
248
|
export type SubsetRuleId = "EVL001" | "EVL003";
|
|
242
249
|
/** A located, shape-level rejection: the offending node, the EVL rule id it maps to, and a message. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subset.d.ts","sourceRoot":"","sources":["../../src/fold/subset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAiD,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAE9F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwKG;AAEH
|
|
1
|
+
{"version":3,"file":"subset.d.ts","sourceRoot":"","sources":["../../src/fold/subset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAiD,KAAK,YAAY,EAAE,MAAM,YAAY,CA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,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,WAAW,CAAC,MAAM,CAAC,CAoDpF;AAgCD,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,GAAG,MAAM,CAEzE;AAED,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,GAAG,MAAM,CAE1E;AAED,eAAO,MAAM,iCAAiC,8BAA8B,CAAC;AAE7E,eAAO,MAAM,yBAAyB,sBAAsB,CAAC;AAE7D,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,GAAG,MAAM,CAEtE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,GAAG,MAAM,CAErE;AAED,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,MAAM,CAElE;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,EAAE,CAAC,wBAAwB,EACjC,UAAU,CAAC,EAAE,SAAS,YAAY,EAAE,GACnC,eAAe,GAAG,SAAS,CAc7B;AAWD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,UAAU,CAAC,EAAE,SAAS,YAAY,EAAE,GACnC,eAAe,GAAG,SAAS,CAkO7B"}
|
|
@@ -71,7 +71,11 @@
|
|
|
71
71
|
import { type Declarable } from "./declarable.js";
|
|
72
72
|
import { type ArgumentLocation, type EntityProvenance, type PathOrigin, type SourceLocation } from "./provenance.js";
|
|
73
73
|
import type { DeepEntityDrift } from "./lifecycle/deep-diff.js";
|
|
74
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* Why a field's origin could not be determined. The first two are facts about
|
|
76
|
+
* the BUILD; the host reasons are facts about the expression, and match the
|
|
77
|
+
* strings the specification's reference implementation reports.
|
|
78
|
+
*/
|
|
75
79
|
export type UnknownOriginReason =
|
|
76
80
|
/**
|
|
77
81
|
* A composite expanded the entity and this build did not interpret its body,
|
|
@@ -85,7 +89,15 @@ export type UnknownOriginReason =
|
|
|
85
89
|
* composite make it" is answerable. A sandboxed child's entities arrive this
|
|
86
90
|
* way: `discovery/entity-wire-codec.ts` drops build metadata over the wire.
|
|
87
91
|
*/
|
|
88
|
-
| "no-provenance"
|
|
92
|
+
| "no-provenance"
|
|
93
|
+
/**
|
|
94
|
+
* INTENTIUS/typescript-as-data#248: host code computed the value, by a method
|
|
95
|
+
* called on a real receiver (`"x".toUpperCase()`, `[1, 2].join("-")`) or an
|
|
96
|
+
* eager lexicon helper. The file wrote the call, not the value.
|
|
97
|
+
*/
|
|
98
|
+
| "host-call"
|
|
99
|
+
/** A value a lexicon package exports, bound by an import (`AWS.Region`, `S3Actions.GetObject`). */
|
|
100
|
+
| "host-value";
|
|
89
101
|
/**
|
|
90
102
|
* What produced one emitted property path.
|
|
91
103
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fold-provenance.d.ts","sourceRoot":"","sources":["../src/fold-provenance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AAEH,OAAO,EAAwB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAErE,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,uBAAuB,CAAC;AAE5E
|
|
1
|
+
{"version":3,"file":"fold-provenance.d.ts","sourceRoot":"","sources":["../src/fold-provenance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;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BAAgB,gBAAgB,CAC9B,OAAO,EAAE,SAAS,eAAe,EAAE,EACnC,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,gBAAgB,GAAG,SAAS,EAC9D,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GAC9B,cAAc,EAAE,CAoBlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ir-utils.d.ts","sourceRoot":"","sources":["../../src/import/ir-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAkBzE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"ir-utils.d.ts","sourceRoot":"","sources":["../../src/import/ir-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAkBzE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAsBrE;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,OAAO,EACd,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,GAAG,IAAI,GAC5D,GAAG,CAAC,MAAM,CAAC,CAIb"}
|
package/dist/import/parser.d.ts
CHANGED
|
@@ -8,6 +8,9 @@ export interface ParameterIR {
|
|
|
8
8
|
readonly description?: string;
|
|
9
9
|
readonly defaultValue?: unknown;
|
|
10
10
|
readonly required?: boolean;
|
|
11
|
+
/** What the value is checked against, under the source format's own keys
|
|
12
|
+
* and as written (CloudFormation `AllowedValues`, `MinLength`, `NoEcho`). */
|
|
13
|
+
readonly constraints?: Readonly<Record<string, unknown>>;
|
|
11
14
|
}
|
|
12
15
|
/**
|
|
13
16
|
* Intermediate representation of a template resource
|
|
@@ -20,6 +23,11 @@ export interface ResourceIR {
|
|
|
20
23
|
/** Name of the condition gating this resource (CloudFormation `Condition`
|
|
21
24
|
* key, or equivalent), when the source template declares one (#2069). */
|
|
22
25
|
readonly condition?: string;
|
|
26
|
+
/** Resource-level attributes other than the condition, under the source
|
|
27
|
+
* format's own keys (CloudFormation `DependsOn`, `DeletionPolicy`,
|
|
28
|
+
* `UpdateReplacePolicy`, `UpdatePolicy`, `CreationPolicy`). Values are
|
|
29
|
+
* parsed value trees, like {@link properties}. */
|
|
30
|
+
readonly attributes?: Readonly<Record<string, unknown>>;
|
|
23
31
|
}
|
|
24
32
|
/**
|
|
25
33
|
* Intermediate representation of a declared template condition — a named
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/import/parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/import/parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,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"factory.d.ts","sourceRoot":"","sources":["../../../src/op/activities/factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/op/activities/factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAQH,uEAAuE;AACvE,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,sFAAsF;IACtF,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,+DAA+D;IAC/D,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACxD,0FAA0F;IAC1F,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,OAAO,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,oFAAoF;IACpF,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,wFAAwF;IACxF,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,KAAK,GAAG,IAAI,CAAC;CAC/C;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,OAAO,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,0HAA0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@ export interface EntityProvenance {
|
|
|
83
83
|
* expression for this path reads no parameter at all. The composite fixes
|
|
84
84
|
* this field, and no argument at the call site moves it.
|
|
85
85
|
*
|
|
86
|
+
* - `host` — the authored expression for this path reads a value host code
|
|
87
|
+
* produced (INTENTIUS/typescript-as-data#248): a method called on a real
|
|
88
|
+
* receiver or an eager lexicon helper (`host-call`), or a value a lexicon
|
|
89
|
+
* package exports (`host-value`). The author wrote the call, not the value,
|
|
90
|
+
* so ./fold-provenance.ts answers `unknown` rather than `direct`.
|
|
91
|
+
*
|
|
86
92
|
* The coarse `composite` and the two fine kinds are not alternatives. A build
|
|
87
93
|
* records `composite` when it expanded a composite without interpreting its
|
|
88
94
|
* body (the run path, an inadmissible factory), and that is why
|
|
@@ -111,7 +117,12 @@ export type PathOrigin = {
|
|
|
111
117
|
} | {
|
|
112
118
|
kind: "composite-literal";
|
|
113
119
|
composite: string;
|
|
120
|
+
} | {
|
|
121
|
+
kind: "host";
|
|
122
|
+
reason: HostOriginReason;
|
|
114
123
|
};
|
|
124
|
+
/** Which host code produced a value: a call it ran, or a value its package exports. */
|
|
125
|
+
export type HostOriginReason = "host-call" | "host-value";
|
|
115
126
|
/**
|
|
116
127
|
* A place in a source file. `file` is absolute, as
|
|
117
128
|
* {@link EntityProvenance.sourceFile} is; `line` and `column` are 1-based, the
|
package/dist/provenance.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provenance.d.ts","sourceRoot":"","sources":["../src/provenance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,MAAM,WAAW,gBAAgB;IAC/B,+EAA+E;IAC/E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,cAAc,CAAC;IAC/B;;;;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,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAe7D;AAED;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;IACb,yFAAyF;IACzF,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACjC,sCAAsC;IACtC,MAAM,EAAE,KAAK,GAAG,aAAa,GAAG,KAAK,GAAG,SAAS,CAAC;CACnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializer-walker.d.ts","sourceRoot":"","sources":["../src/serializer-walker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAO/C,MAAM,WAAW,iBAAiB;IAChC,4DAA4D;IAC5D,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IACzD,mEAAmE;IACnE,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1C,+DAA+D;IAC/D,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO,GAAG,OAAO,CAAC;CAChF;
|
|
1
|
+
{"version":3,"file":"serializer-walker.d.ts","sourceRoot":"","sources":["../src/serializer-walker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAO/C,MAAM,WAAW,iBAAiB;IAChC,4DAA4D;IAC5D,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IACzD,mEAAmE;IACnE,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1C,+DAA+D;IAC/D,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO,GAAG,OAAO,CAAC;CAChF;AAkBD;;;GAGG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,OAAO,EACd,WAAW,EAAE,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,EACpC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAyFT"}
|
package/dist/stack-output.d.ts
CHANGED
|
@@ -33,6 +33,10 @@ export interface StackOutput extends Declarable {
|
|
|
33
33
|
* `Output.Condition`) — a condition name, or the condition Declarable
|
|
34
34
|
* itself, resolved to its logical name at serialization (#2068/#2069). */
|
|
35
35
|
readonly condition?: string | Declarable;
|
|
36
|
+
/** The output's key in the template, when it is not the export name. A
|
|
37
|
+
* template may use one key for an output and a parameter or resource; a
|
|
38
|
+
* module cannot export both under that name (#3604). */
|
|
39
|
+
readonly name?: string;
|
|
36
40
|
}
|
|
37
41
|
/**
|
|
38
42
|
* Type guard for StackOutput.
|
|
@@ -61,5 +65,6 @@ export declare function stackOutput(ref: AttrRef | Intrinsic | string, options?:
|
|
|
61
65
|
exportName?: string;
|
|
62
66
|
lexicon?: string;
|
|
63
67
|
condition?: string | Declarable;
|
|
68
|
+
name?: string;
|
|
64
69
|
}): StackOutput;
|
|
65
70
|
//# sourceMappingURL=stack-output.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack-output.d.ts","sourceRoot":"","sources":["../src/stack-output.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,iBAAiB,EAAgB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAG1D;;GAEG;AACH,eAAO,MAAM,mBAAmB,eAAkC,CAAC;AAEnE;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC7C,QAAQ,CAAC,CAAC,mBAAm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E,MAAM,CAAC;IAC9B;gFAC4E;IAC5E,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B;;8EAE0E;IAC1E,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IACzC;;4DAEwD;IACxD,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AA2CD;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAOlE;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CACzB,GAAG,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,EACjC,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GACxH,WAAW,CA2Cb"}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* `chant workspace box`: a member's box block. Two verbs:
|
|
3
3
|
*
|
|
4
4
|
* - `box listing set <member>` (#3308) changes the box's listing
|
|
5
|
-
* (`box-listing.ts`)
|
|
6
|
-
*
|
|
5
|
+
* (`box-listing.ts`), and `box factory set <member>` (#3600) its factory,
|
|
6
|
+
* such as where it publishes (`box-factory-write.ts`). A box's other
|
|
7
|
+
* configuration is changed by editing the declaration in a reviewed change.
|
|
7
8
|
* - `box publish <member> <item> | --records` (#3165, ws-088) runs the
|
|
8
9
|
* publisher the box block names and checks what it did (`box-publish.ts`).
|
|
9
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"box-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/box-cli.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"box-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/box-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAWtD,wBAAsB,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAuD1E"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant workspace box factory set <member>` (#3600): change a box's
|
|
3
|
+
* factory, `members[i].box.factory` in the declaration (#3146, ws-077),
|
|
4
|
+
* through chant.
|
|
5
|
+
*
|
|
6
|
+
* A box planted from a shared template can't carry where it publishes:
|
|
7
|
+
* `factory.publish.repo` must be a real owner/name, so the template leaves
|
|
8
|
+
* it out and whoever plants the box, which knows the box's repo, sets it
|
|
9
|
+
* here. The write is the factory's sibling of `box listing set` (#3308): it
|
|
10
|
+
* changes only the factory's own top-level properties, in place, so the file
|
|
11
|
+
* keeps its formatting, key order and comments; it validates the declaration
|
|
12
|
+
* it would write, judges the declaration by the write scope at base (so a
|
|
13
|
+
* protected declaration takes it when its `except` names
|
|
14
|
+
* `/members/*\/box/factory/publish`), refuses a bare `--by` name under
|
|
15
|
+
* `identity.attribution: "identified"`, holds the working tree's write lock,
|
|
16
|
+
* prints one JSON document (`box-factory-write.schema.json`) and never
|
|
17
|
+
* commits.
|
|
18
|
+
*/
|
|
19
|
+
import { type FactoryView } from "./box-factory.js";
|
|
20
|
+
/** The version of the document this write prints. */
|
|
21
|
+
export declare const BOX_FACTORY_CONTRACT_VERSION = 1;
|
|
22
|
+
/** `$id` of the JSON Schema for what `box factory set` prints, shipped beside this file. */
|
|
23
|
+
export declare const BOX_FACTORY_WRITE_SCHEMA_ID = "https://intentius.io/chant/schemas/workspace/box-factory-write/v1/box-factory-write.schema.json";
|
|
24
|
+
/** Why a factory write wrote nothing. Closed. */
|
|
25
|
+
export declare const BOX_FACTORY_ERROR_CODES: readonly ["declaration-missing", "declaration-ambiguous", "declaration-unparseable", "declaration-invalid", "placement-invalid", "reader-too-old", "root-chant-required", "not-a-git-repository", "revision-unknown", "write-usage-invalid", "write-input-invalid", "factory-member-unknown", "factory-box-missing", "write-scope-member", "write-scope-protected", "write-scope-class-unknown", "agent-unknown", "principal-unidentified", "write-lock-timeout", "write-lock-not-held"];
|
|
26
|
+
export type BoxFactoryErrorCode = (typeof BOX_FACTORY_ERROR_CODES)[number];
|
|
27
|
+
/** The factory properties a write may set. Any `x-` key is passed through as well. */
|
|
28
|
+
export declare const FACTORY_FIELDS: readonly ["builds", "check", "checks", "builders", "tiers", "publish"];
|
|
29
|
+
type Head = {
|
|
30
|
+
$schema: string;
|
|
31
|
+
contract: number;
|
|
32
|
+
chant: string;
|
|
33
|
+
};
|
|
34
|
+
/** What `box factory set` prints. */
|
|
35
|
+
export type BoxFactoryWriteDocument = (Head & {
|
|
36
|
+
member: string;
|
|
37
|
+
/** The declaration file, from the repository root, and the sha256 of its bytes after the write (or as it would be, with dryRun). */
|
|
38
|
+
declaration: {
|
|
39
|
+
path: string;
|
|
40
|
+
sha256: string;
|
|
41
|
+
};
|
|
42
|
+
/** The declaration, from the repository root, when the write changed it; else empty. */
|
|
43
|
+
paths: string[];
|
|
44
|
+
changed: boolean;
|
|
45
|
+
dryRun: boolean;
|
|
46
|
+
/** The factory before the write, as status --json prints it, or null when the box declared none. */
|
|
47
|
+
previous: FactoryView | null;
|
|
48
|
+
/** The factory after the write, as status --json prints it, or null when the write took every field out. */
|
|
49
|
+
factory: FactoryView | null;
|
|
50
|
+
}) | (Head & {
|
|
51
|
+
member: string | null;
|
|
52
|
+
error: {
|
|
53
|
+
code: BoxFactoryErrorCode;
|
|
54
|
+
message: string;
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
export interface BoxFactoryWriteRequest {
|
|
58
|
+
cwd: string;
|
|
59
|
+
member: string;
|
|
60
|
+
/** The factory fields as JSON text (`--from`). */
|
|
61
|
+
fields?: string;
|
|
62
|
+
/** Who is writing (`--by`). */
|
|
63
|
+
by?: string;
|
|
64
|
+
/** The agent session (`CHANT_AGENT`). */
|
|
65
|
+
agent?: string;
|
|
66
|
+
dryRun?: boolean;
|
|
67
|
+
}
|
|
68
|
+
/** Run the write and build the document it prints. Never throws for a refusal. */
|
|
69
|
+
export declare function boxFactorySet(req: BoxFactoryWriteRequest): BoxFactoryWriteDocument;
|
|
70
|
+
export {};
|
|
71
|
+
//# sourceMappingURL=box-factory-write.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"box-factory-write.d.ts","sourceRoot":"","sources":["../../src/workspace/box-factory-write.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAU9D,qDAAqD;AACrD,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAE9C,4FAA4F;AAC5F,eAAO,MAAM,2BAA2B,oGAAoG,CAAC;AAE7I,iDAAiD;AACjD,eAAO,MAAM,uBAAuB,0dAYM,CAAC;AAC3C,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3E,sFAAsF;AACtF,eAAO,MAAM,cAAc,YAAI,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,CAAU,CAAC;AAErG,KAAK,IAAI,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjE,qCAAqC;AACrC,MAAM,MAAM,uBAAuB,GAC/B,CAAC,IAAI,GAAG;IACN,MAAM,EAAE,MAAM,CAAC;IACf,oIAAoI;IACpI,WAAW,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9C,wFAAwF;IACxF,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,oGAAoG;IACpG,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7B,4GAA4G;IAC5G,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;CAC7B,CAAC,GACF,CAAC,IAAI,GAAG;IAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,KAAK,EAAE;QAAE,IAAI,EAAE,mBAAmB,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC,CAAC;AAE9F,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAwCD,kFAAkF;AAClF,wBAAgB,aAAa,CAAC,GAAG,EAAE,sBAAsB,GAAG,uBAAuB,CAalF"}
|
|
@@ -32,6 +32,12 @@ export interface BoxIntent {
|
|
|
32
32
|
answer: string | null;
|
|
33
33
|
decided_by: string | null;
|
|
34
34
|
decided_on: string | null;
|
|
35
|
+
/**
|
|
36
|
+
* Whether the record's state counts as approved (#3609): the decision
|
|
37
|
+
* kind's `approval` rank for it is above 0, the rule the factory's pick
|
|
38
|
+
* holds dispatch with. False with no record, and for a kind with no ranks.
|
|
39
|
+
*/
|
|
40
|
+
approved: boolean;
|
|
35
41
|
}
|
|
36
42
|
/** The decision record a box's intent names, as the checks read it. */
|
|
37
43
|
export interface ResolvedBoxIntent {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"box-intent.d.ts","sourceRoot":"","sources":["../../src/workspace/box-intent.ts"],"names":[],"mappings":"AAAA;;;;;;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ACnB;AAED,uEAAuE;AACvE,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,4DAA4D;IAC5D,OAAO,EAAE,MAAM,CAAC;IAChB,8DAA8D;IAC9D,MAAM,EAAE;QACN,4DAA4D;QAC5D,IAAI,EAAE,MAAM,CAAC;QACb,iDAAiD;QACjD,IAAI,EAAE,MAAM,CAAC;QACb,mDAAmD;QACnD,UAAU,EAAE,MAAM,EAAE,CAAC;QACrB,MAAM,EAAE,SAAS,CAAC;KACnB,GAAG,IAAI,CAAC;IACT,0GAA0G;IAC1G,GAAG,EAAE,MAAM,CAAC;CACb;AAYD,sEAAsE;AACtE,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,CAEtD;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS,YAAY,EAAE,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAmD7I;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAQ3F;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,OAAO,CAE7G"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant workspace member add <name> --from <file|->`, `chant workspace
|
|
3
|
+
* member remove <name>` and `chant workspace host set <name> --from
|
|
4
|
+
* <file|->` (#3596): the command lines of `declaration-write.ts`.
|
|
5
|
+
*/
|
|
6
|
+
import type { CommandContext } from "../cli/registry.js";
|
|
7
|
+
/** `chant workspace member add|remove <name>`. */
|
|
8
|
+
export declare function runWorkspaceMember(ctx: CommandContext): number;
|
|
9
|
+
/** `chant workspace host set <name>`. */
|
|
10
|
+
export declare function runWorkspaceHost(ctx: CommandContext): number;
|
|
11
|
+
//# sourceMappingURL=declaration-write-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declaration-write-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/declaration-write-cli.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAsBtD,kDAAkD;AAClD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,CAK9D;AAED,yCAAyC;AACzC,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,CAI5D"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant workspace member add|remove` and `chant workspace host set` (#3596):
|
|
3
|
+
* a declaration's members and hosts, written through chant.
|
|
4
|
+
*
|
|
5
|
+
* ws-074 lets a tool write the repo only through chant. A local lobby keeps
|
|
6
|
+
* one member per box it runs, each with a box block whose isolation chant
|
|
7
|
+
* resolves, and the host those boxes run on; before these writes it edited
|
|
8
|
+
* `chant.workspace.json` itself to plant, retire and start a box. Each write
|
|
9
|
+
* changes one entry of `members` or `hosts` in place, so the file keeps its
|
|
10
|
+
* formatting, key order and, in a `.jsonc` file, its comments, as `box
|
|
11
|
+
* listing set` does (#3308).
|
|
12
|
+
*
|
|
13
|
+
* A write is refused, and nothing written, when the declaration it would
|
|
14
|
+
* write does not read (`write-input-invalid`, with the read's own message),
|
|
15
|
+
* when it adds a collision between two boxes on one host or a literal
|
|
16
|
+
* machine path (`box-isolation-collision`, `box-isolation-literal`, the codes
|
|
17
|
+
* `chant workspace check` reports as WSP123 and WSP124), and when the write
|
|
18
|
+
* scope at base keeps the writer off the declaration (`judgePath`, with the
|
|
19
|
+
* change, so a protected entry's `except` can allow `members` or `hosts`).
|
|
20
|
+
* Each holds the working tree's write lock (#3173, ws-089), prints one JSON
|
|
21
|
+
* document (`member-write.schema.json`) and never commits.
|
|
22
|
+
*/
|
|
23
|
+
/** The version of the document these writes print. */
|
|
24
|
+
export declare const DECLARATION_WRITE_CONTRACT_VERSION = 1;
|
|
25
|
+
/** `$id` of the JSON Schema for what the member and host writes print, shipped beside this file. */
|
|
26
|
+
export declare const DECLARATION_WRITE_SCHEMA_ID = "https://intentius.io/chant/schemas/workspace/member-write/v1/member-write.schema.json";
|
|
27
|
+
/** The writes. */
|
|
28
|
+
export declare const DECLARATION_WRITE_ACTIONS: readonly ["member add", "member remove", "host set"];
|
|
29
|
+
export type DeclarationWriteAction = (typeof DECLARATION_WRITE_ACTIONS)[number];
|
|
30
|
+
/** Why a member or host write wrote nothing. Closed. */
|
|
31
|
+
export declare const DECLARATION_WRITE_ERROR_CODES: readonly ["declaration-missing", "declaration-ambiguous", "declaration-unparseable", "declaration-invalid", "placement-invalid", "reader-too-old", "root-chant-required", "not-a-git-repository", "revision-unknown", "write-usage-invalid", "write-input-invalid", "member-exists", "member-unknown", "box-isolation-collision", "box-isolation-literal", "write-scope-member", "write-scope-protected", "write-scope-class-unknown", "agent-unknown", "principal-unidentified", "write-lock-timeout", "write-lock-not-held"];
|
|
32
|
+
export type DeclarationWriteErrorCode = (typeof DECLARATION_WRITE_ERROR_CODES)[number];
|
|
33
|
+
type Head = {
|
|
34
|
+
$schema: string;
|
|
35
|
+
contract: number;
|
|
36
|
+
chant: string;
|
|
37
|
+
action: DeclarationWriteAction;
|
|
38
|
+
name: string | null;
|
|
39
|
+
};
|
|
40
|
+
/** What `member add`, `member remove` and `host set` print. */
|
|
41
|
+
export type DeclarationWriteDocument = (Head & {
|
|
42
|
+
name: string;
|
|
43
|
+
/** The declaration file, from the repository root, and the sha256 of its bytes after the write (or as it would be, with dryRun). */
|
|
44
|
+
declaration: {
|
|
45
|
+
path: string;
|
|
46
|
+
sha256: string;
|
|
47
|
+
};
|
|
48
|
+
/** The declaration, from the repository root, when the write changed it; else empty. */
|
|
49
|
+
paths: string[];
|
|
50
|
+
changed: boolean;
|
|
51
|
+
dryRun: boolean;
|
|
52
|
+
/** The entry before the write, as the file held it, or null when there was none. */
|
|
53
|
+
previous: Record<string, unknown> | null;
|
|
54
|
+
/** The entry after the write, as the file holds it, or null after a remove. */
|
|
55
|
+
entry: Record<string, unknown> | null;
|
|
56
|
+
}) | (Head & {
|
|
57
|
+
error: {
|
|
58
|
+
code: DeclarationWriteErrorCode;
|
|
59
|
+
message: string;
|
|
60
|
+
};
|
|
61
|
+
});
|
|
62
|
+
export interface DeclarationWriteRequest {
|
|
63
|
+
cwd: string;
|
|
64
|
+
action: DeclarationWriteAction;
|
|
65
|
+
/** The member's or host's name. */
|
|
66
|
+
name: string;
|
|
67
|
+
/** The entry as JSON text (`--from`), for member add and host set. */
|
|
68
|
+
entry?: string;
|
|
69
|
+
/** Who is writing (`--by`). */
|
|
70
|
+
by?: string;
|
|
71
|
+
/** The agent session (`CHANT_AGENT`). */
|
|
72
|
+
agent?: string;
|
|
73
|
+
dryRun?: boolean;
|
|
74
|
+
}
|
|
75
|
+
/** Run the write and build the document it prints. Never throws for a refusal. */
|
|
76
|
+
export declare function declarationWrite(req: DeclarationWriteRequest): DeclarationWriteDocument;
|
|
77
|
+
export {};
|
|
78
|
+
//# sourceMappingURL=declaration-write.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declaration-write.d.ts","sourceRoot":"","sources":["../../src/workspace/declaration-write.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAgBH,sDAAsD;AACtD,eAAO,MAAM,kCAAkC,IAAI,CAAC;AAEpD,oGAAoG;AACpG,eAAO,MAAM,2BAA2B,0FAA0F,CAAC;AAEnI,kBAAkB;AAClB,eAAO,MA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,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AA4CD,kFAAkF;AAClF,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,uBAAuB,GAAG,wBAAwB,CAavF"}
|
|
@@ -538,6 +538,14 @@ export declare function pinnedChant(obj: Record<string, unknown>): {
|
|
|
538
538
|
* trailing commas.
|
|
539
539
|
*/
|
|
540
540
|
export declare function parseDeclaration(text: string, file: string, reader?: string, options?: ReadOptions): Declaration;
|
|
541
|
+
/**
|
|
542
|
+
* The `x-` keys of the object at `pointer` in the declaration as written
|
|
543
|
+
* (#3595), in file order: what a reader of `status --json` or `ls --json`
|
|
544
|
+
* gets back on the object the declaration holds them on. Empty when the
|
|
545
|
+
* pointer names no object, and for a declaration not read through
|
|
546
|
+
* {@link parseDeclaration}.
|
|
547
|
+
*/
|
|
548
|
+
export declare function extensionsAt(declaration: Declaration, pointer: string): Record<string, unknown>;
|
|
541
549
|
/**
|
|
542
550
|
* The rules the schema can't say about a box's services (#2880), as a
|
|
543
551
|
* message and the pointer to show, or null when they hold: each name is
|