@squiz/render-runtime-lib 1.70.1 → 1.72.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.
@@ -0,0 +1 @@
1
+ UPDATE "component" SET "type" = 'server' WHERE "type" = 'sandbox';
@@ -5007,6 +5007,30 @@
5007
5007
  "type": "object",
5008
5008
  "additionalProperties": {}
5009
5009
  },
5010
+ "Pick_MANIFEST_MODELS.v1.ComponentManifest.type_": {
5011
+ "properties": {
5012
+ "type": {
5013
+ "type": "string",
5014
+ "enum": [
5015
+ "edge",
5016
+ "server"
5017
+ ],
5018
+ "description": "Type of component that will be deployed to different runtimes"
5019
+ }
5020
+ },
5021
+ "type": "object",
5022
+ "description": "From T, pick a set of properties whose keys are in the union K"
5023
+ },
5024
+ "ComponentFunctionDefinitionResponse": {
5025
+ "allOf": [
5026
+ {
5027
+ "$ref": "#/components/schemas/MANIFEST_MODELS.v1.ComponentFunction"
5028
+ },
5029
+ {
5030
+ "$ref": "#/components/schemas/Pick_MANIFEST_MODELS.v1.ComponentManifest.type_"
5031
+ }
5032
+ ]
5033
+ },
5010
5034
  "ComponentManifest": {
5011
5035
  "$ref": "#/components/schemas/MANIFEST_MODELS.v1.ComponentManifest"
5012
5036
  },
@@ -5031,7 +5055,7 @@
5031
5055
  },
5032
5056
  "info": {
5033
5057
  "title": "@squiz/render-runtime-lib",
5034
- "version": "1.70.0",
5058
+ "version": "1.71.0",
5035
5059
  "description": "Package of rendering utilities for components",
5036
5060
  "license": {
5037
5061
  "name": "ISC"
@@ -5166,7 +5190,7 @@
5166
5190
  "content": {
5167
5191
  "application/json": {
5168
5192
  "schema": {
5169
- "$ref": "#/components/schemas/MANIFEST_MODELS.v1.ComponentFunction"
5193
+ "$ref": "#/components/schemas/ComponentFunctionDefinitionResponse"
5170
5194
  }
5171
5195
  }
5172
5196
  }
@@ -5226,7 +5250,7 @@
5226
5250
  "content": {
5227
5251
  "application/json": {
5228
5252
  "schema": {
5229
- "$ref": "#/components/schemas/MANIFEST_MODELS.v1.ComponentFunction"
5253
+ "$ref": "#/components/schemas/ComponentFunctionDefinitionResponse"
5230
5254
  }
5231
5255
  }
5232
5256
  }
@@ -1,7 +1,6 @@
1
1
  import { Controller } from 'tsoa';
2
2
  import { type Request as ExpressRequest, type Response as ExpressResponse } from 'express';
3
- import { ManifestModel, ManifestService, ComponentFunctionService, ComponentSetService, Manifest, Headers } from '@squiz/component-lib';
4
- import { MANIFEST_MODELS } from '@squiz/dx-json-schema-lib';
3
+ import { ManifestModel, ManifestService, ComponentFunctionService, ComponentSetService, Manifest, Headers, ComponentFunctionDefinitionResponse } from '@squiz/component-lib';
5
4
  import { ComponentRootUrlResolver } from '../../component-runner';
6
5
  export declare class DefinitionController extends Controller {
7
6
  protected componentSetService: ComponentSetService;
@@ -10,8 +9,8 @@ export declare class DefinitionController extends Controller {
10
9
  protected componentRootUrlResolver: ComponentRootUrlResolver;
11
10
  constructor(componentSetService: ComponentSetService, manifestService: ManifestService, componentFunctionService: ComponentFunctionService, componentRootUrlResolver: ComponentRootUrlResolver);
12
11
  getComponentVersionManifest(namespace: string, componentName: string, version: string, request: ExpressRequest, _previewKey?: string, _componentSet?: string): Promise<ManifestModel>;
13
- getDefaultFunctionDefinition(namespace: string, componentName: string, version: string, request: ExpressRequest, _previewKey?: string, _componentSet?: string): Promise<MANIFEST_MODELS.v1.ComponentFunction>;
14
- getGivenFunctionDefinition(namespace: string, componentName: string, version: string, functionName: string, request: ExpressRequest, _previewKey?: string, _componentSet?: string): Promise<MANIFEST_MODELS.v1.ComponentFunction>;
12
+ getDefaultFunctionDefinition(namespace: string, componentName: string, version: string, request: ExpressRequest, _previewKey?: string, _componentSet?: string): Promise<ComponentFunctionDefinitionResponse>;
13
+ getGivenFunctionDefinition(namespace: string, componentName: string, version: string, functionName: string, request: ExpressRequest, _previewKey?: string, _componentSet?: string): Promise<ComponentFunctionDefinitionResponse>;
15
14
  private setHeadersFromComponentSet;
16
15
  protected setHeadersFromPreview(manifest: Manifest, _previewKey: string, functionName: string, response: ExpressResponse): void;
17
16
  protected setHeaders(headers: Headers, response: ExpressResponse): void;