Runtime
OCP App SDK / Runtime
Runtime
Index
Constructors
Accessors
Methods
- getChannelClass
- getFunctionClass
- getJobClass
- getLifecycleClass
- getLiquidExtensionClass
- getSchemaObjects
- toJson
- fromJson
- initialize
Constructors
constructor()
Signature
new Runtime(): Runtime;
Returns
Accessors
baseDir
Signature
baseDir(): string;
Returns
string
Defined in: src/app/Runtime.ts:55
Defined in: src/app/Runtime.ts:55
manifest
Signature
manifest(): Readonly<AppManifest>;
Returns
Readonly
<AppManifest
>
Defined in: src/app/Runtime.ts:51
Defined in: src/app/Runtime.ts:51
Methods
getChannelClass()
Signature
getChannelClass<T>(): Promise<() => T>;
Type parameters
T
extendsChannel
<T
>
Returns
Promise
<() => T
>
Defined in: src/app/Runtime.ts:74
getFunctionClass()
Signature
getFunctionClass<T>(name: string): Promise<(request: Request) => T>;
Type parameters
T
extendsFunction
<T
>
Parameters
Name | Type |
---|---|
name | string |
Returns
Promise
<(request
: Request
) => T
>
Defined in: src/app/Runtime.ts:60
getJobClass()
Signature
getJobClass<T>(name: string): Promise<(invocation: JobInvocation) => T>;
Type parameters
T
extendsJob
<T
>
Parameters
Name | Type |
---|---|
name | string |
Returns
Promise
<(invocation
: JobInvocation
) => T
>
Defined in: src/app/Runtime.ts:78
getLifecycleClass()
Signature
getLifecycleClass<T>(): Promise<() => T>;
Type parameters
T
extendsLifecycle
<T
>
Returns
Promise
<() => T
>
Defined in: src/app/Runtime.ts:70
getLiquidExtensionClass()
Signature
getLiquidExtensionClass<T>(name: string): Promise<() => T>;
Type parameters
T
extendsLiquidExtension
<T
>
Parameters
Name | Type |
---|---|
name | string |
Returns
Promise
<() => T
>
Defined in: src/app/Runtime.ts:88
getSchemaObjects()
Signature
getSchemaObjects(): SchemaObjects;
Returns
SchemaObjects
Defined in: src/app/Runtime.ts:98
toJson()
Signature
toJson(): string;
Returns
string
Defined in: src/app/Runtime.ts:109
fromJson()
Initializes from a pre-validated JSON definition. Used during task execution.
Signature
Static fromJson(serializedRuntime: string): Runtime;
Parameters
Name | Type | Description |
---|---|---|
serializedRuntime | string | JSON-serialized runtime definition |
Returns
Defined in: src/app/Runtime.ts:41
initialize()
Initializes from a directory. Used during startup.
Signature
Static initialize(dirName: string, skipJsonValidation: boolean = false): Promise<Runtime>;
Parameters
Name | Type | Default value | Description |
---|---|---|---|
dirName | string | undefined | the base directory of the app |
skipJsonValidation | boolean | false | for internal use, allows json-schema errors to be captured by the validation process |
Returns
Promise
<Runtime
>
Defined in: src/app/Runtime.ts:31
Updated about 2 months ago