quidproquo-core 0.1.13 → 0.1.15
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/commonjs/actions/dynamicFunctions/DynamicFunctionsActionType.d.ts +3 -0
- package/lib/commonjs/actions/dynamicFunctions/DynamicFunctionsActionType.js +8 -0
- package/lib/commonjs/actions/dynamicFunctions/DynamicFunctionsActionType.js.map +1 -0
- package/lib/commonjs/actions/dynamicFunctions/DynamicFunctionsExecuteActionRequester.d.ts +2 -0
- package/lib/commonjs/actions/dynamicFunctions/DynamicFunctionsExecuteActionRequester.js +19 -0
- package/lib/commonjs/actions/dynamicFunctions/DynamicFunctionsExecuteActionRequester.js.map +1 -0
- package/lib/commonjs/actions/dynamicFunctions/DynamicFunctionsExecuteActionTypes.d.ts +21 -0
- package/lib/commonjs/actions/dynamicFunctions/DynamicFunctionsExecuteActionTypes.js +17 -0
- package/lib/commonjs/actions/dynamicFunctions/DynamicFunctionsExecuteActionTypes.js.map +1 -0
- package/lib/commonjs/actions/dynamicFunctions/createDynamicFunctionCaller.d.ts +5 -0
- package/lib/commonjs/actions/dynamicFunctions/createDynamicFunctionCaller.js +15 -0
- package/lib/commonjs/actions/dynamicFunctions/createDynamicFunctionCaller.js.map +1 -0
- package/lib/commonjs/actions/dynamicFunctions/index.d.ts +4 -0
- package/lib/commonjs/actions/dynamicFunctions/index.js +21 -0
- package/lib/commonjs/actions/dynamicFunctions/index.js.map +1 -0
- package/lib/commonjs/actions/guid/GuidActionType.d.ts +2 -1
- package/lib/commonjs/actions/guid/GuidActionType.js +1 -0
- package/lib/commonjs/actions/guid/GuidActionType.js.map +1 -1
- package/lib/commonjs/actions/guid/GuidNewSortableManyActionRequester.d.ts +2 -0
- package/lib/commonjs/actions/guid/GuidNewSortableManyActionRequester.js +13 -0
- package/lib/commonjs/actions/guid/GuidNewSortableManyActionRequester.js.map +1 -0
- package/lib/commonjs/actions/guid/GuidNewSortableManyActionRequesterTypes.d.ts +11 -0
- package/lib/commonjs/actions/guid/GuidNewSortableManyActionRequesterTypes.js +3 -0
- package/lib/commonjs/actions/guid/GuidNewSortableManyActionRequesterTypes.js.map +1 -0
- package/lib/commonjs/actions/guid/index.d.ts +2 -0
- package/lib/commonjs/actions/guid/index.js +2 -0
- package/lib/commonjs/actions/guid/index.js.map +1 -1
- package/lib/commonjs/actions/index.d.ts +1 -0
- package/lib/commonjs/actions/index.js +1 -0
- package/lib/commonjs/actions/index.js.map +1 -1
- package/lib/commonjs/actions/keyValueStore/KeyValueStoreActionType.d.ts +1 -0
- package/lib/commonjs/actions/keyValueStore/KeyValueStoreActionType.js +1 -0
- package/lib/commonjs/actions/keyValueStore/KeyValueStoreActionType.js.map +1 -1
- package/lib/commonjs/actions/keyValueStore/KeyValueStoreQueryActionTypes.d.ts +1 -0
- package/lib/commonjs/actions/keyValueStore/KeyValueStoreQueryActionTypes.js.map +1 -1
- package/lib/commonjs/actions/keyValueStore/KeyValueStoreUpsertManyActionRequester.d.ts +9 -0
- package/lib/commonjs/actions/keyValueStore/KeyValueStoreUpsertManyActionRequester.js +39 -0
- package/lib/commonjs/actions/keyValueStore/KeyValueStoreUpsertManyActionRequester.js.map +1 -0
- package/lib/commonjs/actions/keyValueStore/KeyValueStoreUpsertManyActionTypes.d.ts +16 -0
- package/lib/commonjs/actions/keyValueStore/KeyValueStoreUpsertManyActionTypes.js +3 -0
- package/lib/commonjs/actions/keyValueStore/KeyValueStoreUpsertManyActionTypes.js.map +1 -0
- package/lib/commonjs/actions/keyValueStore/index.d.ts +2 -0
- package/lib/commonjs/actions/keyValueStore/index.js +2 -0
- package/lib/commonjs/actions/keyValueStore/index.js.map +1 -1
- package/lib/commonjs/config/QPQConfig.d.ts +1 -0
- package/lib/commonjs/config/QPQConfig.js +1 -0
- package/lib/commonjs/config/QPQConfig.js.map +1 -1
- package/lib/commonjs/config/settings/dynamicFunctions.d.ts +10 -0
- package/lib/commonjs/config/settings/dynamicFunctions.js +18 -0
- package/lib/commonjs/config/settings/dynamicFunctions.js.map +1 -0
- package/lib/commonjs/config/settings/index.d.ts +1 -0
- package/lib/commonjs/config/settings/index.js +1 -0
- package/lib/commonjs/config/settings/index.js.map +1 -1
- package/lib/commonjs/config/settings/queue.js +14 -3
- package/lib/commonjs/config/settings/queue.js.map +1 -1
- package/lib/commonjs/logic/actionLogic.js +10 -0
- package/lib/commonjs/logic/actionLogic.js.map +1 -1
- package/lib/commonjs/logic/index.d.ts +1 -0
- package/lib/commonjs/logic/index.js +1 -0
- package/lib/commonjs/logic/index.js.map +1 -1
- package/lib/commonjs/logic/transientErrorNames.d.ts +20 -0
- package/lib/commonjs/logic/transientErrorNames.js +52 -0
- package/lib/commonjs/logic/transientErrorNames.js.map +1 -0
- package/lib/commonjs/qpqCoreUtils.d.ts +3 -1
- package/lib/commonjs/qpqCoreUtils.js +18 -2
- package/lib/commonjs/qpqCoreUtils.js.map +1 -1
- package/lib/commonjs/qpqCoreUtilsLib.d.ts +2 -0
- package/lib/esm/actions/dynamicFunctions/DynamicFunctionsActionType.d.ts +3 -0
- package/lib/esm/actions/dynamicFunctions/DynamicFunctionsActionType.js +5 -0
- package/lib/esm/actions/dynamicFunctions/DynamicFunctionsActionType.js.map +1 -0
- package/lib/esm/actions/dynamicFunctions/DynamicFunctionsExecuteActionRequester.d.ts +2 -0
- package/lib/esm/actions/dynamicFunctions/DynamicFunctionsExecuteActionRequester.js +16 -0
- package/lib/esm/actions/dynamicFunctions/DynamicFunctionsExecuteActionRequester.js.map +1 -0
- package/lib/esm/actions/dynamicFunctions/DynamicFunctionsExecuteActionTypes.d.ts +21 -0
- package/lib/esm/actions/dynamicFunctions/DynamicFunctionsExecuteActionTypes.js +14 -0
- package/lib/esm/actions/dynamicFunctions/DynamicFunctionsExecuteActionTypes.js.map +1 -0
- package/lib/esm/actions/dynamicFunctions/createDynamicFunctionCaller.d.ts +5 -0
- package/lib/esm/actions/dynamicFunctions/createDynamicFunctionCaller.js +11 -0
- package/lib/esm/actions/dynamicFunctions/createDynamicFunctionCaller.js.map +1 -0
- package/lib/esm/actions/dynamicFunctions/index.d.ts +4 -0
- package/lib/esm/actions/dynamicFunctions/index.js +5 -0
- package/lib/esm/actions/dynamicFunctions/index.js.map +1 -0
- package/lib/esm/actions/guid/GuidActionType.d.ts +2 -1
- package/lib/esm/actions/guid/GuidActionType.js +1 -0
- package/lib/esm/actions/guid/GuidActionType.js.map +1 -1
- package/lib/esm/actions/guid/GuidNewSortableManyActionRequester.d.ts +2 -0
- package/lib/esm/actions/guid/GuidNewSortableManyActionRequester.js +10 -0
- package/lib/esm/actions/guid/GuidNewSortableManyActionRequester.js.map +1 -0
- package/lib/esm/actions/guid/GuidNewSortableManyActionRequesterTypes.d.ts +11 -0
- package/lib/esm/actions/guid/GuidNewSortableManyActionRequesterTypes.js +2 -0
- package/lib/esm/actions/guid/GuidNewSortableManyActionRequesterTypes.js.map +1 -0
- package/lib/esm/actions/guid/index.d.ts +2 -0
- package/lib/esm/actions/guid/index.js +2 -0
- package/lib/esm/actions/guid/index.js.map +1 -1
- package/lib/esm/actions/index.d.ts +1 -0
- package/lib/esm/actions/index.js +1 -0
- package/lib/esm/actions/index.js.map +1 -1
- package/lib/esm/actions/keyValueStore/KeyValueStoreActionType.d.ts +1 -0
- package/lib/esm/actions/keyValueStore/KeyValueStoreActionType.js +1 -0
- package/lib/esm/actions/keyValueStore/KeyValueStoreActionType.js.map +1 -1
- package/lib/esm/actions/keyValueStore/KeyValueStoreQueryActionTypes.d.ts +1 -0
- package/lib/esm/actions/keyValueStore/KeyValueStoreQueryActionTypes.js.map +1 -1
- package/lib/esm/actions/keyValueStore/KeyValueStoreUpsertManyActionRequester.d.ts +9 -0
- package/lib/esm/actions/keyValueStore/KeyValueStoreUpsertManyActionRequester.js +35 -0
- package/lib/esm/actions/keyValueStore/KeyValueStoreUpsertManyActionRequester.js.map +1 -0
- package/lib/esm/actions/keyValueStore/KeyValueStoreUpsertManyActionTypes.d.ts +16 -0
- package/lib/esm/actions/keyValueStore/KeyValueStoreUpsertManyActionTypes.js +2 -0
- package/lib/esm/actions/keyValueStore/KeyValueStoreUpsertManyActionTypes.js.map +1 -0
- package/lib/esm/actions/keyValueStore/index.d.ts +2 -0
- package/lib/esm/actions/keyValueStore/index.js +2 -0
- package/lib/esm/actions/keyValueStore/index.js.map +1 -1
- package/lib/esm/config/QPQConfig.d.ts +1 -0
- package/lib/esm/config/QPQConfig.js +1 -0
- package/lib/esm/config/QPQConfig.js.map +1 -1
- package/lib/esm/config/settings/dynamicFunctions.d.ts +10 -0
- package/lib/esm/config/settings/dynamicFunctions.js +14 -0
- package/lib/esm/config/settings/dynamicFunctions.js.map +1 -0
- package/lib/esm/config/settings/index.d.ts +1 -0
- package/lib/esm/config/settings/index.js +1 -0
- package/lib/esm/config/settings/index.js.map +1 -1
- package/lib/esm/config/settings/queue.js +12 -1
- package/lib/esm/config/settings/queue.js.map +1 -1
- package/lib/esm/logic/actionLogic.js +10 -0
- package/lib/esm/logic/actionLogic.js.map +1 -1
- package/lib/esm/logic/index.d.ts +1 -0
- package/lib/esm/logic/index.js +1 -0
- package/lib/esm/logic/index.js.map +1 -1
- package/lib/esm/logic/transientErrorNames.d.ts +20 -0
- package/lib/esm/logic/transientErrorNames.js +48 -0
- package/lib/esm/logic/transientErrorNames.js.map +1 -0
- package/lib/esm/qpqCoreUtils.d.ts +3 -1
- package/lib/esm/qpqCoreUtils.js +14 -0
- package/lib/esm/qpqCoreUtils.js.map +1 -1
- package/lib/esm/qpqCoreUtilsLib.d.ts +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DynamicFunctionsActionType = void 0;
|
|
4
|
+
var DynamicFunctionsActionType;
|
|
5
|
+
(function (DynamicFunctionsActionType) {
|
|
6
|
+
DynamicFunctionsActionType["Execute"] = "@quidproquo-core/DynamicFunctions/Execute";
|
|
7
|
+
})(DynamicFunctionsActionType || (exports.DynamicFunctionsActionType = DynamicFunctionsActionType = {}));
|
|
8
|
+
//# sourceMappingURL=DynamicFunctionsActionType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DynamicFunctionsActionType.js","sourceRoot":"","sources":["../../../../src/actions/dynamicFunctions/DynamicFunctionsActionType.ts"],"names":[],"mappings":";;;AAAA,IAAY,0BAEX;AAFD,WAAY,0BAA0B;IACpC,mFAAqD,CAAA;AACvD,CAAC,EAFW,0BAA0B,0CAA1B,0BAA0B,QAErC","sourcesContent":["export enum DynamicFunctionsActionType {\n Execute = '@quidproquo-core/DynamicFunctions/Execute',\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { DynamicFunctionResult, DynamicFunctions, DynamicFunctionsExecuteActionRequester } from './DynamicFunctionsExecuteActionTypes';
|
|
2
|
+
export declare function askDynamicFunctionExecute<TFunctions extends DynamicFunctions = DynamicFunctions, TName extends keyof TFunctions & string = keyof TFunctions & string>(dynamicFunctionsName: string, functionName: TName, ...args: Parameters<TFunctions[TName]>): DynamicFunctionsExecuteActionRequester<DynamicFunctionResult<TFunctions[TName]>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askDynamicFunctionExecute = askDynamicFunctionExecute;
|
|
4
|
+
const DynamicFunctionsActionType_1 = require("./DynamicFunctionsActionType");
|
|
5
|
+
// Invoke one member of a registered dynamic-functions object (see
|
|
6
|
+
// defineDynamicFunctions) by name, with positional args. Type the seam by passing
|
|
7
|
+
// the object's type: askDynamicFunctionExecute<typeof templateEventDoc>(...) checks
|
|
8
|
+
// the member name, its args, and infers the (story-unwrapped) result.
|
|
9
|
+
function* askDynamicFunctionExecute(dynamicFunctionsName, functionName, ...args) {
|
|
10
|
+
return yield {
|
|
11
|
+
type: DynamicFunctionsActionType_1.DynamicFunctionsActionType.Execute,
|
|
12
|
+
payload: {
|
|
13
|
+
dynamicFunctionsName,
|
|
14
|
+
functionName,
|
|
15
|
+
args,
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=DynamicFunctionsExecuteActionRequester.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DynamicFunctionsExecuteActionRequester.js","sourceRoot":"","sources":["../../../../src/actions/dynamicFunctions/DynamicFunctionsExecuteActionRequester.ts"],"names":[],"mappings":";;AAOA,8DAgBC;AAvBD,6EAA0E;AAG1E,kEAAkE;AAClE,kFAAkF;AAClF,oFAAoF;AACpF,sEAAsE;AACtE,QAAe,CAAC,CAAC,yBAAyB,CAIxC,oBAA4B,EAC5B,YAAmB,EACnB,GAAG,IAAmC;IAEtC,OAAO,MAAM;QACX,IAAI,EAAE,uDAA0B,CAAC,OAAO;QACxC,OAAO,EAAE;YACP,oBAAoB;YACpB,YAAY;YACZ,IAAI;SACL;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { DynamicFunctionsActionType } from './DynamicFunctionsActionType';\nimport { DynamicFunctionResult, DynamicFunctions, DynamicFunctionsExecuteActionRequester } from './DynamicFunctionsExecuteActionTypes';\n\n// Invoke one member of a registered dynamic-functions object (see\n// defineDynamicFunctions) by name, with positional args. Type the seam by passing\n// the object's type: askDynamicFunctionExecute<typeof templateEventDoc>(...) checks\n// the member name, its args, and infers the (story-unwrapped) result.\nexport function* askDynamicFunctionExecute<\n TFunctions extends DynamicFunctions = DynamicFunctions,\n TName extends keyof TFunctions & string = keyof TFunctions & string,\n>(\n dynamicFunctionsName: string,\n functionName: TName,\n ...args: Parameters<TFunctions[TName]>\n): DynamicFunctionsExecuteActionRequester<DynamicFunctionResult<TFunctions[TName]>> {\n return yield {\n type: DynamicFunctionsActionType.Execute,\n payload: {\n dynamicFunctionsName,\n functionName,\n args,\n },\n };\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
+
import { DynamicFunctionsActionType } from './DynamicFunctionsActionType';
|
|
3
|
+
export declare enum DynamicFunctionsExecuteErrorTypeEnum {
|
|
4
|
+
DynamicFunctionsNotFound = "DynamicFunctionsNotFound",
|
|
5
|
+
ModuleLoadFailed = "ModuleLoadFailed",
|
|
6
|
+
FunctionNotFound = "FunctionNotFound",
|
|
7
|
+
FunctionThrew = "FunctionThrew"
|
|
8
|
+
}
|
|
9
|
+
export type DynamicFunctions = Record<string, (...args: any[]) => any>;
|
|
10
|
+
export type DynamicFunctionResult<TFn extends (...args: any[]) => any> = ReturnType<TFn> extends Generator<any, infer R, any> ? R : ReturnType<TFn> extends Promise<infer R> ? R : ReturnType<TFn>;
|
|
11
|
+
export interface DynamicFunctionsExecuteActionPayload {
|
|
12
|
+
dynamicFunctionsName: string;
|
|
13
|
+
functionName: string;
|
|
14
|
+
args: unknown[];
|
|
15
|
+
}
|
|
16
|
+
export interface DynamicFunctionsExecuteAction extends Action<DynamicFunctionsExecuteActionPayload> {
|
|
17
|
+
type: DynamicFunctionsActionType.Execute;
|
|
18
|
+
payload: DynamicFunctionsExecuteActionPayload;
|
|
19
|
+
}
|
|
20
|
+
export type DynamicFunctionsExecuteActionProcessor<R> = ActionProcessor<DynamicFunctionsExecuteAction, R>;
|
|
21
|
+
export type DynamicFunctionsExecuteActionRequester<R> = ActionRequester<DynamicFunctionsExecuteAction, R>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DynamicFunctionsExecuteErrorTypeEnum = void 0;
|
|
4
|
+
// The full catalog of errors the Execute processor can produce itself. Errors
|
|
5
|
+
// thrown by a generator member's own story propagate with their original type.
|
|
6
|
+
var DynamicFunctionsExecuteErrorTypeEnum;
|
|
7
|
+
(function (DynamicFunctionsExecuteErrorTypeEnum) {
|
|
8
|
+
// No defineDynamicFunctions setting registered under the name.
|
|
9
|
+
DynamicFunctionsExecuteErrorTypeEnum["DynamicFunctionsNotFound"] = "DynamicFunctionsNotFound";
|
|
10
|
+
// The dynamic module loader could not resolve the registered runtime.
|
|
11
|
+
DynamicFunctionsExecuteErrorTypeEnum["ModuleLoadFailed"] = "ModuleLoadFailed";
|
|
12
|
+
// The named member is not an own enumerable function on the loaded object.
|
|
13
|
+
DynamicFunctionsExecuteErrorTypeEnum["FunctionNotFound"] = "FunctionNotFound";
|
|
14
|
+
// A plain (non-story) member threw or rejected.
|
|
15
|
+
DynamicFunctionsExecuteErrorTypeEnum["FunctionThrew"] = "FunctionThrew";
|
|
16
|
+
})(DynamicFunctionsExecuteErrorTypeEnum || (exports.DynamicFunctionsExecuteErrorTypeEnum = DynamicFunctionsExecuteErrorTypeEnum = {}));
|
|
17
|
+
//# sourceMappingURL=DynamicFunctionsExecuteActionTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DynamicFunctionsExecuteActionTypes.js","sourceRoot":"","sources":["../../../../src/actions/dynamicFunctions/DynamicFunctionsExecuteActionTypes.ts"],"names":[],"mappings":";;;AAGA,8EAA8E;AAC9E,+EAA+E;AAC/E,IAAY,oCASX;AATD,WAAY,oCAAoC;IAC9C,+DAA+D;IAC/D,6FAAqD,CAAA;IACrD,sEAAsE;IACtE,6EAAqC,CAAA;IACrC,2EAA2E;IAC3E,6EAAqC,CAAA;IACrC,gDAAgD;IAChD,uEAA+B,CAAA;AACjC,CAAC,EATW,oCAAoC,oDAApC,oCAAoC,QAS/C","sourcesContent":["import { Action, ActionProcessor, ActionRequester } from '../../types/Action';\nimport { DynamicFunctionsActionType } from './DynamicFunctionsActionType';\n\n// The full catalog of errors the Execute processor can produce itself. Errors\n// thrown by a generator member's own story propagate with their original type.\nexport enum DynamicFunctionsExecuteErrorTypeEnum {\n // No defineDynamicFunctions setting registered under the name.\n DynamicFunctionsNotFound = 'DynamicFunctionsNotFound',\n // The dynamic module loader could not resolve the registered runtime.\n ModuleLoadFailed = 'ModuleLoadFailed',\n // The named member is not an own enumerable function on the loaded object.\n FunctionNotFound = 'FunctionNotFound',\n // A plain (non-story) member threw or rejected.\n FunctionThrew = 'FunctionThrew',\n}\n\n// The shape a registered export must have: an object of callable members. `any` is\n// required here - member parameters are contravariant, so a Record over `unknown[]`\n// args would reject every concretely-typed functions object.\nexport type DynamicFunctions = Record<string, (...args: any[]) => any>;\n\n// What the processor hands back for a member: a generator member resolves to its\n// story return value, a promise-returning member to its awaited value.\nexport type DynamicFunctionResult<TFn extends (...args: any[]) => any> =\n ReturnType<TFn> extends Generator<any, infer R, any> ? R : ReturnType<TFn> extends Promise<infer R> ? R : ReturnType<TFn>;\n\n// Payload\nexport interface DynamicFunctionsExecuteActionPayload {\n dynamicFunctionsName: string;\n functionName: string;\n args: unknown[];\n}\n\n// Action\nexport interface DynamicFunctionsExecuteAction extends Action<DynamicFunctionsExecuteActionPayload> {\n type: DynamicFunctionsActionType.Execute;\n payload: DynamicFunctionsExecuteActionPayload;\n}\n\n// Function Types\nexport type DynamicFunctionsExecuteActionProcessor<R> = ActionProcessor<DynamicFunctionsExecuteAction, R>;\nexport type DynamicFunctionsExecuteActionRequester<R> = ActionRequester<DynamicFunctionsExecuteAction, R>;\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DynamicFunctionResult, DynamicFunctions, DynamicFunctionsExecuteActionRequester } from './DynamicFunctionsExecuteActionTypes';
|
|
2
|
+
export type DynamicFunctionCaller<TFunctions extends DynamicFunctions> = {
|
|
3
|
+
[TName in keyof TFunctions]: (...args: Parameters<TFunctions[TName]>) => DynamicFunctionsExecuteActionRequester<DynamicFunctionResult<TFunctions[TName]>>;
|
|
4
|
+
};
|
|
5
|
+
export declare const createDynamicFunctionCaller: <TFunctions extends DynamicFunctions>(dynamicFunctionsName: string) => DynamicFunctionCaller<TFunctions>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createDynamicFunctionCaller = void 0;
|
|
4
|
+
const DynamicFunctionsExecuteActionRequester_1 = require("./DynamicFunctionsExecuteActionRequester");
|
|
5
|
+
// Typed sugar over askDynamicFunctionExecute: caller.someMember(a, b) yields the
|
|
6
|
+
// same Execute action as askDynamicFunctionExecute(name, 'someMember', a, b).
|
|
7
|
+
// `create*`, not `ask*`: it returns requester generators rather than being one.
|
|
8
|
+
const createDynamicFunctionCaller = (dynamicFunctionsName) =>
|
|
9
|
+
// The Proxy IS the mapped type: member names only exist at the type level, so the
|
|
10
|
+
// casts restate that every property access is a call onto the named member.
|
|
11
|
+
new Proxy({}, {
|
|
12
|
+
get: (_target, functionName) => (...args) => (0, DynamicFunctionsExecuteActionRequester_1.askDynamicFunctionExecute)(dynamicFunctionsName, String(functionName), ...args),
|
|
13
|
+
});
|
|
14
|
+
exports.createDynamicFunctionCaller = createDynamicFunctionCaller;
|
|
15
|
+
//# sourceMappingURL=createDynamicFunctionCaller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createDynamicFunctionCaller.js","sourceRoot":"","sources":["../../../../src/actions/dynamicFunctions/createDynamicFunctionCaller.ts"],"names":[],"mappings":";;;AAAA,qGAAqF;AASrF,iFAAiF;AACjF,8EAA8E;AAC9E,gFAAgF;AACzE,MAAM,2BAA2B,GAAG,CAAsC,oBAA4B,EAAqC,EAAE;AAClJ,kFAAkF;AAClF,4EAA4E;AAC5E,IAAI,KAAK,CAAC,EAAuC,EAAE;IACjD,GAAG,EACD,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,CAC1B,CAAC,GAAG,IAAe,EAAE,EAAE,CACrB,IAAA,kEAAyB,EAAC,oBAAoB,EAAE,MAAM,CAAC,YAAY,CAAC,EAAE,GAAG,IAAI,CAAC;CACnF,CAAC,CAAC;AARQ,QAAA,2BAA2B,+BAQnC","sourcesContent":["import { askDynamicFunctionExecute } from './DynamicFunctionsExecuteActionRequester';\nimport { DynamicFunctionResult, DynamicFunctions, DynamicFunctionsExecuteActionRequester } from './DynamicFunctionsExecuteActionTypes';\n\nexport type DynamicFunctionCaller<TFunctions extends DynamicFunctions> = {\n [TName in keyof TFunctions]: (\n ...args: Parameters<TFunctions[TName]>\n ) => DynamicFunctionsExecuteActionRequester<DynamicFunctionResult<TFunctions[TName]>>;\n};\n\n// Typed sugar over askDynamicFunctionExecute: caller.someMember(a, b) yields the\n// same Execute action as askDynamicFunctionExecute(name, 'someMember', a, b).\n// `create*`, not `ask*`: it returns requester generators rather than being one.\nexport const createDynamicFunctionCaller = <TFunctions extends DynamicFunctions>(dynamicFunctionsName: string): DynamicFunctionCaller<TFunctions> =>\n // The Proxy IS the mapped type: member names only exist at the type level, so the\n // casts restate that every property access is a call onto the named member.\n new Proxy({} as DynamicFunctionCaller<TFunctions>, {\n get:\n (_target, functionName) =>\n (...args: unknown[]) =>\n askDynamicFunctionExecute(dynamicFunctionsName, String(functionName), ...args),\n });\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./createDynamicFunctionCaller"), exports);
|
|
18
|
+
__exportStar(require("./DynamicFunctionsActionType"), exports);
|
|
19
|
+
__exportStar(require("./DynamicFunctionsExecuteActionRequester"), exports);
|
|
20
|
+
__exportStar(require("./DynamicFunctionsExecuteActionTypes"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/actions/dynamicFunctions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gEAA8C;AAC9C,+DAA6C;AAC7C,2EAAyD;AACzD,uEAAqD","sourcesContent":["export * from './createDynamicFunctionCaller';\nexport * from './DynamicFunctionsActionType';\nexport * from './DynamicFunctionsExecuteActionRequester';\nexport * from './DynamicFunctionsExecuteActionTypes';\n"]}
|
|
@@ -5,5 +5,6 @@ var GuidActionType;
|
|
|
5
5
|
(function (GuidActionType) {
|
|
6
6
|
GuidActionType["New"] = "@quidproquo-core/Guid/New";
|
|
7
7
|
GuidActionType["NewSortable"] = "@quidproquo-core/Guid/NewSortable";
|
|
8
|
+
GuidActionType["NewSortableMany"] = "@quidproquo-core/Guid/NewSortableMany";
|
|
8
9
|
})(GuidActionType || (exports.GuidActionType = GuidActionType = {}));
|
|
9
10
|
//# sourceMappingURL=GuidActionType.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GuidActionType.js","sourceRoot":"","sources":["../../../../src/actions/guid/GuidActionType.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"GuidActionType.js","sourceRoot":"","sources":["../../../../src/actions/guid/GuidActionType.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,mDAAiC,CAAA;IACjC,mEAAiD,CAAA;IACjD,2EAAyD,CAAA;AAC3D,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB","sourcesContent":["export enum GuidActionType {\n New = '@quidproquo-core/Guid/New',\n NewSortable = '@quidproquo-core/Guid/NewSortable',\n NewSortableMany = '@quidproquo-core/Guid/NewSortableMany',\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askNewSortableGuids = askNewSortableGuids;
|
|
4
|
+
const GuidActionType_1 = require("./GuidActionType");
|
|
5
|
+
// Mint `count` sortable ids in ONE action. The processor generates them in
|
|
6
|
+
// sequence, so the returned array is itself in sort order: ids[0] < ids[1] < ...
|
|
7
|
+
// (uuidv7's counter bits keep same-millisecond mints monotonic). The batch
|
|
8
|
+
// primitive for bulk writers — one append fan-out should not pay one action
|
|
9
|
+
// per id.
|
|
10
|
+
function* askNewSortableGuids(count) {
|
|
11
|
+
return yield { type: GuidActionType_1.GuidActionType.NewSortableMany, payload: { count } };
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=GuidNewSortableManyActionRequester.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidNewSortableManyActionRequester.js","sourceRoot":"","sources":["../../../../src/actions/guid/GuidNewSortableManyActionRequester.ts"],"names":[],"mappings":";;AAQA,kDAEC;AAVD,qDAAkD;AAGlD,2EAA2E;AAC3E,iFAAiF;AACjF,2EAA2E;AAC3E,4EAA4E;AAC5E,UAAU;AACV,QAAe,CAAC,CAAC,mBAAmB,CAAC,KAAa;IAChD,OAAO,MAAM,EAAE,IAAI,EAAE,+BAAc,CAAC,eAAe,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC;AAC5E,CAAC","sourcesContent":["import { GuidActionType } from './GuidActionType';\nimport { GuidNewSortableManyActionRequester } from './GuidNewSortableManyActionRequesterTypes';\n\n// Mint `count` sortable ids in ONE action. The processor generates them in\n// sequence, so the returned array is itself in sort order: ids[0] < ids[1] < ...\n// (uuidv7's counter bits keep same-millisecond mints monotonic). The batch\n// primitive for bulk writers — one append fan-out should not pay one action\n// per id.\nexport function* askNewSortableGuids(count: number): GuidNewSortableManyActionRequester {\n return yield { type: GuidActionType.NewSortableMany, payload: { count } };\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
+
import { GuidActionType } from './GuidActionType';
|
|
3
|
+
export interface GuidNewSortableManyActionPayload {
|
|
4
|
+
count: number;
|
|
5
|
+
}
|
|
6
|
+
export interface GuidNewSortableManyAction extends Action<GuidNewSortableManyActionPayload> {
|
|
7
|
+
type: GuidActionType.NewSortableMany;
|
|
8
|
+
payload: GuidNewSortableManyActionPayload;
|
|
9
|
+
}
|
|
10
|
+
export type GuidNewSortableManyActionProcessor = ActionProcessor<GuidNewSortableManyAction, string[]>;
|
|
11
|
+
export type GuidNewSortableManyActionRequester = ActionRequester<GuidNewSortableManyAction, string[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidNewSortableManyActionRequesterTypes.js","sourceRoot":"","sources":["../../../../src/actions/guid/GuidNewSortableManyActionRequesterTypes.ts"],"names":[],"mappings":"","sourcesContent":["import { Action, ActionProcessor, ActionRequester } from '../../types/Action';\nimport { GuidActionType } from './GuidActionType';\n\n// Payload\nexport interface GuidNewSortableManyActionPayload {\n count: number;\n}\n\n// Action\nexport interface GuidNewSortableManyAction extends Action<GuidNewSortableManyActionPayload> {\n type: GuidActionType.NewSortableMany;\n payload: GuidNewSortableManyActionPayload;\n}\n\n// Function Types\nexport type GuidNewSortableManyActionProcessor = ActionProcessor<GuidNewSortableManyAction, string[]>;\nexport type GuidNewSortableManyActionRequester = ActionRequester<GuidNewSortableManyAction, string[]>;\n"]}
|
|
@@ -3,3 +3,5 @@ export * from './GuidNewActionRequester';
|
|
|
3
3
|
export * from './GuidNewActionRequesterTypes';
|
|
4
4
|
export * from './GuidNewSortableActionRequester';
|
|
5
5
|
export * from './GuidNewSortableActionRequesterTypes';
|
|
6
|
+
export * from './GuidNewSortableManyActionRequester';
|
|
7
|
+
export * from './GuidNewSortableManyActionRequesterTypes';
|
|
@@ -19,4 +19,6 @@ __exportStar(require("./GuidNewActionRequester"), exports);
|
|
|
19
19
|
__exportStar(require("./GuidNewActionRequesterTypes"), exports);
|
|
20
20
|
__exportStar(require("./GuidNewSortableActionRequester"), exports);
|
|
21
21
|
__exportStar(require("./GuidNewSortableActionRequesterTypes"), exports);
|
|
22
|
+
__exportStar(require("./GuidNewSortableManyActionRequester"), exports);
|
|
23
|
+
__exportStar(require("./GuidNewSortableManyActionRequesterTypes"), exports);
|
|
22
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/actions/guid/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,2DAAyC;AACzC,gEAA8C;AAC9C,mEAAiD;AACjD,wEAAsD","sourcesContent":["export * from './GuidActionType';\nexport * from './GuidNewActionRequester';\nexport * from './GuidNewActionRequesterTypes';\nexport * from './GuidNewSortableActionRequester';\nexport * from './GuidNewSortableActionRequesterTypes';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/actions/guid/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,2DAAyC;AACzC,gEAA8C;AAC9C,mEAAiD;AACjD,wEAAsD;AACtD,uEAAqD;AACrD,4EAA0D","sourcesContent":["export * from './GuidActionType';\nexport * from './GuidNewActionRequester';\nexport * from './GuidNewActionRequesterTypes';\nexport * from './GuidNewSortableActionRequester';\nexport * from './GuidNewSortableActionRequesterTypes';\nexport * from './GuidNewSortableManyActionRequester';\nexport * from './GuidNewSortableManyActionRequesterTypes';\n"]}
|
|
@@ -20,6 +20,7 @@ __exportStar(require("./config"), exports);
|
|
|
20
20
|
__exportStar(require("./context"), exports);
|
|
21
21
|
__exportStar(require("./crypto"), exports);
|
|
22
22
|
__exportStar(require("./date"), exports);
|
|
23
|
+
__exportStar(require("./dynamicFunctions"), exports);
|
|
23
24
|
__exportStar(require("./error"), exports);
|
|
24
25
|
__exportStar(require("./event"), exports);
|
|
25
26
|
__exportStar(require("./eventBus"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/actions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uCAAqB;AACrB,6CAA2B;AAC3B,2CAAyB;AACzB,4CAA0B;AAC1B,2CAAyB;AACzB,yCAAuB;AACvB,0CAAwB;AACxB,0CAAwB;AACxB,6CAA2B;AAC3B,yCAAuB;AACvB,kDAAgC;AAChC,yCAAuB;AACvB,mDAAiC;AACjC,kDAAgC;AAChC,wCAAsB;AACtB,yCAAuB;AACvB,2CAAyB;AACzB,4CAA0B;AAC1B,6CAA2B;AAC3B,0CAAwB;AACxB,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,kDAAgC","sourcesContent":["export * from './ai';\nexport * from './claudeAi';\nexport * from './config';\nexport * from './context';\nexport * from './crypto';\nexport * from './date';\nexport * from './error';\nexport * from './event';\nexport * from './eventBus';\nexport * from './file';\nexport * from './graphDatabase';\nexport * from './guid';\nexport * from './inlineFunction';\nexport * from './keyValueStore';\nexport * from './log';\nexport * from './math';\nexport * from './metric';\nexport * from './network';\nexport * from './platform';\nexport * from './queue';\nexport * from './state';\nexport * from './stream';\nexport * from './system';\nexport * from './userDirectory';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/actions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uCAAqB;AACrB,6CAA2B;AAC3B,2CAAyB;AACzB,4CAA0B;AAC1B,2CAAyB;AACzB,yCAAuB;AACvB,qDAAmC;AACnC,0CAAwB;AACxB,0CAAwB;AACxB,6CAA2B;AAC3B,yCAAuB;AACvB,kDAAgC;AAChC,yCAAuB;AACvB,mDAAiC;AACjC,kDAAgC;AAChC,wCAAsB;AACtB,yCAAuB;AACvB,2CAAyB;AACzB,4CAA0B;AAC1B,6CAA2B;AAC3B,0CAAwB;AACxB,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,kDAAgC","sourcesContent":["export * from './ai';\nexport * from './claudeAi';\nexport * from './config';\nexport * from './context';\nexport * from './crypto';\nexport * from './date';\nexport * from './dynamicFunctions';\nexport * from './error';\nexport * from './event';\nexport * from './eventBus';\nexport * from './file';\nexport * from './graphDatabase';\nexport * from './guid';\nexport * from './inlineFunction';\nexport * from './keyValueStore';\nexport * from './log';\nexport * from './math';\nexport * from './metric';\nexport * from './network';\nexport * from './platform';\nexport * from './queue';\nexport * from './state';\nexport * from './stream';\nexport * from './system';\nexport * from './userDirectory';\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare enum KeyValueStoreActionType {
|
|
2
2
|
Upsert = "@quidproquo-core/KeyValueStore/Upsert",
|
|
3
|
+
UpsertMany = "@quidproquo-core/KeyValueStore/UpsertMany",
|
|
3
4
|
Get = "@quidproquo-core/KeyValueStore/Get",
|
|
4
5
|
GetAll = "@quidproquo-core/KeyValueStore/GetAll",
|
|
5
6
|
Delete = "@quidproquo-core/KeyValueStore/Delete",
|
|
@@ -4,6 +4,7 @@ exports.KeyValueStoreActionType = void 0;
|
|
|
4
4
|
var KeyValueStoreActionType;
|
|
5
5
|
(function (KeyValueStoreActionType) {
|
|
6
6
|
KeyValueStoreActionType["Upsert"] = "@quidproquo-core/KeyValueStore/Upsert";
|
|
7
|
+
KeyValueStoreActionType["UpsertMany"] = "@quidproquo-core/KeyValueStore/UpsertMany";
|
|
7
8
|
KeyValueStoreActionType["Get"] = "@quidproquo-core/KeyValueStore/Get";
|
|
8
9
|
KeyValueStoreActionType["GetAll"] = "@quidproquo-core/KeyValueStore/GetAll";
|
|
9
10
|
KeyValueStoreActionType["Delete"] = "@quidproquo-core/KeyValueStore/Delete";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyValueStoreActionType.js","sourceRoot":"","sources":["../../../../src/actions/keyValueStore/KeyValueStoreActionType.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"KeyValueStoreActionType.js","sourceRoot":"","sources":["../../../../src/actions/keyValueStore/KeyValueStoreActionType.ts"],"names":[],"mappings":";;;AAAA,IAAY,uBAUX;AAVD,WAAY,uBAAuB;IACjC,2EAAgD,CAAA;IAChD,mFAAwD,CAAA;IACxD,qEAA0C,CAAA;IAC1C,2EAAgD,CAAA;IAChD,2EAAgD,CAAA;IAChD,2EAAgD,CAAA;IAChD,yEAA8C,CAAA;IAC9C,uEAA4C,CAAA;IAC5C,yFAA8D,CAAA;AAChE,CAAC,EAVW,uBAAuB,uCAAvB,uBAAuB,QAUlC","sourcesContent":["export enum KeyValueStoreActionType {\n Upsert = '@quidproquo-core/KeyValueStore/Upsert',\n UpsertMany = '@quidproquo-core/KeyValueStore/UpsertMany',\n Get = '@quidproquo-core/KeyValueStore/Get',\n GetAll = '@quidproquo-core/KeyValueStore/GetAll',\n Delete = '@quidproquo-core/KeyValueStore/Delete',\n Update = '@quidproquo-core/KeyValueStore/Update',\n Query = '@quidproquo-core/KeyValueStore/Query',\n Scan = '@quidproquo-core/KeyValueStore/Scan',\n ScanAllScopes = '@quidproquo-core/KeyValueStore/ScanAllScopes',\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyValueStoreQueryActionTypes.js","sourceRoot":"","sources":["../../../../src/actions/keyValueStore/KeyValueStoreQueryActionTypes.ts"],"names":[],"mappings":"","sourcesContent":["import { QpqPagedData } from '../../types';\nimport { Action, ActionProcessor, ActionRequester } from '../../types/Action';\nimport { KeyValueStoreActionType } from './KeyValueStoreActionType';\nimport { KvsQueryOperation } from './types';\n\n// Options Type\nexport interface KeyValueStoreQueryOptions {\n // Accepted but not implemented: no processor applies a TTL to query results.\n ttlInSeconds?: number;\n sortAscending?: boolean;\n limit?: number;\n nextPageKey?: string;\n filter?: KvsQueryOperation;\n // Composed into partition-key conditions by the processor; requires a string-typed partition key.\n scope?: string;\n}\n\n// Payload\nexport interface KeyValueStoreQueryActionPayload {\n keyValueStoreName: string;\n\n keyCondition: KvsQueryOperation;\n\n options?: KeyValueStoreQueryOptions;\n}\n\n// Action\nexport interface KeyValueStoreQueryAction extends Action<KeyValueStoreQueryActionPayload> {\n type: KeyValueStoreActionType.Query;\n payload: KeyValueStoreQueryActionPayload;\n}\n\n// Function Types\nexport type KeyValueStoreQueryActionProcessor<KvsItem> = ActionProcessor<KeyValueStoreQueryAction, QpqPagedData<KvsItem>>;\nexport type KeyValueStoreQueryActionRequester<KvsItem> = ActionRequester<KeyValueStoreQueryAction, QpqPagedData<KvsItem>>;\n"]}
|
|
1
|
+
{"version":3,"file":"KeyValueStoreQueryActionTypes.js","sourceRoot":"","sources":["../../../../src/actions/keyValueStore/KeyValueStoreQueryActionTypes.ts"],"names":[],"mappings":"","sourcesContent":["import { QpqPagedData } from '../../types';\nimport { Action, ActionProcessor, ActionRequester } from '../../types/Action';\nimport { KeyValueStoreActionType } from './KeyValueStoreActionType';\nimport { KvsQueryOperation } from './types';\n\n// Options Type\nexport interface KeyValueStoreQueryOptions {\n // Accepted but not implemented: no processor applies a TTL to query results.\n ttlInSeconds?: number;\n sortAscending?: boolean;\n limit?: number;\n nextPageKey?: string;\n filter?: KvsQueryOperation;\n // Composed into partition-key conditions by the processor; requires a string-typed partition key.\n scope?: string;\n // Read the writer's own most recent writes, at the cost of a slower and (on DynamoDB) doubly-charged\n // read.\n //\n // Default reads are EVENTUALLY consistent, which is right for a viewer and wrong for a caller that just\n // wrote and is now reading back to decide something. That case is not hypothetical: a flow run appends\n // its terminal event and immediately re-lists the log to fold the outcome, and under load the terminal\n // event is intermittently not yet visible — so a run that succeeded reads back as having no outcome at\n // all, with nothing recorded to explain it.\n //\n // Use it for read-your-own-writes and for any fold used as a COORDINATION primitive (deciding \"am I\n // last\", \"did this finish\"). Do not use it for ordinary reads.\n consistentRead?: boolean;\n}\n\n// Payload\nexport interface KeyValueStoreQueryActionPayload {\n keyValueStoreName: string;\n\n keyCondition: KvsQueryOperation;\n\n options?: KeyValueStoreQueryOptions;\n}\n\n// Action\nexport interface KeyValueStoreQueryAction extends Action<KeyValueStoreQueryActionPayload> {\n type: KeyValueStoreActionType.Query;\n payload: KeyValueStoreQueryActionPayload;\n}\n\n// Function Types\nexport type KeyValueStoreQueryActionProcessor<KvsItem> = ActionProcessor<KeyValueStoreQueryAction, QpqPagedData<KvsItem>>;\nexport type KeyValueStoreQueryActionRequester<KvsItem> = ActionRequester<KeyValueStoreQueryAction, QpqPagedData<KvsItem>>;\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { KeyValueStoreUpsertManyActionRequester, KeyValueStoreUpsertManyOptions } from './KeyValueStoreUpsertManyActionTypes';
|
|
2
|
+
export declare const KeyValueStoreUpsertManyErrorTypeEnum: {
|
|
3
|
+
ResourceNotFound: string;
|
|
4
|
+
ServiceUnavailable: string;
|
|
5
|
+
InvalidScope: string;
|
|
6
|
+
StoreNotFound: string;
|
|
7
|
+
DuplicateKey: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function askKeyValueStoreUpsertMany<KvsItem>(keyValueStoreName: string, items: KvsItem[], options?: KeyValueStoreUpsertManyOptions): KeyValueStoreUpsertManyActionRequester<KvsItem>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KeyValueStoreUpsertManyErrorTypeEnum = void 0;
|
|
4
|
+
exports.askKeyValueStoreUpsertMany = askKeyValueStoreUpsertMany;
|
|
5
|
+
const types_1 = require("../../types");
|
|
6
|
+
const KeyValueStoreActionType_1 = require("./KeyValueStoreActionType");
|
|
7
|
+
exports.KeyValueStoreUpsertManyErrorTypeEnum = (0, types_1.createErrorEnumForAction)(KeyValueStoreActionType_1.KeyValueStoreActionType.UpsertMany, [
|
|
8
|
+
'ServiceUnavailable',
|
|
9
|
+
'ResourceNotFound',
|
|
10
|
+
'InvalidScope', // scope is malformed or the store's partition key is not string-typed
|
|
11
|
+
'StoreNotFound', // the store is not declared in the qpq config (misconfiguration)
|
|
12
|
+
// Two items in one batch share a primary key. Rejected up front on every
|
|
13
|
+
// runtime, before anything is written: DynamoDB rejects same-key duplicates
|
|
14
|
+
// only when they land in the same 25-item BatchWriteItem chunk (across chunks
|
|
15
|
+
// the later write silently wins), so without this check the outcome would
|
|
16
|
+
// depend on item position and never reproduce locally.
|
|
17
|
+
'DuplicateKey',
|
|
18
|
+
]);
|
|
19
|
+
// Write many items in ONE action. The batch primitive for bulk writers (an
|
|
20
|
+
// event-log fan-out persisting hundreds of rows should not pay one action per
|
|
21
|
+
// row): processors batch the underlying writes (DynamoDB BatchWriteItem in
|
|
22
|
+
// chunks of 25, one repository pass locally) and retry partial acceptance
|
|
23
|
+
// internally, so the call is all-or-error from the story's point of view.
|
|
24
|
+
//
|
|
25
|
+
// UNCONDITIONAL, unlike askKeyValueStoreUpsert: batch writes cannot carry an
|
|
26
|
+
// ifNotExists condition (BatchWriteItem has no ConditionExpression), so this is
|
|
27
|
+
// only for items whose keys are unique by construction — a caller that needs
|
|
28
|
+
// the write race surfaced must use the single Upsert.
|
|
29
|
+
function* askKeyValueStoreUpsertMany(keyValueStoreName, items, options) {
|
|
30
|
+
return yield {
|
|
31
|
+
type: KeyValueStoreActionType_1.KeyValueStoreActionType.UpsertMany,
|
|
32
|
+
payload: {
|
|
33
|
+
keyValueStoreName,
|
|
34
|
+
items,
|
|
35
|
+
options,
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=KeyValueStoreUpsertManyActionRequester.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeyValueStoreUpsertManyActionRequester.js","sourceRoot":"","sources":["../../../../src/actions/keyValueStore/KeyValueStoreUpsertManyActionRequester.ts"],"names":[],"mappings":";;;AA2BA,gEAaC;AAxCD,uCAAuD;AACvD,uEAAoE;AAGvD,QAAA,oCAAoC,GAAG,IAAA,gCAAwB,EAAC,iDAAuB,CAAC,UAAU,EAAE;IAC/G,oBAAoB;IACpB,kBAAkB;IAClB,cAAc,EAAE,sEAAsE;IACtF,eAAe,EAAE,iEAAiE;IAClF,yEAAyE;IACzE,4EAA4E;IAC5E,8EAA8E;IAC9E,0EAA0E;IAC1E,uDAAuD;IACvD,cAAc;CACf,CAAC,CAAC;AAEH,2EAA2E;AAC3E,8EAA8E;AAC9E,2EAA2E;AAC3E,0EAA0E;AAC1E,0EAA0E;AAC1E,EAAE;AACF,6EAA6E;AAC7E,gFAAgF;AAChF,6EAA6E;AAC7E,sDAAsD;AACtD,QAAe,CAAC,CAAC,0BAA0B,CACzC,iBAAyB,EACzB,KAAgB,EAChB,OAAwC;IAExC,OAAO,MAAM;QACX,IAAI,EAAE,iDAAuB,CAAC,UAAU;QACxC,OAAO,EAAE;YACP,iBAAiB;YACjB,KAAK;YACL,OAAO;SACR;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { createErrorEnumForAction } from '../../types';\nimport { KeyValueStoreActionType } from './KeyValueStoreActionType';\nimport { KeyValueStoreUpsertManyActionRequester, KeyValueStoreUpsertManyOptions } from './KeyValueStoreUpsertManyActionTypes';\n\nexport const KeyValueStoreUpsertManyErrorTypeEnum = createErrorEnumForAction(KeyValueStoreActionType.UpsertMany, [\n 'ServiceUnavailable',\n 'ResourceNotFound',\n 'InvalidScope', // scope is malformed or the store's partition key is not string-typed\n 'StoreNotFound', // the store is not declared in the qpq config (misconfiguration)\n // Two items in one batch share a primary key. Rejected up front on every\n // runtime, before anything is written: DynamoDB rejects same-key duplicates\n // only when they land in the same 25-item BatchWriteItem chunk (across chunks\n // the later write silently wins), so without this check the outcome would\n // depend on item position and never reproduce locally.\n 'DuplicateKey',\n]);\n\n// Write many items in ONE action. The batch primitive for bulk writers (an\n// event-log fan-out persisting hundreds of rows should not pay one action per\n// row): processors batch the underlying writes (DynamoDB BatchWriteItem in\n// chunks of 25, one repository pass locally) and retry partial acceptance\n// internally, so the call is all-or-error from the story's point of view.\n//\n// UNCONDITIONAL, unlike askKeyValueStoreUpsert: batch writes cannot carry an\n// ifNotExists condition (BatchWriteItem has no ConditionExpression), so this is\n// only for items whose keys are unique by construction — a caller that needs\n// the write race surfaced must use the single Upsert.\nexport function* askKeyValueStoreUpsertMany<KvsItem>(\n keyValueStoreName: string,\n items: KvsItem[],\n options?: KeyValueStoreUpsertManyOptions,\n): KeyValueStoreUpsertManyActionRequester<KvsItem> {\n return yield {\n type: KeyValueStoreActionType.UpsertMany,\n payload: {\n keyValueStoreName,\n items,\n options,\n },\n };\n}\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
+
import { KeyValueStoreActionType } from './KeyValueStoreActionType';
|
|
3
|
+
export interface KeyValueStoreUpsertManyOptions {
|
|
4
|
+
scope?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface KeyValueStoreUpsertManyActionPayload<KvsItem> {
|
|
7
|
+
keyValueStoreName: string;
|
|
8
|
+
items: KvsItem[];
|
|
9
|
+
options?: KeyValueStoreUpsertManyOptions;
|
|
10
|
+
}
|
|
11
|
+
export interface KeyValueStoreUpsertManyAction<KvsItem> extends Action<KeyValueStoreUpsertManyActionPayload<KvsItem>> {
|
|
12
|
+
type: KeyValueStoreActionType.UpsertMany;
|
|
13
|
+
payload: KeyValueStoreUpsertManyActionPayload<KvsItem>;
|
|
14
|
+
}
|
|
15
|
+
export type KeyValueStoreUpsertManyActionProcessor<KvsItem> = ActionProcessor<KeyValueStoreUpsertManyAction<KvsItem>, void>;
|
|
16
|
+
export type KeyValueStoreUpsertManyActionRequester<KvsItem> = ActionRequester<KeyValueStoreUpsertManyAction<KvsItem>, void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeyValueStoreUpsertManyActionTypes.js","sourceRoot":"","sources":["../../../../src/actions/keyValueStore/KeyValueStoreUpsertManyActionTypes.ts"],"names":[],"mappings":"","sourcesContent":["import { Action, ActionProcessor, ActionRequester } from '../../types/Action';\nimport { KeyValueStoreActionType } from './KeyValueStoreActionType';\n\n// Options Type\nexport interface KeyValueStoreUpsertManyOptions {\n // Composed into each item's partition key value by the processor; requires a string-typed partition key.\n scope?: string;\n}\n\n// Payload\nexport interface KeyValueStoreUpsertManyActionPayload<KvsItem> {\n keyValueStoreName: string;\n items: KvsItem[];\n options?: KeyValueStoreUpsertManyOptions;\n}\n\n// Action\nexport interface KeyValueStoreUpsertManyAction<KvsItem> extends Action<KeyValueStoreUpsertManyActionPayload<KvsItem>> {\n type: KeyValueStoreActionType.UpsertMany;\n payload: KeyValueStoreUpsertManyActionPayload<KvsItem>;\n}\n\n// Function Types\nexport type KeyValueStoreUpsertManyActionProcessor<KvsItem> = ActionProcessor<KeyValueStoreUpsertManyAction<KvsItem>, void>;\nexport type KeyValueStoreUpsertManyActionRequester<KvsItem> = ActionRequester<KeyValueStoreUpsertManyAction<KvsItem>, void>;\n"]}
|
|
@@ -15,5 +15,7 @@ export * from './KeyValueStoreUpdateActionRequester';
|
|
|
15
15
|
export * from './KeyValueStoreUpdateActionTypes';
|
|
16
16
|
export * from './KeyValueStoreUpsertActionRequester';
|
|
17
17
|
export * from './KeyValueStoreUpsertActionTypes';
|
|
18
|
+
export * from './KeyValueStoreUpsertManyActionRequester';
|
|
19
|
+
export * from './KeyValueStoreUpsertManyActionTypes';
|
|
18
20
|
export * from './types';
|
|
19
21
|
export * from './utils';
|
|
@@ -31,6 +31,8 @@ __exportStar(require("./KeyValueStoreUpdateActionRequester"), exports);
|
|
|
31
31
|
__exportStar(require("./KeyValueStoreUpdateActionTypes"), exports);
|
|
32
32
|
__exportStar(require("./KeyValueStoreUpsertActionRequester"), exports);
|
|
33
33
|
__exportStar(require("./KeyValueStoreUpsertActionTypes"), exports);
|
|
34
|
+
__exportStar(require("./KeyValueStoreUpsertManyActionRequester"), exports);
|
|
35
|
+
__exportStar(require("./KeyValueStoreUpsertManyActionTypes"), exports);
|
|
34
36
|
__exportStar(require("./types"), exports);
|
|
35
37
|
__exportStar(require("./utils"), exports);
|
|
36
38
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/actions/keyValueStore/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0EAAwD;AACxD,8EAA4D;AAC5D,4DAA0C;AAC1C,uEAAqD;AACrD,mEAAiD;AACjD,oEAAkD;AAClD,gEAA8C;AAC9C,uEAAqD;AACrD,mEAAiD;AACjD,sEAAoD;AACpD,kEAAgD;AAChD,qEAAmD;AACnD,iEAA+C;AAC/C,uEAAqD;AACrD,mEAAiD;AACjD,uEAAqD;AACrD,mEAAiD;AACjD,0CAAwB;AACxB,0CAAwB","sourcesContent":["export * from './KeyValueStoreScanAllScopesActionTypes';\nexport * from './KeyValueStoreScanAllScopesActionRequester';\nexport * from './KeyValueStoreActionType';\nexport * from './KeyValueStoreDeleteActionRequester';\nexport * from './KeyValueStoreDeleteActionTypes';\nexport * from './KeyValueStoreGetActionRequester';\nexport * from './KeyValueStoreGetActionTypes';\nexport * from './KeyValueStoreGetAllActionRequester';\nexport * from './KeyValueStoreGetAllActionTypes';\nexport * from './KeyValueStoreQueryActionRequester';\nexport * from './KeyValueStoreQueryActionTypes';\nexport * from './KeyValueStoreScanActionRequester';\nexport * from './KeyValueStoreScanActionTypes';\nexport * from './KeyValueStoreUpdateActionRequester';\nexport * from './KeyValueStoreUpdateActionTypes';\nexport * from './KeyValueStoreUpsertActionRequester';\nexport * from './KeyValueStoreUpsertActionTypes';\nexport * from './types';\nexport * from './utils';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/actions/keyValueStore/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0EAAwD;AACxD,8EAA4D;AAC5D,4DAA0C;AAC1C,uEAAqD;AACrD,mEAAiD;AACjD,oEAAkD;AAClD,gEAA8C;AAC9C,uEAAqD;AACrD,mEAAiD;AACjD,sEAAoD;AACpD,kEAAgD;AAChD,qEAAmD;AACnD,iEAA+C;AAC/C,uEAAqD;AACrD,mEAAiD;AACjD,uEAAqD;AACrD,mEAAiD;AACjD,2EAAyD;AACzD,uEAAqD;AACrD,0CAAwB;AACxB,0CAAwB","sourcesContent":["export * from './KeyValueStoreScanAllScopesActionTypes';\nexport * from './KeyValueStoreScanAllScopesActionRequester';\nexport * from './KeyValueStoreActionType';\nexport * from './KeyValueStoreDeleteActionRequester';\nexport * from './KeyValueStoreDeleteActionTypes';\nexport * from './KeyValueStoreGetActionRequester';\nexport * from './KeyValueStoreGetActionTypes';\nexport * from './KeyValueStoreGetAllActionRequester';\nexport * from './KeyValueStoreGetAllActionTypes';\nexport * from './KeyValueStoreQueryActionRequester';\nexport * from './KeyValueStoreQueryActionTypes';\nexport * from './KeyValueStoreScanActionRequester';\nexport * from './KeyValueStoreScanActionTypes';\nexport * from './KeyValueStoreUpdateActionRequester';\nexport * from './KeyValueStoreUpdateActionTypes';\nexport * from './KeyValueStoreUpsertActionRequester';\nexport * from './KeyValueStoreUpsertActionTypes';\nexport * from './KeyValueStoreUpsertManyActionRequester';\nexport * from './KeyValueStoreUpsertManyActionTypes';\nexport * from './types';\nexport * from './utils';\n"]}
|
|
@@ -26,6 +26,7 @@ export declare enum QPQCoreConfigSettingType {
|
|
|
26
26
|
virtualNetwork = "@quidproquo-core/config/VirtualNetwork",
|
|
27
27
|
notifyError = "@quidproquo-core/config/notifyError",
|
|
28
28
|
inlineFunction = "@quidproquo-core/config/InlineFunction",
|
|
29
|
+
dynamicFunctions = "@quidproquo-core/config/DynamicFunctions",
|
|
29
30
|
javascriptRuntime = "@quidproquo-core/config/JavascriptRuntime",
|
|
30
31
|
federatedModuleStore = "@quidproquo-core/config/FederatedModuleStore"
|
|
31
32
|
}
|
|
@@ -29,6 +29,7 @@ var QPQCoreConfigSettingType;
|
|
|
29
29
|
QPQCoreConfigSettingType["virtualNetwork"] = "@quidproquo-core/config/VirtualNetwork";
|
|
30
30
|
QPQCoreConfigSettingType["notifyError"] = "@quidproquo-core/config/notifyError";
|
|
31
31
|
QPQCoreConfigSettingType["inlineFunction"] = "@quidproquo-core/config/InlineFunction";
|
|
32
|
+
QPQCoreConfigSettingType["dynamicFunctions"] = "@quidproquo-core/config/DynamicFunctions";
|
|
32
33
|
QPQCoreConfigSettingType["javascriptRuntime"] = "@quidproquo-core/config/JavascriptRuntime";
|
|
33
34
|
QPQCoreConfigSettingType["federatedModuleStore"] = "@quidproquo-core/config/FederatedModuleStore";
|
|
34
35
|
})(QPQCoreConfigSettingType || (exports.QPQCoreConfigSettingType = QPQCoreConfigSettingType = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QPQConfig.js","sourceRoot":"","sources":["../../../src/config/QPQConfig.ts"],"names":[],"mappings":";;;AAEA,IAAY,
|
|
1
|
+
{"version":3,"file":"QPQConfig.js","sourceRoot":"","sources":["../../../src/config/QPQConfig.ts"],"names":[],"mappings":";;;AAEA,IAAY,wBA8BX;AA9BD,WAAY,wBAAwB;IAClC,6DAAiC,CAAA;IACjC,uEAA2C,CAAA;IAC3C,6EAAiD,CAAA;IACjD,iFAAqD,CAAA;IACrD,yEAA6C,CAAA;IAC7C,qEAAyC,CAAA;IACzC,qEAAyC,CAAA;IACzC,2EAA+C,CAAA;IAC/C,yFAA6D,CAAA;IAC7D,iFAAqD,CAAA;IACrD,iGAAqE,CAAA;IACrE,mGAAuE,CAAA;IACvE,mEAAuC,CAAA;IACvC,yEAA6C,CAAA;IAC7C,mFAAuD,CAAA;IACvD,mFAAuD,CAAA;IACvD,+EAAmD,CAAA;IACnD,2EAA+C,CAAA;IAC/C,+FAAmE,CAAA;IACnE,uFAA2D,CAAA;IAC3D,+EAAmD,CAAA;IACnD,yEAA6C,CAAA;IAC7C,mFAAuD,CAAA;IACvD,qFAAyD,CAAA;IACzD,+EAAmD,CAAA;IACnD,qFAAyD,CAAA;IACzD,yFAA6D,CAAA;IAC7D,2FAA+D,CAAA;IAC/D,iGAAqE,CAAA;AACvE,CAAC,EA9BW,wBAAwB,wCAAxB,wBAAwB,QA8BnC","sourcesContent":["import { CrossModuleOwner } from '../types';\n\nexport enum QPQCoreConfigSettingType {\n ai = '@quidproquo-core/config/Ai',\n appName = '@quidproquo-core/config/AppName',\n moduleName = '@quidproquo-core/config/moduleName',\n storageDrive = '@quidproquo-core/config/storageDrive',\n schedule = '@quidproquo-core/config/schedule',\n secret = '@quidproquo-core/config/secret',\n global = '@quidproquo-core/config/global',\n parameter = '@quidproquo-core/config/parameter',\n actionProcessors = '@quidproquo-core/config/actionProcessors',\n apiBuildPath = '@quidproquo-core/config/apiBuildPath',\n backendBundleOptions = '@quidproquo-core/config/BackendBundleOptions',\n frontendBundleOptions = '@quidproquo-core/config/FrontendBundleOptions',\n queue = '@quidproquo-core/config/Queue',\n eventBus = '@quidproquo-core/config/EventBus',\n userDirectory = '@quidproquo-core/config/UserDirectory',\n keyValueStore = '@quidproquo-core/config/KeyValueStore',\n configValue = '@quidproquo-core/config/ConfigValue',\n cryptoKey = '@quidproquo-core/config/cryptoKey',\n environmentSettings = '@quidproquo-core/config/EnvironmentSettings',\n serviceSettings = '@quidproquo-core/config/ServiceSettings',\n deployEvent = '@quidproquo-core/config/DeployEvent',\n claudeAi = '@quidproquo-core/config/ClaudeAi',\n graphDatabase = '@quidproquo-core/config/GraphDatabase',\n virtualNetwork = '@quidproquo-core/config/VirtualNetwork',\n notifyError = '@quidproquo-core/config/notifyError',\n inlineFunction = '@quidproquo-core/config/InlineFunction',\n dynamicFunctions = '@quidproquo-core/config/DynamicFunctions',\n javascriptRuntime = '@quidproquo-core/config/JavascriptRuntime',\n federatedModuleStore = '@quidproquo-core/config/FederatedModuleStore',\n}\n\nexport interface QPQConfigSetting {\n configSettingType: string;\n uniqueKey: string;\n\n owner?: CrossModuleOwner;\n}\n\nexport interface QPQConfigAdvancedSettings {\n deprecated?: boolean;\n}\n\nexport type QPQConfigItem = QPQConfigSetting | QPQConfigItem[];\nexport type QPQConfig = QPQConfigItem[];\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CrossModuleOwner, QpqFunctionRuntime } from '../../types';
|
|
2
|
+
import { QPQConfigAdvancedSettings, QPQConfigSetting } from '../QPQConfig';
|
|
3
|
+
export interface QPQConfigAdvancedDynamicFunctionsSettings extends QPQConfigAdvancedSettings {
|
|
4
|
+
owner?: CrossModuleOwner<'dynamicFunctionsName'>;
|
|
5
|
+
}
|
|
6
|
+
export interface DynamicFunctionsQPQConfigSetting extends QPQConfigSetting {
|
|
7
|
+
runtime: QpqFunctionRuntime;
|
|
8
|
+
dynamicFunctionsName: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const defineDynamicFunctions: (dynamicFunctionsName: string, runtime: QpqFunctionRuntime, options?: QPQConfigAdvancedDynamicFunctionsSettings) => DynamicFunctionsQPQConfigSetting;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defineDynamicFunctions = void 0;
|
|
4
|
+
const QPQConfig_1 = require("../QPQConfig");
|
|
5
|
+
const crossModuleUtils_1 = require("../utils/crossModuleUtils");
|
|
6
|
+
// Registers a module export - an OBJECT whose properties are functions - under a
|
|
7
|
+
// name, so stories can invoke its members via askDynamicFunctionExecute without a
|
|
8
|
+
// per-function registration. The successor to defineInlineFunction: one setting
|
|
9
|
+
// addresses a whole surface (name + member) instead of one function per entry.
|
|
10
|
+
const defineDynamicFunctions = (dynamicFunctionsName, runtime, options) => ({
|
|
11
|
+
configSettingType: QPQConfig_1.QPQCoreConfigSettingType.dynamicFunctions,
|
|
12
|
+
uniqueKey: dynamicFunctionsName,
|
|
13
|
+
runtime,
|
|
14
|
+
dynamicFunctionsName,
|
|
15
|
+
owner: (0, crossModuleUtils_1.convertCrossModuleOwnerToGenericResourceNameOverride)(options === null || options === void 0 ? void 0 : options.owner),
|
|
16
|
+
});
|
|
17
|
+
exports.defineDynamicFunctions = defineDynamicFunctions;
|
|
18
|
+
//# sourceMappingURL=dynamicFunctions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamicFunctions.js","sourceRoot":"","sources":["../../../../src/config/settings/dynamicFunctions.ts"],"names":[],"mappings":";;;AACA,4CAAqG;AACrG,gEAAiG;AAYjG,iFAAiF;AACjF,kFAAkF;AAClF,gFAAgF;AAChF,+EAA+E;AACxE,MAAM,sBAAsB,GAAG,CACpC,oBAA4B,EAC5B,OAA2B,EAC3B,OAAmD,EACjB,EAAE,CAAC,CAAC;IACtC,iBAAiB,EAAE,oCAAwB,CAAC,gBAAgB;IAC5D,SAAS,EAAE,oBAAoB;IAE/B,OAAO;IAEP,oBAAoB;IAEpB,KAAK,EAAE,IAAA,uEAAoD,EAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,CAAC;CAC5E,CAAC,CAAC;AAbU,QAAA,sBAAsB,0BAahC","sourcesContent":["import { CrossModuleOwner, QpqFunctionRuntime } from '../../types';\nimport { QPQConfigAdvancedSettings, QPQConfigSetting, QPQCoreConfigSettingType } from '../QPQConfig';\nimport { convertCrossModuleOwnerToGenericResourceNameOverride } from '../utils/crossModuleUtils';\n\nexport interface QPQConfigAdvancedDynamicFunctionsSettings extends QPQConfigAdvancedSettings {\n owner?: CrossModuleOwner<'dynamicFunctionsName'>;\n}\n\nexport interface DynamicFunctionsQPQConfigSetting extends QPQConfigSetting {\n runtime: QpqFunctionRuntime;\n\n dynamicFunctionsName: string;\n}\n\n// Registers a module export - an OBJECT whose properties are functions - under a\n// name, so stories can invoke its members via askDynamicFunctionExecute without a\n// per-function registration. The successor to defineInlineFunction: one setting\n// addresses a whole surface (name + member) instead of one function per entry.\nexport const defineDynamicFunctions = (\n dynamicFunctionsName: string,\n runtime: QpqFunctionRuntime,\n options?: QPQConfigAdvancedDynamicFunctionsSettings,\n): DynamicFunctionsQPQConfigSetting => ({\n configSettingType: QPQCoreConfigSettingType.dynamicFunctions,\n uniqueKey: dynamicFunctionsName,\n\n runtime,\n\n dynamicFunctionsName,\n\n owner: convertCrossModuleOwnerToGenericResourceNameOverride(options?.owner),\n});\n"]}
|
|
@@ -10,6 +10,7 @@ export * from './configValue';
|
|
|
10
10
|
export * from './cryptoKey';
|
|
11
11
|
export * from './definePromiseMode';
|
|
12
12
|
export * from './deployEvent';
|
|
13
|
+
export * from './dynamicFunctions';
|
|
13
14
|
export * from './emailTemplates';
|
|
14
15
|
export * from './environmentSettings';
|
|
15
16
|
export * from './eventBus';
|
|
@@ -26,6 +26,7 @@ __exportStar(require("./configValue"), exports);
|
|
|
26
26
|
__exportStar(require("./cryptoKey"), exports);
|
|
27
27
|
__exportStar(require("./definePromiseMode"), exports);
|
|
28
28
|
__exportStar(require("./deployEvent"), exports);
|
|
29
|
+
__exportStar(require("./dynamicFunctions"), exports);
|
|
29
30
|
__exportStar(require("./emailTemplates"), exports);
|
|
30
31
|
__exportStar(require("./environmentSettings"), exports);
|
|
31
32
|
__exportStar(require("./eventBus"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/config/settings/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,uCAAqB;AACrB,iDAA+B;AAC/B,sDAAoC;AACpC,oDAAkC;AAClC,uDAAqC;AACrC,kDAAgC;AAChC,6CAA2B;AAC3B,gDAA8B;AAC9B,8CAA4B;AAC5B,sDAAoC;AACpC,gDAA8B;AAC9B,mDAAiC;AACjC,wDAAsC;AACtC,6CAA2B;AAC3B,yDAAuC;AACvC,2CAAyB;AACzB,kDAAgC;AAChC,mDAAiC;AACjC,sDAAoC;AACpC,kDAAgC;AAChC,+CAA6B;AAC7B,gDAA8B;AAC9B,8CAA4B;AAC5B,0CAAwB;AACxB,6CAA2B;AAC3B,2CAAyB;AACzB,oDAAkC;AAClC,iDAA+B;AAC/B,kDAAgC;AAChC,mDAAiC","sourcesContent":["export * from './actionProcessors';\nexport * from './ai';\nexport * from './apiBuildPath';\nexport * from './applicationModule';\nexport * from './applicationName';\nexport * from './applicationVersion';\nexport * from './bundleOptions';\nexport * from './claudeAi';\nexport * from './configValue';\nexport * from './cryptoKey';\nexport * from './definePromiseMode';\nexport * from './deployEvent';\nexport * from './emailTemplates';\nexport * from './environmentSettings';\nexport * from './eventBus';\nexport * from './federatedModuleStore';\nexport * from './global';\nexport * from './graphDatabase';\nexport * from './inlineFunction';\nexport * from './javascriptRuntime';\nexport * from './keyValueStore';\nexport * from './moduleName';\nexport * from './notifyError';\nexport * from './parameter';\nexport * from './queue';\nexport * from './schedule';\nexport * from './secret';\nexport * from './serviceSettings';\nexport * from './storageDrive';\nexport * from './userDirectory';\nexport * from './virtualNetwork';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/config/settings/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,uCAAqB;AACrB,iDAA+B;AAC/B,sDAAoC;AACpC,oDAAkC;AAClC,uDAAqC;AACrC,kDAAgC;AAChC,6CAA2B;AAC3B,gDAA8B;AAC9B,8CAA4B;AAC5B,sDAAoC;AACpC,gDAA8B;AAC9B,qDAAmC;AACnC,mDAAiC;AACjC,wDAAsC;AACtC,6CAA2B;AAC3B,yDAAuC;AACvC,2CAAyB;AACzB,kDAAgC;AAChC,mDAAiC;AACjC,sDAAoC;AACpC,kDAAgC;AAChC,+CAA6B;AAC7B,gDAA8B;AAC9B,8CAA4B;AAC5B,0CAAwB;AACxB,6CAA2B;AAC3B,2CAAyB;AACzB,oDAAkC;AAClC,iDAA+B;AAC/B,kDAAgC;AAChC,mDAAiC","sourcesContent":["export * from './actionProcessors';\nexport * from './ai';\nexport * from './apiBuildPath';\nexport * from './applicationModule';\nexport * from './applicationName';\nexport * from './applicationVersion';\nexport * from './bundleOptions';\nexport * from './claudeAi';\nexport * from './configValue';\nexport * from './cryptoKey';\nexport * from './definePromiseMode';\nexport * from './deployEvent';\nexport * from './dynamicFunctions';\nexport * from './emailTemplates';\nexport * from './environmentSettings';\nexport * from './eventBus';\nexport * from './federatedModuleStore';\nexport * from './global';\nexport * from './graphDatabase';\nexport * from './inlineFunction';\nexport * from './javascriptRuntime';\nexport * from './keyValueStore';\nexport * from './moduleName';\nexport * from './notifyError';\nexport * from './parameter';\nexport * from './queue';\nexport * from './schedule';\nexport * from './secret';\nexport * from './serviceSettings';\nexport * from './storageDrive';\nexport * from './userDirectory';\nexport * from './virtualNetwork';\n"]}
|