quidproquo-core 0.1.19 → 0.1.20
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/keyValueStore/askKeyValueStoreUpsert.d.ts +1 -1
- package/lib/commonjs/actions/keyValueStore/askKeyValueStoreUpsert.js +6 -2
- package/lib/commonjs/actions/keyValueStore/askKeyValueStoreUpsert.js.map +1 -1
- package/lib/commonjs/actions/keyValueStore/askKeyValueStoreUpsertMany.d.ts +2 -1
- package/lib/commonjs/actions/keyValueStore/askKeyValueStoreUpsertMany.js +7 -0
- package/lib/commonjs/actions/keyValueStore/askKeyValueStoreUpsertMany.js.map +1 -1
- package/lib/commonjs/config/settings/userDirectory.d.ts +0 -1
- package/lib/commonjs/config/settings/userDirectory.js.map +1 -1
- package/lib/commonjs/stories/kvs/askKeyValueStoreUpsertWithRetry.js +4 -1
- package/lib/commonjs/stories/kvs/askKeyValueStoreUpsertWithRetry.js.map +1 -1
- package/lib/commonjs/types/QpqFunctionRuntime.d.ts +2 -4
- package/lib/commonjs/types/QpqFunctionRuntime.js.map +1 -1
- package/lib/commonjs/types/QpqPureFunction.d.ts +10 -0
- package/lib/commonjs/types/QpqPureFunction.js +3 -0
- package/lib/commonjs/types/QpqPureFunction.js.map +1 -0
- package/lib/commonjs/types/index.d.ts +1 -0
- package/lib/commonjs/types/index.js +1 -0
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/esm/actions/keyValueStore/askKeyValueStoreUpsert.d.ts +1 -1
- package/lib/esm/actions/keyValueStore/askKeyValueStoreUpsert.js +6 -2
- package/lib/esm/actions/keyValueStore/askKeyValueStoreUpsert.js.map +1 -1
- package/lib/esm/actions/keyValueStore/askKeyValueStoreUpsertMany.d.ts +2 -1
- package/lib/esm/actions/keyValueStore/askKeyValueStoreUpsertMany.js +7 -0
- package/lib/esm/actions/keyValueStore/askKeyValueStoreUpsertMany.js.map +1 -1
- package/lib/esm/config/settings/userDirectory.d.ts +0 -1
- package/lib/esm/config/settings/userDirectory.js.map +1 -1
- package/lib/esm/stories/kvs/askKeyValueStoreUpsertWithRetry.js +4 -1
- package/lib/esm/stories/kvs/askKeyValueStoreUpsertWithRetry.js.map +1 -1
- package/lib/esm/types/QpqFunctionRuntime.d.ts +2 -4
- package/lib/esm/types/QpqFunctionRuntime.js.map +1 -1
- package/lib/esm/types/QpqPureFunction.d.ts +10 -0
- package/lib/esm/types/QpqPureFunction.js +2 -0
- package/lib/esm/types/QpqPureFunction.js.map +1 -0
- package/lib/esm/types/index.d.ts +1 -0
- package/lib/esm/types/index.js +1 -0
- package/lib/esm/types/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -10,5 +10,5 @@ export declare const askKeyValueStoreUpsertBase: import("../..").ActionRequester
|
|
|
10
10
|
keyValueStoreName: string;
|
|
11
11
|
item: KvsItemRecord;
|
|
12
12
|
options: KeyValueStoreUpsertOptions | undefined;
|
|
13
|
-
}, void, "Conflict" | "ResourceNotFound" | "ServiceUnavailable" | "InvalidScope" | "StoreNotFound">;
|
|
13
|
+
}, void, "Conflict" | "ResourceNotFound" | "ServiceUnavailable" | "InvalidScope" | "StoreNotFound" | "WriteContention">;
|
|
14
14
|
export declare function askKeyValueStoreUpsert<KvsItem>(keyValueStoreName: string, item: KvsItem, options?: KeyValueStoreUpsertOptions): AskResponse<void>;
|
|
@@ -9,10 +9,14 @@ exports.askKeyValueStoreUpsertBase = (0, createActionRequester_1.createActionReq
|
|
|
9
9
|
errorTypes: [
|
|
10
10
|
'ServiceUnavailable', // DynamoDB internal error / throttling
|
|
11
11
|
'ResourceNotFound', // the underlying table does not exist
|
|
12
|
-
// A conditional (ifNotExists) write lost to an existing item.
|
|
13
|
-
// not ErrorTypeEnum.Conflict
|
|
12
|
+
// A conditional (ifNotExists) write lost to an existing item. Final: the slot is taken.
|
|
13
|
+
// Namespaced, not ErrorTypeEnum.Conflict, so retry logic can target the write race
|
|
14
14
|
// specifically without also catching domain-level conflicts.
|
|
15
15
|
'Conflict',
|
|
16
|
+
// Another write (a transaction in flight) holds the item right now. Transient: the item
|
|
17
|
+
// may still be absent once it settles, so this is a retry, never "already exists".
|
|
18
|
+
// askKeyValueStoreUpsertWithRetry retries it.
|
|
19
|
+
'WriteContention',
|
|
16
20
|
'InvalidScope', // scope is malformed or the store's partition key is not string-typed
|
|
17
21
|
'StoreNotFound', // the store is not declared in the qpq config (misconfiguration)
|
|
18
22
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"askKeyValueStoreUpsert.js","sourceRoot":"","sources":["../../../../src/actions/keyValueStore/askKeyValueStoreUpsert.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"askKeyValueStoreUpsert.js","sourceRoot":"","sources":["../../../../src/actions/keyValueStore/askKeyValueStoreUpsert.ts"],"names":[],"mappings":";;;AAsCA,wDAEC;AAvCD,mFAAgF;AAChF,uEAAoE;AAgBvD,QAAA,0BAA0B,GAAG,IAAA,6CAAqB,GAAQ,CAAC;IACtE,UAAU,EAAE,iDAAuB,CAAC,MAAM;IAC1C,UAAU,EAAE;QACV,oBAAoB,EAAE,uCAAuC;QAC7D,kBAAkB,EAAE,sCAAsC;QAC1D,wFAAwF;QACxF,mFAAmF;QACnF,6DAA6D;QAC7D,UAAU;QACV,wFAAwF;QACxF,mFAAmF;QACnF,8CAA8C;QAC9C,iBAAiB;QACjB,cAAc,EAAE,sEAAsE;QACtF,eAAe,EAAE,iEAAiE;KACnF;IACD,UAAU,EAAE,CAAC,iBAAyB,EAAE,IAAmB,EAAE,OAAoC,EAAE,EAAE,CAAC,CAAC,EAAE,iBAAiB,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;CAC7I,CAAC,CAAC;AAEH,+EAA+E;AAC/E,QAAe,CAAC,CAAC,sBAAsB,CAAU,iBAAyB,EAAE,IAAa,EAAE,OAAoC;IAC7H,OAAO,KAAK,CAAC,CAAC,IAAA,kCAA0B,EAAC,iBAAiB,EAAE,IAAqB,EAAE,OAAO,CAAC,CAAC;AAC9F,CAAC","sourcesContent":["import { AskResponse } from '../../types/StorySession';\nimport { createActionRequester } from '../../types/utils/createActionRequester';\nimport { KeyValueStoreActionType } from './KeyValueStoreActionType';\nimport { KvsItemRecord } from './types';\n\nexport type KeyValueStoreUpsertOptions = {\n ttlInSeconds?: number; // Time-to-live in seconds\n\n // Conditional insert: only write when no item with the same key exists.\n // A losing concurrent writer gets ErrorTypeEnum.Conflict instead of silently\n // overwriting — the primitive for optimistic-concurrency schemes (e.g.\n // append-only event logs where the sort key is a claimed index).\n ifNotExists?: boolean;\n\n // Composed into the item's partition key value by the processor; requires a string-typed partition key.\n scope?: string;\n};\n\nexport const askKeyValueStoreUpsertBase = createActionRequester<void>()({\n actionType: KeyValueStoreActionType.Upsert,\n errorTypes: [\n 'ServiceUnavailable', // DynamoDB internal error / throttling\n 'ResourceNotFound', // the underlying table does not exist\n // A conditional (ifNotExists) write lost to an existing item. Final: the slot is taken.\n // Namespaced, not ErrorTypeEnum.Conflict, so retry logic can target the write race\n // specifically without also catching domain-level conflicts.\n 'Conflict',\n // Another write (a transaction in flight) holds the item right now. Transient: the item\n // may still be absent once it settles, so this is a retry, never \"already exists\".\n // askKeyValueStoreUpsertWithRetry retries it.\n 'WriteContention',\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 ],\n getPayload: (keyValueStoreName: string, item: KvsItemRecord, options?: KeyValueStoreUpsertOptions) => ({ keyValueStoreName, item, options }),\n});\n\n// Generic so callers can pin the item shape they are writing at the call site.\nexport function* askKeyValueStoreUpsert<KvsItem>(keyValueStoreName: string, item: KvsItem, options?: KeyValueStoreUpsertOptions): AskResponse<void> {\n return yield* askKeyValueStoreUpsertBase(keyValueStoreName, item as KvsItemRecord, options);\n}\n"]}
|
|
@@ -2,11 +2,12 @@ import { AskResponse } from '../../types/StorySession';
|
|
|
2
2
|
import { KeyValueStoreActionType } from './KeyValueStoreActionType';
|
|
3
3
|
import { KvsItemRecord } from './types';
|
|
4
4
|
export type KeyValueStoreUpsertManyOptions = {
|
|
5
|
+
ifNotExists?: boolean;
|
|
5
6
|
scope?: string;
|
|
6
7
|
};
|
|
7
8
|
export declare const askKeyValueStoreUpsertManyBase: import("../..").ActionRequesterFunction<KeyValueStoreActionType.UpsertMany, [keyValueStoreName: string, items: KvsItemRecord[], options?: KeyValueStoreUpsertManyOptions | undefined], {
|
|
8
9
|
keyValueStoreName: string;
|
|
9
10
|
items: KvsItemRecord[];
|
|
10
11
|
options: KeyValueStoreUpsertManyOptions | undefined;
|
|
11
|
-
}, void, "ResourceNotFound" | "ServiceUnavailable" | "InvalidScope" | "StoreNotFound" | "DuplicateKey">;
|
|
12
|
+
}, void, "Conflict" | "ResourceNotFound" | "ServiceUnavailable" | "InvalidScope" | "StoreNotFound" | "WriteContention" | "DuplicateKey">;
|
|
12
13
|
export declare function askKeyValueStoreUpsertMany<KvsItem>(keyValueStoreName: string, items: KvsItem[], options?: KeyValueStoreUpsertManyOptions): AskResponse<void>;
|
|
@@ -17,6 +17,13 @@ exports.askKeyValueStoreUpsertManyBase = (0, createActionRequester_1.createActio
|
|
|
17
17
|
// the later write silently wins), so without this check the outcome would
|
|
18
18
|
// depend on item position and never reproduce locally.
|
|
19
19
|
'DuplicateKey',
|
|
20
|
+
// A conditional (ifNotExists) batch lost to an existing item; none of the batch was
|
|
21
|
+
// written. Final: a slot is taken. Namespaced, not ErrorTypeEnum.Conflict, so retry
|
|
22
|
+
// logic can target the write race specifically without also catching domain-level conflicts.
|
|
23
|
+
'Conflict',
|
|
24
|
+
// Another write holds one of the batch's items right now; none of the batch was
|
|
25
|
+
// written. Transient: retry.
|
|
26
|
+
'WriteContention',
|
|
20
27
|
],
|
|
21
28
|
getPayload: (keyValueStoreName, items, options) => ({
|
|
22
29
|
keyValueStoreName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"askKeyValueStoreUpsertMany.js","sourceRoot":"","sources":["../../../../src/actions/keyValueStore/askKeyValueStoreUpsertMany.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"askKeyValueStoreUpsertMany.js","sourceRoot":"","sources":["../../../../src/actions/keyValueStore/askKeyValueStoreUpsertMany.ts"],"names":[],"mappings":";;;AA+CA,gEAMC;AApDD,mFAAgF;AAChF,uEAAoE;AAgBvD,QAAA,8BAA8B,GAAG,IAAA,6CAAqB,GAAQ,CAAC;IAC1E,UAAU,EAAE,iDAAuB,CAAC,UAAU;IAC9C,UAAU,EAAE;QACV,oBAAoB,EAAE,uCAAuC;QAC7D,kBAAkB,EAAE,sCAAsC;QAC1D,cAAc,EAAE,sEAAsE;QACtF,eAAe,EAAE,iEAAiE;QAClF,yEAAyE;QACzE,4EAA4E;QAC5E,8EAA8E;QAC9E,0EAA0E;QAC1E,uDAAuD;QACvD,cAAc;QACd,oFAAoF;QACpF,oFAAoF;QACpF,6FAA6F;QAC7F,UAAU;QACV,gFAAgF;QAChF,6BAA6B;QAC7B,iBAAiB;KAClB;IACD,UAAU,EAAE,CAAC,iBAAyB,EAAE,KAAsB,EAAE,OAAwC,EAAE,EAAE,CAAC,CAAC;QAC5G,iBAAiB;QACjB,KAAK;QACL,OAAO;KACR,CAAC;CACH,CAAC,CAAC;AAEH,+EAA+E;AAC/E,QAAe,CAAC,CAAC,0BAA0B,CACzC,iBAAyB,EACzB,KAAgB,EAChB,OAAwC;IAExC,OAAO,KAAK,CAAC,CAAC,IAAA,sCAA8B,EAAC,iBAAiB,EAAE,KAAwB,EAAE,OAAO,CAAC,CAAC;AACrG,CAAC","sourcesContent":["import { AskResponse } from '../../types/StorySession';\nimport { createActionRequester } from '../../types/utils/createActionRequester';\nimport { KeyValueStoreActionType } from './KeyValueStoreActionType';\nimport { KvsItemRecord } from './types';\n\nexport type KeyValueStoreUpsertManyOptions = {\n // Conditional batch insert: only write when NO item in the batch has an\n // existing key, and write ALL of them or none. The batch becomes a\n // transaction on every runtime (DynamoDB TransactWriteItems, a SQLite\n // transaction locally), so a losing concurrent writer gets the namespaced\n // Conflict with nothing landed - the batch primitive for claiming a run of\n // consecutive slots in an append-only log.\n ifNotExists?: boolean;\n\n // Composed into each item's partition key value by the processor; requires a string-typed partition key.\n scope?: string;\n};\n\nexport const askKeyValueStoreUpsertManyBase = createActionRequester<void>()({\n actionType: KeyValueStoreActionType.UpsertMany,\n errorTypes: [\n 'ServiceUnavailable', // DynamoDB internal error / throttling\n 'ResourceNotFound', // the underlying table does not exist\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 // A conditional (ifNotExists) batch lost to an existing item; none of the batch was\n // written. Final: a slot is taken. Namespaced, not ErrorTypeEnum.Conflict, so retry\n // logic can target the write race specifically without also catching domain-level conflicts.\n 'Conflict',\n // Another write holds one of the batch's items right now; none of the batch was\n // written. Transient: retry.\n 'WriteContention',\n ],\n getPayload: (keyValueStoreName: string, items: KvsItemRecord[], options?: KeyValueStoreUpsertManyOptions) => ({\n keyValueStoreName,\n items,\n options,\n }),\n});\n\n// Generic so callers can pin the item shape they are writing at the call site.\nexport function* askKeyValueStoreUpsertMany<KvsItem>(\n keyValueStoreName: string,\n items: KvsItem[],\n options?: KeyValueStoreUpsertManyOptions,\n): AskResponse<void> {\n return yield* askKeyValueStoreUpsertManyBase(keyValueStoreName, items as KvsItemRecord[], options);\n}\n"]}
|
|
@@ -3,7 +3,6 @@ import { QPQConfigAdvancedSettings, QPQConfigSetting } from '../QPQConfig';
|
|
|
3
3
|
import { CustomAuthRuntime, EmailTemplates } from './emailTemplates';
|
|
4
4
|
export type AuthDirectoryDnsRecord = {
|
|
5
5
|
subdomain: string;
|
|
6
|
-
rootDomain: string;
|
|
7
6
|
};
|
|
8
7
|
export declare enum UserDirectoryMfaMode {
|
|
9
8
|
off = "off",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userDirectory.js","sourceRoot":"","sources":["../../../../src/config/settings/userDirectory.ts"],"names":[],"mappings":";;;AACA,4CAAqG;AACrG,gEAAiG;
|
|
1
|
+
{"version":3,"file":"userDirectory.js","sourceRoot":"","sources":["../../../../src/config/settings/userDirectory.ts"],"names":[],"mappings":";;;AACA,4CAAqG;AACrG,gEAAiG;AAOjG,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,mCAAW,CAAA;IACX,6CAAqB,CAAA;IACrB,6CAAqB,CAAA;AACvB,CAAC,EAJW,oBAAoB,oCAApB,oBAAoB,QAI/B;AAED,IAAY,4BAGX;AAHD,WAAY,4BAA4B;IACtC,6CAAa,CAAA;IACb,sEAAsE;AACxE,CAAC,EAHW,4BAA4B,4CAA5B,4BAA4B,QAGvC;AAqDM,MAAM,mBAAmB,GAAG,CAAC,IAAY,EAAE,OAAgD,EAAiC,EAAE;;IAAC,OAAA,CAAC;QACrI,iBAAiB,EAAE,oCAAwB,CAAC,aAAa;QACzD,SAAS,EAAE,IAAI;QAEf,IAAI;QAEJ,aAAa,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,KAAI,KAAK;QAE9C,iBAAiB,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB,mCAAI,KAAK;QAEtD,cAAc,EAAE;YACd,WAAW,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,0CAAE,WAAW;YACjD,aAAa,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,0CAAE,aAAa;YACrD,kBAAkB,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,0CAAE,kBAAkB;SAChE;QAED,SAAS,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS;QAC7B,iBAAiB,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB;QAE7C,0BAA0B,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,0BAA0B;QAE/D,GAAG,EAAE;YACH,IAAI,EAAE,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,0CAAE,IAAI,mCAAI,oBAAoB,CAAC,GAAG;YACpD,aAAa,EAAE,CAAA,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,0CAAE,aAAa,0CAAE,MAAM,EAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,IAAI,CAAC;SACrH;QAED,KAAK,EAAE,IAAA,uEAAoD,EAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,CAAC;KAC5E,CAAC,CAAA;CAAA,CAAC;AA3BU,QAAA,mBAAmB,uBA2B7B","sourcesContent":["import { CrossModuleOwner } from '../../types';\nimport { QPQConfigAdvancedSettings, QPQConfigSetting, QPQCoreConfigSettingType } from '../QPQConfig';\nimport { convertCrossModuleOwnerToGenericResourceNameOverride } from '../utils/crossModuleUtils';\nimport { CustomAuthRuntime, EmailTemplates } from './emailTemplates';\n\nexport type AuthDirectoryDnsRecord = {\n subdomain: string;\n};\n\nexport enum UserDirectoryMfaMode {\n off = 'off',\n optional = 'optional',\n required = 'required',\n}\n\nexport enum UserDirectoryMfaSecondFactor {\n totp = 'totp',\n // sms = 'sms', // future — additionally needs phone + SNS role infra.\n}\n\nexport interface UserDirectoryMfaSettings {\n mode: UserDirectoryMfaMode;\n\n // Enabled second factors. Defaults to [totp] when omitted.\n secondFactors?: UserDirectoryMfaSecondFactor[];\n}\n\nexport interface QPQConfigAdvancedUserDirectorySettings extends QPQConfigAdvancedSettings {\n phoneRequired?: boolean;\n\n selfSignUpEnabled?: boolean;\n\n emailTemplates?: EmailTemplates;\n\n owner?: CrossModuleOwner<'userDirectoryName'>;\n\n dnsRecord?: AuthDirectoryDnsRecord;\n\n customAuthRuntime?: CustomAuthRuntime;\n\n mfa?: UserDirectoryMfaSettings;\n\n // Access/ID token (JWT) lifetime in minutes. Shorter = a smaller window in which a\n // revoked session's still-valid access token keeps working (access tokens are stateless\n // and can't be revoked before expiry). Cognito allows 5–1440; omitted → Cognito default\n // (60).\n //\n // Generally web apps should refresh in the few mins so this should be > 5.\n accessTokenValidityMinutes?: number;\n}\n\nexport interface UserDirectoryQPQConfigSetting extends QPQConfigSetting {\n name: string;\n\n phoneRequired: boolean;\n\n selfSignUpEnabled: boolean;\n\n emailTemplates: EmailTemplates;\n\n owner?: CrossModuleOwner;\n\n dnsRecord?: AuthDirectoryDnsRecord;\n\n customAuthRuntime?: CustomAuthRuntime;\n\n mfa: UserDirectoryMfaSettings;\n\n accessTokenValidityMinutes?: number;\n}\n\nexport const defineUserDirectory = (name: string, options?: QPQConfigAdvancedUserDirectorySettings): UserDirectoryQPQConfigSetting => ({\n configSettingType: QPQCoreConfigSettingType.userDirectory,\n uniqueKey: name,\n\n name,\n\n phoneRequired: options?.phoneRequired || false,\n\n selfSignUpEnabled: options?.selfSignUpEnabled ?? false,\n\n emailTemplates: {\n verifyEmail: options?.emailTemplates?.verifyEmail,\n resetPassword: options?.emailTemplates?.resetPassword,\n resetPasswordAdmin: options?.emailTemplates?.resetPasswordAdmin,\n },\n\n dnsRecord: options?.dnsRecord,\n customAuthRuntime: options?.customAuthRuntime,\n\n accessTokenValidityMinutes: options?.accessTokenValidityMinutes,\n\n mfa: {\n mode: options?.mfa?.mode ?? UserDirectoryMfaMode.off,\n secondFactors: options?.mfa?.secondFactors?.length ? options.mfa.secondFactors : [UserDirectoryMfaSecondFactor.totp],\n },\n\n owner: convertCrossModuleOwnerToGenericResourceNameOverride(options?.owner),\n});\n"]}
|
|
@@ -18,7 +18,10 @@ function* askKeyValueStoreUpsertWithRetry(keyValueStoreName, item, options) {
|
|
|
18
18
|
const _a = options || {}, { maxRetries = 3 } = _a, kvsOptions = __rest(_a, ["maxRetries"]);
|
|
19
19
|
const upsertResponse = yield* (0, askRetry_1.askRetry)(function* askRunLogic() {
|
|
20
20
|
return yield* (0, actions_1.askKeyValueStoreUpsert)(keyValueStoreName, item, kvsOptions);
|
|
21
|
-
}, maxRetries, 250,
|
|
21
|
+
}, maxRetries, 250,
|
|
22
|
+
// Both transient: the service is throttling, or another write holds the item for the
|
|
23
|
+
// moment. Conflict (the item exists) is final and passes straight through.
|
|
24
|
+
[actions_1.askKeyValueStoreUpsertBase.errorType.ServiceUnavailable, actions_1.askKeyValueStoreUpsertBase.errorType.WriteContention]);
|
|
22
25
|
if (!upsertResponse.success) {
|
|
23
26
|
yield* (0, actions_1.askThrowError)(upsertResponse.error.errorType, upsertResponse.error.errorText, upsertResponse.error.errorStack);
|
|
24
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"askKeyValueStoreUpsertWithRetry.js","sourceRoot":"","sources":["../../../../src/stories/kvs/askKeyValueStoreUpsertWithRetry.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAQA,
|
|
1
|
+
{"version":3,"file":"askKeyValueStoreUpsertWithRetry.js","sourceRoot":"","sources":["../../../../src/stories/kvs/askKeyValueStoreUpsertWithRetry.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAQA,0EAqBC;AA7BD,2CAA8H;AAE9H,0CAAuC;AAMvC,QAAe,CAAC,CAAC,+BAA+B,CAC9C,iBAAyB,EACzB,IAAa,EACb,OAA6C;IAE7C,MAAM,KAAoC,OAAO,IAAI,EAAE,EAAjD,EAAE,UAAU,GAAG,CAAC,OAAiC,EAA5B,UAAU,cAA/B,cAAiC,CAAgB,CAAC;IAExD,MAAM,cAAc,GAAG,KAAK,CAAC,CAAC,IAAA,mBAAQ,EACpC,QAAQ,CAAC,CAAC,WAAW;QACnB,OAAO,KAAK,CAAC,CAAC,IAAA,gCAAsB,EAAU,iBAAiB,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IACrF,CAAC,EACD,UAAU,EACV,GAAG;IACH,qFAAqF;IACrF,2EAA2E;IAC3E,CAAC,oCAA0B,CAAC,SAAS,CAAC,kBAAkB,EAAE,oCAA0B,CAAC,SAAS,CAAC,eAAe,CAAC,CAChH,CAAC;IAEF,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;QAC5B,KAAK,CAAC,CAAC,IAAA,uBAAa,EAAC,cAAc,CAAC,KAAK,CAAC,SAAS,EAAE,cAAc,CAAC,KAAK,CAAC,SAAS,EAAE,cAAc,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACxH,CAAC;AACH,CAAC","sourcesContent":["import { askKeyValueStoreUpsert, askKeyValueStoreUpsertBase, askThrowError, KeyValueStoreUpsertOptions } from '../../actions';\nimport { AskResponse } from '../../types';\nimport { askRetry } from '../askRetry';\n\nexport type KeyValueStoreUpsertWithRetryOptions = KeyValueStoreUpsertOptions & {\n maxRetries?: number; // default 3\n};\n\nexport function* askKeyValueStoreUpsertWithRetry<KvsItem>(\n keyValueStoreName: string,\n item: KvsItem,\n options?: KeyValueStoreUpsertWithRetryOptions,\n): AskResponse<void> {\n const { maxRetries = 3, ...kvsOptions } = options || {};\n\n const upsertResponse = yield* askRetry(\n function* askRunLogic() {\n return yield* askKeyValueStoreUpsert<KvsItem>(keyValueStoreName, item, kvsOptions);\n },\n maxRetries,\n 250,\n // Both transient: the service is throttling, or another write holds the item for the\n // moment. Conflict (the item exists) is final and passes straight through.\n [askKeyValueStoreUpsertBase.errorType.ServiceUnavailable, askKeyValueStoreUpsertBase.errorType.WriteContention],\n );\n\n if (!upsertResponse.success) {\n yield* askThrowError(upsertResponse.error.errorType, upsertResponse.error.errorText, upsertResponse.error.errorStack);\n }\n}\n"]}
|
|
@@ -5,11 +5,9 @@
|
|
|
5
5
|
* - Advanced: { basePath: `E:/repo/project/src`, relativePath: `/service/entry/controller/admin::onAuthUpdate` }
|
|
6
6
|
* - Relative: `/entry/controller/admin::onAuthUpdate`
|
|
7
7
|
*/
|
|
8
|
+
import { QpqPureFunction } from './QpqPureFunction';
|
|
8
9
|
export type QpqFunctionRuntimeRelativePath = `/${string}::${string}`;
|
|
9
|
-
export type QpqFunctionRuntimeAdvanced = {
|
|
10
|
-
basePath: string;
|
|
11
|
-
relativePath: string;
|
|
12
|
-
functionName: string;
|
|
10
|
+
export type QpqFunctionRuntimeAdvanced = QpqPureFunction & {
|
|
13
11
|
globals?: Record<string, unknown>;
|
|
14
12
|
actionProcessors?: QpqFunctionRuntime[];
|
|
15
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QpqFunctionRuntime.js","sourceRoot":"","sources":["../../../src/types/QpqFunctionRuntime.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Represents a runtime function definition that can be either relative or advanced.\n *\n * Example:\n * - Advanced: { basePath: `E:/repo/project/src`, relativePath: `/service/entry/controller/admin::onAuthUpdate` }\n * - Relative: `/entry/controller/admin::onAuthUpdate`\n */\nexport type QpqFunctionRuntimeRelativePath = `/${string}::${string}`;\nexport type QpqFunctionRuntimeAdvanced =
|
|
1
|
+
{"version":3,"file":"QpqFunctionRuntime.js","sourceRoot":"","sources":["../../../src/types/QpqFunctionRuntime.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Represents a runtime function definition that can be either relative or advanced.\n *\n * Example:\n * - Advanced: { basePath: `E:/repo/project/src`, relativePath: `/service/entry/controller/admin::onAuthUpdate` }\n * - Relative: `/entry/controller/admin::onAuthUpdate`\n */\nimport { QpqPureFunction } from './QpqPureFunction';\n\nexport type QpqFunctionRuntimeRelativePath = `/${string}::${string}`;\nexport type QpqFunctionRuntimeAdvanced = QpqPureFunction & {\n // Globals scoped to this function, keyed by global name. When the function's\n // story reads a global via askConfigGetGlobal, a value here takes precedence\n // over the service-wide global of the same name.\n globals?: Record<string, unknown>;\n\n // Action processor overrides scoped to this function. Each entry points at a\n // getActionProcessors-style function (same contract as a defineActionProcessors\n // source); the returned processors are merged over the platform and service-wide\n // ones for this function's whole execution, last wins. That includes the\n // framework preamble (e.g. route auth decode) and in-process nested executions,\n // which inherit the caller's merged list; transport boundaries (http, queue, ws)\n // start fresh from their own runtime's registration. Footgun: an override can\n // shadow framework-internal actions for that execution, not just app-level ones.\n actionProcessors?: QpqFunctionRuntime[];\n};\n\nexport type QpqFunctionRuntime = QpqFunctionRuntimeAdvanced | QpqFunctionRuntimeRelativePath;\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A pointer to a named export in a file (`basePath/relativePath` exports `functionName`).
|
|
3
|
+
* Serializable, so config can carry it; the tooling `require`s it under ts-node. Nothing at
|
|
4
|
+
* runtime ever loads one: a pure function referenced this way runs at synth and build time.
|
|
5
|
+
*/
|
|
6
|
+
export type QpqPureFunction = {
|
|
7
|
+
basePath: string;
|
|
8
|
+
relativePath: string;
|
|
9
|
+
functionName: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QpqPureFunction.js","sourceRoot":"","sources":["../../../src/types/QpqPureFunction.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * A pointer to a named export in a file (`basePath/relativePath` exports `functionName`).\n * Serializable, so config can carry it; the tooling `require`s it under ts-node. Nothing at\n * runtime ever loads one: a pure function referenced this way runs at synth and build time.\n */\nexport type QpqPureFunction = {\n basePath: string;\n relativePath: string;\n functionName: string;\n};\n"]}
|
|
@@ -26,6 +26,7 @@ export * from './QpqFunctionRuntime';
|
|
|
26
26
|
export * from './QpqIsoDateTime';
|
|
27
27
|
export * from './QpqLogger';
|
|
28
28
|
export * from './QpqPagedData';
|
|
29
|
+
export * from './QpqPureFunction';
|
|
29
30
|
export * from './QueueEvent';
|
|
30
31
|
export * from './Readonlyify';
|
|
31
32
|
export * from './ScheduledEvent';
|
|
@@ -42,6 +42,7 @@ __exportStar(require("./QpqFunctionRuntime"), exports);
|
|
|
42
42
|
__exportStar(require("./QpqIsoDateTime"), exports);
|
|
43
43
|
__exportStar(require("./QpqLogger"), exports);
|
|
44
44
|
__exportStar(require("./QpqPagedData"), exports);
|
|
45
|
+
__exportStar(require("./QpqPureFunction"), exports);
|
|
45
46
|
__exportStar(require("./QueueEvent"), exports);
|
|
46
47
|
__exportStar(require("./Readonlyify"), exports);
|
|
47
48
|
__exportStar(require("./ScheduledEvent"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,4DAA0C;AAC1C,kDAAgC;AAChC,oDAAkC;AAClC,wDAAsC;AACtC,uDAAqC;AACrC,qDAAmC;AACnC,6DAA2C;AAC3C,qDAAmC;AACnC,gDAA8B;AAC9B,wDAAsC;AACtC,kDAAgC;AAChC,iDAA+B;AAC/B,gDAA8B;AAC9B,2DAAyC;AACzC,0CAAwB;AACxB,mDAAiC;AACjC,iDAA+B;AAC/B,2CAAyB;AACzB,0DAAwC;AACxC,6CAA2B;AAC3B,kDAAgC;AAChC,yDAAuC;AACvC,sDAAoC;AACpC,uDAAqC;AACrC,mDAAiC;AACjC,8CAA4B;AAC5B,iDAA+B;AAC/B,+CAA6B;AAC7B,gDAA8B;AAC9B,mDAAiC;AACjC,iDAA+B;AAC/B,mDAAiC;AACjC,sDAAoC;AACpC,wDAAsC;AACtC,0CAAwB","sourcesContent":["export * from './Action';\nexport * from './ActionRequesterFunction';\nexport * from './authChallenge';\nexport * from './BoundLogicStory';\nexport * from './ConfigUrlDefinition';\nexport * from './CrossModuleMessage';\nexport * from './CrossModuleOwner';\nexport * from './CrossServiceResourceName';\nexport * from './DecomposedString';\nexport * from './DeployEvent';\nexport * from './DynamicModuleLoader';\nexport * from './ErrorTypeEnum';\nexport * from './EventMessage';\nexport * from './ExcludeKeys';\nexport * from './FullyQualifiedResource';\nexport * from './KeyOf';\nexport * from './KvsStreamEvent';\nexport * from './LogLevelEnum';\nexport * from './Lookup';\nexport * from './NotifyErrorQueueEvent';\nexport * from './Nullable';\nexport * from './QPQBinaryData';\nexport * from './QpqContextIdentifier';\nexport * from './QpqExecutionTrace';\nexport * from './QpqFunctionRuntime';\nexport * from './QpqIsoDateTime';\nexport * from './QpqLogger';\nexport * from './QpqPagedData';\nexport * from './QueueEvent';\nexport * from './Readonlyify';\nexport * from './ScheduledEvent';\nexport * from './StorySession';\nexport * from './StreamRegistry';\nexport * from './UnboundLogicStory';\nexport * from './UnionToIntersection';\nexport * from './utils';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,4DAA0C;AAC1C,kDAAgC;AAChC,oDAAkC;AAClC,wDAAsC;AACtC,uDAAqC;AACrC,qDAAmC;AACnC,6DAA2C;AAC3C,qDAAmC;AACnC,gDAA8B;AAC9B,wDAAsC;AACtC,kDAAgC;AAChC,iDAA+B;AAC/B,gDAA8B;AAC9B,2DAAyC;AACzC,0CAAwB;AACxB,mDAAiC;AACjC,iDAA+B;AAC/B,2CAAyB;AACzB,0DAAwC;AACxC,6CAA2B;AAC3B,kDAAgC;AAChC,yDAAuC;AACvC,sDAAoC;AACpC,uDAAqC;AACrC,mDAAiC;AACjC,8CAA4B;AAC5B,iDAA+B;AAC/B,oDAAkC;AAClC,+CAA6B;AAC7B,gDAA8B;AAC9B,mDAAiC;AACjC,iDAA+B;AAC/B,mDAAiC;AACjC,sDAAoC;AACpC,wDAAsC;AACtC,0CAAwB","sourcesContent":["export * from './Action';\nexport * from './ActionRequesterFunction';\nexport * from './authChallenge';\nexport * from './BoundLogicStory';\nexport * from './ConfigUrlDefinition';\nexport * from './CrossModuleMessage';\nexport * from './CrossModuleOwner';\nexport * from './CrossServiceResourceName';\nexport * from './DecomposedString';\nexport * from './DeployEvent';\nexport * from './DynamicModuleLoader';\nexport * from './ErrorTypeEnum';\nexport * from './EventMessage';\nexport * from './ExcludeKeys';\nexport * from './FullyQualifiedResource';\nexport * from './KeyOf';\nexport * from './KvsStreamEvent';\nexport * from './LogLevelEnum';\nexport * from './Lookup';\nexport * from './NotifyErrorQueueEvent';\nexport * from './Nullable';\nexport * from './QPQBinaryData';\nexport * from './QpqContextIdentifier';\nexport * from './QpqExecutionTrace';\nexport * from './QpqFunctionRuntime';\nexport * from './QpqIsoDateTime';\nexport * from './QpqLogger';\nexport * from './QpqPagedData';\nexport * from './QpqPureFunction';\nexport * from './QueueEvent';\nexport * from './Readonlyify';\nexport * from './ScheduledEvent';\nexport * from './StorySession';\nexport * from './StreamRegistry';\nexport * from './UnboundLogicStory';\nexport * from './UnionToIntersection';\nexport * from './utils';\n"]}
|
|
@@ -10,5 +10,5 @@ export declare const askKeyValueStoreUpsertBase: import("../..").ActionRequester
|
|
|
10
10
|
keyValueStoreName: string;
|
|
11
11
|
item: KvsItemRecord;
|
|
12
12
|
options: KeyValueStoreUpsertOptions | undefined;
|
|
13
|
-
}, void, "Conflict" | "ResourceNotFound" | "ServiceUnavailable" | "InvalidScope" | "StoreNotFound">;
|
|
13
|
+
}, void, "Conflict" | "ResourceNotFound" | "ServiceUnavailable" | "InvalidScope" | "StoreNotFound" | "WriteContention">;
|
|
14
14
|
export declare function askKeyValueStoreUpsert<KvsItem>(keyValueStoreName: string, item: KvsItem, options?: KeyValueStoreUpsertOptions): AskResponse<void>;
|
|
@@ -5,10 +5,14 @@ export const askKeyValueStoreUpsertBase = createActionRequester()({
|
|
|
5
5
|
errorTypes: [
|
|
6
6
|
'ServiceUnavailable', // DynamoDB internal error / throttling
|
|
7
7
|
'ResourceNotFound', // the underlying table does not exist
|
|
8
|
-
// A conditional (ifNotExists) write lost to an existing item.
|
|
9
|
-
// not ErrorTypeEnum.Conflict
|
|
8
|
+
// A conditional (ifNotExists) write lost to an existing item. Final: the slot is taken.
|
|
9
|
+
// Namespaced, not ErrorTypeEnum.Conflict, so retry logic can target the write race
|
|
10
10
|
// specifically without also catching domain-level conflicts.
|
|
11
11
|
'Conflict',
|
|
12
|
+
// Another write (a transaction in flight) holds the item right now. Transient: the item
|
|
13
|
+
// may still be absent once it settles, so this is a retry, never "already exists".
|
|
14
|
+
// askKeyValueStoreUpsertWithRetry retries it.
|
|
15
|
+
'WriteContention',
|
|
12
16
|
'InvalidScope', // scope is malformed or the store's partition key is not string-typed
|
|
13
17
|
'StoreNotFound', // the store is not declared in the qpq config (misconfiguration)
|
|
14
18
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"askKeyValueStoreUpsert.js","sourceRoot":"","sources":["../../../../src/actions/keyValueStore/askKeyValueStoreUpsert.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAgBpE,MAAM,CAAC,MAAM,0BAA0B,GAAG,qBAAqB,EAAQ,CAAC;IACtE,UAAU,EAAE,uBAAuB,CAAC,MAAM;IAC1C,UAAU,EAAE;QACV,oBAAoB,EAAE,uCAAuC;QAC7D,kBAAkB,EAAE,sCAAsC;QAC1D,
|
|
1
|
+
{"version":3,"file":"askKeyValueStoreUpsert.js","sourceRoot":"","sources":["../../../../src/actions/keyValueStore/askKeyValueStoreUpsert.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAgBpE,MAAM,CAAC,MAAM,0BAA0B,GAAG,qBAAqB,EAAQ,CAAC;IACtE,UAAU,EAAE,uBAAuB,CAAC,MAAM;IAC1C,UAAU,EAAE;QACV,oBAAoB,EAAE,uCAAuC;QAC7D,kBAAkB,EAAE,sCAAsC;QAC1D,wFAAwF;QACxF,mFAAmF;QACnF,6DAA6D;QAC7D,UAAU;QACV,wFAAwF;QACxF,mFAAmF;QACnF,8CAA8C;QAC9C,iBAAiB;QACjB,cAAc,EAAE,sEAAsE;QACtF,eAAe,EAAE,iEAAiE;KACnF;IACD,UAAU,EAAE,CAAC,iBAAyB,EAAE,IAAmB,EAAE,OAAoC,EAAE,EAAE,CAAC,CAAC,EAAE,iBAAiB,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;CAC7I,CAAC,CAAC;AAEH,+EAA+E;AAC/E,MAAM,SAAS,CAAC,CAAC,sBAAsB,CAAU,iBAAyB,EAAE,IAAa,EAAE,OAAoC;IAC7H,OAAO,KAAK,CAAC,CAAC,0BAA0B,CAAC,iBAAiB,EAAE,IAAqB,EAAE,OAAO,CAAC,CAAC;AAC9F,CAAC","sourcesContent":["import { AskResponse } from '../../types/StorySession';\nimport { createActionRequester } from '../../types/utils/createActionRequester';\nimport { KeyValueStoreActionType } from './KeyValueStoreActionType';\nimport { KvsItemRecord } from './types';\n\nexport type KeyValueStoreUpsertOptions = {\n ttlInSeconds?: number; // Time-to-live in seconds\n\n // Conditional insert: only write when no item with the same key exists.\n // A losing concurrent writer gets ErrorTypeEnum.Conflict instead of silently\n // overwriting — the primitive for optimistic-concurrency schemes (e.g.\n // append-only event logs where the sort key is a claimed index).\n ifNotExists?: boolean;\n\n // Composed into the item's partition key value by the processor; requires a string-typed partition key.\n scope?: string;\n};\n\nexport const askKeyValueStoreUpsertBase = createActionRequester<void>()({\n actionType: KeyValueStoreActionType.Upsert,\n errorTypes: [\n 'ServiceUnavailable', // DynamoDB internal error / throttling\n 'ResourceNotFound', // the underlying table does not exist\n // A conditional (ifNotExists) write lost to an existing item. Final: the slot is taken.\n // Namespaced, not ErrorTypeEnum.Conflict, so retry logic can target the write race\n // specifically without also catching domain-level conflicts.\n 'Conflict',\n // Another write (a transaction in flight) holds the item right now. Transient: the item\n // may still be absent once it settles, so this is a retry, never \"already exists\".\n // askKeyValueStoreUpsertWithRetry retries it.\n 'WriteContention',\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 ],\n getPayload: (keyValueStoreName: string, item: KvsItemRecord, options?: KeyValueStoreUpsertOptions) => ({ keyValueStoreName, item, options }),\n});\n\n// Generic so callers can pin the item shape they are writing at the call site.\nexport function* askKeyValueStoreUpsert<KvsItem>(keyValueStoreName: string, item: KvsItem, options?: KeyValueStoreUpsertOptions): AskResponse<void> {\n return yield* askKeyValueStoreUpsertBase(keyValueStoreName, item as KvsItemRecord, options);\n}\n"]}
|
|
@@ -2,11 +2,12 @@ import { AskResponse } from '../../types/StorySession';
|
|
|
2
2
|
import { KeyValueStoreActionType } from './KeyValueStoreActionType';
|
|
3
3
|
import { KvsItemRecord } from './types';
|
|
4
4
|
export type KeyValueStoreUpsertManyOptions = {
|
|
5
|
+
ifNotExists?: boolean;
|
|
5
6
|
scope?: string;
|
|
6
7
|
};
|
|
7
8
|
export declare const askKeyValueStoreUpsertManyBase: import("../..").ActionRequesterFunction<KeyValueStoreActionType.UpsertMany, [keyValueStoreName: string, items: KvsItemRecord[], options?: KeyValueStoreUpsertManyOptions | undefined], {
|
|
8
9
|
keyValueStoreName: string;
|
|
9
10
|
items: KvsItemRecord[];
|
|
10
11
|
options: KeyValueStoreUpsertManyOptions | undefined;
|
|
11
|
-
}, void, "ResourceNotFound" | "ServiceUnavailable" | "InvalidScope" | "StoreNotFound" | "DuplicateKey">;
|
|
12
|
+
}, void, "Conflict" | "ResourceNotFound" | "ServiceUnavailable" | "InvalidScope" | "StoreNotFound" | "WriteContention" | "DuplicateKey">;
|
|
12
13
|
export declare function askKeyValueStoreUpsertMany<KvsItem>(keyValueStoreName: string, items: KvsItem[], options?: KeyValueStoreUpsertManyOptions): AskResponse<void>;
|
|
@@ -13,6 +13,13 @@ export const askKeyValueStoreUpsertManyBase = createActionRequester()({
|
|
|
13
13
|
// the later write silently wins), so without this check the outcome would
|
|
14
14
|
// depend on item position and never reproduce locally.
|
|
15
15
|
'DuplicateKey',
|
|
16
|
+
// A conditional (ifNotExists) batch lost to an existing item; none of the batch was
|
|
17
|
+
// written. Final: a slot is taken. Namespaced, not ErrorTypeEnum.Conflict, so retry
|
|
18
|
+
// logic can target the write race specifically without also catching domain-level conflicts.
|
|
19
|
+
'Conflict',
|
|
20
|
+
// Another write holds one of the batch's items right now; none of the batch was
|
|
21
|
+
// written. Transient: retry.
|
|
22
|
+
'WriteContention',
|
|
16
23
|
],
|
|
17
24
|
getPayload: (keyValueStoreName, items, options) => ({
|
|
18
25
|
keyValueStoreName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"askKeyValueStoreUpsertMany.js","sourceRoot":"","sources":["../../../../src/actions/keyValueStore/askKeyValueStoreUpsertMany.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"askKeyValueStoreUpsertMany.js","sourceRoot":"","sources":["../../../../src/actions/keyValueStore/askKeyValueStoreUpsertMany.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAgBpE,MAAM,CAAC,MAAM,8BAA8B,GAAG,qBAAqB,EAAQ,CAAC;IAC1E,UAAU,EAAE,uBAAuB,CAAC,UAAU;IAC9C,UAAU,EAAE;QACV,oBAAoB,EAAE,uCAAuC;QAC7D,kBAAkB,EAAE,sCAAsC;QAC1D,cAAc,EAAE,sEAAsE;QACtF,eAAe,EAAE,iEAAiE;QAClF,yEAAyE;QACzE,4EAA4E;QAC5E,8EAA8E;QAC9E,0EAA0E;QAC1E,uDAAuD;QACvD,cAAc;QACd,oFAAoF;QACpF,oFAAoF;QACpF,6FAA6F;QAC7F,UAAU;QACV,gFAAgF;QAChF,6BAA6B;QAC7B,iBAAiB;KAClB;IACD,UAAU,EAAE,CAAC,iBAAyB,EAAE,KAAsB,EAAE,OAAwC,EAAE,EAAE,CAAC,CAAC;QAC5G,iBAAiB;QACjB,KAAK;QACL,OAAO;KACR,CAAC;CACH,CAAC,CAAC;AAEH,+EAA+E;AAC/E,MAAM,SAAS,CAAC,CAAC,0BAA0B,CACzC,iBAAyB,EACzB,KAAgB,EAChB,OAAwC;IAExC,OAAO,KAAK,CAAC,CAAC,8BAA8B,CAAC,iBAAiB,EAAE,KAAwB,EAAE,OAAO,CAAC,CAAC;AACrG,CAAC","sourcesContent":["import { AskResponse } from '../../types/StorySession';\nimport { createActionRequester } from '../../types/utils/createActionRequester';\nimport { KeyValueStoreActionType } from './KeyValueStoreActionType';\nimport { KvsItemRecord } from './types';\n\nexport type KeyValueStoreUpsertManyOptions = {\n // Conditional batch insert: only write when NO item in the batch has an\n // existing key, and write ALL of them or none. The batch becomes a\n // transaction on every runtime (DynamoDB TransactWriteItems, a SQLite\n // transaction locally), so a losing concurrent writer gets the namespaced\n // Conflict with nothing landed - the batch primitive for claiming a run of\n // consecutive slots in an append-only log.\n ifNotExists?: boolean;\n\n // Composed into each item's partition key value by the processor; requires a string-typed partition key.\n scope?: string;\n};\n\nexport const askKeyValueStoreUpsertManyBase = createActionRequester<void>()({\n actionType: KeyValueStoreActionType.UpsertMany,\n errorTypes: [\n 'ServiceUnavailable', // DynamoDB internal error / throttling\n 'ResourceNotFound', // the underlying table does not exist\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 // A conditional (ifNotExists) batch lost to an existing item; none of the batch was\n // written. Final: a slot is taken. Namespaced, not ErrorTypeEnum.Conflict, so retry\n // logic can target the write race specifically without also catching domain-level conflicts.\n 'Conflict',\n // Another write holds one of the batch's items right now; none of the batch was\n // written. Transient: retry.\n 'WriteContention',\n ],\n getPayload: (keyValueStoreName: string, items: KvsItemRecord[], options?: KeyValueStoreUpsertManyOptions) => ({\n keyValueStoreName,\n items,\n options,\n }),\n});\n\n// Generic so callers can pin the item shape they are writing at the call site.\nexport function* askKeyValueStoreUpsertMany<KvsItem>(\n keyValueStoreName: string,\n items: KvsItem[],\n options?: KeyValueStoreUpsertManyOptions,\n): AskResponse<void> {\n return yield* askKeyValueStoreUpsertManyBase(keyValueStoreName, items as KvsItemRecord[], options);\n}\n"]}
|
|
@@ -3,7 +3,6 @@ import { QPQConfigAdvancedSettings, QPQConfigSetting } from '../QPQConfig';
|
|
|
3
3
|
import { CustomAuthRuntime, EmailTemplates } from './emailTemplates';
|
|
4
4
|
export type AuthDirectoryDnsRecord = {
|
|
5
5
|
subdomain: string;
|
|
6
|
-
rootDomain: string;
|
|
7
6
|
};
|
|
8
7
|
export declare enum UserDirectoryMfaMode {
|
|
9
8
|
off = "off",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userDirectory.js","sourceRoot":"","sources":["../../../../src/config/settings/userDirectory.ts"],"names":[],"mappings":"AACA,OAAO,EAA+C,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACrG,OAAO,EAAE,oDAAoD,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"userDirectory.js","sourceRoot":"","sources":["../../../../src/config/settings/userDirectory.ts"],"names":[],"mappings":"AACA,OAAO,EAA+C,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACrG,OAAO,EAAE,oDAAoD,EAAE,MAAM,2BAA2B,CAAC;AAOjG,MAAM,CAAN,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,mCAAW,CAAA;IACX,6CAAqB,CAAA;IACrB,6CAAqB,CAAA;AACvB,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,QAI/B;AAED,MAAM,CAAN,IAAY,4BAGX;AAHD,WAAY,4BAA4B;IACtC,6CAAa,CAAA;IACb,sEAAsE;AACxE,CAAC,EAHW,4BAA4B,KAA5B,4BAA4B,QAGvC;AAqDD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAY,EAAE,OAAgD,EAAiC,EAAE,CAAC,CAAC;IACrI,iBAAiB,EAAE,wBAAwB,CAAC,aAAa;IACzD,SAAS,EAAE,IAAI;IAEf,IAAI;IAEJ,aAAa,EAAE,OAAO,EAAE,aAAa,IAAI,KAAK;IAE9C,iBAAiB,EAAE,OAAO,EAAE,iBAAiB,IAAI,KAAK;IAEtD,cAAc,EAAE;QACd,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW;QACjD,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,aAAa;QACrD,kBAAkB,EAAE,OAAO,EAAE,cAAc,EAAE,kBAAkB;KAChE;IAED,SAAS,EAAE,OAAO,EAAE,SAAS;IAC7B,iBAAiB,EAAE,OAAO,EAAE,iBAAiB;IAE7C,0BAA0B,EAAE,OAAO,EAAE,0BAA0B;IAE/D,GAAG,EAAE;QACH,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,IAAI,oBAAoB,CAAC,GAAG;QACpD,aAAa,EAAE,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,IAAI,CAAC;KACrH;IAED,KAAK,EAAE,oDAAoD,CAAC,OAAO,EAAE,KAAK,CAAC;CAC5E,CAAC,CAAC","sourcesContent":["import { CrossModuleOwner } from '../../types';\nimport { QPQConfigAdvancedSettings, QPQConfigSetting, QPQCoreConfigSettingType } from '../QPQConfig';\nimport { convertCrossModuleOwnerToGenericResourceNameOverride } from '../utils/crossModuleUtils';\nimport { CustomAuthRuntime, EmailTemplates } from './emailTemplates';\n\nexport type AuthDirectoryDnsRecord = {\n subdomain: string;\n};\n\nexport enum UserDirectoryMfaMode {\n off = 'off',\n optional = 'optional',\n required = 'required',\n}\n\nexport enum UserDirectoryMfaSecondFactor {\n totp = 'totp',\n // sms = 'sms', // future — additionally needs phone + SNS role infra.\n}\n\nexport interface UserDirectoryMfaSettings {\n mode: UserDirectoryMfaMode;\n\n // Enabled second factors. Defaults to [totp] when omitted.\n secondFactors?: UserDirectoryMfaSecondFactor[];\n}\n\nexport interface QPQConfigAdvancedUserDirectorySettings extends QPQConfigAdvancedSettings {\n phoneRequired?: boolean;\n\n selfSignUpEnabled?: boolean;\n\n emailTemplates?: EmailTemplates;\n\n owner?: CrossModuleOwner<'userDirectoryName'>;\n\n dnsRecord?: AuthDirectoryDnsRecord;\n\n customAuthRuntime?: CustomAuthRuntime;\n\n mfa?: UserDirectoryMfaSettings;\n\n // Access/ID token (JWT) lifetime in minutes. Shorter = a smaller window in which a\n // revoked session's still-valid access token keeps working (access tokens are stateless\n // and can't be revoked before expiry). Cognito allows 5–1440; omitted → Cognito default\n // (60).\n //\n // Generally web apps should refresh in the few mins so this should be > 5.\n accessTokenValidityMinutes?: number;\n}\n\nexport interface UserDirectoryQPQConfigSetting extends QPQConfigSetting {\n name: string;\n\n phoneRequired: boolean;\n\n selfSignUpEnabled: boolean;\n\n emailTemplates: EmailTemplates;\n\n owner?: CrossModuleOwner;\n\n dnsRecord?: AuthDirectoryDnsRecord;\n\n customAuthRuntime?: CustomAuthRuntime;\n\n mfa: UserDirectoryMfaSettings;\n\n accessTokenValidityMinutes?: number;\n}\n\nexport const defineUserDirectory = (name: string, options?: QPQConfigAdvancedUserDirectorySettings): UserDirectoryQPQConfigSetting => ({\n configSettingType: QPQCoreConfigSettingType.userDirectory,\n uniqueKey: name,\n\n name,\n\n phoneRequired: options?.phoneRequired || false,\n\n selfSignUpEnabled: options?.selfSignUpEnabled ?? false,\n\n emailTemplates: {\n verifyEmail: options?.emailTemplates?.verifyEmail,\n resetPassword: options?.emailTemplates?.resetPassword,\n resetPasswordAdmin: options?.emailTemplates?.resetPasswordAdmin,\n },\n\n dnsRecord: options?.dnsRecord,\n customAuthRuntime: options?.customAuthRuntime,\n\n accessTokenValidityMinutes: options?.accessTokenValidityMinutes,\n\n mfa: {\n mode: options?.mfa?.mode ?? UserDirectoryMfaMode.off,\n secondFactors: options?.mfa?.secondFactors?.length ? options.mfa.secondFactors : [UserDirectoryMfaSecondFactor.totp],\n },\n\n owner: convertCrossModuleOwnerToGenericResourceNameOverride(options?.owner),\n});\n"]}
|
|
@@ -4,7 +4,10 @@ export function* askKeyValueStoreUpsertWithRetry(keyValueStoreName, item, option
|
|
|
4
4
|
const { maxRetries = 3, ...kvsOptions } = options || {};
|
|
5
5
|
const upsertResponse = yield* askRetry(function* askRunLogic() {
|
|
6
6
|
return yield* askKeyValueStoreUpsert(keyValueStoreName, item, kvsOptions);
|
|
7
|
-
}, maxRetries, 250,
|
|
7
|
+
}, maxRetries, 250,
|
|
8
|
+
// Both transient: the service is throttling, or another write holds the item for the
|
|
9
|
+
// moment. Conflict (the item exists) is final and passes straight through.
|
|
10
|
+
[askKeyValueStoreUpsertBase.errorType.ServiceUnavailable, askKeyValueStoreUpsertBase.errorType.WriteContention]);
|
|
8
11
|
if (!upsertResponse.success) {
|
|
9
12
|
yield* askThrowError(upsertResponse.error.errorType, upsertResponse.error.errorText, upsertResponse.error.errorStack);
|
|
10
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"askKeyValueStoreUpsertWithRetry.js","sourceRoot":"","sources":["../../../../src/stories/kvs/askKeyValueStoreUpsertWithRetry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,aAAa,EAA8B,MAAM,eAAe,CAAC;AAE9H,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAMvC,MAAM,SAAS,CAAC,CAAC,+BAA+B,CAC9C,iBAAyB,EACzB,IAAa,EACb,OAA6C;IAE7C,MAAM,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,UAAU,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IAExD,MAAM,cAAc,GAAG,KAAK,CAAC,CAAC,QAAQ,CACpC,QAAQ,CAAC,CAAC,WAAW;QACnB,OAAO,KAAK,CAAC,CAAC,sBAAsB,CAAU,iBAAiB,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IACrF,CAAC,EACD,UAAU,EACV,GAAG,
|
|
1
|
+
{"version":3,"file":"askKeyValueStoreUpsertWithRetry.js","sourceRoot":"","sources":["../../../../src/stories/kvs/askKeyValueStoreUpsertWithRetry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,aAAa,EAA8B,MAAM,eAAe,CAAC;AAE9H,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAMvC,MAAM,SAAS,CAAC,CAAC,+BAA+B,CAC9C,iBAAyB,EACzB,IAAa,EACb,OAA6C;IAE7C,MAAM,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,UAAU,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IAExD,MAAM,cAAc,GAAG,KAAK,CAAC,CAAC,QAAQ,CACpC,QAAQ,CAAC,CAAC,WAAW;QACnB,OAAO,KAAK,CAAC,CAAC,sBAAsB,CAAU,iBAAiB,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IACrF,CAAC,EACD,UAAU,EACV,GAAG;IACH,qFAAqF;IACrF,2EAA2E;IAC3E,CAAC,0BAA0B,CAAC,SAAS,CAAC,kBAAkB,EAAE,0BAA0B,CAAC,SAAS,CAAC,eAAe,CAAC,CAChH,CAAC;IAEF,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;QAC5B,KAAK,CAAC,CAAC,aAAa,CAAC,cAAc,CAAC,KAAK,CAAC,SAAS,EAAE,cAAc,CAAC,KAAK,CAAC,SAAS,EAAE,cAAc,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACxH,CAAC;AACH,CAAC","sourcesContent":["import { askKeyValueStoreUpsert, askKeyValueStoreUpsertBase, askThrowError, KeyValueStoreUpsertOptions } from '../../actions';\nimport { AskResponse } from '../../types';\nimport { askRetry } from '../askRetry';\n\nexport type KeyValueStoreUpsertWithRetryOptions = KeyValueStoreUpsertOptions & {\n maxRetries?: number; // default 3\n};\n\nexport function* askKeyValueStoreUpsertWithRetry<KvsItem>(\n keyValueStoreName: string,\n item: KvsItem,\n options?: KeyValueStoreUpsertWithRetryOptions,\n): AskResponse<void> {\n const { maxRetries = 3, ...kvsOptions } = options || {};\n\n const upsertResponse = yield* askRetry(\n function* askRunLogic() {\n return yield* askKeyValueStoreUpsert<KvsItem>(keyValueStoreName, item, kvsOptions);\n },\n maxRetries,\n 250,\n // Both transient: the service is throttling, or another write holds the item for the\n // moment. Conflict (the item exists) is final and passes straight through.\n [askKeyValueStoreUpsertBase.errorType.ServiceUnavailable, askKeyValueStoreUpsertBase.errorType.WriteContention],\n );\n\n if (!upsertResponse.success) {\n yield* askThrowError(upsertResponse.error.errorType, upsertResponse.error.errorText, upsertResponse.error.errorStack);\n }\n}\n"]}
|
|
@@ -5,11 +5,9 @@
|
|
|
5
5
|
* - Advanced: { basePath: `E:/repo/project/src`, relativePath: `/service/entry/controller/admin::onAuthUpdate` }
|
|
6
6
|
* - Relative: `/entry/controller/admin::onAuthUpdate`
|
|
7
7
|
*/
|
|
8
|
+
import { QpqPureFunction } from './QpqPureFunction';
|
|
8
9
|
export type QpqFunctionRuntimeRelativePath = `/${string}::${string}`;
|
|
9
|
-
export type QpqFunctionRuntimeAdvanced = {
|
|
10
|
-
basePath: string;
|
|
11
|
-
relativePath: string;
|
|
12
|
-
functionName: string;
|
|
10
|
+
export type QpqFunctionRuntimeAdvanced = QpqPureFunction & {
|
|
13
11
|
globals?: Record<string, unknown>;
|
|
14
12
|
actionProcessors?: QpqFunctionRuntime[];
|
|
15
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QpqFunctionRuntime.js","sourceRoot":"","sources":["../../../src/types/QpqFunctionRuntime.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Represents a runtime function definition that can be either relative or advanced.\n *\n * Example:\n * - Advanced: { basePath: `E:/repo/project/src`, relativePath: `/service/entry/controller/admin::onAuthUpdate` }\n * - Relative: `/entry/controller/admin::onAuthUpdate`\n */\nexport type QpqFunctionRuntimeRelativePath = `/${string}::${string}`;\nexport type QpqFunctionRuntimeAdvanced =
|
|
1
|
+
{"version":3,"file":"QpqFunctionRuntime.js","sourceRoot":"","sources":["../../../src/types/QpqFunctionRuntime.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Represents a runtime function definition that can be either relative or advanced.\n *\n * Example:\n * - Advanced: { basePath: `E:/repo/project/src`, relativePath: `/service/entry/controller/admin::onAuthUpdate` }\n * - Relative: `/entry/controller/admin::onAuthUpdate`\n */\nimport { QpqPureFunction } from './QpqPureFunction';\n\nexport type QpqFunctionRuntimeRelativePath = `/${string}::${string}`;\nexport type QpqFunctionRuntimeAdvanced = QpqPureFunction & {\n // Globals scoped to this function, keyed by global name. When the function's\n // story reads a global via askConfigGetGlobal, a value here takes precedence\n // over the service-wide global of the same name.\n globals?: Record<string, unknown>;\n\n // Action processor overrides scoped to this function. Each entry points at a\n // getActionProcessors-style function (same contract as a defineActionProcessors\n // source); the returned processors are merged over the platform and service-wide\n // ones for this function's whole execution, last wins. That includes the\n // framework preamble (e.g. route auth decode) and in-process nested executions,\n // which inherit the caller's merged list; transport boundaries (http, queue, ws)\n // start fresh from their own runtime's registration. Footgun: an override can\n // shadow framework-internal actions for that execution, not just app-level ones.\n actionProcessors?: QpqFunctionRuntime[];\n};\n\nexport type QpqFunctionRuntime = QpqFunctionRuntimeAdvanced | QpqFunctionRuntimeRelativePath;\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A pointer to a named export in a file (`basePath/relativePath` exports `functionName`).
|
|
3
|
+
* Serializable, so config can carry it; the tooling `require`s it under ts-node. Nothing at
|
|
4
|
+
* runtime ever loads one: a pure function referenced this way runs at synth and build time.
|
|
5
|
+
*/
|
|
6
|
+
export type QpqPureFunction = {
|
|
7
|
+
basePath: string;
|
|
8
|
+
relativePath: string;
|
|
9
|
+
functionName: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QpqPureFunction.js","sourceRoot":"","sources":["../../../src/types/QpqPureFunction.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * A pointer to a named export in a file (`basePath/relativePath` exports `functionName`).\n * Serializable, so config can carry it; the tooling `require`s it under ts-node. Nothing at\n * runtime ever loads one: a pure function referenced this way runs at synth and build time.\n */\nexport type QpqPureFunction = {\n basePath: string;\n relativePath: string;\n functionName: string;\n};\n"]}
|
package/lib/esm/types/index.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export * from './QpqFunctionRuntime';
|
|
|
26
26
|
export * from './QpqIsoDateTime';
|
|
27
27
|
export * from './QpqLogger';
|
|
28
28
|
export * from './QpqPagedData';
|
|
29
|
+
export * from './QpqPureFunction';
|
|
29
30
|
export * from './QueueEvent';
|
|
30
31
|
export * from './Readonlyify';
|
|
31
32
|
export * from './ScheduledEvent';
|
package/lib/esm/types/index.js
CHANGED
|
@@ -26,6 +26,7 @@ export * from './QpqFunctionRuntime';
|
|
|
26
26
|
export * from './QpqIsoDateTime';
|
|
27
27
|
export * from './QpqLogger';
|
|
28
28
|
export * from './QpqPagedData';
|
|
29
|
+
export * from './QpqPureFunction';
|
|
29
30
|
export * from './QueueEvent';
|
|
30
31
|
export * from './Readonlyify';
|
|
31
32
|
export * from './ScheduledEvent';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,SAAS,CAAC","sourcesContent":["export * from './Action';\nexport * from './ActionRequesterFunction';\nexport * from './authChallenge';\nexport * from './BoundLogicStory';\nexport * from './ConfigUrlDefinition';\nexport * from './CrossModuleMessage';\nexport * from './CrossModuleOwner';\nexport * from './CrossServiceResourceName';\nexport * from './DecomposedString';\nexport * from './DeployEvent';\nexport * from './DynamicModuleLoader';\nexport * from './ErrorTypeEnum';\nexport * from './EventMessage';\nexport * from './ExcludeKeys';\nexport * from './FullyQualifiedResource';\nexport * from './KeyOf';\nexport * from './KvsStreamEvent';\nexport * from './LogLevelEnum';\nexport * from './Lookup';\nexport * from './NotifyErrorQueueEvent';\nexport * from './Nullable';\nexport * from './QPQBinaryData';\nexport * from './QpqContextIdentifier';\nexport * from './QpqExecutionTrace';\nexport * from './QpqFunctionRuntime';\nexport * from './QpqIsoDateTime';\nexport * from './QpqLogger';\nexport * from './QpqPagedData';\nexport * from './QueueEvent';\nexport * from './Readonlyify';\nexport * from './ScheduledEvent';\nexport * from './StorySession';\nexport * from './StreamRegistry';\nexport * from './UnboundLogicStory';\nexport * from './UnionToIntersection';\nexport * from './utils';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,SAAS,CAAC","sourcesContent":["export * from './Action';\nexport * from './ActionRequesterFunction';\nexport * from './authChallenge';\nexport * from './BoundLogicStory';\nexport * from './ConfigUrlDefinition';\nexport * from './CrossModuleMessage';\nexport * from './CrossModuleOwner';\nexport * from './CrossServiceResourceName';\nexport * from './DecomposedString';\nexport * from './DeployEvent';\nexport * from './DynamicModuleLoader';\nexport * from './ErrorTypeEnum';\nexport * from './EventMessage';\nexport * from './ExcludeKeys';\nexport * from './FullyQualifiedResource';\nexport * from './KeyOf';\nexport * from './KvsStreamEvent';\nexport * from './LogLevelEnum';\nexport * from './Lookup';\nexport * from './NotifyErrorQueueEvent';\nexport * from './Nullable';\nexport * from './QPQBinaryData';\nexport * from './QpqContextIdentifier';\nexport * from './QpqExecutionTrace';\nexport * from './QpqFunctionRuntime';\nexport * from './QpqIsoDateTime';\nexport * from './QpqLogger';\nexport * from './QpqPagedData';\nexport * from './QpqPureFunction';\nexport * from './QueueEvent';\nexport * from './Readonlyify';\nexport * from './ScheduledEvent';\nexport * from './StorySession';\nexport * from './StreamRegistry';\nexport * from './UnboundLogicStory';\nexport * from './UnionToIntersection';\nexport * from './utils';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quidproquo-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/commonjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"homepage": "https://github.com/qpqjs/quidproquo#readme",
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "^24.2.1",
|
|
39
|
-
"quidproquo-tsconfig": "0.1.
|
|
39
|
+
"quidproquo-tsconfig": "0.1.20",
|
|
40
40
|
"typescript": "^5.8.2"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|