@crafter8/sdk 0.1.0-next.1
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 +175 -0
- package/build.js +553 -0
- package/index.d.ts +473 -0
- package/index.js +1831 -0
- package/mock.d.ts +128 -0
- package/mock.js +471 -0
- package/package.json +61 -0
- package/react.d.ts +30 -0
- package/react.js +124 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
export type ArtifactKind = "app" | "module" | "datapack";
|
|
2
|
+
|
|
3
|
+
export type ArtifactRef<K extends ArtifactKind = ArtifactKind> = {
|
|
4
|
+
kind: K;
|
|
5
|
+
id: string;
|
|
6
|
+
packageName?: string;
|
|
7
|
+
slug?: string;
|
|
8
|
+
version?: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export type ArtifactMetaBase<K extends ArtifactKind = ArtifactKind> = {
|
|
12
|
+
kind: K;
|
|
13
|
+
id: string;
|
|
14
|
+
version: string;
|
|
15
|
+
name?: string;
|
|
16
|
+
summary?: string;
|
|
17
|
+
capabilities?: string[];
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Transitional metadata only.
|
|
20
|
+
* Prefer generated `dependencies` as the primary dependency graph.
|
|
21
|
+
*/
|
|
22
|
+
uses?: {
|
|
23
|
+
modules?: string[];
|
|
24
|
+
datapacks?: string[];
|
|
25
|
+
};
|
|
26
|
+
provides?: Record<string, unknown>;
|
|
27
|
+
dependencies?: {
|
|
28
|
+
modules?: string[];
|
|
29
|
+
datapacks?: string[];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated Transitional creator input.
|
|
35
|
+
* Prefer package imports and generated `dependencies`.
|
|
36
|
+
*/
|
|
37
|
+
export type UsesBlock = {
|
|
38
|
+
modules?: Array<ArtifactRef<"module"> | string>;
|
|
39
|
+
datapacks?: Array<ArtifactRef<"datapack"> | string>;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export type Crafter8Session = {
|
|
43
|
+
authenticated: boolean;
|
|
44
|
+
userId: string | null;
|
|
45
|
+
userDisplayName: string | null;
|
|
46
|
+
activeWorkspaceId: string | null;
|
|
47
|
+
activeWorkspaceName: string | null;
|
|
48
|
+
capabilities: string[];
|
|
49
|
+
hostApi: number;
|
|
50
|
+
hostApiLabel: string;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export type Crafter8TransportRequest = {
|
|
54
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD";
|
|
55
|
+
path: string;
|
|
56
|
+
query?: Record<string, unknown>;
|
|
57
|
+
body?: unknown;
|
|
58
|
+
headers?: Record<string, string>;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export type Crafter8Transport = {
|
|
62
|
+
request<T = unknown>(request: Crafter8TransportRequest): Promise<T>;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export type Crafter8AuthProvider = {
|
|
66
|
+
getHeaders(): Promise<Record<string, string>>;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export type Crafter8AssetFetch = typeof fetch;
|
|
70
|
+
|
|
71
|
+
export type Crafter8PublicHttpTransportOptions = {
|
|
72
|
+
baseUrl: string;
|
|
73
|
+
auth?: Crafter8AuthProvider;
|
|
74
|
+
fetchImpl?: typeof fetch;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export type ResolvedDatapackContent = {
|
|
78
|
+
sourceKind: "published" | "local" | "fallback";
|
|
79
|
+
datapack: ArtifactRef<"datapack">;
|
|
80
|
+
key: string;
|
|
81
|
+
url: string;
|
|
82
|
+
contentType: string;
|
|
83
|
+
cacheKey: string;
|
|
84
|
+
integrity?: string;
|
|
85
|
+
encoding?: string;
|
|
86
|
+
requiresAuth: boolean;
|
|
87
|
+
expiresAt?: string | null;
|
|
88
|
+
warnings: string[];
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export type DatapackSelector = string | ArtifactRef<"datapack"> | DatapackDefinition;
|
|
92
|
+
|
|
93
|
+
export type Crafter8DatapackResolverMode = "local-first" | "remote-first";
|
|
94
|
+
|
|
95
|
+
export type Crafter8DatapackSourceCandidate = {
|
|
96
|
+
url?: string;
|
|
97
|
+
contentType?: string;
|
|
98
|
+
cacheKey?: string;
|
|
99
|
+
integrity?: string;
|
|
100
|
+
encoding?: string;
|
|
101
|
+
requiresAuth?: boolean;
|
|
102
|
+
expiresAt?: string | null;
|
|
103
|
+
value?: unknown;
|
|
104
|
+
read?: () => Promise<unknown> | unknown;
|
|
105
|
+
warnings?: string | string[];
|
|
106
|
+
packageName?: string;
|
|
107
|
+
slug?: string;
|
|
108
|
+
version?: string;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export type Crafter8DatapackResolver = (input: {
|
|
112
|
+
datapack: ArtifactRef<"datapack">;
|
|
113
|
+
key: string;
|
|
114
|
+
}) => Promise<Crafter8DatapackSourceCandidate | null> | Crafter8DatapackSourceCandidate | null;
|
|
115
|
+
|
|
116
|
+
export type Crafter8DatapackPackageSource = {
|
|
117
|
+
local?: Crafter8DatapackResolver | Crafter8DatapackSourceCandidate | null;
|
|
118
|
+
fallback?: Crafter8DatapackResolver | Crafter8DatapackSourceCandidate | null;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export type Crafter8DatapackClientOptions = {
|
|
122
|
+
mode?: Crafter8DatapackResolverMode;
|
|
123
|
+
localResolver?: Crafter8DatapackResolver;
|
|
124
|
+
fallbackResolver?: Crafter8DatapackResolver;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export type HostRuntimeVersion = {
|
|
128
|
+
hostApi: number;
|
|
129
|
+
hostApiLabel: string;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
export type HostRuntimeSession = {
|
|
133
|
+
apiBaseUrl: string;
|
|
134
|
+
activeWorkspaceId: string;
|
|
135
|
+
activeWorkspaceName: string | null;
|
|
136
|
+
scenarioIds: string;
|
|
137
|
+
userId?: string;
|
|
138
|
+
userDisplayName?: string | null;
|
|
139
|
+
capabilities: string[];
|
|
140
|
+
hostApi: number;
|
|
141
|
+
hostApiLabel: string;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
export type RuntimeOperationSelector = {
|
|
145
|
+
kind?: string;
|
|
146
|
+
packageName?: string;
|
|
147
|
+
slug?: string;
|
|
148
|
+
id?: string;
|
|
149
|
+
user?: string;
|
|
150
|
+
operationId?: string;
|
|
151
|
+
pathParams?: Record<string, string | number | boolean>;
|
|
152
|
+
query?: Record<string, unknown>;
|
|
153
|
+
body?: unknown;
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
export type RuntimeOperationDescriptor = {
|
|
157
|
+
kind: string;
|
|
158
|
+
scope: string;
|
|
159
|
+
selectors: unknown;
|
|
160
|
+
resolvedUser: string | null;
|
|
161
|
+
artifactRef: string | null;
|
|
162
|
+
artifact: Record<string, unknown> | null;
|
|
163
|
+
operation: Record<string, unknown>;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
export type Crafter8Client = {
|
|
167
|
+
session: {
|
|
168
|
+
get(): Promise<Crafter8Session>;
|
|
169
|
+
};
|
|
170
|
+
artifacts: {
|
|
171
|
+
list(selector?: {
|
|
172
|
+
kind?: "app" | "module" | "datapack";
|
|
173
|
+
trustLevel?: string;
|
|
174
|
+
packageName?: string;
|
|
175
|
+
slug?: string;
|
|
176
|
+
query?: string;
|
|
177
|
+
user?: string;
|
|
178
|
+
id?: string;
|
|
179
|
+
}): Promise<Record<string, unknown>[]>;
|
|
180
|
+
get(selector?: {
|
|
181
|
+
kind?: "app" | "module" | "datapack";
|
|
182
|
+
trustLevel?: string;
|
|
183
|
+
packageName?: string;
|
|
184
|
+
slug?: string;
|
|
185
|
+
query?: string;
|
|
186
|
+
user?: string;
|
|
187
|
+
id?: string;
|
|
188
|
+
}): Promise<Record<string, unknown> | null>;
|
|
189
|
+
};
|
|
190
|
+
datapacks: {
|
|
191
|
+
list(): Promise<unknown[]>;
|
|
192
|
+
getManifest(slug: string): Promise<unknown>;
|
|
193
|
+
listContents(slug: string): Promise<unknown>;
|
|
194
|
+
resolveContent(datapack: DatapackSelector, key: string): Promise<ResolvedDatapackContent>;
|
|
195
|
+
readContent(datapack: DatapackSelector, key: string): Promise<unknown>;
|
|
196
|
+
};
|
|
197
|
+
operations: {
|
|
198
|
+
list(selector?: RuntimeOperationSelector): Promise<RuntimeOperationDescriptor[]>;
|
|
199
|
+
get(selector: RuntimeOperationSelector): Promise<RuntimeOperationDescriptor | null>;
|
|
200
|
+
invoke<TInput = unknown, TOutput = unknown>(
|
|
201
|
+
selector: RuntimeOperationSelector,
|
|
202
|
+
input?: TInput
|
|
203
|
+
): Promise<TOutput>;
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
export type Crafter8HostServices = {
|
|
208
|
+
navigation: {
|
|
209
|
+
navigate(path: string): void;
|
|
210
|
+
openItemInGraph(itemId: string): void;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* @deprecated Transitional embedded adapter surface.
|
|
216
|
+
* Prefer Crafter8Client for data/compute and Crafter8HostServices for shell integration.
|
|
217
|
+
*/
|
|
218
|
+
export type HostRuntimeApiV1 = {
|
|
219
|
+
version: HostRuntimeVersion;
|
|
220
|
+
session: {
|
|
221
|
+
get(): HostRuntimeSession;
|
|
222
|
+
};
|
|
223
|
+
capabilities: {
|
|
224
|
+
list(): string[];
|
|
225
|
+
has(capability: string): boolean;
|
|
226
|
+
assert(capability: string): void;
|
|
227
|
+
};
|
|
228
|
+
navigation: {
|
|
229
|
+
navigate(path: string): void;
|
|
230
|
+
openItemInGraph(itemId: string): void;
|
|
231
|
+
};
|
|
232
|
+
datapacks: {
|
|
233
|
+
list(): Promise<unknown[]>;
|
|
234
|
+
getManifest(slug: string): Promise<unknown>;
|
|
235
|
+
listContents(slug: string): Promise<unknown>;
|
|
236
|
+
readContent(slug: string, key: string): Promise<unknown>;
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* @deprecated Prefer package imports for module code reuse and client.artifacts/client.operations for runtime discovery and compute.
|
|
240
|
+
*/
|
|
241
|
+
modules: {
|
|
242
|
+
list(): Promise<unknown[]>;
|
|
243
|
+
load<T extends Record<string, unknown> = Record<string, unknown>>(packageName: string): Promise<T>;
|
|
244
|
+
};
|
|
245
|
+
operations: {
|
|
246
|
+
list(selector?: RuntimeOperationSelector): Promise<RuntimeOperationDescriptor[]>;
|
|
247
|
+
get(selector: RuntimeOperationSelector): Promise<RuntimeOperationDescriptor | null>;
|
|
248
|
+
invoke<TInput = unknown, TOutput = unknown>(
|
|
249
|
+
selector: RuntimeOperationSelector,
|
|
250
|
+
input?: TInput
|
|
251
|
+
): Promise<TOutput>;
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
export type AppContext = {
|
|
256
|
+
client: Crafter8Client;
|
|
257
|
+
host?: Crafter8HostServices;
|
|
258
|
+
/**
|
|
259
|
+
* @deprecated Transitional embedded adapter surface.
|
|
260
|
+
* Prefer client + host.
|
|
261
|
+
*/
|
|
262
|
+
runtime?: HostRuntimeApiV1;
|
|
263
|
+
container: Record<string, unknown>;
|
|
264
|
+
artifact: ArtifactMetaBase<"app">;
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
export type ModuleContext = {
|
|
268
|
+
client: Crafter8Client;
|
|
269
|
+
/**
|
|
270
|
+
* @deprecated Transitional embedded adapter surface.
|
|
271
|
+
* Prefer client and operation-specific context.
|
|
272
|
+
*/
|
|
273
|
+
runtime?: HostRuntimeApiV1;
|
|
274
|
+
artifact: ArtifactMetaBase<"module">;
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
export type Crafter8EmbeddedEnvironment = {
|
|
278
|
+
client: Crafter8Client;
|
|
279
|
+
host: Crafter8HostServices;
|
|
280
|
+
runtime?: HostRuntimeApiV1;
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
export type AppDefinition = {
|
|
284
|
+
readonly kind: "app";
|
|
285
|
+
readonly id: string;
|
|
286
|
+
readonly name: string;
|
|
287
|
+
readonly summary?: string;
|
|
288
|
+
readonly capabilities: string[];
|
|
289
|
+
/**
|
|
290
|
+
* @deprecated Transitional metadata only.
|
|
291
|
+
* Prefer package imports and generated `dependencies`.
|
|
292
|
+
*/
|
|
293
|
+
readonly uses: {
|
|
294
|
+
modules: string[];
|
|
295
|
+
datapacks: string[];
|
|
296
|
+
};
|
|
297
|
+
readonly mount?: (ctx: AppContext) => unknown;
|
|
298
|
+
readonly component?: (...args: any[]) => any;
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
export type ModuleDefinition = {
|
|
302
|
+
readonly kind: "module";
|
|
303
|
+
readonly id: string;
|
|
304
|
+
readonly name: string;
|
|
305
|
+
readonly summary?: string;
|
|
306
|
+
readonly capabilities: string[];
|
|
307
|
+
/**
|
|
308
|
+
* @deprecated Transitional metadata only.
|
|
309
|
+
* Prefer package imports and generated `dependencies`.
|
|
310
|
+
*/
|
|
311
|
+
readonly uses: {
|
|
312
|
+
modules: string[];
|
|
313
|
+
datapacks: string[];
|
|
314
|
+
};
|
|
315
|
+
readonly provides: {
|
|
316
|
+
exports: Record<string, (...args: any[]) => any>;
|
|
317
|
+
operations: string[];
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
export type DatapackDefinition = {
|
|
322
|
+
readonly kind: "datapack";
|
|
323
|
+
readonly id: string;
|
|
324
|
+
readonly name: string;
|
|
325
|
+
readonly summary?: string;
|
|
326
|
+
readonly contents: {
|
|
327
|
+
root?: string;
|
|
328
|
+
manifest?: string;
|
|
329
|
+
};
|
|
330
|
+
readonly provides: {
|
|
331
|
+
profile?: string;
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
export type ArtifactDefinition = AppDefinition | ModuleDefinition | DatapackDefinition;
|
|
336
|
+
|
|
337
|
+
export type GenerateArtifactManifestOptions = {
|
|
338
|
+
version: string;
|
|
339
|
+
specVersion?: number;
|
|
340
|
+
hostApi?: number;
|
|
341
|
+
/**
|
|
342
|
+
* When true, include legacy `uses` in generated manifests.
|
|
343
|
+
* Default behavior is to emit only `dependencies`.
|
|
344
|
+
*/
|
|
345
|
+
legacyUses?: boolean;
|
|
346
|
+
dependencies?: {
|
|
347
|
+
modules?: Array<ArtifactRef<"module"> | string>;
|
|
348
|
+
datapacks?: Array<ArtifactRef<"datapack"> | string>;
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
export declare const ARTIFACT_SPEC_V1: 1;
|
|
353
|
+
export declare const ARTIFACT_SPEC_V2: 2;
|
|
354
|
+
export declare const HOST_API_V1: 1;
|
|
355
|
+
|
|
356
|
+
export declare function defineApp(config: {
|
|
357
|
+
id: string;
|
|
358
|
+
name: string;
|
|
359
|
+
summary?: string;
|
|
360
|
+
capabilities?: string[];
|
|
361
|
+
/**
|
|
362
|
+
* @deprecated Transitional input.
|
|
363
|
+
* Prefer package imports and generated `dependencies`.
|
|
364
|
+
*/
|
|
365
|
+
uses?: UsesBlock;
|
|
366
|
+
mount?: (ctx: AppContext) => unknown;
|
|
367
|
+
component?: (...args: any[]) => any;
|
|
368
|
+
}): AppDefinition;
|
|
369
|
+
|
|
370
|
+
export declare function defineModule(config: {
|
|
371
|
+
id: string;
|
|
372
|
+
name: string;
|
|
373
|
+
summary?: string;
|
|
374
|
+
capabilities?: string[];
|
|
375
|
+
/**
|
|
376
|
+
* @deprecated Transitional input.
|
|
377
|
+
* Prefer package imports and generated `dependencies`.
|
|
378
|
+
*/
|
|
379
|
+
uses?: UsesBlock;
|
|
380
|
+
provides?: {
|
|
381
|
+
exports?: Record<string, (...args: any[]) => any>;
|
|
382
|
+
operations?: string[];
|
|
383
|
+
};
|
|
384
|
+
exports?: Record<string, (...args: any[]) => any>;
|
|
385
|
+
operations?: string[];
|
|
386
|
+
}): ModuleDefinition;
|
|
387
|
+
|
|
388
|
+
export declare function defineDatapack(config: {
|
|
389
|
+
id: string;
|
|
390
|
+
name: string;
|
|
391
|
+
summary?: string;
|
|
392
|
+
contents: {
|
|
393
|
+
root?: string;
|
|
394
|
+
manifest?: string;
|
|
395
|
+
};
|
|
396
|
+
provides?: {
|
|
397
|
+
profile?: string;
|
|
398
|
+
};
|
|
399
|
+
}): DatapackDefinition;
|
|
400
|
+
|
|
401
|
+
export declare function createAppRef(value: string | ArtifactRef<"app"> | AppDefinition): ArtifactRef<"app">;
|
|
402
|
+
export declare function createModuleRef(value: string | ArtifactRef<"module"> | ModuleDefinition): ArtifactRef<"module">;
|
|
403
|
+
export declare function createDatapackRef(value: string | ArtifactRef<"datapack"> | DatapackDefinition): ArtifactRef<"datapack">;
|
|
404
|
+
export declare function registerDatapackPackageSource(
|
|
405
|
+
value: DatapackSelector,
|
|
406
|
+
source: Crafter8DatapackPackageSource
|
|
407
|
+
): {
|
|
408
|
+
datapack: ArtifactRef<"datapack">;
|
|
409
|
+
local: Crafter8DatapackResolver | null;
|
|
410
|
+
fallback: Crafter8DatapackResolver | null;
|
|
411
|
+
};
|
|
412
|
+
export declare function getRegisteredDatapackPackageSource(
|
|
413
|
+
value: DatapackSelector
|
|
414
|
+
): {
|
|
415
|
+
datapack: ArtifactRef<"datapack">;
|
|
416
|
+
local: Crafter8DatapackResolver | null;
|
|
417
|
+
fallback: Crafter8DatapackResolver | null;
|
|
418
|
+
} | null;
|
|
419
|
+
export declare function isArtifactDefinition(value: unknown): value is ArtifactDefinition;
|
|
420
|
+
export declare function isCrafter8Client(value: unknown): value is Crafter8Client;
|
|
421
|
+
export declare function isCrafter8HostServices(value: unknown): value is Crafter8HostServices;
|
|
422
|
+
export declare function isHostRuntimeApiV1(value: unknown): value is HostRuntimeApiV1;
|
|
423
|
+
export declare function readArtifactRef<K extends ArtifactKind>(value: string | ArtifactRef<K> | ArtifactDefinition, expectedKind: K): ArtifactRef<K>;
|
|
424
|
+
export declare function createCrafter8HostServices(host: unknown): Crafter8HostServices;
|
|
425
|
+
export declare function createPublicHttpTransport(options: Crafter8PublicHttpTransportOptions): Crafter8Transport;
|
|
426
|
+
export declare function createEmbeddedHostTransport(host: unknown): Crafter8Transport;
|
|
427
|
+
export declare function createCrafter8Client(args: {
|
|
428
|
+
transport: Crafter8Transport;
|
|
429
|
+
sessionResolver?: () => Promise<unknown> | unknown;
|
|
430
|
+
datapacks?: Crafter8DatapackClientOptions;
|
|
431
|
+
assetFetch?: Crafter8AssetFetch;
|
|
432
|
+
assetBaseUrl?: string;
|
|
433
|
+
}): Crafter8Client;
|
|
434
|
+
/**
|
|
435
|
+
* Embedded/advanced adapter for creating a Crafter8Client from the current broad host surface.
|
|
436
|
+
* Most apps should receive a configured client from Crafter8 rather than constructing it directly.
|
|
437
|
+
*/
|
|
438
|
+
export declare function createEmbeddedCrafter8Client(
|
|
439
|
+
host: unknown,
|
|
440
|
+
options?: { datapacks?: Crafter8DatapackClientOptions; assetFetch?: Crafter8AssetFetch; assetBaseUrl?: string }
|
|
441
|
+
): Crafter8Client;
|
|
442
|
+
export declare function createEmbeddedCrafter8Environment(
|
|
443
|
+
host: unknown,
|
|
444
|
+
options?: {
|
|
445
|
+
datapacks?: Crafter8DatapackClientOptions;
|
|
446
|
+
includeLegacyRuntime?: boolean;
|
|
447
|
+
assetFetch?: Crafter8AssetFetch;
|
|
448
|
+
assetBaseUrl?: string;
|
|
449
|
+
}
|
|
450
|
+
): Crafter8EmbeddedEnvironment;
|
|
451
|
+
/**
|
|
452
|
+
* @deprecated Transitional embedded adapter surface.
|
|
453
|
+
* Prefer Crafter8Client + Crafter8HostServices.
|
|
454
|
+
*/
|
|
455
|
+
export declare function createHostRuntimeApiV1(host: unknown): HostRuntimeApiV1;
|
|
456
|
+
export declare function createAppContext(args: {
|
|
457
|
+
client?: Crafter8Client;
|
|
458
|
+
host?: HostRuntimeApiV1 | unknown;
|
|
459
|
+
hostServices?: Crafter8HostServices | unknown;
|
|
460
|
+
runtime?: HostRuntimeApiV1 | unknown;
|
|
461
|
+
container: Record<string, unknown>;
|
|
462
|
+
artifact: Omit<ArtifactMetaBase<"app">, "kind"> & { kind?: "app" };
|
|
463
|
+
}): AppContext;
|
|
464
|
+
export declare function createModuleContext(args: {
|
|
465
|
+
client?: Crafter8Client;
|
|
466
|
+
host?: HostRuntimeApiV1 | unknown;
|
|
467
|
+
runtime?: HostRuntimeApiV1 | unknown;
|
|
468
|
+
artifact: Omit<ArtifactMetaBase<"module">, "kind"> & { kind?: "module" };
|
|
469
|
+
}): ModuleContext;
|
|
470
|
+
export declare function generateArtifactManifest(
|
|
471
|
+
definition: ArtifactDefinition,
|
|
472
|
+
options: GenerateArtifactManifestOptions
|
|
473
|
+
): Record<string, unknown>;
|