@fluojs/runtime 1.1.1 → 1.1.3
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/README.ko.md +8 -0
- package/README.md +8 -0
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +41 -19
- package/dist/devtools/contracts.d.ts +138 -0
- package/dist/devtools/contracts.d.ts.map +1 -0
- package/dist/devtools/contracts.js +1 -0
- package/dist/devtools/index.d.ts +4 -0
- package/dist/devtools/index.d.ts.map +1 -0
- package/dist/devtools/index.js +2 -0
- package/dist/devtools/snapshot.d.ts +39 -0
- package/dist/devtools/snapshot.d.ts.map +1 -0
- package/dist/devtools/snapshot.js +345 -0
- package/dist/devtools/studio-runtime.d.ts +96 -0
- package/dist/devtools/studio-runtime.d.ts.map +1 -0
- package/dist/devtools/studio-runtime.js +335 -0
- package/dist/http-adapter-shared.js +3 -3
- package/dist/logging/default-logger.d.ts +8 -0
- package/dist/logging/default-logger.d.ts.map +1 -0
- package/dist/logging/default-logger.js +28 -0
- package/dist/node/internal-node.d.ts.map +1 -1
- package/dist/node/internal-node.js +8 -1
- package/package.json +3 -3
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
import { createRuntimeDiagnosticsGraph } from '../health/diagnostics.js';
|
|
2
|
+
import { getRuntimeClassDiMetadata } from '../internal/core-metadata.js';
|
|
3
|
+
import { providerToken } from '../module-graph.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Describes Studio Live Snapshot Input data used by the Studio devtool.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
function isForwardRef(value) {
|
|
10
|
+
return typeof value === 'object' && value !== null && '__forwardRef__' in value && value.__forwardRef__ === true;
|
|
11
|
+
}
|
|
12
|
+
function isOptionalToken(value) {
|
|
13
|
+
return typeof value === 'object' && value !== null && '__optional__' in value && value.__optional__ === true;
|
|
14
|
+
}
|
|
15
|
+
function resolveInjectionToken(token) {
|
|
16
|
+
if (isForwardRef(token)) {
|
|
17
|
+
return token.forwardRef();
|
|
18
|
+
}
|
|
19
|
+
if (isOptionalToken(token)) {
|
|
20
|
+
return token.token;
|
|
21
|
+
}
|
|
22
|
+
return token;
|
|
23
|
+
}
|
|
24
|
+
function labelToken(token) {
|
|
25
|
+
if (typeof token === 'function') {
|
|
26
|
+
return token.name || '<anonymous-token>';
|
|
27
|
+
}
|
|
28
|
+
if (typeof token === 'symbol') {
|
|
29
|
+
return token.description ? `Symbol(${token.description})` : token.toString();
|
|
30
|
+
}
|
|
31
|
+
return String(token);
|
|
32
|
+
}
|
|
33
|
+
function labelModule(moduleType) {
|
|
34
|
+
return moduleType.name || '<anonymous-module>';
|
|
35
|
+
}
|
|
36
|
+
function providerShape(provider) {
|
|
37
|
+
if (typeof provider === 'function') {
|
|
38
|
+
return 'class';
|
|
39
|
+
}
|
|
40
|
+
if ('useFactory' in provider) {
|
|
41
|
+
return 'factory';
|
|
42
|
+
}
|
|
43
|
+
if ('useValue' in provider) {
|
|
44
|
+
return 'value';
|
|
45
|
+
}
|
|
46
|
+
if ('useExisting' in provider) {
|
|
47
|
+
return 'existing';
|
|
48
|
+
}
|
|
49
|
+
return 'class';
|
|
50
|
+
}
|
|
51
|
+
function providerScope(provider) {
|
|
52
|
+
if (typeof provider === 'function') {
|
|
53
|
+
return getRuntimeClassDiMetadata(provider)?.scope ?? 'singleton';
|
|
54
|
+
}
|
|
55
|
+
if ('useValue' in provider || 'useExisting' in provider) {
|
|
56
|
+
return 'singleton';
|
|
57
|
+
}
|
|
58
|
+
if ('useFactory' in provider) {
|
|
59
|
+
return provider.scope ?? (provider.resolverClass ? getRuntimeClassDiMetadata(provider.resolverClass)?.scope : undefined) ?? 'singleton';
|
|
60
|
+
}
|
|
61
|
+
if ('useClass' in provider) {
|
|
62
|
+
return provider.scope ?? getRuntimeClassDiMetadata(provider.useClass)?.scope ?? 'singleton';
|
|
63
|
+
}
|
|
64
|
+
return 'singleton';
|
|
65
|
+
}
|
|
66
|
+
function providerDependencies(provider) {
|
|
67
|
+
if (typeof provider === 'function') {
|
|
68
|
+
return [...(getRuntimeClassDiMetadata(provider)?.inject ?? [])];
|
|
69
|
+
}
|
|
70
|
+
if ('useFactory' in provider) {
|
|
71
|
+
return [...(provider.inject ?? [])];
|
|
72
|
+
}
|
|
73
|
+
if ('useClass' in provider) {
|
|
74
|
+
return [...(provider.inject ?? getRuntimeClassDiMetadata(provider.useClass)?.inject ?? [])];
|
|
75
|
+
}
|
|
76
|
+
if ('useExisting' in provider) {
|
|
77
|
+
return [provider.useExisting];
|
|
78
|
+
}
|
|
79
|
+
return [];
|
|
80
|
+
}
|
|
81
|
+
function controllerDependencies(controller) {
|
|
82
|
+
return [...(getRuntimeClassDiMetadata(controller)?.inject ?? [])];
|
|
83
|
+
}
|
|
84
|
+
function slug(value) {
|
|
85
|
+
return value.replaceAll(/[^a-zA-Z0-9_.:-]/g, '_') || 'anonymous';
|
|
86
|
+
}
|
|
87
|
+
function moduleNodeId(moduleName) {
|
|
88
|
+
return `module:${slug(moduleName)}`;
|
|
89
|
+
}
|
|
90
|
+
function providerNodeId(moduleName, tokenLabel) {
|
|
91
|
+
return `provider:${slug(moduleName)}:${slug(tokenLabel)}`;
|
|
92
|
+
}
|
|
93
|
+
function controllerNodeId(moduleName, controllerName) {
|
|
94
|
+
return `controller:${slug(moduleName)}:${slug(controllerName)}`;
|
|
95
|
+
}
|
|
96
|
+
function externalNodeId(tokenLabel) {
|
|
97
|
+
return `external:${slug(tokenLabel)}`;
|
|
98
|
+
}
|
|
99
|
+
function routeNodeId(route) {
|
|
100
|
+
return `route:${slug(route.id)}`;
|
|
101
|
+
}
|
|
102
|
+
function edgeId(kind, from, to) {
|
|
103
|
+
return `${kind}:${from}->${to}`;
|
|
104
|
+
}
|
|
105
|
+
function addNode(nodes, node) {
|
|
106
|
+
nodes.set(node.id, node);
|
|
107
|
+
}
|
|
108
|
+
function addEdge(edges, edge) {
|
|
109
|
+
edges.set(edge.id, edge);
|
|
110
|
+
}
|
|
111
|
+
function createDependencyEdgeTarget(tokenLabel, moduleName, providerByModuleAndToken, firstProviderByToken, nodes) {
|
|
112
|
+
const moduleLocal = providerByModuleAndToken.get(`${moduleName}:${tokenLabel}`);
|
|
113
|
+
if (moduleLocal) {
|
|
114
|
+
return moduleLocal;
|
|
115
|
+
}
|
|
116
|
+
const firstProvider = firstProviderByToken.get(tokenLabel);
|
|
117
|
+
if (firstProvider) {
|
|
118
|
+
return firstProvider;
|
|
119
|
+
}
|
|
120
|
+
const externalId = externalNodeId(tokenLabel);
|
|
121
|
+
addNode(nodes, {
|
|
122
|
+
id: externalId,
|
|
123
|
+
kind: 'external',
|
|
124
|
+
label: tokenLabel
|
|
125
|
+
});
|
|
126
|
+
return externalId;
|
|
127
|
+
}
|
|
128
|
+
function routePath(descriptor) {
|
|
129
|
+
return descriptor.metadata.effectivePath || descriptor.route.path;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Creates a stable route id shared by runtime request traces and Studio graph snapshots.
|
|
134
|
+
*
|
|
135
|
+
* @param descriptor HTTP handler descriptor to identify.
|
|
136
|
+
* @returns Stable Studio route id for the handler.
|
|
137
|
+
*/
|
|
138
|
+
export function createStudioRouteId(descriptor) {
|
|
139
|
+
return [descriptor.route.method, routePath(descriptor), descriptor.controllerToken.name || '<anonymous-controller>', descriptor.methodName].join(' ');
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Converts an HTTP handler descriptor into the live Studio route contract.
|
|
144
|
+
*
|
|
145
|
+
* @param descriptor HTTP handler descriptor to expose to Studio.
|
|
146
|
+
* @returns Route descriptor consumed by the Studio UI and request traces.
|
|
147
|
+
*/
|
|
148
|
+
export function handlerToStudioRouteDescriptor(descriptor) {
|
|
149
|
+
const route = {
|
|
150
|
+
controller: descriptor.controllerToken.name || '<anonymous-controller>',
|
|
151
|
+
handler: descriptor.methodName,
|
|
152
|
+
id: createStudioRouteId(descriptor),
|
|
153
|
+
method: descriptor.route.method,
|
|
154
|
+
path: routePath(descriptor)
|
|
155
|
+
};
|
|
156
|
+
const moduleName = descriptor.metadata.moduleType?.name;
|
|
157
|
+
if (moduleName) {
|
|
158
|
+
route.module = moduleName;
|
|
159
|
+
}
|
|
160
|
+
const version = descriptor.metadata.effectiveVersion ?? descriptor.route.version;
|
|
161
|
+
if (version) {
|
|
162
|
+
route.version = version;
|
|
163
|
+
}
|
|
164
|
+
return route;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Builds the runtime-connected Studio snapshot from compiled modules and HTTP route descriptors.
|
|
169
|
+
*
|
|
170
|
+
* @param input Runtime module graph, route, diagnostic, and timing inputs.
|
|
171
|
+
* @returns Live Studio snapshot for graph, routes, diagnostics, requests, and timing.
|
|
172
|
+
*/
|
|
173
|
+
export function createStudioLiveSnapshot(input) {
|
|
174
|
+
const diagnosticsGraph = createRuntimeDiagnosticsGraph(input.modules, input.rootModule);
|
|
175
|
+
const nodes = new Map();
|
|
176
|
+
const edges = new Map();
|
|
177
|
+
const providerByModuleAndToken = new Map();
|
|
178
|
+
const firstProviderByToken = new Map();
|
|
179
|
+
const controllerByModuleAndName = new Map();
|
|
180
|
+
for (const module of diagnosticsGraph.modules) {
|
|
181
|
+
const id = moduleNodeId(module.name);
|
|
182
|
+
addNode(nodes, {
|
|
183
|
+
id,
|
|
184
|
+
kind: 'module',
|
|
185
|
+
label: module.name,
|
|
186
|
+
metadata: {
|
|
187
|
+
controllers: module.controllers.length,
|
|
188
|
+
exports: module.exports.length,
|
|
189
|
+
global: module.global,
|
|
190
|
+
providers: module.providers.length,
|
|
191
|
+
root: module.name === diagnosticsGraph.rootModule
|
|
192
|
+
},
|
|
193
|
+
status: module.name === diagnosticsGraph.rootModule ? 'active' : 'idle'
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
for (const relationship of diagnosticsGraph.relationships.moduleImports) {
|
|
197
|
+
const from = moduleNodeId(relationship.from);
|
|
198
|
+
const to = moduleNodeId(relationship.to);
|
|
199
|
+
addEdge(edges, {
|
|
200
|
+
from,
|
|
201
|
+
id: edgeId('imports', from, to),
|
|
202
|
+
kind: 'imports',
|
|
203
|
+
to
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
for (const compiledModule of input.modules) {
|
|
207
|
+
const moduleName = labelModule(compiledModule.type);
|
|
208
|
+
const ownerId = moduleNodeId(moduleName);
|
|
209
|
+
for (const provider of compiledModule.definition.providers ?? []) {
|
|
210
|
+
const tokenLabel = labelToken(providerToken(provider));
|
|
211
|
+
const id = providerNodeId(moduleName, tokenLabel);
|
|
212
|
+
providerByModuleAndToken.set(`${moduleName}:${tokenLabel}`, id);
|
|
213
|
+
if (!firstProviderByToken.has(tokenLabel)) {
|
|
214
|
+
firstProviderByToken.set(tokenLabel, id);
|
|
215
|
+
}
|
|
216
|
+
addNode(nodes, {
|
|
217
|
+
id,
|
|
218
|
+
kind: 'provider',
|
|
219
|
+
label: tokenLabel,
|
|
220
|
+
metadata: {
|
|
221
|
+
module: moduleName,
|
|
222
|
+
providerType: providerShape(provider),
|
|
223
|
+
scope: providerScope(provider)
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
addEdge(edges, {
|
|
227
|
+
from: ownerId,
|
|
228
|
+
id: edgeId('owns_provider', ownerId, id),
|
|
229
|
+
kind: 'owns_provider',
|
|
230
|
+
to: id
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
for (const controller of compiledModule.definition.controllers ?? []) {
|
|
234
|
+
const controllerName = controller.name || '<anonymous-controller>';
|
|
235
|
+
const id = controllerNodeId(moduleName, controllerName);
|
|
236
|
+
controllerByModuleAndName.set(`${moduleName}:${controllerName}`, id);
|
|
237
|
+
addNode(nodes, {
|
|
238
|
+
id,
|
|
239
|
+
kind: 'controller',
|
|
240
|
+
label: controllerName,
|
|
241
|
+
metadata: {
|
|
242
|
+
module: moduleName
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
addEdge(edges, {
|
|
246
|
+
from: ownerId,
|
|
247
|
+
id: edgeId('owns_controller', ownerId, id),
|
|
248
|
+
kind: 'owns_controller',
|
|
249
|
+
to: id
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
for (const compiledModule of input.modules) {
|
|
254
|
+
const moduleName = labelModule(compiledModule.type);
|
|
255
|
+
for (const provider of compiledModule.definition.providers ?? []) {
|
|
256
|
+
const from = providerByModuleAndToken.get(`${moduleName}:${labelToken(providerToken(provider))}`);
|
|
257
|
+
if (!from) {
|
|
258
|
+
continue;
|
|
259
|
+
}
|
|
260
|
+
for (const dependency of providerDependencies(provider)) {
|
|
261
|
+
const tokenLabel = labelToken(resolveInjectionToken(dependency));
|
|
262
|
+
const to = createDependencyEdgeTarget(tokenLabel, moduleName, providerByModuleAndToken, firstProviderByToken, nodes);
|
|
263
|
+
addEdge(edges, {
|
|
264
|
+
from,
|
|
265
|
+
id: edgeId('depends_on', from, to),
|
|
266
|
+
kind: 'depends_on',
|
|
267
|
+
label: tokenLabel,
|
|
268
|
+
to
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
for (const controller of compiledModule.definition.controllers ?? []) {
|
|
273
|
+
const controllerName = controller.name || '<anonymous-controller>';
|
|
274
|
+
const from = controllerByModuleAndName.get(`${moduleName}:${controllerName}`);
|
|
275
|
+
if (!from) {
|
|
276
|
+
continue;
|
|
277
|
+
}
|
|
278
|
+
for (const dependency of controllerDependencies(controller)) {
|
|
279
|
+
const tokenLabel = labelToken(resolveInjectionToken(dependency));
|
|
280
|
+
const to = createDependencyEdgeTarget(tokenLabel, moduleName, providerByModuleAndToken, firstProviderByToken, nodes);
|
|
281
|
+
addEdge(edges, {
|
|
282
|
+
from,
|
|
283
|
+
id: edgeId('depends_on', from, to),
|
|
284
|
+
kind: 'depends_on',
|
|
285
|
+
label: tokenLabel,
|
|
286
|
+
to
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
for (const token of compiledModule.exportedTokens) {
|
|
291
|
+
const tokenLabel = labelToken(token);
|
|
292
|
+
const from = moduleNodeId(moduleName);
|
|
293
|
+
const to = createDependencyEdgeTarget(tokenLabel, moduleName, providerByModuleAndToken, firstProviderByToken, nodes);
|
|
294
|
+
addEdge(edges, {
|
|
295
|
+
from,
|
|
296
|
+
id: edgeId('exports', from, to),
|
|
297
|
+
kind: 'exports',
|
|
298
|
+
label: tokenLabel,
|
|
299
|
+
to
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
const routes = (input.routes ?? []).map(descriptor => handlerToStudioRouteDescriptor(descriptor));
|
|
304
|
+
for (const route of routes) {
|
|
305
|
+
const id = routeNodeId(route);
|
|
306
|
+
addNode(nodes, {
|
|
307
|
+
id,
|
|
308
|
+
kind: 'route',
|
|
309
|
+
label: `${route.method} ${route.path}`,
|
|
310
|
+
metadata: {
|
|
311
|
+
controller: route.controller,
|
|
312
|
+
handler: route.handler,
|
|
313
|
+
module: route.module,
|
|
314
|
+
version: route.version
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
if (route.module) {
|
|
318
|
+
const controllerId = controllerByModuleAndName.get(`${route.module}:${route.controller}`);
|
|
319
|
+
if (controllerId) {
|
|
320
|
+
addEdge(edges, {
|
|
321
|
+
from: controllerId,
|
|
322
|
+
id: edgeId('exposes_route', controllerId, id),
|
|
323
|
+
kind: 'exposes_route',
|
|
324
|
+
to: id
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
const snapshot = {
|
|
330
|
+
appId: input.appId,
|
|
331
|
+
diagnostics: [...(input.diagnostics ?? [])],
|
|
332
|
+
generatedAt: input.generatedAt ?? new Date().toISOString(),
|
|
333
|
+
graph: {
|
|
334
|
+
edges: [...edges.values()],
|
|
335
|
+
nodes: [...nodes.values()]
|
|
336
|
+
},
|
|
337
|
+
requests: [...(input.requests ?? [])],
|
|
338
|
+
routes,
|
|
339
|
+
version: 1
|
|
340
|
+
};
|
|
341
|
+
if (input.timing) {
|
|
342
|
+
snapshot.timing = input.timing;
|
|
343
|
+
}
|
|
344
|
+
return snapshot;
|
|
345
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { HandlerDescriptor, RequestObserver } from '@fluojs/http';
|
|
2
|
+
import type { BootstrapTimingDiagnostics } from '../health/diagnostics.js';
|
|
3
|
+
import type { BootstrapApplicationOptions, CompiledModule, CreateApplicationContextOptions, ModuleType } from '../types.js';
|
|
4
|
+
import type { StudioLiveEvent, StudioLiveEventSource, StudioLiveSnapshot } from './contracts.js';
|
|
5
|
+
/**
|
|
6
|
+
* Describes Studio Devtools Runtime Transport data used by the Studio devtool.
|
|
7
|
+
*/
|
|
8
|
+
export interface StudioDevtoolsRuntimeTransport {
|
|
9
|
+
publish(event: StudioLiveEvent): Promise<void> | void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Describes Studio Devtools Runtime Options data used by the Studio devtool.
|
|
13
|
+
*/
|
|
14
|
+
export interface StudioDevtoolsRuntimeOptions {
|
|
15
|
+
appId: string;
|
|
16
|
+
epoch?: string;
|
|
17
|
+
runtime?: StudioLiveEventSource['runtime'];
|
|
18
|
+
transport: StudioDevtoolsRuntimeTransport;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Describes Studio Bootstrap Snapshot Input data used by the Studio devtool.
|
|
22
|
+
*/
|
|
23
|
+
export interface StudioBootstrapSnapshotInput {
|
|
24
|
+
diagnostics?: StudioLiveSnapshot['diagnostics'];
|
|
25
|
+
modules: readonly CompiledModule[];
|
|
26
|
+
rootModule: ModuleType;
|
|
27
|
+
routes?: readonly HandlerDescriptor[];
|
|
28
|
+
timing?: BootstrapTimingDiagnostics;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Describes Studio Devtools Config data used by the Studio devtool.
|
|
32
|
+
*/
|
|
33
|
+
export interface StudioDevtoolsConfig {
|
|
34
|
+
FLUO_STUDIO?: string;
|
|
35
|
+
FLUO_STUDIO_APP_ID?: string;
|
|
36
|
+
FLUO_STUDIO_ENDPOINT?: string;
|
|
37
|
+
FLUO_STUDIO_EPOCH?: string;
|
|
38
|
+
FLUO_STUDIO_RUNTIME?: string;
|
|
39
|
+
FLUO_STUDIO_TOKEN?: string;
|
|
40
|
+
FLUO_STUDIO_URL?: string;
|
|
41
|
+
}
|
|
42
|
+
/** Process-local runtime bridge used only when Studio env injection is present. */
|
|
43
|
+
export declare class StudioDevtoolsRuntime {
|
|
44
|
+
private readonly options;
|
|
45
|
+
private readonly epoch;
|
|
46
|
+
private readonly observer;
|
|
47
|
+
private sequence;
|
|
48
|
+
constructor(options: StudioDevtoolsRuntimeOptions);
|
|
49
|
+
get appId(): string;
|
|
50
|
+
get requestObserver(): RequestObserver;
|
|
51
|
+
publish<TEvent extends StudioLiveEvent>(type: TEvent['type'], payload: TEvent['payload']): void;
|
|
52
|
+
publishBootstrapSnapshot(input: StudioBootstrapSnapshotInput): void;
|
|
53
|
+
close(): void;
|
|
54
|
+
}
|
|
55
|
+
declare global {
|
|
56
|
+
var __FLUO_STUDIO_DEVTOOLS_CONFIG__: StudioDevtoolsConfig | undefined;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Creates the Studio runtime bridge from explicit CLI-injected config.
|
|
60
|
+
* Returns `undefined` unless Studio is explicitly enabled and a token-protected endpoint is present.
|
|
61
|
+
*
|
|
62
|
+
* @param config Explicit Studio config injected by the application boundary.
|
|
63
|
+
* @returns Studio runtime bridge, or `undefined` when Studio is disabled or incomplete.
|
|
64
|
+
*/
|
|
65
|
+
export declare function createStudioDevtoolsRuntimeFromConfig(config?: StudioDevtoolsConfig | undefined): StudioDevtoolsRuntime | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Compatibility helper for callers that already resolved env values at their application boundary.
|
|
68
|
+
*
|
|
69
|
+
* @param env Explicit Studio config resolved outside runtime package source.
|
|
70
|
+
* @returns Studio runtime bridge, or `undefined` when Studio is disabled or incomplete.
|
|
71
|
+
*/
|
|
72
|
+
export declare function createStudioDevtoolsRuntimeFromEnv(env: StudioDevtoolsConfig): StudioDevtoolsRuntime | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Provides apply Studio Devtools Application Options behavior for the Studio devtool.
|
|
75
|
+
*
|
|
76
|
+
* @param options options value used by apply Studio Devtools Application Options.
|
|
77
|
+
* @param runtime runtime value used by apply Studio Devtools Application Options.
|
|
78
|
+
* @returns The apply Studio Devtools Application Options result.
|
|
79
|
+
*/
|
|
80
|
+
export declare function applyStudioDevtoolsApplicationOptions(options: BootstrapApplicationOptions, runtime: StudioDevtoolsRuntime | undefined): BootstrapApplicationOptions;
|
|
81
|
+
/**
|
|
82
|
+
* Provides apply Studio Devtools Context Options behavior for the Studio devtool.
|
|
83
|
+
*
|
|
84
|
+
* @param options options value used by apply Studio Devtools Context Options.
|
|
85
|
+
* @param runtime runtime value used by apply Studio Devtools Context Options.
|
|
86
|
+
* @returns The apply Studio Devtools Context Options result.
|
|
87
|
+
*/
|
|
88
|
+
export declare function applyStudioDevtoolsContextOptions(options: CreateApplicationContextOptions, runtime: StudioDevtoolsRuntime | undefined): CreateApplicationContextOptions;
|
|
89
|
+
/**
|
|
90
|
+
* Provides publish Studio Bootstrap Snapshot behavior for the Studio devtool.
|
|
91
|
+
*
|
|
92
|
+
* @param runtime runtime value used by publish Studio Bootstrap Snapshot.
|
|
93
|
+
* @param input input value used by publish Studio Bootstrap Snapshot.
|
|
94
|
+
*/
|
|
95
|
+
export declare function publishStudioBootstrapSnapshot(runtime: StudioDevtoolsRuntime | undefined, input: StudioBootstrapSnapshotInput): void;
|
|
96
|
+
//# sourceMappingURL=studio-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"studio-runtime.d.ts","sourceRoot":"","sources":["../../src/devtools/studio-runtime.ts"],"names":[],"m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