@platforma-sdk/model 1.82.0 → 1.83.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.
- package/dist/bconfig/index.d.ts +2 -2
- package/dist/bconfig/lambdas.d.ts +2 -12
- package/dist/bconfig/lambdas.d.ts.map +1 -1
- package/dist/bconfig/v3.d.ts +1 -1
- package/dist/block_model.cjs +2 -2
- package/dist/block_model.js +2 -2
- package/dist/config/index.d.ts +2 -6
- package/dist/config/type_engine.d.ts +7 -28
- package/dist/config/type_engine.d.ts.map +1 -1
- package/dist/index.cjs +20 -60
- package/dist/index.d.ts +5 -11
- package/dist/index.js +4 -8
- package/dist/package.cjs +1 -1
- package/dist/package.js +1 -1
- package/dist/render/api.cjs +0 -22
- package/dist/render/api.cjs.map +1 -1
- package/dist/render/api.d.ts +1 -9
- package/dist/render/api.d.ts.map +1 -1
- package/dist/render/api.js +1 -22
- package/dist/render/api.js.map +1 -1
- package/dist/render/index.cjs +0 -1
- package/dist/render/index.d.ts +2 -2
- package/dist/render/index.js +2 -2
- package/package.json +4 -4
- package/src/bconfig/lambdas.ts +1 -25
- package/src/config/index.ts +0 -4
- package/src/config/type_engine.ts +6 -49
- package/src/index.ts +0 -2
- package/src/render/api.ts +0 -32
- package/src/typing.test.ts +4 -143
- package/dist/block_model_legacy.cjs +0 -240
- package/dist/block_model_legacy.cjs.map +0 -1
- package/dist/block_model_legacy.d.ts +0 -115
- package/dist/block_model_legacy.d.ts.map +0 -1
- package/dist/block_model_legacy.js +0 -240
- package/dist/block_model_legacy.js.map +0 -1
- package/dist/config/actions.cjs +0 -232
- package/dist/config/actions.cjs.map +0 -1
- package/dist/config/actions.d.ts +0 -48
- package/dist/config/actions.d.ts.map +0 -1
- package/dist/config/actions.js +0 -201
- package/dist/config/actions.js.map +0 -1
- package/dist/config/actions_kinds.d.ts +0 -116
- package/dist/config/actions_kinds.d.ts.map +0 -1
- package/dist/config/index.cjs +0 -33
- package/dist/config/index.js +0 -2
- package/dist/config/model_meta.d.ts +0 -9
- package/dist/config/model_meta.d.ts.map +0 -1
- package/dist/config/type_util.d.ts +0 -14
- package/dist/config/type_util.d.ts.map +0 -1
- package/dist/ref_util.cjs +0 -21
- package/dist/ref_util.cjs.map +0 -1
- package/dist/ref_util.d.ts +0 -19
- package/dist/ref_util.d.ts.map +0 -1
- package/dist/ref_util.js +0 -20
- package/dist/ref_util.js.map +0 -1
- package/src/block_model_legacy.ts +0 -465
- package/src/config/actions.ts +0 -468
- package/src/config/actions_kinds.ts +0 -264
- package/src/config/model_meta.ts +0 -5
- package/src/config/type_util.ts +0 -25
- package/src/ref_util.ts +0 -17
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"actions.cjs","names":[],"sources":["../../src/config/actions.ts"],"sourcesContent":["import type {\n ActGetField,\n ActGetFromCtx,\n ActGetImmediate,\n ActGetResourceField,\n ActGetResourceValueAsJson,\n ActMakeObject,\n ActMapRecordValues,\n ActMapResourceFields,\n ActMapArrayValues,\n ActIsEmpty,\n ActNot,\n ActIsolate,\n ActGetBlobContentAsJson,\n ActGetBlobContentAsString,\n ActGetBlobContent,\n ActAnd,\n ActOr,\n ActMakeArray,\n ActFlatten,\n ActGetDownloadedBlobContent,\n ActGetOnDemandBlobContent,\n ActImportProgress,\n ActGetLastLogs,\n ActGetProgressLog,\n ActGetProgressLogWithInfo,\n ActGetLogHandle,\n ActExtractArchiveAndGetURL,\n} from \"./actions_kinds\";\nimport type {\n ExtractAction,\n POCExtractAction,\n PrimitiveOrConfig,\n TypedConfig,\n} from \"./type_engine\";\nimport type { Cfg } from \"./model\";\nimport type { CheckedSyncConf } from \"./type_util\";\nimport type { ArchiveFormat, RangeBytes } from \"@milaboratories/pl-model-common\";\n\n//\n// Helpers\n//\n\nfunction primitiveToConfig(value: PrimitiveOrConfig): TypedConfig {\n if (\n typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\" ||\n value === null\n )\n return getImmediate(value);\n else return value as TypedConfig;\n}\n\n//\n// Context\n//\n\nexport function getFromCfg<const V extends string>(variable: V): TypedConfig<ActGetFromCtx<V>> {\n return { type: \"GetFromCtx\", variable } as Cfg as any;\n}\n\n//\n// Isolate\n//\n\nexport function isolate<const Config extends TypedConfig>(\n cfg: Config,\n): TypedConfig<ActIsolate<ExtractAction<Config>>> {\n return {\n type: \"Isolate\",\n cfg,\n } as Cfg as any;\n}\n\n//\n// Well-known Context Vars\n//\n\nexport const Args = getFromCfg(\"$args\");\nexport const It = getFromCfg(\"$it\");\nexport const MainOutputs = getFromCfg(\"$prod\");\nexport const StagingOutputs = getFromCfg(\"$staging\");\nexport const UiState = getFromCfg(\"$ui\");\n\n//\n// Json\n//\n\nexport function getImmediate<const T>(value: T): TypedConfig<ActGetImmediate<T>> {\n return { type: \"Immediate\", value } as Cfg as any;\n}\n\nexport function makeObject<const T extends Record<string, PrimitiveOrConfig>>(\n template: T,\n): TypedConfig<ActMakeObject<{ [Key in keyof T]: POCExtractAction<T[Key]> }>> {\n const normalizedTemplate: Record<string, TypedConfig> = {};\n for (const [k, cfg] of Object.entries(template)) normalizedTemplate[k] = primitiveToConfig(cfg);\n return {\n type: \"MakeObject\",\n template: normalizedTemplate,\n } as Cfg as any;\n}\n\nexport function makeArray<const T extends PrimitiveOrConfig[]>(\n ...template: T\n): TypedConfig<ActMakeArray<{ [Key in keyof T]: POCExtractAction<T[Key]> }>> {\n const normalizedTemplate: TypedConfig[] = [];\n for (const cfg of template) normalizedTemplate.push(primitiveToConfig(cfg));\n return {\n type: \"MakeArray\",\n template: normalizedTemplate,\n } as Cfg as any;\n}\n\nexport function getJsonField<\n const Source extends PrimitiveOrConfig,\n const Field extends PrimitiveOrConfig,\n>(\n source: Source,\n field: Field,\n): TypedConfig<ActGetField<POCExtractAction<Source>, POCExtractAction<Field>>> {\n return {\n type: \"GetJsonField\",\n source: primitiveToConfig(source),\n field: primitiveToConfig(field),\n } as Cfg as any;\n}\n\nexport function mapRecordValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n>(\n source: Source & CheckedSyncConf<Source>,\n mapping: Mapping,\n): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, \"$it\">>;\nexport function mapRecordValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n>(\n source: Source,\n mapping: Mapping & CheckedSyncConf<Mapping>,\n): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, \"$it\">>;\nexport function mapRecordValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source & CheckedSyncConf<Source>,\n mapping: Mapping,\n itVar: ItVar,\n): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;\nexport function mapRecordValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping & CheckedSyncConf<Mapping>,\n itVar: ItVar,\n): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;\nexport function mapRecordValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping,\n itVar: ItVar = \"$it\" as ItVar,\n): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>> {\n return {\n type: \"MapRecordValues\",\n source,\n mapping,\n itVar,\n } as Cfg as any;\n}\n\nexport function mapArrayValues<const Source extends TypedConfig, const Mapping extends TypedConfig>(\n source: Source & CheckedSyncConf<Source>,\n mapping: Mapping,\n): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, \"$it\">>;\nexport function mapArrayValues<const Source extends TypedConfig, const Mapping extends TypedConfig>(\n source: Source,\n mapping: Mapping & CheckedSyncConf<Mapping>,\n): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, \"$it\">>;\nexport function mapArrayValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source & CheckedSyncConf<Source>,\n mapping: Mapping,\n itVar: ItVar,\n): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;\nexport function mapArrayValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping & CheckedSyncConf<Mapping>,\n itVar: ItVar,\n): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;\nexport function mapArrayValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping,\n itVar: ItVar = \"$it\" as ItVar,\n): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>> {\n return {\n type: \"MapArrayValues\",\n source,\n mapping,\n itVar,\n } as Cfg as any;\n}\n\nexport function flatten<const Source extends TypedConfig>(\n source: Source,\n): TypedConfig<ActFlatten<ExtractAction<Source>>> {\n return {\n type: \"Flatten\",\n source,\n } as Cfg as any;\n}\n\n//\n// Boolean\n//\n\nexport function isEmpty<const Arg extends TypedConfig>(\n arg: Arg,\n): TypedConfig<ActIsEmpty<ExtractAction<Arg>>> {\n return {\n type: \"IsEmpty\",\n arg,\n } as Cfg as any;\n}\n\nexport function not<const Operand extends TypedConfig>(\n operand: Operand,\n): TypedConfig<ActNot<ExtractAction<Operand>>> {\n return {\n type: \"Not\",\n operand,\n } as Cfg as any;\n}\n\nexport function and<const Operand1 extends TypedConfig, const Operand2 extends TypedConfig>(\n operand1: Operand1,\n operand2: Operand2,\n): TypedConfig<ActAnd<ExtractAction<Operand1>, ExtractAction<Operand2>>> {\n return {\n type: \"And\",\n operand1,\n operand2,\n } as Cfg as any;\n}\n\nexport function or<const Operand1 extends TypedConfig, const Operand2 extends TypedConfig>(\n operand1: Operand1,\n operand2: Operand2,\n): TypedConfig<ActOr<ExtractAction<Operand1>, ExtractAction<Operand2>>> {\n return {\n type: \"Or\",\n operand1,\n operand2,\n } as Cfg as any;\n}\n\n//\n// Resources\n//\n\nexport function getResourceField<\n const Source extends PrimitiveOrConfig,\n const Field extends PrimitiveOrConfig,\n>(\n source: Source,\n field: Field,\n): TypedConfig<ActGetResourceField<POCExtractAction<Source>, POCExtractAction<Field>>> {\n return {\n type: \"GetResourceField\",\n source: primitiveToConfig(source),\n field: primitiveToConfig(field),\n } as Cfg as any;\n}\n\nexport function getResourceValueAsJson<T>() {\n return function <const Source extends PrimitiveOrConfig>(\n source: Source,\n ): TypedConfig<ActGetResourceValueAsJson<POCExtractAction<Source>, T>> {\n return {\n type: \"GetResourceValueAsJson\",\n source: primitiveToConfig(source),\n } as Cfg as any;\n };\n}\n\nexport function mapResourceFields<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n>(\n source: Source,\n mapping: Mapping,\n): TypedConfig<ActMapResourceFields<ExtractAction<Source>, ExtractAction<Mapping>, \"$it\">>;\nexport function mapResourceFields<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping,\n itVar: ItVar,\n): TypedConfig<ActMapResourceFields<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;\nexport function mapResourceFields<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping,\n itVar: ItVar = \"$it\" as ItVar,\n): TypedConfig<ActMapResourceFields<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>> {\n return {\n type: \"MapResourceFields\",\n source,\n mapping,\n itVar,\n } as Cfg as TypedConfig<\n ActMapResourceFields<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>\n >;\n}\n\n//\n// Download Blobs\n//\n\nexport function getBlobContent<const Source extends TypedConfig>(\n source: Source,\n range?: RangeBytes,\n): TypedConfig<ActGetBlobContent<ExtractAction<Source>>> {\n return {\n type: \"GetBlobContent\",\n range,\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\nexport function getBlobContentAsString<const Source extends TypedConfig>(\n source: Source,\n range?: RangeBytes,\n): TypedConfig<ActGetBlobContentAsString<ExtractAction<Source>>> {\n return {\n type: \"GetBlobContentAsString\",\n range,\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\nexport function getBlobContentAsJson<T>() {\n return function <const Source extends TypedConfig>(\n source: Source,\n range?: RangeBytes,\n ): TypedConfig<ActGetBlobContentAsJson<ExtractAction<Source>, T>> {\n return {\n type: \"GetBlobContentAsJson\",\n range,\n source: primitiveToConfig(source),\n } as Cfg as any;\n };\n}\n\nexport function getDownloadedBlobContent<const Source extends TypedConfig>(\n source: Source,\n): TypedConfig<ActGetDownloadedBlobContent<ExtractAction<Source>>> {\n return {\n type: \"GetDownloadedBlobContent\",\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\nexport function getOnDemandBlobContent<const Source extends TypedConfig>(\n source: Source,\n): TypedConfig<ActGetOnDemandBlobContent<ExtractAction<Source>>> {\n return {\n type: \"GetOnDemandBlobContent\",\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\n//\n// Download Blobs to URLs\n//\n\nexport function extractArchiveAndGetURL<const Source extends TypedConfig>(\n source: Source,\n format: ArchiveFormat,\n): TypedConfig<ActExtractArchiveAndGetURL<ExtractAction<Source>>> {\n return {\n type: \"ExtractArchiveAndGetURL\",\n format,\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\n//\n// Upload Blobs\n//\n\nexport function getImportProgress<const Source extends TypedConfig>(\n source: Source,\n): TypedConfig<ActImportProgress<ExtractAction<Source>>> {\n return {\n type: \"GetImportProgress\",\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\n//\n// Logs\n//\n\nexport function getLastLogs<const Source extends TypedConfig>(\n source: Source,\n lines: number,\n): TypedConfig<ActGetLastLogs<ExtractAction<Source>>> {\n return {\n type: \"GetLastLogs\",\n source: primitiveToConfig(source),\n lines,\n } as Cfg as any;\n}\n\nexport function getProgressLog<const Source extends TypedConfig>(\n source: Source,\n patternToSearch: string,\n): TypedConfig<ActGetProgressLog<ExtractAction<Source>>> {\n return {\n type: \"GetProgressLog\",\n source: primitiveToConfig(source),\n patternToSearch,\n } as Cfg as any;\n}\n\nexport function getProgressLogWithInfo<const Source extends TypedConfig>(\n source: Source,\n patternToSearch: string,\n): TypedConfig<ActGetProgressLogWithInfo<ExtractAction<Source>>> {\n return {\n type: \"GetProgressLogWithInfo\",\n source: primitiveToConfig(source),\n patternToSearch,\n } as Cfg as any;\n}\n\nexport function getLogHandle<const Source extends TypedConfig>(\n source: Source,\n): TypedConfig<ActGetLogHandle<ExtractAction<Source>>> {\n return {\n type: \"GetLogHandle\",\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n"],"mappings":";AA2CA,SAAS,kBAAkB,OAAuC;CAChE,IACE,OAAO,UAAU,YACjB,OAAO,UAAU,YACjB,OAAO,UAAU,aACjB,UAAU,MAEV,OAAO,aAAa,KAAK;MACtB,OAAO;AACd;AAMA,SAAgB,WAAmC,UAA4C;CAC7F,OAAO;EAAE,MAAM;EAAc;CAAS;AACxC;AAMA,SAAgB,QACd,KACgD;CAChD,OAAO;EACL,MAAM;EACN;CACF;AACF;AAMA,MAAa,OAAO,WAAW,OAAO;AACtC,MAAa,KAAK,WAAW,KAAK;AAClC,MAAa,cAAc,WAAW,OAAO;AAC7C,MAAa,iBAAiB,WAAW,UAAU;AACnD,MAAa,UAAU,WAAW,KAAK;AAMvC,SAAgB,aAAsB,OAA2C;CAC/E,OAAO;EAAE,MAAM;EAAa;CAAM;AACpC;AAEA,SAAgB,WACd,UAC4E;CAC5E,MAAM,qBAAkD,CAAC;CACzD,KAAK,MAAM,CAAC,GAAG,QAAQ,OAAO,QAAQ,QAAQ,GAAG,mBAAmB,KAAK,kBAAkB,GAAG;CAC9F,OAAO;EACL,MAAM;EACN,UAAU;CACZ;AACF;AAEA,SAAgB,UACd,GAAG,UACwE;CAC3E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ACN;EACA,QAAQ,kBAAkB,MAAM;CAClC;AACF;AAEA,SAAgB,uBAA0B;CACxC,OAAO,SACL,QACA,OACgE;EAChE,OAAO;GACL,MAAM;GACN;GACA,QAAQ,kBAAkB,MAAM;EAClC;CACF;AACF;AAEA,SAAgB,yBACd,QACiE;CACjE,OAAO;EACL,MAAM;EACN,QAAQ,kBAAkB,MAAM;CAClC;AACF;AAEA,SAAgB,uBACd,QAC+D;CAC/D,OAAO;EACL,MAAM;EACN,QAAQ,kBAAkB,MAAM;CAClC;AACF;AAMA,SAAgB,wBACd,QACA,QACgE;CAChE,OAAO;EACL,MAAM;EACN;EACA,QAAQ,kBAAkB,MAAM;CAClC;AACF;AAMA,SAAgB,kBACd,QACuD;CACvD,OAAO;EACL,MAAM;EACN,QAAQ,kBAAkB,MAAM;CAClC;AACF;AAMA,SAAgB,YACd,QACA,OACoD;CACpD,OAAO;EACL,MAAM;EACN,QAAQ,kBAAkB,MAAM;EAChC;CACF;AACF;AAEA,SAAgB,eACd,QACA,iBACuD;CACvD,OAAO;EACL,MAAM;EACN,QAAQ,kBAAkB,MAAM;EAChC;CACF;AACF;AAEA,SAAgB,uBACd,QACA,iBAC+D;CAC/D,OAAO;EACL,MAAM;EACN,QAAQ,kBAAkB,MAAM;EAChC;CACF;AACF;AAEA,SAAgB,aACd,QACqD;CACrD,OAAO;EACL,MAAM;EACN,QAAQ,kBAAkB,MAAM;CAClC;AACF"}
|
package/dist/config/actions.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { ExtractAction, POCExtractAction, PrimitiveOrConfig, TypedConfig } from "./type_engine.js";
|
|
2
|
-
import { CheckedSyncConf } from "./type_util.js";
|
|
3
|
-
import { ActAnd, ActExtractArchiveAndGetURL, ActFlatten, ActGetBlobContent, ActGetBlobContentAsJson, ActGetBlobContentAsString, ActGetDownloadedBlobContent, ActGetField, ActGetFromCtx, ActGetImmediate, ActGetLastLogs, ActGetLogHandle, ActGetOnDemandBlobContent, ActGetProgressLog, ActGetProgressLogWithInfo, ActGetResourceField, ActGetResourceValueAsJson, ActImportProgress, ActIsEmpty, ActIsolate, ActMakeArray, ActMakeObject, ActMapArrayValues, ActMapRecordValues, ActMapResourceFields, ActNot, ActOr } from "./actions_kinds.js";
|
|
4
|
-
import { ArchiveFormat, RangeBytes } from "@milaboratories/pl-model-common";
|
|
5
|
-
|
|
6
|
-
//#region src/config/actions.d.ts
|
|
7
|
-
declare function getFromCfg<const V extends string>(variable: V): TypedConfig<ActGetFromCtx<V>>;
|
|
8
|
-
declare function isolate<const Config extends TypedConfig>(cfg: Config): TypedConfig<ActIsolate<ExtractAction<Config>>>;
|
|
9
|
-
declare const Args: TypedConfig<ActGetFromCtx<"$args">>;
|
|
10
|
-
declare const It: TypedConfig<ActGetFromCtx<"$it">>;
|
|
11
|
-
declare const MainOutputs: TypedConfig<ActGetFromCtx<"$prod">>;
|
|
12
|
-
declare const StagingOutputs: TypedConfig<ActGetFromCtx<"$staging">>;
|
|
13
|
-
declare const UiState: TypedConfig<ActGetFromCtx<"$ui">>;
|
|
14
|
-
declare function getImmediate<const T>(value: T): TypedConfig<ActGetImmediate<T>>;
|
|
15
|
-
declare function makeObject<const T extends Record<string, PrimitiveOrConfig>>(template: T): TypedConfig<ActMakeObject<{ [Key in keyof T]: POCExtractAction<T[Key]> }>>;
|
|
16
|
-
declare function makeArray<const T extends PrimitiveOrConfig[]>(...template: T): TypedConfig<ActMakeArray<{ [Key in keyof T]: POCExtractAction<T[Key]> }>>;
|
|
17
|
-
declare function getJsonField<const Source extends PrimitiveOrConfig, const Field extends PrimitiveOrConfig>(source: Source, field: Field): TypedConfig<ActGetField<POCExtractAction<Source>, POCExtractAction<Field>>>;
|
|
18
|
-
declare function mapRecordValues<const Source extends TypedConfig, const Mapping extends TypedConfig>(source: Source & CheckedSyncConf<Source>, mapping: Mapping): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, "$it">>;
|
|
19
|
-
declare function mapRecordValues<const Source extends TypedConfig, const Mapping extends TypedConfig>(source: Source, mapping: Mapping & CheckedSyncConf<Mapping>): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, "$it">>;
|
|
20
|
-
declare function mapRecordValues<const Source extends TypedConfig, const Mapping extends TypedConfig, const ItVar extends string>(source: Source & CheckedSyncConf<Source>, mapping: Mapping, itVar: ItVar): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;
|
|
21
|
-
declare function mapRecordValues<const Source extends TypedConfig, const Mapping extends TypedConfig, const ItVar extends string>(source: Source, mapping: Mapping & CheckedSyncConf<Mapping>, itVar: ItVar): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;
|
|
22
|
-
declare function mapArrayValues<const Source extends TypedConfig, const Mapping extends TypedConfig>(source: Source & CheckedSyncConf<Source>, mapping: Mapping): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, "$it">>;
|
|
23
|
-
declare function mapArrayValues<const Source extends TypedConfig, const Mapping extends TypedConfig>(source: Source, mapping: Mapping & CheckedSyncConf<Mapping>): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, "$it">>;
|
|
24
|
-
declare function mapArrayValues<const Source extends TypedConfig, const Mapping extends TypedConfig, const ItVar extends string>(source: Source & CheckedSyncConf<Source>, mapping: Mapping, itVar: ItVar): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;
|
|
25
|
-
declare function mapArrayValues<const Source extends TypedConfig, const Mapping extends TypedConfig, const ItVar extends string>(source: Source, mapping: Mapping & CheckedSyncConf<Mapping>, itVar: ItVar): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;
|
|
26
|
-
declare function flatten<const Source extends TypedConfig>(source: Source): TypedConfig<ActFlatten<ExtractAction<Source>>>;
|
|
27
|
-
declare function isEmpty<const Arg extends TypedConfig>(arg: Arg): TypedConfig<ActIsEmpty<ExtractAction<Arg>>>;
|
|
28
|
-
declare function not<const Operand extends TypedConfig>(operand: Operand): TypedConfig<ActNot<ExtractAction<Operand>>>;
|
|
29
|
-
declare function and<const Operand1 extends TypedConfig, const Operand2 extends TypedConfig>(operand1: Operand1, operand2: Operand2): TypedConfig<ActAnd<ExtractAction<Operand1>, ExtractAction<Operand2>>>;
|
|
30
|
-
declare function or<const Operand1 extends TypedConfig, const Operand2 extends TypedConfig>(operand1: Operand1, operand2: Operand2): TypedConfig<ActOr<ExtractAction<Operand1>, ExtractAction<Operand2>>>;
|
|
31
|
-
declare function getResourceField<const Source extends PrimitiveOrConfig, const Field extends PrimitiveOrConfig>(source: Source, field: Field): TypedConfig<ActGetResourceField<POCExtractAction<Source>, POCExtractAction<Field>>>;
|
|
32
|
-
declare function getResourceValueAsJson<T>(): <const Source extends PrimitiveOrConfig>(source: Source) => TypedConfig<ActGetResourceValueAsJson<POCExtractAction<Source>, T>>;
|
|
33
|
-
declare function mapResourceFields<const Source extends TypedConfig, const Mapping extends TypedConfig>(source: Source, mapping: Mapping): TypedConfig<ActMapResourceFields<ExtractAction<Source>, ExtractAction<Mapping>, "$it">>;
|
|
34
|
-
declare function mapResourceFields<const Source extends TypedConfig, const Mapping extends TypedConfig, const ItVar extends string>(source: Source, mapping: Mapping, itVar: ItVar): TypedConfig<ActMapResourceFields<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;
|
|
35
|
-
declare function getBlobContent<const Source extends TypedConfig>(source: Source, range?: RangeBytes): TypedConfig<ActGetBlobContent<ExtractAction<Source>>>;
|
|
36
|
-
declare function getBlobContentAsString<const Source extends TypedConfig>(source: Source, range?: RangeBytes): TypedConfig<ActGetBlobContentAsString<ExtractAction<Source>>>;
|
|
37
|
-
declare function getBlobContentAsJson<T>(): <const Source extends TypedConfig>(source: Source, range?: RangeBytes) => TypedConfig<ActGetBlobContentAsJson<ExtractAction<Source>, T>>;
|
|
38
|
-
declare function getDownloadedBlobContent<const Source extends TypedConfig>(source: Source): TypedConfig<ActGetDownloadedBlobContent<ExtractAction<Source>>>;
|
|
39
|
-
declare function getOnDemandBlobContent<const Source extends TypedConfig>(source: Source): TypedConfig<ActGetOnDemandBlobContent<ExtractAction<Source>>>;
|
|
40
|
-
declare function extractArchiveAndGetURL<const Source extends TypedConfig>(source: Source, format: ArchiveFormat): TypedConfig<ActExtractArchiveAndGetURL<ExtractAction<Source>>>;
|
|
41
|
-
declare function getImportProgress<const Source extends TypedConfig>(source: Source): TypedConfig<ActImportProgress<ExtractAction<Source>>>;
|
|
42
|
-
declare function getLastLogs<const Source extends TypedConfig>(source: Source, lines: number): TypedConfig<ActGetLastLogs<ExtractAction<Source>>>;
|
|
43
|
-
declare function getProgressLog<const Source extends TypedConfig>(source: Source, patternToSearch: string): TypedConfig<ActGetProgressLog<ExtractAction<Source>>>;
|
|
44
|
-
declare function getProgressLogWithInfo<const Source extends TypedConfig>(source: Source, patternToSearch: string): TypedConfig<ActGetProgressLogWithInfo<ExtractAction<Source>>>;
|
|
45
|
-
declare function getLogHandle<const Source extends TypedConfig>(source: Source): TypedConfig<ActGetLogHandle<ExtractAction<Source>>>;
|
|
46
|
-
//#endregion
|
|
47
|
-
export { Args, It, MainOutputs, StagingOutputs, UiState, and, extractArchiveAndGetURL, flatten, getBlobContent, getBlobContentAsJson, getBlobContentAsString, getDownloadedBlobContent, getFromCfg, getImmediate, getImportProgress, getJsonField, getLastLogs, getLogHandle, getOnDemandBlobContent, getProgressLog, getProgressLogWithInfo, getResourceField, getResourceValueAsJson, isEmpty, isolate, makeArray, makeObject, mapArrayValues, mapRecordValues, mapResourceFields, not, or };
|
|
48
|
-
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","names":[],"sources":["../../src/config/actions.ts"],"mappings":";;;;;;iBA0DgB,UAAA,yBAAmC,QAAA,EAAU,CAAA,GAAI,WAAA,CAAY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AA,sBAAoC,WAAA,EAClD,MAAA,EAAQ,MAAA,EACR,eAAA,WACC,WAAA,CAAY,iBAAA,CAAkB,aAAA,CAAc,MAAA;AAAA,iBAQ/B,sBAAA,sBAA4C,WAAA,EAC1D,MAAA,EAAQ,MAAA,EACR,eAAA,WACC,WAAA,CAAY,yBAAA,CAA0B,aAAA,CAAc,MAAA;AAAA,iBAQvC,YAAA,sBAAkC,WAAA,EAChD,MAAA,EAAQ,MAAA,GACP,WAAA,CAAY,eAAA,CAAgB,aAAA,CAAc,MAAA"}
|
package/dist/config/actions.js
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
//#region src/config/actions.ts
|
|
2
|
-
function primitiveToConfig(value) {
|
|
3
|
-
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || value === null) return getImmediate(value);
|
|
4
|
-
else return value;
|
|
5
|
-
}
|
|
6
|
-
function getFromCfg(variable) {
|
|
7
|
-
return {
|
|
8
|
-
type: "GetFromCtx",
|
|
9
|
-
variable
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
function isolate(cfg) {
|
|
13
|
-
return {
|
|
14
|
-
type: "Isolate",
|
|
15
|
-
cfg
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
const Args = getFromCfg("$args");
|
|
19
|
-
const It = getFromCfg("$it");
|
|
20
|
-
const MainOutputs = getFromCfg("$prod");
|
|
21
|
-
const StagingOutputs = getFromCfg("$staging");
|
|
22
|
-
const UiState = getFromCfg("$ui");
|
|
23
|
-
function getImmediate(value) {
|
|
24
|
-
return {
|
|
25
|
-
type: "Immediate",
|
|
26
|
-
value
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
function makeObject(template) {
|
|
30
|
-
const normalizedTemplate = {};
|
|
31
|
-
for (const [k, cfg] of Object.entries(template)) normalizedTemplate[k] = primitiveToConfig(cfg);
|
|
32
|
-
return {
|
|
33
|
-
type: "MakeObject",
|
|
34
|
-
template: normalizedTemplate
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
function makeArray(...template) {
|
|
38
|
-
const normalizedTemplate = [];
|
|
39
|
-
for (const cfg of template) normalizedTemplate.push(primitiveToConfig(cfg));
|
|
40
|
-
return {
|
|
41
|
-
type: "MakeArray",
|
|
42
|
-
template: normalizedTemplate
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
function getJsonField(source, field) {
|
|
46
|
-
return {
|
|
47
|
-
type: "GetJsonField",
|
|
48
|
-
source: primitiveToConfig(source),
|
|
49
|
-
field: primitiveToConfig(field)
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
function mapRecordValues(source, mapping, itVar = "$it") {
|
|
53
|
-
return {
|
|
54
|
-
type: "MapRecordValues",
|
|
55
|
-
source,
|
|
56
|
-
mapping,
|
|
57
|
-
itVar
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
function mapArrayValues(source, mapping, itVar = "$it") {
|
|
61
|
-
return {
|
|
62
|
-
type: "MapArrayValues",
|
|
63
|
-
source,
|
|
64
|
-
mapping,
|
|
65
|
-
itVar
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
function flatten(source) {
|
|
69
|
-
return {
|
|
70
|
-
type: "Flatten",
|
|
71
|
-
source
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
function isEmpty(arg) {
|
|
75
|
-
return {
|
|
76
|
-
type: "IsEmpty",
|
|
77
|
-
arg
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
function not(operand) {
|
|
81
|
-
return {
|
|
82
|
-
type: "Not",
|
|
83
|
-
operand
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
function and(operand1, operand2) {
|
|
87
|
-
return {
|
|
88
|
-
type: "And",
|
|
89
|
-
operand1,
|
|
90
|
-
operand2
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
function or(operand1, operand2) {
|
|
94
|
-
return {
|
|
95
|
-
type: "Or",
|
|
96
|
-
operand1,
|
|
97
|
-
operand2
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
function getResourceField(source, field) {
|
|
101
|
-
return {
|
|
102
|
-
type: "GetResourceField",
|
|
103
|
-
source: primitiveToConfig(source),
|
|
104
|
-
field: primitiveToConfig(field)
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
function getResourceValueAsJson() {
|
|
108
|
-
return function(source) {
|
|
109
|
-
return {
|
|
110
|
-
type: "GetResourceValueAsJson",
|
|
111
|
-
source: primitiveToConfig(source)
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
function mapResourceFields(source, mapping, itVar = "$it") {
|
|
116
|
-
return {
|
|
117
|
-
type: "MapResourceFields",
|
|
118
|
-
source,
|
|
119
|
-
mapping,
|
|
120
|
-
itVar
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
function getBlobContent(source, range) {
|
|
124
|
-
return {
|
|
125
|
-
type: "GetBlobContent",
|
|
126
|
-
range,
|
|
127
|
-
source: primitiveToConfig(source)
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
function getBlobContentAsString(source, range) {
|
|
131
|
-
return {
|
|
132
|
-
type: "GetBlobContentAsString",
|
|
133
|
-
range,
|
|
134
|
-
source: primitiveToConfig(source)
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
function getBlobContentAsJson() {
|
|
138
|
-
return function(source, range) {
|
|
139
|
-
return {
|
|
140
|
-
type: "GetBlobContentAsJson",
|
|
141
|
-
range,
|
|
142
|
-
source: primitiveToConfig(source)
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
function getDownloadedBlobContent(source) {
|
|
147
|
-
return {
|
|
148
|
-
type: "GetDownloadedBlobContent",
|
|
149
|
-
source: primitiveToConfig(source)
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
function getOnDemandBlobContent(source) {
|
|
153
|
-
return {
|
|
154
|
-
type: "GetOnDemandBlobContent",
|
|
155
|
-
source: primitiveToConfig(source)
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
function extractArchiveAndGetURL(source, format) {
|
|
159
|
-
return {
|
|
160
|
-
type: "ExtractArchiveAndGetURL",
|
|
161
|
-
format,
|
|
162
|
-
source: primitiveToConfig(source)
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
function getImportProgress(source) {
|
|
166
|
-
return {
|
|
167
|
-
type: "GetImportProgress",
|
|
168
|
-
source: primitiveToConfig(source)
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
function getLastLogs(source, lines) {
|
|
172
|
-
return {
|
|
173
|
-
type: "GetLastLogs",
|
|
174
|
-
source: primitiveToConfig(source),
|
|
175
|
-
lines
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
function getProgressLog(source, patternToSearch) {
|
|
179
|
-
return {
|
|
180
|
-
type: "GetProgressLog",
|
|
181
|
-
source: primitiveToConfig(source),
|
|
182
|
-
patternToSearch
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
function getProgressLogWithInfo(source, patternToSearch) {
|
|
186
|
-
return {
|
|
187
|
-
type: "GetProgressLogWithInfo",
|
|
188
|
-
source: primitiveToConfig(source),
|
|
189
|
-
patternToSearch
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
function getLogHandle(source) {
|
|
193
|
-
return {
|
|
194
|
-
type: "GetLogHandle",
|
|
195
|
-
source: primitiveToConfig(source)
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
//#endregion
|
|
199
|
-
export { Args, It, MainOutputs, StagingOutputs, UiState, and, extractArchiveAndGetURL, flatten, getBlobContent, getBlobContentAsJson, getBlobContentAsString, getDownloadedBlobContent, getFromCfg, getImmediate, getImportProgress, getJsonField, getLastLogs, getLogHandle, getOnDemandBlobContent, getProgressLog, getProgressLogWithInfo, getResourceField, getResourceValueAsJson, isEmpty, isolate, makeArray, makeObject, mapArrayValues, mapRecordValues, mapResourceFields, not, or };
|
|
200
|
-
|
|
201
|
-
//# sourceMappingURL=actions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","names":[],"sources":["../../src/config/actions.ts"],"sourcesContent":["import type {\n ActGetField,\n ActGetFromCtx,\n ActGetImmediate,\n ActGetResourceField,\n ActGetResourceValueAsJson,\n ActMakeObject,\n ActMapRecordValues,\n ActMapResourceFields,\n ActMapArrayValues,\n ActIsEmpty,\n ActNot,\n ActIsolate,\n ActGetBlobContentAsJson,\n ActGetBlobContentAsString,\n ActGetBlobContent,\n ActAnd,\n ActOr,\n ActMakeArray,\n ActFlatten,\n ActGetDownloadedBlobContent,\n ActGetOnDemandBlobContent,\n ActImportProgress,\n ActGetLastLogs,\n ActGetProgressLog,\n ActGetProgressLogWithInfo,\n ActGetLogHandle,\n ActExtractArchiveAndGetURL,\n} from \"./actions_kinds\";\nimport type {\n ExtractAction,\n POCExtractAction,\n PrimitiveOrConfig,\n TypedConfig,\n} from \"./type_engine\";\nimport type { Cfg } from \"./model\";\nimport type { CheckedSyncConf } from \"./type_util\";\nimport type { ArchiveFormat, RangeBytes } from \"@milaboratories/pl-model-common\";\n\n//\n// Helpers\n//\n\nfunction primitiveToConfig(value: PrimitiveOrConfig): TypedConfig {\n if (\n typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\" ||\n value === null\n )\n return getImmediate(value);\n else return value as TypedConfig;\n}\n\n//\n// Context\n//\n\nexport function getFromCfg<const V extends string>(variable: V): TypedConfig<ActGetFromCtx<V>> {\n return { type: \"GetFromCtx\", variable } as Cfg as any;\n}\n\n//\n// Isolate\n//\n\nexport function isolate<const Config extends TypedConfig>(\n cfg: Config,\n): TypedConfig<ActIsolate<ExtractAction<Config>>> {\n return {\n type: \"Isolate\",\n cfg,\n } as Cfg as any;\n}\n\n//\n// Well-known Context Vars\n//\n\nexport const Args = getFromCfg(\"$args\");\nexport const It = getFromCfg(\"$it\");\nexport const MainOutputs = getFromCfg(\"$prod\");\nexport const StagingOutputs = getFromCfg(\"$staging\");\nexport const UiState = getFromCfg(\"$ui\");\n\n//\n// Json\n//\n\nexport function getImmediate<const T>(value: T): TypedConfig<ActGetImmediate<T>> {\n return { type: \"Immediate\", value } as Cfg as any;\n}\n\nexport function makeObject<const T extends Record<string, PrimitiveOrConfig>>(\n template: T,\n): TypedConfig<ActMakeObject<{ [Key in keyof T]: POCExtractAction<T[Key]> }>> {\n const normalizedTemplate: Record<string, TypedConfig> = {};\n for (const [k, cfg] of Object.entries(template)) normalizedTemplate[k] = primitiveToConfig(cfg);\n return {\n type: \"MakeObject\",\n template: normalizedTemplate,\n } as Cfg as any;\n}\n\nexport function makeArray<const T extends PrimitiveOrConfig[]>(\n ...template: T\n): TypedConfig<ActMakeArray<{ [Key in keyof T]: POCExtractAction<T[Key]> }>> {\n const normalizedTemplate: TypedConfig[] = [];\n for (const cfg of template) normalizedTemplate.push(primitiveToConfig(cfg));\n return {\n type: \"MakeArray\",\n template: normalizedTemplate,\n } as Cfg as any;\n}\n\nexport function getJsonField<\n const Source extends PrimitiveOrConfig,\n const Field extends PrimitiveOrConfig,\n>(\n source: Source,\n field: Field,\n): TypedConfig<ActGetField<POCExtractAction<Source>, POCExtractAction<Field>>> {\n return {\n type: \"GetJsonField\",\n source: primitiveToConfig(source),\n field: primitiveToConfig(field),\n } as Cfg as any;\n}\n\nexport function mapRecordValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n>(\n source: Source & CheckedSyncConf<Source>,\n mapping: Mapping,\n): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, \"$it\">>;\nexport function mapRecordValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n>(\n source: Source,\n mapping: Mapping & CheckedSyncConf<Mapping>,\n): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, \"$it\">>;\nexport function mapRecordValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source & CheckedSyncConf<Source>,\n mapping: Mapping,\n itVar: ItVar,\n): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;\nexport function mapRecordValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping & CheckedSyncConf<Mapping>,\n itVar: ItVar,\n): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;\nexport function mapRecordValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping,\n itVar: ItVar = \"$it\" as ItVar,\n): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>> {\n return {\n type: \"MapRecordValues\",\n source,\n mapping,\n itVar,\n } as Cfg as any;\n}\n\nexport function mapArrayValues<const Source extends TypedConfig, const Mapping extends TypedConfig>(\n source: Source & CheckedSyncConf<Source>,\n mapping: Mapping,\n): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, \"$it\">>;\nexport function mapArrayValues<const Source extends TypedConfig, const Mapping extends TypedConfig>(\n source: Source,\n mapping: Mapping & CheckedSyncConf<Mapping>,\n): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, \"$it\">>;\nexport function mapArrayValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source & CheckedSyncConf<Source>,\n mapping: Mapping,\n itVar: ItVar,\n): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;\nexport function mapArrayValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping & CheckedSyncConf<Mapping>,\n itVar: ItVar,\n): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;\nexport function mapArrayValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping,\n itVar: ItVar = \"$it\" as ItVar,\n): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>> {\n return {\n type: \"MapArrayValues\",\n source,\n mapping,\n itVar,\n } as Cfg as any;\n}\n\nexport function flatten<const Source extends TypedConfig>(\n source: Source,\n): TypedConfig<ActFlatten<ExtractAction<Source>>> {\n return {\n type: \"Flatten\",\n source,\n } as Cfg as any;\n}\n\n//\n// Boolean\n//\n\nexport function isEmpty<const Arg extends TypedConfig>(\n arg: Arg,\n): TypedConfig<ActIsEmpty<ExtractAction<Arg>>> {\n return {\n type: \"IsEmpty\",\n arg,\n } as Cfg as any;\n}\n\nexport function not<const Operand extends TypedConfig>(\n operand: Operand,\n): TypedConfig<ActNot<ExtractAction<Operand>>> {\n return {\n type: \"Not\",\n operand,\n } as Cfg as any;\n}\n\nexport function and<const Operand1 extends TypedConfig, const Operand2 extends TypedConfig>(\n operand1: Operand1,\n operand2: Operand2,\n): TypedConfig<ActAnd<ExtractAction<Operand1>, ExtractAction<Operand2>>> {\n return {\n type: \"And\",\n operand1,\n operand2,\n } as Cfg as any;\n}\n\nexport function or<const Operand1 extends TypedConfig, const Operand2 extends TypedConfig>(\n operand1: Operand1,\n operand2: Operand2,\n): TypedConfig<ActOr<ExtractAction<Operand1>, ExtractAction<Operand2>>> {\n return {\n type: \"Or\",\n operand1,\n operand2,\n } as Cfg as any;\n}\n\n//\n// Resources\n//\n\nexport function getResourceField<\n const Source extends PrimitiveOrConfig,\n const Field extends PrimitiveOrConfig,\n>(\n source: Source,\n field: Field,\n): TypedConfig<ActGetResourceField<POCExtractAction<Source>, POCExtractAction<Field>>> {\n return {\n type: \"GetResourceField\",\n source: primitiveToConfig(source),\n field: primitiveToConfig(field),\n } as Cfg as any;\n}\n\nexport function getResourceValueAsJson<T>() {\n return function <const Source extends PrimitiveOrConfig>(\n source: Source,\n ): TypedConfig<ActGetResourceValueAsJson<POCExtractAction<Source>, T>> {\n return {\n type: \"GetResourceValueAsJson\",\n source: primitiveToConfig(source),\n } as Cfg as any;\n };\n}\n\nexport function mapResourceFields<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n>(\n source: Source,\n mapping: Mapping,\n): TypedConfig<ActMapResourceFields<ExtractAction<Source>, ExtractAction<Mapping>, \"$it\">>;\nexport function mapResourceFields<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping,\n itVar: ItVar,\n): TypedConfig<ActMapResourceFields<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;\nexport function mapResourceFields<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping,\n itVar: ItVar = \"$it\" as ItVar,\n): TypedConfig<ActMapResourceFields<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>> {\n return {\n type: \"MapResourceFields\",\n source,\n mapping,\n itVar,\n } as Cfg as TypedConfig<\n ActMapResourceFields<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>\n >;\n}\n\n//\n// Download Blobs\n//\n\nexport function getBlobContent<const Source extends TypedConfig>(\n source: Source,\n range?: RangeBytes,\n): TypedConfig<ActGetBlobContent<ExtractAction<Source>>> {\n return {\n type: \"GetBlobContent\",\n range,\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\nexport function getBlobContentAsString<const Source extends TypedConfig>(\n source: Source,\n range?: RangeBytes,\n): TypedConfig<ActGetBlobContentAsString<ExtractAction<Source>>> {\n return {\n type: \"GetBlobContentAsString\",\n range,\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\nexport function getBlobContentAsJson<T>() {\n return function <const Source extends TypedConfig>(\n source: Source,\n range?: RangeBytes,\n ): TypedConfig<ActGetBlobContentAsJson<ExtractAction<Source>, T>> {\n return {\n type: \"GetBlobContentAsJson\",\n range,\n source: primitiveToConfig(source),\n } as Cfg as any;\n };\n}\n\nexport function getDownloadedBlobContent<const Source extends TypedConfig>(\n source: Source,\n): TypedConfig<ActGetDownloadedBlobContent<ExtractAction<Source>>> {\n return {\n type: \"GetDownloadedBlobContent\",\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\nexport function getOnDemandBlobContent<const Source extends TypedConfig>(\n source: Source,\n): TypedConfig<ActGetOnDemandBlobContent<ExtractAction<Source>>> {\n return {\n type: \"GetOnDemandBlobContent\",\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\n//\n// Download Blobs to URLs\n//\n\nexport function extractArchiveAndGetURL<const Source extends TypedConfig>(\n source: Source,\n format: ArchiveFormat,\n): TypedConfig<ActExtractArchiveAndGetURL<ExtractAction<Source>>> {\n return {\n type: \"ExtractArchiveAndGetURL\",\n format,\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\n//\n// Upload Blobs\n//\n\nexport function getImportProgress<const Source extends TypedConfig>(\n source: Source,\n): TypedConfig<ActImportProgress<ExtractAction<Source>>> {\n return {\n type: \"GetImportProgress\",\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\n//\n// Logs\n//\n\nexport function getLastLogs<const Source extends TypedConfig>(\n source: Source,\n lines: number,\n): TypedConfig<ActGetLastLogs<ExtractAction<Source>>> {\n return {\n type: \"GetLastLogs\",\n source: primitiveToConfig(source),\n lines,\n } as Cfg as any;\n}\n\nexport function getProgressLog<const Source extends TypedConfig>(\n source: Source,\n patternToSearch: string,\n): TypedConfig<ActGetProgressLog<ExtractAction<Source>>> {\n return {\n type: \"GetProgressLog\",\n source: primitiveToConfig(source),\n patternToSearch,\n } as Cfg as any;\n}\n\nexport function getProgressLogWithInfo<const Source extends TypedConfig>(\n source: Source,\n patternToSearch: string,\n): TypedConfig<ActGetProgressLogWithInfo<ExtractAction<Source>>> {\n return {\n type: \"GetProgressLogWithInfo\",\n source: primitiveToConfig(source),\n patternToSearch,\n } as Cfg as any;\n}\n\nexport function getLogHandle<const Source extends TypedConfig>(\n source: Source,\n): TypedConfig<ActGetLogHandle<ExtractAction<Source>>> {\n return {\n type: \"GetLogHandle\",\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n"],"mappings":";AA2CA,SAAS,kBAAkB,OAAuC;CAChE,IACE,OAAO,UAAU,YACjB,OAAO,UAAU,YACjB,OAAO,UAAU,aACjB,UAAU,MAEV,OAAO,aAAa,KAAK;MACtB,OAAO;AACd;AAMA,SAAgB,WAAmC,UAA4C;CAC7F,OAAO;EAAE,MAAM;EAAc;CAAS;AACxC;AAMA,SAAgB,QACd,KACgD;CAChD,OAAO;EACL,MAAM;EACN;CACF;AACF;AAMA,MAAa,OAAO,WAAW,OAAO;AACtC,MAAa,KAAK,WAAW,KAAK;AAClC,MAAa,cAAc,WAAW,OAAO;AAC7C,MAAa,iBAAiB,WAAW,UAAU;AACnD,MAAa,UAAU,WAAW,KAAK;AAMvC,SAAgB,aAAsB,OAA2C;CAC/E,OAAO;EAAE,MAAM;EAAa;CAAM;AACpC;AAEA,SAAgB,WACd,UAC4E;CAC5E,MAAM,qBAAkD,CAAC;CACzD,KAAK,MAAM,CAAC,GAAG,QAAQ,OAAO,QAAQ,QAAQ,GAAG,mBAAmB,KAAK,kBAAkB,GAAG;CAC9F,OAAO;EACL,MAAM;EACN,UAAU;CACZ;AACF;AAEA,SAAgB,UACd,GAAG,UACwE;CAC3E,MAAM,qBAAoC,CAAC;CAC3C,KAAK,MAAM,OAAO,UAAU,mBAAmB,KAAK,kBAAkB,GAAG,CAAC;CAC1E,OAAO;EACL,MAAM;EACN,UAAU;CACZ;AACF;AAEA,SAAgB,aAId,QACA,OAC6E;CAC7E,OAAO;EACL,MAAM;EACN,QAAQ,kBAAkB,MAAM;EAChC,OAAO,kBAAkB,KAAK;CAChC;AACF;AAkCA,SAAgB,gBAKd,QACA,SACA,QAAe,OACwE;CACvF,OAAO;EACL,MAAM;EACN;EACA;EACA;CACF;AACF;AA4BA,SAAgB,eAKd,QACA,SACA,QAAe,OACuE;CACtF,OAAO;EACL,MAAM;EACN;EACA;EACA;CACF;AACF;AAEA,SAAgB,QACd,QACgD;CAChD,OAAO;EACL,MAAM;EACN;CACF;AACF;AAMA,SAAgB,QACd,KAC6C;CAC7C,OAAO;EACL,MAAM;EACN;CACF;AACF;AAEA,SAAgB,IACd,SAC6C;CAC7C,OAAO;EACL,MAAM;EACN;CACF;AACF;AAEA,SAAgB,IACd,UACA,UACuE;CACvE,OAAO;EACL,MAAM;EACN;EACA;CACF;AACF;AAEA,SAAgB,GACd,UACA,UACsE;CACtE,OAAO;EACL,MAAM;EACN;EACA;CACF;AACF;AAMA,SAAgB,iBAId,QACA,OACqF;CACrF,OAAO;EACL,MAAM;EACN,QAAQ,kBAAkB,MAAM;EAChC,OAAO,kBAAkB,KAAK;CAChC;AACF;AAEA,SAAgB,yBAA4B;CAC1C,OAAO,SACL,QACqE;EACrE,OAAO;GACL,MAAM;GACN,QAAQ,kBAAkB,MAAM;EAClC;CACF;AACF;AAkBA,SAAgB,kBAKd,QACA,SACA,QAAe,OAC0E;CACzF,OAAO;EACL,MAAM;EACN;EACA;EACA;CACF;AAGF;AAMA,SAAgB,eACd,QACA,OACuD;CACvD,OAAO;EACL,MAAM;EACN;EACA,QAAQ,kBAAkB,MAAM;CAClC;AACF;AAEA,SAAgB,uBACd,QACA,OAC+D;CAC/D,OAAO;EACL,MAAM;EACN;EACA,QAAQ,kBAAkB,MAAM;CAClC;AACF;AAEA,SAAgB,uBAA0B;CACxC,OAAO,SACL,QACA,OACgE;EAChE,OAAO;GACL,MAAM;GACN;GACA,QAAQ,kBAAkB,MAAM;EAClC;CACF;AACF;AAEA,SAAgB,yBACd,QACiE;CACjE,OAAO;EACL,MAAM;EACN,QAAQ,kBAAkB,MAAM;CAClC;AACF;AAEA,SAAgB,uBACd,QAC+D;CAC/D,OAAO;EACL,MAAM;EACN,QAAQ,kBAAkB,MAAM;CAClC;AACF;AAMA,SAAgB,wBACd,QACA,QACgE;CAChE,OAAO;EACL,MAAM;EACN;EACA,QAAQ,kBAAkB,MAAM;CAClC;AACF;AAMA,SAAgB,kBACd,QACuD;CACvD,OAAO;EACL,MAAM;EACN,QAAQ,kBAAkB,MAAM;CAClC;AACF;AAMA,SAAgB,YACd,QACA,OACoD;CACpD,OAAO;EACL,MAAM;EACN,QAAQ,kBAAkB,MAAM;EAChC;CACF;AACF;AAEA,SAAgB,eACd,QACA,iBACuD;CACvD,OAAO;EACL,MAAM;EACN,QAAQ,kBAAkB,MAAM;EAChC;CACF;AACF;AAEA,SAAgB,uBACd,QACA,iBAC+D;CAC/D,OAAO;EACL,MAAM;EACN,QAAQ,kBAAkB,MAAM;EAChC;CACF;AACF;AAEA,SAAgB,aACd,QACqD;CACrD,OAAO;EACL,MAAM;EACN,QAAQ,kBAAkB,MAAM;CAClC;AACF"}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { ActionResult, ConfAction, InferVarTypeSafe, PlResourceEntry } from "./type_engine.js";
|
|
2
|
-
import { And, IsA, SyncConfAction } from "./type_util.js";
|
|
3
|
-
import { AnyLogHandle, FolderURL, ImportProgress, LocalBlobHandleAndSize, RemoteBlobHandleAndSize } from "@milaboratories/pl-model-common";
|
|
4
|
-
|
|
5
|
-
//#region src/config/actions_kinds.d.ts
|
|
6
|
-
interface ActGetFromCtx<V extends string> extends ConfAction {
|
|
7
|
-
new: (x: this["ctx"]) => InferVarTypeSafe<typeof x, V>;
|
|
8
|
-
isSync: true;
|
|
9
|
-
}
|
|
10
|
-
interface ActIsolate<Nested extends ConfAction> extends ConfAction {
|
|
11
|
-
new: (x: this["ctx"]) => ActionResult<Nested, typeof x>;
|
|
12
|
-
isSync: false;
|
|
13
|
-
}
|
|
14
|
-
interface ActGetImmediate<T> extends ConfAction {
|
|
15
|
-
new: () => T;
|
|
16
|
-
isSync: true;
|
|
17
|
-
}
|
|
18
|
-
interface ActMakeObject<T extends Record<string, ConfAction>> extends ConfAction {
|
|
19
|
-
new: (x: this["ctx"]) => { [Key in keyof T]: ActionResult<T[Key], typeof x> };
|
|
20
|
-
isSync: IsA<T, Record<string, SyncConfAction>>;
|
|
21
|
-
}
|
|
22
|
-
interface ActMakeArray<T extends ConfAction[]> extends ConfAction {
|
|
23
|
-
new: (x: this["ctx"]) => { [Key in keyof T]: ActionResult<T[Key], typeof x> };
|
|
24
|
-
isSync: IsA<T, SyncConfAction[]>;
|
|
25
|
-
}
|
|
26
|
-
interface ActGetField<Source extends ConfAction, Field extends ConfAction> extends ConfAction {
|
|
27
|
-
new: (x: this["ctx"]) => InferVarTypeSafe<ActionResult<Source, typeof x>, ActionResult<Field, typeof x>>;
|
|
28
|
-
isSync: true;
|
|
29
|
-
}
|
|
30
|
-
interface ActMapRecordValues<Source extends ConfAction, Mapping extends ConfAction, ItVar extends string> extends ConfAction {
|
|
31
|
-
new: (x: this["ctx"]) => ActionResult<Source, typeof x> extends Record<string, infer V> ? Record<string, ActionResult<Mapping, typeof x & { [K in ItVar]: V }>> : unknown;
|
|
32
|
-
isSync: And<IsA<Source, SyncConfAction>, IsA<Mapping, SyncConfAction>>;
|
|
33
|
-
}
|
|
34
|
-
interface ActMapArrayValues<Source extends ConfAction, Mapping extends ConfAction, ItVar extends string> extends ConfAction {
|
|
35
|
-
new: (x: this["ctx"]) => ActionResult<Source, typeof x> extends (infer V)[] ? ActionResult<Mapping, typeof x & { [K in ItVar]: V }>[] : unknown;
|
|
36
|
-
isSync: And<IsA<Source, SyncConfAction>, IsA<Mapping, SyncConfAction>>;
|
|
37
|
-
}
|
|
38
|
-
interface ActFlatten<Sources extends ConfAction> extends ConfAction {
|
|
39
|
-
new: (x: this["ctx"]) => ActionResult<Sources, typeof x> extends (infer V)[][] ? V[] : unknown;
|
|
40
|
-
isSync: IsA<Sources, SyncConfAction[]>;
|
|
41
|
-
}
|
|
42
|
-
interface ActIsEmpty<Source extends ConfAction> extends ConfAction {
|
|
43
|
-
new: (x: this["ctx"]) => ActionResult<Source, typeof x> extends unknown[] | string | undefined ? boolean : unknown;
|
|
44
|
-
isSync: IsA<Source, SyncConfAction>;
|
|
45
|
-
}
|
|
46
|
-
interface ActNot<Source extends ConfAction> extends ConfAction {
|
|
47
|
-
new: (x: this["ctx"]) => ActionResult<Source, typeof x> extends boolean ? boolean : unknown;
|
|
48
|
-
isSync: IsA<Source, SyncConfAction>;
|
|
49
|
-
}
|
|
50
|
-
interface ActAnd<Source1 extends ConfAction, Source2 extends ConfAction> extends ConfAction {
|
|
51
|
-
new: (x: this["ctx"]) => ActionResult<Source1, typeof x> extends boolean ? ActionResult<Source2, typeof x> extends boolean ? boolean : unknown : unknown;
|
|
52
|
-
isSync: IsA<Source1, SyncConfAction> & IsA<Source2, SyncConfAction>;
|
|
53
|
-
}
|
|
54
|
-
interface ActOr<Source1 extends ConfAction, Source2 extends ConfAction> extends ConfAction {
|
|
55
|
-
new: (x: this["ctx"]) => ActionResult<Source1, typeof x> extends boolean ? ActionResult<Source2, typeof x> extends boolean ? boolean : unknown : unknown;
|
|
56
|
-
isSync: IsA<Source1, SyncConfAction> & IsA<Source2, SyncConfAction>;
|
|
57
|
-
}
|
|
58
|
-
interface ActGetResourceField<Source extends ConfAction, Field extends ConfAction> extends ConfAction {
|
|
59
|
-
new: (x: this["ctx"]) => ActionResult<Source, typeof x> extends PlResourceEntry ? ActionResult<Field, typeof x> extends string ? PlResourceEntry : unknown : unknown;
|
|
60
|
-
isSync: And<IsA<Source, SyncConfAction>, IsA<Field, SyncConfAction>>;
|
|
61
|
-
}
|
|
62
|
-
interface ActMapResourceFields<Source extends ConfAction, Mapping extends ConfAction, ItVar extends string> extends ConfAction {
|
|
63
|
-
new: (x: this["ctx"]) => ActionResult<Source, typeof x> extends PlResourceEntry ? Record<string, ActionResult<Mapping, typeof x & { [K in ItVar]: PlResourceEntry }>> : unknown;
|
|
64
|
-
isSync: And<IsA<Source, SyncConfAction>, IsA<Mapping, SyncConfAction>>;
|
|
65
|
-
}
|
|
66
|
-
interface ActGetResourceValueAsJson<Source extends ConfAction, T> extends ConfAction {
|
|
67
|
-
new: (x: this["ctx"]) => ActionResult<Source, typeof x> extends PlResourceEntry ? T : unknown;
|
|
68
|
-
isSync: IsA<Source, SyncConfAction>;
|
|
69
|
-
}
|
|
70
|
-
interface ActGetBlobContent<Source extends ConfAction> extends ConfAction {
|
|
71
|
-
new: (x: this["ctx"]) => ActionResult<Source, typeof x> extends PlResourceEntry ? Uint8Array : unknown;
|
|
72
|
-
isSync: IsA<Source, SyncConfAction>;
|
|
73
|
-
}
|
|
74
|
-
interface ActGetBlobContentAsString<Source extends ConfAction> extends ConfAction {
|
|
75
|
-
new: (x: this["ctx"]) => ActionResult<Source, typeof x> extends PlResourceEntry ? string : unknown;
|
|
76
|
-
isSync: IsA<Source, SyncConfAction>;
|
|
77
|
-
}
|
|
78
|
-
interface ActGetBlobContentAsJson<Source extends ConfAction, T> extends ConfAction {
|
|
79
|
-
new: (x: this["ctx"]) => ActionResult<Source, typeof x> extends PlResourceEntry ? T : unknown;
|
|
80
|
-
isSync: IsA<Source, SyncConfAction>;
|
|
81
|
-
}
|
|
82
|
-
interface ActGetDownloadedBlobContent<Source extends ConfAction> extends ConfAction {
|
|
83
|
-
new: (x: this["ctx"]) => ActionResult<Source, typeof x> extends PlResourceEntry ? LocalBlobHandleAndSize : unknown;
|
|
84
|
-
isSync: IsA<Source, SyncConfAction>;
|
|
85
|
-
}
|
|
86
|
-
interface ActGetOnDemandBlobContent<Source extends ConfAction> extends ConfAction {
|
|
87
|
-
new: (x: this["ctx"]) => ActionResult<Source, typeof x> extends PlResourceEntry ? RemoteBlobHandleAndSize : unknown;
|
|
88
|
-
isSync: IsA<Source, SyncConfAction>;
|
|
89
|
-
}
|
|
90
|
-
interface ActExtractArchiveAndGetURL<Source extends ConfAction> extends ConfAction {
|
|
91
|
-
new: (x: this["ctx"]) => ActionResult<Source, typeof x> extends PlResourceEntry ? FolderURL : unknown;
|
|
92
|
-
isSync: IsA<Source, SyncConfAction>;
|
|
93
|
-
}
|
|
94
|
-
interface ActImportProgress<Source extends ConfAction> extends ConfAction {
|
|
95
|
-
new: (x: this["ctx"]) => ActionResult<Source, typeof x> extends PlResourceEntry ? ImportProgress : unknown;
|
|
96
|
-
isSync: IsA<Source, SyncConfAction>;
|
|
97
|
-
}
|
|
98
|
-
interface ActGetLastLogs<Source extends ConfAction> extends ConfAction {
|
|
99
|
-
new: (x: this["ctx"]) => ActionResult<Source, typeof x> extends PlResourceEntry ? string : unknown;
|
|
100
|
-
isSync: IsA<Source, SyncConfAction>;
|
|
101
|
-
}
|
|
102
|
-
interface ActGetProgressLog<Source extends ConfAction> extends ConfAction {
|
|
103
|
-
new: (x: this["ctx"]) => ActionResult<Source, typeof x> extends PlResourceEntry ? string : unknown;
|
|
104
|
-
isSync: IsA<Source, SyncConfAction>;
|
|
105
|
-
}
|
|
106
|
-
interface ActGetProgressLogWithInfo<Source extends ConfAction> extends ConfAction {
|
|
107
|
-
new: (x: this["ctx"]) => ActionResult<Source, typeof x> extends PlResourceEntry ? string : unknown;
|
|
108
|
-
isSync: IsA<Source, SyncConfAction>;
|
|
109
|
-
}
|
|
110
|
-
interface ActGetLogHandle<Source extends ConfAction> extends ConfAction {
|
|
111
|
-
new: (x: this["ctx"]) => ActionResult<Source, typeof x> extends PlResourceEntry ? AnyLogHandle : unknown;
|
|
112
|
-
isSync: IsA<Source, SyncConfAction>;
|
|
113
|
-
}
|
|
114
|
-
//#endregion
|
|
115
|
-
export { ActAnd, ActExtractArchiveAndGetURL, ActFlatten, ActGetBlobContent, ActGetBlobContentAsJson, ActGetBlobContentAsString, ActGetDownloadedBlobContent, ActGetField, ActGetFromCtx, ActGetImmediate, ActGetLastLogs, ActGetLogHandle, ActGetOnDemandBlobContent, ActGetProgressLog, ActGetProgressLogWithInfo, ActGetResourceField, ActGetResourceValueAsJson, ActImportProgress, ActIsEmpty, ActIsolate, ActMakeArray, ActMakeObject, ActMapArrayValues, ActMapRecordValues, ActMapResourceFields, ActNot, ActOr };
|
|
116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AAA,gBAAiC,UAAA,UAAoB,UAAA;EACpE,GAAA,GACE,CAAA,kBACG,YAAA,CAAa,MAAA,SAAe,CAAA,UAAW,eAAA;EAC5C,MAAA,EAAQ,GAAA,CAAI,MAAA,EAAQ,cAAA;AAAA;AAAA,UAGL,yBAAA,gBAAyC,UAAA,UAAoB,UAAA;EAC5E,GAAA,GACE,CAAA,kBACG,YAAA,CAAa,MAAA,SAAe,CAAA,UAAW,eAAA;EAC5C,MAAA,EAAQ,GAAA,CAAI,MAAA,EAAQ,cAAA;AAAA;AAAA,UAGL,eAAA,gBAA+B,UAAA,UAAoB,UAAA;EAClE,GAAA,GACE,CAAA,kBACG,YAAA,CAAa,MAAA,SAAe,CAAA,UAAW,eAAA,GAAkB,YAAA;EAC9D,MAAA,EAAQ,GAAA,CAAI,MAAA,EAAQ,cAAA;AAAA"}
|
package/dist/config/index.cjs
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
const require_actions = require("./actions.cjs");
|
|
2
|
-
exports.Args = require_actions.Args;
|
|
3
|
-
exports.It = require_actions.It;
|
|
4
|
-
exports.MainOutputs = require_actions.MainOutputs;
|
|
5
|
-
exports.StagingOutputs = require_actions.StagingOutputs;
|
|
6
|
-
exports.UiState = require_actions.UiState;
|
|
7
|
-
exports.and = require_actions.and;
|
|
8
|
-
exports.extractArchiveAndGetURL = require_actions.extractArchiveAndGetURL;
|
|
9
|
-
exports.flatten = require_actions.flatten;
|
|
10
|
-
exports.getBlobContent = require_actions.getBlobContent;
|
|
11
|
-
exports.getBlobContentAsJson = require_actions.getBlobContentAsJson;
|
|
12
|
-
exports.getBlobContentAsString = require_actions.getBlobContentAsString;
|
|
13
|
-
exports.getDownloadedBlobContent = require_actions.getDownloadedBlobContent;
|
|
14
|
-
exports.getFromCfg = require_actions.getFromCfg;
|
|
15
|
-
exports.getImmediate = require_actions.getImmediate;
|
|
16
|
-
exports.getImportProgress = require_actions.getImportProgress;
|
|
17
|
-
exports.getJsonField = require_actions.getJsonField;
|
|
18
|
-
exports.getLastLogs = require_actions.getLastLogs;
|
|
19
|
-
exports.getLogHandle = require_actions.getLogHandle;
|
|
20
|
-
exports.getOnDemandBlobContent = require_actions.getOnDemandBlobContent;
|
|
21
|
-
exports.getProgressLog = require_actions.getProgressLog;
|
|
22
|
-
exports.getProgressLogWithInfo = require_actions.getProgressLogWithInfo;
|
|
23
|
-
exports.getResourceField = require_actions.getResourceField;
|
|
24
|
-
exports.getResourceValueAsJson = require_actions.getResourceValueAsJson;
|
|
25
|
-
exports.isEmpty = require_actions.isEmpty;
|
|
26
|
-
exports.isolate = require_actions.isolate;
|
|
27
|
-
exports.makeArray = require_actions.makeArray;
|
|
28
|
-
exports.makeObject = require_actions.makeObject;
|
|
29
|
-
exports.mapArrayValues = require_actions.mapArrayValues;
|
|
30
|
-
exports.mapRecordValues = require_actions.mapRecordValues;
|
|
31
|
-
exports.mapResourceFields = require_actions.mapResourceFields;
|
|
32
|
-
exports.not = require_actions.not;
|
|
33
|
-
exports.or = require_actions.or;
|
package/dist/config/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { Args, It, MainOutputs, StagingOutputs, UiState, and, extractArchiveAndGetURL, flatten, getBlobContent, getBlobContentAsJson, getBlobContentAsString, getDownloadedBlobContent, getFromCfg, getImmediate, getImportProgress, getJsonField, getLastLogs, getLogHandle, getOnDemandBlobContent, getProgressLog, getProgressLogWithInfo, getResourceField, getResourceValueAsJson, isEmpty, isolate, makeArray, makeObject, mapArrayValues, mapRecordValues, mapResourceFields, not, or } from "./actions.js";
|
|
2
|
-
export { Args, It, MainOutputs, StagingOutputs, UiState, and, extractArchiveAndGetURL, flatten, getBlobContent, getBlobContentAsJson, getBlobContentAsString, getDownloadedBlobContent, getFromCfg, getImmediate, getImportProgress, getJsonField, getLastLogs, getLogHandle, getOnDemandBlobContent, getProgressLog, getProgressLogWithInfo, getResourceField, getResourceValueAsJson, isEmpty, isolate, makeArray, makeObject, mapArrayValues, mapRecordValues, mapResourceFields, not, or };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
//#region src/config/model_meta.d.ts
|
|
2
|
-
/** Divides all configurations into two broad classes. Some configs can be
|
|
3
|
-
* executed synchronously, given all their arguments are already rendered.
|
|
4
|
-
* Some require creation of a separate rendering cell, like downloading
|
|
5
|
-
* files. */
|
|
6
|
-
type CfgRenderingMode = "Sync" | "Async";
|
|
7
|
-
//#endregion
|
|
8
|
-
export { CfgRenderingMode };
|
|
9
|
-
//# sourceMappingURL=model_meta.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model_meta.d.ts","names":[],"sources":["../../src/config/model_meta.ts"],"mappings":";;AAIA;;;KAAY,gBAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ExtractAction, TypedConfig } from "./type_engine.js";
|
|
2
|
-
|
|
3
|
-
//#region src/config/type_util.d.ts
|
|
4
|
-
type SyncConfAction = {
|
|
5
|
-
isSync: true;
|
|
6
|
-
};
|
|
7
|
-
type IsSyncConf<Cfg extends TypedConfig> = ExtractAction<Cfg> extends SyncConfAction ? true : false;
|
|
8
|
-
type CheckedSyncConf<Cfg extends TypedConfig> = Checked<Cfg, IsSyncConf<Cfg>>;
|
|
9
|
-
type And<A extends boolean, B extends boolean> = A extends true ? B extends true ? true : false : false;
|
|
10
|
-
type IsA<T, E> = T extends E ? true : false;
|
|
11
|
-
type Checked<Type, Condition> = Condition extends true ? Type : "error";
|
|
12
|
-
//#endregion
|
|
13
|
-
export { And, Checked, CheckedSyncConf, IsA, IsSyncConf, SyncConfAction };
|
|
14
|
-
//# sourceMappingURL=type_util.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type_util.d.ts","names":[],"sources":["../../src/config/type_util.ts"],"mappings":";;;KAEY,cAAA;EAAmB,MAAM;AAAA;AAAA,KAEzB,UAAA,aAAuB,WAAA,IACjC,aAAA,CAAc,GAAA,UAAa,cAAA;AAAA,KACjB,eAAA,aAA4B,WAAA,IAAe,OAAA,CAAQ,GAAA,EAAK,UAAA,CAAW,GAAA;AAAA,KAUnE,GAAA,yCAA4C,CAAA,gBACpD,CAAC;AAAA,KAKO,GAAA,SAAY,CAAA,SAAU,CAAC;AAAA,KAEvB,OAAA,oBAA2B,SAAA,gBAAyB,IAAI"}
|
package/dist/ref_util.cjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const require_actions = require("./config/actions.cjs");
|
|
2
|
-
require("./config/index.cjs");
|
|
3
|
-
//#region src/ref_util.ts
|
|
4
|
-
function fromPlRef(source) {
|
|
5
|
-
return require_actions.makeObject({
|
|
6
|
-
__isRef: true,
|
|
7
|
-
blockId: require_actions.getJsonField(source, "blockId"),
|
|
8
|
-
name: require_actions.getJsonField(source, "name")
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
function fromPlOption(source) {
|
|
12
|
-
return require_actions.makeObject({
|
|
13
|
-
ref: fromPlRef(require_actions.getJsonField(source, "ref")),
|
|
14
|
-
label: require_actions.getJsonField(source, "label")
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
18
|
-
exports.fromPlOption = fromPlOption;
|
|
19
|
-
exports.fromPlRef = fromPlRef;
|
|
20
|
-
|
|
21
|
-
//# sourceMappingURL=ref_util.cjs.map
|
package/dist/ref_util.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ref_util.cjs","names":["makeObject","getJsonField"],"sources":["../src/ref_util.ts"],"sourcesContent":["import type { TypedConfig } from \"./config\";\nimport { getJsonField, makeObject } from \"./config\";\n\nexport function fromPlRef<Source extends TypedConfig>(source: Source) {\n return makeObject({\n __isRef: true,\n blockId: getJsonField(source, \"blockId\"),\n name: getJsonField(source, \"name\"),\n });\n}\n\nexport function fromPlOption<Source extends TypedConfig>(source: Source) {\n return makeObject({\n ref: fromPlRef(getJsonField(source, \"ref\")),\n label: getJsonField(source, \"label\"),\n });\n}\n"],"mappings":";;;AAGA,SAAgB,UAAsC,QAAgB;CACpE,OAAOA,gBAAAA,WAAW;EAChB,SAAS;EACT,SAASC,gBAAAA,aAAa,QAAQ,SAAS;EACvC,MAAMA,gBAAAA,aAAa,QAAQ,MAAM;CACnC,CAAC;AACH;AAEA,SAAgB,aAAyC,QAAgB;CACvE,OAAOD,gBAAAA,WAAW;EAChB,KAAK,UAAUC,gBAAAA,aAAa,QAAQ,KAAK,CAAC;EAC1C,OAAOA,gBAAAA,aAAa,QAAQ,OAAO;CACrC,CAAC;AACH"}
|
package/dist/ref_util.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { POCExtractAction, TypedConfig } from "./config/type_engine.js";
|
|
2
|
-
import { ActGetField, ActGetImmediate, ActMakeObject } from "./config/actions_kinds.js";
|
|
3
|
-
//#region src/ref_util.d.ts
|
|
4
|
-
declare function fromPlRef<Source extends TypedConfig>(source: Source): TypedConfig<ActMakeObject<{
|
|
5
|
-
readonly __isRef: ActGetImmediate<true>;
|
|
6
|
-
readonly blockId: ActGetField<POCExtractAction<Source>, ActGetImmediate<"blockId">>;
|
|
7
|
-
readonly name: ActGetField<POCExtractAction<Source>, ActGetImmediate<"name">>;
|
|
8
|
-
}>>;
|
|
9
|
-
declare function fromPlOption<Source extends TypedConfig>(source: Source): TypedConfig<ActMakeObject<{
|
|
10
|
-
readonly ref: ActMakeObject<{
|
|
11
|
-
readonly __isRef: ActGetImmediate<true>;
|
|
12
|
-
readonly blockId: ActGetField<ActGetField<POCExtractAction<Source>, ActGetImmediate<"ref">>, ActGetImmediate<"blockId">>;
|
|
13
|
-
readonly name: ActGetField<ActGetField<POCExtractAction<Source>, ActGetImmediate<"ref">>, ActGetImmediate<"name">>;
|
|
14
|
-
}>;
|
|
15
|
-
readonly label: ActGetField<POCExtractAction<Source>, ActGetImmediate<"label">>;
|
|
16
|
-
}>>;
|
|
17
|
-
//#endregion
|
|
18
|
-
export { fromPlOption, fromPlRef };
|
|
19
|
-
//# sourceMappingURL=ref_util.d.ts.map
|
package/dist/ref_util.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ref_util.d.ts","names":[],"sources":["../src/ref_util.ts"],"mappings":";;;iBAGgB,SAAA,gBAAyB,WAAA,EAAa,MAAA,EAAQ,MAAA,GAAM,WAAA;oBAAA,eAAA;EAAA;;;iBAQpD,YAAA,gBAA4B,WAAA,EAAa,MAAA,EAAQ,MAAA,GAAM,WAAA;;sBAAA,eAAA;IAAA"}
|
package/dist/ref_util.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { getJsonField, makeObject } from "./config/actions.js";
|
|
2
|
-
import "./config/index.js";
|
|
3
|
-
//#region src/ref_util.ts
|
|
4
|
-
function fromPlRef(source) {
|
|
5
|
-
return makeObject({
|
|
6
|
-
__isRef: true,
|
|
7
|
-
blockId: getJsonField(source, "blockId"),
|
|
8
|
-
name: getJsonField(source, "name")
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
function fromPlOption(source) {
|
|
12
|
-
return makeObject({
|
|
13
|
-
ref: fromPlRef(getJsonField(source, "ref")),
|
|
14
|
-
label: getJsonField(source, "label")
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
18
|
-
export { fromPlOption, fromPlRef };
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=ref_util.js.map
|
package/dist/ref_util.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ref_util.js","names":[],"sources":["../src/ref_util.ts"],"sourcesContent":["import type { TypedConfig } from \"./config\";\nimport { getJsonField, makeObject } from \"./config\";\n\nexport function fromPlRef<Source extends TypedConfig>(source: Source) {\n return makeObject({\n __isRef: true,\n blockId: getJsonField(source, \"blockId\"),\n name: getJsonField(source, \"name\"),\n });\n}\n\nexport function fromPlOption<Source extends TypedConfig>(source: Source) {\n return makeObject({\n ref: fromPlRef(getJsonField(source, \"ref\")),\n label: getJsonField(source, \"label\"),\n });\n}\n"],"mappings":";;;AAGA,SAAgB,UAAsC,QAAgB;CACpE,OAAO,WAAW;EAChB,SAAS;EACT,SAAS,aAAa,QAAQ,SAAS;EACvC,MAAM,aAAa,QAAQ,MAAM;CACnC,CAAC;AACH;AAEA,SAAgB,aAAyC,QAAgB;CACvE,OAAO,WAAW;EAChB,KAAK,UAAU,aAAa,QAAQ,KAAK,CAAC;EAC1C,OAAO,aAAa,QAAQ,OAAO;CACrC,CAAC;AACH"}
|