@kumwe/studio-testkit 0.1.0-alpha.4 → 0.1.0-alpha.6
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/http-host-adapter.d.ts +74 -0
- package/dist/http-host-adapter.d.ts.map +1 -0
- package/dist/http-host-adapter.js +241 -0
- package/dist/http-host-adapter.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/fixtures/design-vocabulary.example.json +85 -0
- package/fixtures/migration.example.json +22 -0
- package/invalid/blueprint.revoking-slot-marker.json +57 -0
- package/invalid/design-vocabulary.unknown-control-kind.json +38 -0
- package/invalid/migration.empty-artifact-kinds.json +22 -0
- package/package.json +3 -3
- package/vectors/command/mode.blueprint.set-field-value.error.json +76 -0
- package/vectors/command/mode.blueprint.set-property.json +131 -0
- package/vectors/command/mode.content.insert-node.error.json +88 -0
- package/vectors/command/mode.hybrid.batch-atomic.error.json +158 -0
- package/vectors/command/mode.hybrid.insert-allowed.json +263 -0
- package/vectors/command/mode.hybrid.insert-designer-slot.error.json +145 -0
- package/vectors/command/mode.hybrid.insert-disallowed-type.error.json +145 -0
- package/vectors/command/mode.hybrid.insert-roots.error.json +143 -0
- package/vectors/command/mode.hybrid.remove-locked.error.json +130 -0
- package/vectors/command/mode.hybrid.reorder-with-locked.json +239 -0
- package/vectors/command/mode.hybrid.set-property.error.json +132 -0
- package/vectors/command/mode.hybrid.slot-marker-disallowed.error.json +125 -0
- package/vectors/command/mode.hybrid.slot-marker-insert.json +223 -0
- package/vectors/command/mode.hybrid.slot-marker-other-slot.error.json +125 -0
- package/vectors/command/mode.model.remove-node.error.json +75 -0
- package/vectors/command/mode.read-only.set-property.error.json +77 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { type HostAdapter } from '@kumwe/studio-protocol';
|
|
2
|
+
/**
|
|
3
|
+
* Minimal structural view of an HTTP response the adapter needs: the status
|
|
4
|
+
* code and the raw body text. Deliberately narrower than any platform
|
|
5
|
+
* response class so implementations from any runtime satisfy it.
|
|
6
|
+
*/
|
|
7
|
+
export interface HttpResponseLike {
|
|
8
|
+
status: number;
|
|
9
|
+
text(): Promise<string>;
|
|
10
|
+
}
|
|
11
|
+
/** The request shape the adapter hands to the injected transport. */
|
|
12
|
+
export interface HttpRequestInit {
|
|
13
|
+
body: string;
|
|
14
|
+
headers: Record<string, string>;
|
|
15
|
+
method: 'POST';
|
|
16
|
+
/** Opaque abort signal produced by the injected timeout factory, if any. */
|
|
17
|
+
signal?: unknown;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The injected fetch-like transport — the adapter's portability seam.
|
|
21
|
+
*
|
|
22
|
+
* Testkit source is deliberately free of host globals (no fetch, no DOM, no
|
|
23
|
+
* Node), so the embedder supplies the platform transport: a Node test injects
|
|
24
|
+
* a `node:http`-backed implementation, a browser host would inject the
|
|
25
|
+
* platform fetch, and either stays outside this package. The function must
|
|
26
|
+
* resolve with the terminal HTTP response (any status) and reject only for
|
|
27
|
+
* transport-level failures: network refusal, connection loss, or an abort
|
|
28
|
+
* raised by the injected timeout signal.
|
|
29
|
+
*/
|
|
30
|
+
export type HttpFetchLike = (url: string, init: HttpRequestInit) => Promise<HttpResponseLike>;
|
|
31
|
+
/**
|
|
32
|
+
* An abort signal handle minted per request by the injected timeout factory.
|
|
33
|
+
* `signal` is passed through to the transport untouched; `release` (when
|
|
34
|
+
* present) is invoked once the request settles so timer-backed factories can
|
|
35
|
+
* clean up.
|
|
36
|
+
*/
|
|
37
|
+
export interface HttpTimeoutHandle {
|
|
38
|
+
release?(): void;
|
|
39
|
+
signal: unknown;
|
|
40
|
+
}
|
|
41
|
+
export interface HttpHostAdapterOptions {
|
|
42
|
+
/**
|
|
43
|
+
* Second half of the portability seam: mints the per-request timeout
|
|
44
|
+
* signal. When omitted, requests carry no deadline. A rejection whose
|
|
45
|
+
* reason is named `AbortError` or `TimeoutError` is mapped to the canonical
|
|
46
|
+
* deadline failure.
|
|
47
|
+
*/
|
|
48
|
+
createTimeoutSignal?: (timeoutMilliseconds: number) => HttpTimeoutHandle;
|
|
49
|
+
fetchImplementation: HttpFetchLike;
|
|
50
|
+
/** Transport deadline handed to `createTimeoutSignal`. Defaults to 10 000. */
|
|
51
|
+
timeoutMilliseconds?: number;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* A `HostAdapter` that speaks JSON over an injected fetch-like transport to a
|
|
55
|
+
* host server: every port operation becomes
|
|
56
|
+
* `POST {baseUrl}/ports/{port}/{operation}` with a
|
|
57
|
+
* `{ arguments, context }` JSON body.
|
|
58
|
+
*
|
|
59
|
+
* Success responses (2xx) must carry a `HostPortResult` JSON body. Failure
|
|
60
|
+
* responses that carry a guard-conforming `HostPortError` body are re-thrown
|
|
61
|
+
* as that canonical error, so a host-authored category (with its safe
|
|
62
|
+
* revision on conflicts) crosses the transport intact. Everything else is
|
|
63
|
+
* mapped onto the canonical host error categories without disclosing
|
|
64
|
+
* transport details: network refusal and deadline expiry become
|
|
65
|
+
* `unavailable`, HTTP statuses map by class (401 `unauthenticated`, 403
|
|
66
|
+
* `forbidden`, 404 `not-found`, 409 `conflict`, 413 `limit-exceeded`, 422
|
|
67
|
+
* `validation-failed`, 429 `rate-limited`, 5xx `internal`/`unavailable`), and
|
|
68
|
+
* a malformed body — unparseable JSON, a result without `value`, or an error
|
|
69
|
+
* document the guard rejects — becomes `internal`. Every rejection is a
|
|
70
|
+
* `TestbedHostError` whose `error` satisfies `isHostPortError`, and no
|
|
71
|
+
* message ever echoes response bodies, addresses, or underlying reasons.
|
|
72
|
+
*/
|
|
73
|
+
export declare function createHttpHostAdapter(baseUrl: string, options: HttpHostAdapterOptions): HostAdapter;
|
|
74
|
+
//# sourceMappingURL=http-host-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-host-adapter.d.ts","sourceRoot":"","sources":["../src/http-host-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,WAAW,EAkBjB,MAAM,wBAAwB,CAAC;AAGhC;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CACzB;AAED,qEAAqE;AACrE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAE9F;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,IAAI,IAAI,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,CAAC,mBAAmB,EAAE,MAAM,KAAK,iBAAiB,CAAC;IACzE,mBAAmB,EAAE,aAAa,CAAC;IACnC,8EAA8E;IAC9E,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AASD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,sBAAsB,GAC9B,WAAW,CAmKb"}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { isHostPortError, STUDIO_CONTRACT_VERSION, } from '@kumwe/studio-protocol';
|
|
2
|
+
import { TestbedHostError } from './host-testbed.js';
|
|
3
|
+
/**
|
|
4
|
+
* A `HostAdapter` that speaks JSON over an injected fetch-like transport to a
|
|
5
|
+
* host server: every port operation becomes
|
|
6
|
+
* `POST {baseUrl}/ports/{port}/{operation}` with a
|
|
7
|
+
* `{ arguments, context }` JSON body.
|
|
8
|
+
*
|
|
9
|
+
* Success responses (2xx) must carry a `HostPortResult` JSON body. Failure
|
|
10
|
+
* responses that carry a guard-conforming `HostPortError` body are re-thrown
|
|
11
|
+
* as that canonical error, so a host-authored category (with its safe
|
|
12
|
+
* revision on conflicts) crosses the transport intact. Everything else is
|
|
13
|
+
* mapped onto the canonical host error categories without disclosing
|
|
14
|
+
* transport details: network refusal and deadline expiry become
|
|
15
|
+
* `unavailable`, HTTP statuses map by class (401 `unauthenticated`, 403
|
|
16
|
+
* `forbidden`, 404 `not-found`, 409 `conflict`, 413 `limit-exceeded`, 422
|
|
17
|
+
* `validation-failed`, 429 `rate-limited`, 5xx `internal`/`unavailable`), and
|
|
18
|
+
* a malformed body — unparseable JSON, a result without `value`, or an error
|
|
19
|
+
* document the guard rejects — becomes `internal`. Every rejection is a
|
|
20
|
+
* `TestbedHostError` whose `error` satisfies `isHostPortError`, and no
|
|
21
|
+
* message ever echoes response bodies, addresses, or underlying reasons.
|
|
22
|
+
*/
|
|
23
|
+
export function createHttpHostAdapter(baseUrl, options) {
|
|
24
|
+
const base = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl;
|
|
25
|
+
const timeoutMilliseconds = options.timeoutMilliseconds ?? 10_000;
|
|
26
|
+
let correlationSerial = 0;
|
|
27
|
+
function createError(failure) {
|
|
28
|
+
correlationSerial += 1;
|
|
29
|
+
const error = {
|
|
30
|
+
category: failure.category,
|
|
31
|
+
contractVersion: STUDIO_CONTRACT_VERSION,
|
|
32
|
+
correlationId: `http-transport-${correlationSerial}`,
|
|
33
|
+
kind: 'host-error',
|
|
34
|
+
message: { defaultMessage: failure.defaultMessage, key: failure.key },
|
|
35
|
+
retryable: failure.retryable,
|
|
36
|
+
};
|
|
37
|
+
return new TestbedHostError(error);
|
|
38
|
+
}
|
|
39
|
+
async function call(portName, operation, callArguments, context) {
|
|
40
|
+
const handle = options.createTimeoutSignal?.(timeoutMilliseconds);
|
|
41
|
+
let response;
|
|
42
|
+
try {
|
|
43
|
+
response = await options.fetchImplementation(`${base}/ports/${portName}/${operation}`, {
|
|
44
|
+
body: JSON.stringify({ arguments: callArguments, context }),
|
|
45
|
+
headers: { 'content-type': 'application/json' },
|
|
46
|
+
method: 'POST',
|
|
47
|
+
...(handle === undefined ? {} : { signal: handle.signal }),
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
catch (reason) {
|
|
51
|
+
throw createError(classifyTransportFailure(reason));
|
|
52
|
+
}
|
|
53
|
+
finally {
|
|
54
|
+
handle?.release?.();
|
|
55
|
+
}
|
|
56
|
+
let bodyText;
|
|
57
|
+
try {
|
|
58
|
+
bodyText = await response.text();
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
throw createError(malformedResponse());
|
|
62
|
+
}
|
|
63
|
+
if (response.status >= 200 && response.status < 300) {
|
|
64
|
+
const parsed = parseJson(bodyText);
|
|
65
|
+
if (!isHostPortResult(parsed)) {
|
|
66
|
+
throw createError(malformedResponse());
|
|
67
|
+
}
|
|
68
|
+
const result = {
|
|
69
|
+
...(parsed.revision === undefined ? {} : { revision: parsed.revision }),
|
|
70
|
+
value: parsed.value,
|
|
71
|
+
};
|
|
72
|
+
return result;
|
|
73
|
+
}
|
|
74
|
+
const parsed = parseJson(bodyText);
|
|
75
|
+
if (isHostPortError(parsed)) {
|
|
76
|
+
// The host authored a canonical error; transport it verbatim.
|
|
77
|
+
throw new TestbedHostError(parsed);
|
|
78
|
+
}
|
|
79
|
+
throw createError(statusFailure(response.status));
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
artifact: {
|
|
83
|
+
dependencies(reference, context) {
|
|
84
|
+
return call('artifact', 'dependencies', { reference: asJson(reference) }, context);
|
|
85
|
+
},
|
|
86
|
+
load(reference, context) {
|
|
87
|
+
return call('artifact', 'load', { reference: asJson(reference) }, context);
|
|
88
|
+
},
|
|
89
|
+
publish(reference, context) {
|
|
90
|
+
return call('artifact', 'publish', { reference: asJson(reference) }, context);
|
|
91
|
+
},
|
|
92
|
+
save(document, context) {
|
|
93
|
+
return call('artifact', 'save', { document: asJson(document) }, context);
|
|
94
|
+
},
|
|
95
|
+
unpublish(reference, context) {
|
|
96
|
+
return call('artifact', 'unpublish', { reference: asJson(reference) }, context);
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
localization: {
|
|
100
|
+
messages(locale, namespaces, context) {
|
|
101
|
+
return call('localization', 'messages', { locale, namespaces }, context);
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
media: {
|
|
105
|
+
get(assetId, context) {
|
|
106
|
+
return call('media', 'get', { assetId }, context);
|
|
107
|
+
},
|
|
108
|
+
list(query, context) {
|
|
109
|
+
return call('media', 'list', { query: asJson(query) }, context);
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
permission: {
|
|
113
|
+
explain(operation, context) {
|
|
114
|
+
return call('permission', 'explain', { operation }, context);
|
|
115
|
+
},
|
|
116
|
+
refresh(context) {
|
|
117
|
+
return call('permission', 'refresh', {}, context);
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
preview: {
|
|
121
|
+
cancel(draftDigest, context) {
|
|
122
|
+
return call('preview', 'cancel', { draftDigest }, context);
|
|
123
|
+
},
|
|
124
|
+
render(payload, context) {
|
|
125
|
+
return call('preview', 'render', { payload: asJson(payload) }, context);
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
recovery: {
|
|
129
|
+
discard(context) {
|
|
130
|
+
return call('recovery', 'discard', {}, context);
|
|
131
|
+
},
|
|
132
|
+
load(context) {
|
|
133
|
+
return call('recovery', 'load', {}, context);
|
|
134
|
+
},
|
|
135
|
+
store(envelope, context) {
|
|
136
|
+
return call('recovery', 'store', { envelope }, context);
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
resource: {
|
|
140
|
+
search(query, context) {
|
|
141
|
+
return call('resource', 'search', { query: asJson(query) }, context);
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
telemetry: {
|
|
145
|
+
emit(event, context) {
|
|
146
|
+
return call('telemetry', 'emit', { event: asJson(event) }, context);
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
/** Serializable typed values cross the wire as their JSON projections. */
|
|
152
|
+
function asJson(value) {
|
|
153
|
+
return JSON.parse(JSON.stringify(value));
|
|
154
|
+
}
|
|
155
|
+
function parseJson(text) {
|
|
156
|
+
try {
|
|
157
|
+
return JSON.parse(text);
|
|
158
|
+
}
|
|
159
|
+
catch {
|
|
160
|
+
return undefined;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
function isHostPortResult(value) {
|
|
164
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
|
|
165
|
+
return false;
|
|
166
|
+
}
|
|
167
|
+
const record = value;
|
|
168
|
+
if (!Object.hasOwn(record, 'value')) {
|
|
169
|
+
return false;
|
|
170
|
+
}
|
|
171
|
+
const revision = record.revision;
|
|
172
|
+
if (revision !== undefined && (typeof revision !== 'string' || revision.length === 0)) {
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
return Object.keys(record).every((key) => key === 'value' || key === 'revision');
|
|
176
|
+
}
|
|
177
|
+
function classifyTransportFailure(reason) {
|
|
178
|
+
const name = typeof reason === 'object' && reason !== null && 'name' in reason ? reason.name : undefined;
|
|
179
|
+
if (name === 'AbortError' || name === 'TimeoutError') {
|
|
180
|
+
// The injected deadline signal fired before the host answered.
|
|
181
|
+
return {
|
|
182
|
+
category: 'unavailable',
|
|
183
|
+
defaultMessage: 'The host did not respond within the transport deadline.',
|
|
184
|
+
key: 'studio.testkit/http-timeout',
|
|
185
|
+
retryable: true,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
return {
|
|
189
|
+
category: 'unavailable',
|
|
190
|
+
defaultMessage: 'The host could not be reached.',
|
|
191
|
+
key: 'studio.testkit/http-unreachable',
|
|
192
|
+
retryable: true,
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
function malformedResponse() {
|
|
196
|
+
return {
|
|
197
|
+
category: 'internal',
|
|
198
|
+
defaultMessage: 'The host response could not be interpreted.',
|
|
199
|
+
key: 'studio.testkit/http-malformed-response',
|
|
200
|
+
retryable: false,
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
function statusFailure(status) {
|
|
204
|
+
const category = categoryForStatus(status);
|
|
205
|
+
return {
|
|
206
|
+
category,
|
|
207
|
+
defaultMessage: 'The host rejected the request.',
|
|
208
|
+
key: `studio.testkit/http-status-${category}`,
|
|
209
|
+
retryable: category === 'rate-limited' || category === 'unavailable',
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
function categoryForStatus(status) {
|
|
213
|
+
switch (status) {
|
|
214
|
+
case 401:
|
|
215
|
+
return 'unauthenticated';
|
|
216
|
+
case 403:
|
|
217
|
+
return 'forbidden';
|
|
218
|
+
case 404:
|
|
219
|
+
return 'not-found';
|
|
220
|
+
case 408:
|
|
221
|
+
return 'unavailable';
|
|
222
|
+
case 409:
|
|
223
|
+
return 'conflict';
|
|
224
|
+
case 413:
|
|
225
|
+
return 'limit-exceeded';
|
|
226
|
+
case 422:
|
|
227
|
+
return 'validation-failed';
|
|
228
|
+
case 429:
|
|
229
|
+
return 'rate-limited';
|
|
230
|
+
case 502:
|
|
231
|
+
case 503:
|
|
232
|
+
case 504:
|
|
233
|
+
return 'unavailable';
|
|
234
|
+
default:
|
|
235
|
+
if (status >= 400 && status < 500) {
|
|
236
|
+
return 'invalid-request';
|
|
237
|
+
}
|
|
238
|
+
return 'internal';
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
//# sourceMappingURL=http-host-adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-host-adapter.js","sourceRoot":"","sources":["../src/http-host-adapter.ts"],"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E,gCAAgC;QAChD,GAAG,EAAE,8BAA8B,QAAQ,EAAE;QAC7C,SAAS,EAAE,QAAQ,KAAK,cAAc,IAAI,QAAQ,KAAK,aAAa;KACrE,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,GAAG;YACN,OAAO,iBAAiB,CAAC;QAC3B,KAAK,GAAG;YACN,OAAO,WAAW,CAAC;QACrB,KAAK,GAAG;YACN,OAAO,WAAW,CAAC;QACrB,KAAK,GAAG;YACN,OAAO,aAAa,CAAC;QACvB,KAAK,GAAG;YACN,OAAO,UAAU,CAAC;QACpB,KAAK,GAAG;YACN,OAAO,gBAAgB,CAAC;QAC1B,KAAK,GAAG;YACN,OAAO,mBAAmB,CAAC;QAC7B,KAAK,GAAG;YACN,OAAO,cAAc,CAAC;QACxB,KAAK,GAAG,CAAC;QACT,KAAK,GAAG,CAAC;QACT,KAAK,GAAG;YACN,OAAO,aAAa,CAAC;QACvB;YACE,IAAI,MAAM,IAAI,GAAG,IAAI,MAAM,GAAG,GAAG,EAAE,CAAC;gBAClC,OAAO,iBAAiB,CAAC;YAC3B,CAAC;YACD,OAAO,UAAU,CAAC;IACtB,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type BlockDefinition, type BlockSlotDefinition, type BlockType, type BlueprintDocument, type BlueprintBlockLock, type BlueprintNode, type JsonSchema, type StudioConfiguration, type StudioDiagnostic } from '@kumwe/studio-protocol';
|
|
2
2
|
export { createHostRequestContextFixture, createTestbedHost, TestbedHostError, type HostRequestContextFixtureOptions, type TestbedControls, type TestbedHost, type TestbedHostOptions, type TestbedPortName, } from './host-testbed.js';
|
|
3
|
+
export { createHttpHostAdapter, type HttpFetchLike, type HttpHostAdapterOptions, type HttpRequestInit, type HttpResponseLike, type HttpTimeoutHandle, } from './http-host-adapter.js';
|
|
3
4
|
export interface BlueprintFixtureOptions {
|
|
4
5
|
blockLocks?: BlueprintBlockLock[];
|
|
5
6
|
id?: string;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,+BAA+B,EAC/B,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,gCAAgC,EACrC,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,eAAe,GACrB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,uBAAuB;IACtC,UAAU,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,KAAK,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC9B,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iCAAiC;IAChD,SAAS,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAChC,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC;IACzC,YAAY,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC;CACzC;AAED,wBAAgB,sBAAsB,CAAC,OAAO,GAAE,uBAA4B,GAAG,iBAAiB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AAM,CAAC;IACf,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,KAAK,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC9B,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iCAAiC;IAChD,SAAS,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAChC,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC;IACzC,YAAY,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC;CACzC;AAED,wBAAgB,sBAAsB,CAAC,OAAO,GAAE,uBAA4B,GAAG,iBAAiB,CAiB/F;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,eAAe,CA2B1E;AAED,wBAAgB,gCAAgC,CAC9C,OAAO,GAAE,iCAAsC,GAC9C,mBAAmB,CAqErB;AAED,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,iBAAiB,EAC5B,WAAW,EAAE,SAAS,eAAe,EAAE,GACtC,IAAI,CAKN;AAED,qBAAa,sBAAuB,SAAQ,KAAK;IAC/C,SAAgB,WAAW,EAAE,gBAAgB,EAAE,CAAC;gBAE7B,WAAW,EAAE,gBAAgB,EAAE;CASnD"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BlockRegistry, validateBlueprint } from '@kumwe/studio-core';
|
|
2
2
|
import { STUDIO_CONTRACT_VERSION, STUDIO_WIRE_PROTOCOL_VERSION, } from '@kumwe/studio-protocol';
|
|
3
3
|
export { createHostRequestContextFixture, createTestbedHost, TestbedHostError, } from './host-testbed.js';
|
|
4
|
+
export { createHttpHostAdapter, } from './http-host-adapter.js';
|
|
4
5
|
export function createBlueprintFixture(options = {}) {
|
|
5
6
|
return {
|
|
6
7
|
contractVersion: STUDIO_CONTRACT_VERSION,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EACL,uBAAuB,EACvB,4BAA4B,GAU7B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,+BAA+B,EAC/B,iBAAiB,EACjB,gBAAgB,GAMjB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EACL,uBAAuB,EACvB,4BAA4B,GAU7B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,+BAA+B,EAC/B,iBAAiB,EACjB,gBAAgB,GAMjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,qBAAqB,GAMtB,MAAM,wBAAwB,CAAC;AAuBhC,MAAM,UAAU,sBAAsB,CAAC,UAAmC,EAAE;IAC1E,OAAO;QACL,eAAe,EAAE,uBAAuB;QACxC,cAAc,EAAE;YACd,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,UAAU,IAAI,EAAE,CAAC;YAC5C,KAAK,EAAE,EAAE,EAAE,EAAE,mBAAmB,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE;SAC3E;QACD,EAAE,EAAE,OAAO,CAAC,EAAE,IAAI,gBAAgB;QAClC,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,EAAE,cAAc,EAAE,gBAAgB,EAAE,GAAG,EAAE,uBAAuB,EAAE;QACzE,KAAK,EAAE,EAAE,EAAE,EAAE,mBAAmB,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE;QAC1E,KAAK,EAAE,EAAE,EAAE,EAAE,qBAAqB,EAAE,OAAO,EAAE,eAAe,EAAE;QAC9D,QAAQ,EAAE,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AAI,GAAG,wBAAwB,CAAC;QACrC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IAC7C,CAAC;CACF;AAED,SAAS,UAAU,CAAI,KAAQ;IAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAM,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "design-vocabulary",
|
|
4
|
+
"id": "org.example.catalog/product-vocabulary",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"owner": {
|
|
7
|
+
"id": "org.example/catalog",
|
|
8
|
+
"version": "1.0.0"
|
|
9
|
+
},
|
|
10
|
+
"label": {
|
|
11
|
+
"key": "org.example.catalog/product-vocabulary",
|
|
12
|
+
"defaultMessage": "Product design vocabulary"
|
|
13
|
+
},
|
|
14
|
+
"designControls": [
|
|
15
|
+
{
|
|
16
|
+
"id": "card-density",
|
|
17
|
+
"kind": "enum",
|
|
18
|
+
"label": {
|
|
19
|
+
"key": "org.example.catalog/card-density",
|
|
20
|
+
"defaultMessage": "Card density"
|
|
21
|
+
},
|
|
22
|
+
"choices": [
|
|
23
|
+
{
|
|
24
|
+
"id": "compact",
|
|
25
|
+
"label": {
|
|
26
|
+
"key": "org.example.catalog/card-density-compact",
|
|
27
|
+
"defaultMessage": "Compact"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"id": "comfortable",
|
|
32
|
+
"label": {
|
|
33
|
+
"key": "org.example.catalog/card-density-comfortable",
|
|
34
|
+
"defaultMessage": "Comfortable"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"id": "card-width",
|
|
41
|
+
"kind": "size-role",
|
|
42
|
+
"label": {
|
|
43
|
+
"key": "org.example.catalog/card-width",
|
|
44
|
+
"defaultMessage": "Card width"
|
|
45
|
+
},
|
|
46
|
+
"choices": [
|
|
47
|
+
{
|
|
48
|
+
"id": "full",
|
|
49
|
+
"label": {
|
|
50
|
+
"key": "org.example.catalog/card-width-full",
|
|
51
|
+
"defaultMessage": "Full"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"id": "half",
|
|
56
|
+
"label": {
|
|
57
|
+
"key": "org.example.catalog/card-width-half",
|
|
58
|
+
"defaultMessage": "Half"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"id": "quarter",
|
|
63
|
+
"label": {
|
|
64
|
+
"key": "org.example.catalog/card-width-quarter",
|
|
65
|
+
"defaultMessage": "Quarter"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"recipes": [
|
|
72
|
+
{
|
|
73
|
+
"id": "price-compact",
|
|
74
|
+
"blockType": "org.example.catalog/price",
|
|
75
|
+
"label": {
|
|
76
|
+
"key": "org.example.catalog/price-compact",
|
|
77
|
+
"defaultMessage": "Compact price"
|
|
78
|
+
},
|
|
79
|
+
"designValues": {
|
|
80
|
+
"card-density": "compact",
|
|
81
|
+
"card-width": "quarter"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "migration",
|
|
4
|
+
"id": "org.example.catalog/price-to-money",
|
|
5
|
+
"version": "1.1.0",
|
|
6
|
+
"owner": {
|
|
7
|
+
"id": "org.example/catalog",
|
|
8
|
+
"version": "1.1.0"
|
|
9
|
+
},
|
|
10
|
+
"label": {
|
|
11
|
+
"key": "org.example.catalog/price-to-money",
|
|
12
|
+
"defaultMessage": "Price becomes typed money"
|
|
13
|
+
},
|
|
14
|
+
"description": {
|
|
15
|
+
"key": "org.example.catalog/price-to-money-description",
|
|
16
|
+
"defaultMessage": "Rewrites plain price properties into the typed money value shape."
|
|
17
|
+
},
|
|
18
|
+
"artifactKinds": ["blueprint", "entry"],
|
|
19
|
+
"sourceVersions": ">=1.0.0 <1.1.0",
|
|
20
|
+
"targetVersion": "1.1.0",
|
|
21
|
+
"lossClassification": "lossless"
|
|
22
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "blueprint.schema.json",
|
|
3
|
+
"description": "The per-slot composition marker only grants composability; a revoking marker is rejected.",
|
|
4
|
+
"value": {
|
|
5
|
+
"contractVersion": "0.1-draft",
|
|
6
|
+
"dependencyLock": {
|
|
7
|
+
"blocks": [
|
|
8
|
+
{
|
|
9
|
+
"revision": "block-r1",
|
|
10
|
+
"type": "studio.vector/section",
|
|
11
|
+
"version": "1.0.0"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"theme": {
|
|
15
|
+
"id": "studio.vector/theme",
|
|
16
|
+
"revision": "theme-r1",
|
|
17
|
+
"version": "1.0.0"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"id": "vector.blueprint",
|
|
21
|
+
"kind": "blueprint",
|
|
22
|
+
"label": {
|
|
23
|
+
"defaultMessage": "Vector Blueprint",
|
|
24
|
+
"key": "studio.vector/blueprint"
|
|
25
|
+
},
|
|
26
|
+
"model": {
|
|
27
|
+
"id": "studio.vector/model",
|
|
28
|
+
"revision": "model-r1",
|
|
29
|
+
"version": "1.0.0"
|
|
30
|
+
},
|
|
31
|
+
"owner": {
|
|
32
|
+
"id": "studio.vector/suite",
|
|
33
|
+
"version": "0.1.0-alpha.0"
|
|
34
|
+
},
|
|
35
|
+
"revision": "blueprint-r1",
|
|
36
|
+
"roots": [
|
|
37
|
+
{
|
|
38
|
+
"authoring": {
|
|
39
|
+
"mode": "structural",
|
|
40
|
+
"slots": {
|
|
41
|
+
"main": {
|
|
42
|
+
"composable": false
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"bindings": {},
|
|
47
|
+
"id": "section-a",
|
|
48
|
+
"properties": {},
|
|
49
|
+
"slots": {},
|
|
50
|
+
"type": "studio.vector/section",
|
|
51
|
+
"version": "1.0.0"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"status": "draft",
|
|
55
|
+
"version": "1.0.0"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "design-vocabulary.schema.json",
|
|
3
|
+
"description": "Design controls carry only the closed design-control kind vocabulary.",
|
|
4
|
+
"value": {
|
|
5
|
+
"contractVersion": "0.1-draft",
|
|
6
|
+
"kind": "design-vocabulary",
|
|
7
|
+
"id": "org.example.catalog/product-vocabulary",
|
|
8
|
+
"version": "1.0.0",
|
|
9
|
+
"owner": {
|
|
10
|
+
"id": "org.example/catalog",
|
|
11
|
+
"version": "1.0.0"
|
|
12
|
+
},
|
|
13
|
+
"label": {
|
|
14
|
+
"key": "org.example.catalog/product-vocabulary",
|
|
15
|
+
"defaultMessage": "Product design vocabulary"
|
|
16
|
+
},
|
|
17
|
+
"designControls": [
|
|
18
|
+
{
|
|
19
|
+
"id": "card-face",
|
|
20
|
+
"kind": "font-role",
|
|
21
|
+
"label": {
|
|
22
|
+
"key": "org.example.catalog/card-face",
|
|
23
|
+
"defaultMessage": "Card face"
|
|
24
|
+
},
|
|
25
|
+
"choices": [
|
|
26
|
+
{
|
|
27
|
+
"id": "serif",
|
|
28
|
+
"label": {
|
|
29
|
+
"key": "org.example.catalog/card-face-serif",
|
|
30
|
+
"defaultMessage": "Serif"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"recipes": []
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "migration.schema.json",
|
|
3
|
+
"description": "A migration declaration must cover at least one artifact kind.",
|
|
4
|
+
"value": {
|
|
5
|
+
"contractVersion": "0.1-draft",
|
|
6
|
+
"kind": "migration",
|
|
7
|
+
"id": "org.example.catalog/price-to-money",
|
|
8
|
+
"version": "1.1.0",
|
|
9
|
+
"owner": {
|
|
10
|
+
"id": "org.example/catalog",
|
|
11
|
+
"version": "1.1.0"
|
|
12
|
+
},
|
|
13
|
+
"label": {
|
|
14
|
+
"key": "org.example.catalog/price-to-money",
|
|
15
|
+
"defaultMessage": "Price becomes typed money"
|
|
16
|
+
},
|
|
17
|
+
"artifactKinds": [],
|
|
18
|
+
"sourceVersions": ">=1.0.0 <1.1.0",
|
|
19
|
+
"targetVersion": "1.1.0",
|
|
20
|
+
"lossClassification": "lossless"
|
|
21
|
+
}
|
|
22
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kumwe/studio-testkit",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.6",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/kumwe/studio.git",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"build": "tsc -b"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@kumwe/studio-core": "0.1.0-alpha.
|
|
38
|
-
"@kumwe/studio-protocol": "0.1.0-alpha.
|
|
37
|
+
"@kumwe/studio-core": "0.1.0-alpha.6",
|
|
38
|
+
"@kumwe/studio-protocol": "0.1.0-alpha.4"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public",
|