@squiz/edge-dev-render-runtime-lib 2.3.1 → 2.4.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/lib/public/docs.json
CHANGED
|
@@ -2321,6 +2321,43 @@
|
|
|
2321
2321
|
"type": "object",
|
|
2322
2322
|
"additionalProperties": false
|
|
2323
2323
|
},
|
|
2324
|
+
"UiMetadata": {
|
|
2325
|
+
"allOf": [
|
|
2326
|
+
{
|
|
2327
|
+
"properties": {
|
|
2328
|
+
"autoReload": {
|
|
2329
|
+
"type": "boolean",
|
|
2330
|
+
"description": "Whether the component should automatically reload when the input is changed"
|
|
2331
|
+
}
|
|
2332
|
+
},
|
|
2333
|
+
"additionalProperties": {},
|
|
2334
|
+
"type": "object"
|
|
2335
|
+
},
|
|
2336
|
+
{
|
|
2337
|
+
"anyOf": [
|
|
2338
|
+
{
|
|
2339
|
+
"properties": {
|
|
2340
|
+
"collapsedByDefault": {
|
|
2341
|
+
"type": "boolean"
|
|
2342
|
+
}
|
|
2343
|
+
},
|
|
2344
|
+
"type": "object"
|
|
2345
|
+
},
|
|
2346
|
+
{
|
|
2347
|
+
"properties": {
|
|
2348
|
+
"quickOption": {
|
|
2349
|
+
"type": "boolean"
|
|
2350
|
+
},
|
|
2351
|
+
"inlineEditable": {
|
|
2352
|
+
"type": "boolean"
|
|
2353
|
+
}
|
|
2354
|
+
},
|
|
2355
|
+
"type": "object"
|
|
2356
|
+
}
|
|
2357
|
+
]
|
|
2358
|
+
}
|
|
2359
|
+
]
|
|
2360
|
+
},
|
|
2324
2361
|
"CoreSchemaMetaSchema2": {
|
|
2325
2362
|
"anyOf": [
|
|
2326
2363
|
{
|
|
@@ -2745,27 +2782,7 @@
|
|
|
2745
2782
|
"type": "string"
|
|
2746
2783
|
},
|
|
2747
2784
|
"ui:metadata": {
|
|
2748
|
-
"
|
|
2749
|
-
{
|
|
2750
|
-
"properties": {
|
|
2751
|
-
"collapsedByDefault": {
|
|
2752
|
-
"type": "boolean"
|
|
2753
|
-
}
|
|
2754
|
-
},
|
|
2755
|
-
"type": "object"
|
|
2756
|
-
},
|
|
2757
|
-
{
|
|
2758
|
-
"properties": {
|
|
2759
|
-
"quickOption": {
|
|
2760
|
-
"type": "boolean"
|
|
2761
|
-
},
|
|
2762
|
-
"inlineEditable": {
|
|
2763
|
-
"type": "boolean"
|
|
2764
|
-
}
|
|
2765
|
-
},
|
|
2766
|
-
"type": "object"
|
|
2767
|
-
}
|
|
2768
|
-
]
|
|
2785
|
+
"$ref": "#/components/schemas/UiMetadata"
|
|
2769
2786
|
},
|
|
2770
2787
|
"$schema": {
|
|
2771
2788
|
"type": "string"
|
|
@@ -4905,6 +4922,25 @@
|
|
|
4905
4922
|
},
|
|
4906
4923
|
"type": "object",
|
|
4907
4924
|
"description": "Mocked uri objects used in the preview"
|
|
4925
|
+
},
|
|
4926
|
+
"ui:metadata": {
|
|
4927
|
+
"properties": {
|
|
4928
|
+
"autoReload": {
|
|
4929
|
+
"allOf": [
|
|
4930
|
+
{
|
|
4931
|
+
"type": "boolean"
|
|
4932
|
+
},
|
|
4933
|
+
{
|
|
4934
|
+
"type": "string"
|
|
4935
|
+
}
|
|
4936
|
+
]
|
|
4937
|
+
}
|
|
4938
|
+
},
|
|
4939
|
+
"additionalProperties": {},
|
|
4940
|
+
"required": [
|
|
4941
|
+
"autoReload"
|
|
4942
|
+
],
|
|
4943
|
+
"type": "object"
|
|
4908
4944
|
}
|
|
4909
4945
|
},
|
|
4910
4946
|
"required": [
|
|
@@ -4944,7 +4980,7 @@
|
|
|
4944
4980
|
},
|
|
4945
4981
|
"info": {
|
|
4946
4982
|
"title": "@squiz/edge-dev-render-runtime-lib",
|
|
4947
|
-
"version": "2.
|
|
4983
|
+
"version": "2.4.0",
|
|
4948
4984
|
"description": "Package of Edge rendering utilities for components in dev mode",
|
|
4949
4985
|
"license": {
|
|
4950
4986
|
"name": "ISC"
|
|
@@ -6,6 +6,7 @@ import { Config } from '../../ioc';
|
|
|
6
6
|
import { Request as ExpressRequest, Response as ExpressResponse } from 'express';
|
|
7
7
|
import { ComponentPreviewService } from '../../PreviewComponentService';
|
|
8
8
|
import { ComponentExecutionInput, RenderInputService } from '../../RenderInputService';
|
|
9
|
+
import { ContextAwareness } from '../../component-runner/ComponentRunnerService';
|
|
9
10
|
type ComponentManifest = MANIFEST_MODELS.v1.ComponentManifest;
|
|
10
11
|
type ComponentSchema = {
|
|
11
12
|
name: string;
|
|
@@ -49,11 +50,11 @@ export declare class DevelopmentController extends Controller {
|
|
|
49
50
|
* @param {*} [data]
|
|
50
51
|
* @memberof DevelopmentController
|
|
51
52
|
*/
|
|
52
|
-
TemporaryPreview(req: ExpressRequest, componentId: string, functionName: string, headers?: any, envVars?: any, data?: any): Promise<void>;
|
|
53
|
-
getDefaultFunctionRendering(expressRequest: ExpressRequest, componentId: string, componentSet?: string, previewKey?: string): Promise<void>;
|
|
54
|
-
getGivenFunctionRendering(expressRequest: ExpressRequest, componentId: string, functionName: string, componentSet?: string, previewKey?: string): Promise<void>;
|
|
53
|
+
TemporaryPreview(req: ExpressRequest, componentId: string, functionName: string, headers?: any, envVars?: any, data?: any, contextMatrixAssetId?: string, contextMatrixUrl?: string): Promise<void>;
|
|
54
|
+
getDefaultFunctionRendering(expressRequest: ExpressRequest, componentId: string, componentSet?: string, previewKey?: string, contextMatrixAssetId?: string, contextMatrixUrl?: string): Promise<void>;
|
|
55
|
+
getGivenFunctionRendering(expressRequest: ExpressRequest, componentId: string, functionName: string, componentSet?: string, previewKey?: string, contextMatrixAssetId?: string, contextMatrixUrl?: string): Promise<void>;
|
|
55
56
|
protected handleResponse(input: ComponentExecutionInput, output: FunctionReturnTypes, response: ExpressResponse): void;
|
|
56
|
-
protected doFunctionRender(renderInput: ComponentExecutionInput): Promise<FunctionReturnTypes>;
|
|
57
|
+
protected doFunctionRender(renderInput: ComponentExecutionInput, ctx?: ContextAwareness): Promise<FunctionReturnTypes>;
|
|
57
58
|
private renderAndValidateOutput;
|
|
58
59
|
protected setHeadersOnResponse(renderInput: ComponentExecutionInput, response: ExpressResponse): void;
|
|
59
60
|
private checkDevMode;
|