quidproquo-core 0.1.22 → 0.1.24
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/crypto/CryptoActionType.d.ts +4 -1
- package/lib/commonjs/actions/crypto/CryptoActionType.js +3 -0
- package/lib/commonjs/actions/crypto/CryptoActionType.js.map +1 -1
- package/lib/commonjs/actions/crypto/askCryptoGetPublicKey.d.ts +4 -0
- package/lib/commonjs/actions/crypto/askCryptoGetPublicKey.js +18 -0
- package/lib/commonjs/actions/crypto/askCryptoGetPublicKey.js.map +1 -0
- package/lib/commonjs/actions/crypto/askCryptoSign.d.ts +5 -0
- package/lib/commonjs/actions/crypto/askCryptoSign.js +19 -0
- package/lib/commonjs/actions/crypto/askCryptoSign.js.map +1 -0
- package/lib/commonjs/actions/crypto/askCryptoVerify.d.ts +6 -0
- package/lib/commonjs/actions/crypto/askCryptoVerify.js +21 -0
- package/lib/commonjs/actions/crypto/askCryptoVerify.js.map +1 -0
- package/lib/commonjs/actions/crypto/index.d.ts +3 -0
- package/lib/commonjs/actions/crypto/index.js +3 -0
- package/lib/commonjs/actions/crypto/index.js.map +1 -1
- package/lib/commonjs/actions/file/FileActionType.d.ts +1 -0
- package/lib/commonjs/actions/file/FileActionType.js +1 -0
- package/lib/commonjs/actions/file/FileActionType.js.map +1 -1
- package/lib/commonjs/actions/file/askFileCopy.d.ts +13 -0
- package/lib/commonjs/actions/file/askFileCopy.js +27 -0
- package/lib/commonjs/actions/file/askFileCopy.js.map +1 -0
- package/lib/commonjs/actions/file/askFileIsColdStorage.d.ts +1 -1
- package/lib/commonjs/actions/file/askFileReadBinaryContents.d.ts +1 -1
- package/lib/commonjs/actions/file/askFileReadObjectJson.d.ts +1 -1
- package/lib/commonjs/actions/file/askFileReadTextContents.d.ts +1 -1
- package/lib/commonjs/actions/file/askFileStreamOpen.d.ts +1 -1
- package/lib/commonjs/actions/file/index.d.ts +1 -0
- package/lib/commonjs/actions/file/index.js +1 -0
- package/lib/commonjs/actions/file/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/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/signingKey.d.ts +9 -0
- package/lib/commonjs/config/settings/signingKey.js +13 -0
- package/lib/commonjs/config/settings/signingKey.js.map +1 -0
- package/lib/commonjs/qpqCoreUtils.d.ts +4 -1
- package/lib/commonjs/qpqCoreUtils.js +19 -1
- package/lib/commonjs/qpqCoreUtils.js.map +1 -1
- package/lib/commonjs/qpqCoreUtilsLib.d.ts +3 -0
- package/lib/commonjs/stories/crypto/askCryptoSignJwt.d.ts +2 -0
- package/lib/commonjs/stories/crypto/askCryptoSignJwt.js +16 -0
- package/lib/commonjs/stories/crypto/askCryptoSignJwt.js.map +1 -0
- package/lib/commonjs/stories/crypto/askCryptoVerifyJwt.d.ts +10 -0
- package/lib/commonjs/stories/crypto/askCryptoVerifyJwt.js +61 -0
- package/lib/commonjs/stories/crypto/askCryptoVerifyJwt.js.map +1 -0
- package/lib/commonjs/stories/crypto/index.d.ts +2 -0
- package/lib/commonjs/stories/crypto/index.js +19 -0
- package/lib/commonjs/stories/crypto/index.js.map +1 -0
- package/lib/commonjs/stories/index.d.ts +1 -0
- package/lib/commonjs/stories/index.js +1 -0
- package/lib/commonjs/stories/index.js.map +1 -1
- package/lib/commonjs/utils/base64Url/base64Url.d.ts +3 -0
- package/lib/commonjs/utils/base64Url/base64Url.js +42 -0
- package/lib/commonjs/utils/base64Url/base64Url.js.map +1 -0
- package/lib/commonjs/utils/base64Url/index.d.ts +1 -0
- package/lib/commonjs/utils/base64Url/index.js +18 -0
- package/lib/commonjs/utils/base64Url/index.js.map +1 -0
- package/lib/commonjs/utils/index.d.ts +1 -0
- package/lib/commonjs/utils/index.js +1 -0
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/esm/actions/crypto/CryptoActionType.d.ts +4 -1
- package/lib/esm/actions/crypto/CryptoActionType.js +3 -0
- package/lib/esm/actions/crypto/CryptoActionType.js.map +1 -1
- package/lib/esm/actions/crypto/askCryptoGetPublicKey.d.ts +4 -0
- package/lib/esm/actions/crypto/askCryptoGetPublicKey.js +15 -0
- package/lib/esm/actions/crypto/askCryptoGetPublicKey.js.map +1 -0
- package/lib/esm/actions/crypto/askCryptoSign.d.ts +5 -0
- package/lib/esm/actions/crypto/askCryptoSign.js +16 -0
- package/lib/esm/actions/crypto/askCryptoSign.js.map +1 -0
- package/lib/esm/actions/crypto/askCryptoVerify.d.ts +6 -0
- package/lib/esm/actions/crypto/askCryptoVerify.js +18 -0
- package/lib/esm/actions/crypto/askCryptoVerify.js.map +1 -0
- package/lib/esm/actions/crypto/index.d.ts +3 -0
- package/lib/esm/actions/crypto/index.js +3 -0
- package/lib/esm/actions/crypto/index.js.map +1 -1
- package/lib/esm/actions/file/FileActionType.d.ts +1 -0
- package/lib/esm/actions/file/FileActionType.js +1 -0
- package/lib/esm/actions/file/FileActionType.js.map +1 -1
- package/lib/esm/actions/file/askFileCopy.d.ts +13 -0
- package/lib/esm/actions/file/askFileCopy.js +24 -0
- package/lib/esm/actions/file/askFileCopy.js.map +1 -0
- package/lib/esm/actions/file/askFileIsColdStorage.d.ts +1 -1
- package/lib/esm/actions/file/askFileReadBinaryContents.d.ts +1 -1
- package/lib/esm/actions/file/askFileReadObjectJson.d.ts +1 -1
- package/lib/esm/actions/file/askFileReadTextContents.d.ts +1 -1
- package/lib/esm/actions/file/askFileStreamOpen.d.ts +1 -1
- package/lib/esm/actions/file/index.d.ts +1 -0
- package/lib/esm/actions/file/index.js +1 -0
- package/lib/esm/actions/file/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/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/signingKey.d.ts +9 -0
- package/lib/esm/config/settings/signingKey.js +9 -0
- package/lib/esm/config/settings/signingKey.js.map +1 -0
- package/lib/esm/qpqCoreUtils.d.ts +4 -1
- package/lib/esm/qpqCoreUtils.js +15 -0
- package/lib/esm/qpqCoreUtils.js.map +1 -1
- package/lib/esm/qpqCoreUtilsLib.d.ts +3 -0
- package/lib/esm/stories/crypto/askCryptoSignJwt.d.ts +2 -0
- package/lib/esm/stories/crypto/askCryptoSignJwt.js +13 -0
- package/lib/esm/stories/crypto/askCryptoSignJwt.js.map +1 -0
- package/lib/esm/stories/crypto/askCryptoVerifyJwt.d.ts +10 -0
- package/lib/esm/stories/crypto/askCryptoVerifyJwt.js +58 -0
- package/lib/esm/stories/crypto/askCryptoVerifyJwt.js.map +1 -0
- package/lib/esm/stories/crypto/index.d.ts +2 -0
- package/lib/esm/stories/crypto/index.js +3 -0
- package/lib/esm/stories/crypto/index.js.map +1 -0
- package/lib/esm/stories/index.d.ts +1 -0
- package/lib/esm/stories/index.js +1 -0
- package/lib/esm/stories/index.js.map +1 -1
- package/lib/esm/utils/base64Url/base64Url.d.ts +3 -0
- package/lib/esm/utils/base64Url/base64Url.js +36 -0
- package/lib/esm/utils/base64Url/base64Url.js.map +1 -0
- package/lib/esm/utils/base64Url/index.d.ts +1 -0
- package/lib/esm/utils/base64Url/index.js +2 -0
- package/lib/esm/utils/base64Url/index.js.map +1 -0
- package/lib/esm/utils/index.d.ts +1 -0
- package/lib/esm/utils/index.js +1 -0
- package/lib/esm/utils/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export declare enum CryptoActionType {
|
|
2
2
|
Encrypt = "@quidproquo-core/Crypto/Encrypt",
|
|
3
|
-
Decrypt = "@quidproquo-core/Crypto/Decrypt"
|
|
3
|
+
Decrypt = "@quidproquo-core/Crypto/Decrypt",
|
|
4
|
+
Sign = "@quidproquo-core/Crypto/Sign",
|
|
5
|
+
Verify = "@quidproquo-core/Crypto/Verify",
|
|
6
|
+
GetPublicKey = "@quidproquo-core/Crypto/GetPublicKey"
|
|
4
7
|
}
|
|
@@ -5,5 +5,8 @@ var CryptoActionType;
|
|
|
5
5
|
(function (CryptoActionType) {
|
|
6
6
|
CryptoActionType["Encrypt"] = "@quidproquo-core/Crypto/Encrypt";
|
|
7
7
|
CryptoActionType["Decrypt"] = "@quidproquo-core/Crypto/Decrypt";
|
|
8
|
+
CryptoActionType["Sign"] = "@quidproquo-core/Crypto/Sign";
|
|
9
|
+
CryptoActionType["Verify"] = "@quidproquo-core/Crypto/Verify";
|
|
10
|
+
CryptoActionType["GetPublicKey"] = "@quidproquo-core/Crypto/GetPublicKey";
|
|
8
11
|
})(CryptoActionType || (exports.CryptoActionType = CryptoActionType = {}));
|
|
9
12
|
//# sourceMappingURL=CryptoActionType.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CryptoActionType.js","sourceRoot":"","sources":["../../../../src/actions/crypto/CryptoActionType.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"CryptoActionType.js","sourceRoot":"","sources":["../../../../src/actions/crypto/CryptoActionType.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAMX;AAND,WAAY,gBAAgB;IAC1B,+DAA2C,CAAA;IAC3C,+DAA2C,CAAA;IAC3C,yDAAqC,CAAA;IACrC,6DAAyC,CAAA;IACzC,yEAAqD,CAAA;AACvD,CAAC,EANW,gBAAgB,gCAAhB,gBAAgB,QAM3B","sourcesContent":["export enum CryptoActionType {\n Encrypt = '@quidproquo-core/Crypto/Encrypt',\n Decrypt = '@quidproquo-core/Crypto/Decrypt',\n Sign = '@quidproquo-core/Crypto/Sign',\n Verify = '@quidproquo-core/Crypto/Verify',\n GetPublicKey = '@quidproquo-core/Crypto/GetPublicKey',\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CryptoActionType } from './CryptoActionType';
|
|
2
|
+
export declare const askCryptoGetPublicKey: import("../../types").ActionRequesterFunction<CryptoActionType.GetPublicKey, [keyName: string], {
|
|
3
|
+
keyName: string;
|
|
4
|
+
}, string, "Throttling" | "KeyNotConfigured" | "KeyUnavailable">;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askCryptoGetPublicKey = void 0;
|
|
4
|
+
const types_1 = require("../../types");
|
|
5
|
+
const CryptoActionType_1 = require("./CryptoActionType");
|
|
6
|
+
// Returns the public half of a signing key as an SPKI PEM string. Not sensitive:
|
|
7
|
+
// it can only verify, never sign. Hand it to third parties (a JWKS endpoint, a
|
|
8
|
+
// partner service) so they can check signatures without calling back in.
|
|
9
|
+
exports.askCryptoGetPublicKey = (0, types_1.createActionRequester)()({
|
|
10
|
+
actionType: CryptoActionType_1.CryptoActionType.GetPublicKey,
|
|
11
|
+
errorTypes: [
|
|
12
|
+
'KeyNotConfigured', // no defineSigningKey for keyName in the service config
|
|
13
|
+
'KeyUnavailable', // key disabled, deleted, or access denied
|
|
14
|
+
'Throttling', // request rate exceeded
|
|
15
|
+
],
|
|
16
|
+
getPayload: (keyName) => ({ keyName }),
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=askCryptoGetPublicKey.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"askCryptoGetPublicKey.js","sourceRoot":"","sources":["../../../../src/actions/crypto/askCryptoGetPublicKey.ts"],"names":[],"mappings":";;;AAAA,uCAAoD;AACpD,yDAAsD;AAEtD,iFAAiF;AACjF,+EAA+E;AAC/E,yEAAyE;AAC5D,QAAA,qBAAqB,GAAG,IAAA,6BAAqB,GAAU,CAAC;IACnE,UAAU,EAAE,mCAAgB,CAAC,YAAY;IACzC,UAAU,EAAE;QACV,kBAAkB,EAAE,wDAAwD;QAC5E,gBAAgB,EAAE,0CAA0C;QAC5D,YAAY,EAAE,wBAAwB;KACvC;IACD,UAAU,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC;CAC/C,CAAC,CAAC","sourcesContent":["import { createActionRequester } from '../../types';\nimport { CryptoActionType } from './CryptoActionType';\n\n// Returns the public half of a signing key as an SPKI PEM string. Not sensitive:\n// it can only verify, never sign. Hand it to third parties (a JWKS endpoint, a\n// partner service) so they can check signatures without calling back in.\nexport const askCryptoGetPublicKey = createActionRequester<string>()({\n actionType: CryptoActionType.GetPublicKey,\n errorTypes: [\n 'KeyNotConfigured', // no defineSigningKey for keyName in the service config\n 'KeyUnavailable', // key disabled, deleted, or access denied\n 'Throttling', // request rate exceeded\n ],\n getPayload: (keyName: string) => ({ keyName }),\n});\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CryptoActionType } from './CryptoActionType';
|
|
2
|
+
export declare const askCryptoSign: import("../../types").ActionRequesterFunction<CryptoActionType.Sign, [keyName: string, message: string], {
|
|
3
|
+
keyName: string;
|
|
4
|
+
message: string;
|
|
5
|
+
}, string, "Throttling" | "KeyNotConfigured" | "KeyUnavailable">;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askCryptoSign = void 0;
|
|
4
|
+
const types_1 = require("../../types");
|
|
5
|
+
const CryptoActionType_1 = require("./CryptoActionType");
|
|
6
|
+
// Signs `message` with the private half of a signing key (RS256: RSASSA-PKCS1-v1_5
|
|
7
|
+
// over SHA-256) and returns the signature as base64url. RS256 is deterministic, so
|
|
8
|
+
// the same key + message always yields the same signature. The private key never
|
|
9
|
+
// leaves the provider - nothing sensitive passes through the story or its logs.
|
|
10
|
+
exports.askCryptoSign = (0, types_1.createActionRequester)()({
|
|
11
|
+
actionType: CryptoActionType_1.CryptoActionType.Sign,
|
|
12
|
+
errorTypes: [
|
|
13
|
+
'KeyNotConfigured', // no defineSigningKey for keyName in the service config
|
|
14
|
+
'KeyUnavailable', // key disabled, deleted, or access denied
|
|
15
|
+
'Throttling', // request rate exceeded
|
|
16
|
+
],
|
|
17
|
+
getPayload: (keyName, message) => ({ keyName, message }),
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=askCryptoSign.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"askCryptoSign.js","sourceRoot":"","sources":["../../../../src/actions/crypto/askCryptoSign.ts"],"names":[],"mappings":";;;AAAA,uCAAoD;AACpD,yDAAsD;AAEtD,mFAAmF;AACnF,mFAAmF;AACnF,iFAAiF;AACjF,gFAAgF;AACnE,QAAA,aAAa,GAAG,IAAA,6BAAqB,GAAU,CAAC;IAC3D,UAAU,EAAE,mCAAgB,CAAC,IAAI;IACjC,UAAU,EAAE;QACV,kBAAkB,EAAE,wDAAwD;QAC5E,gBAAgB,EAAE,0CAA0C;QAC5D,YAAY,EAAE,wBAAwB;KACvC;IACD,UAAU,EAAE,CAAC,OAAe,EAAE,OAAe,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;CACzE,CAAC,CAAC","sourcesContent":["import { createActionRequester } from '../../types';\nimport { CryptoActionType } from './CryptoActionType';\n\n// Signs `message` with the private half of a signing key (RS256: RSASSA-PKCS1-v1_5\n// over SHA-256) and returns the signature as base64url. RS256 is deterministic, so\n// the same key + message always yields the same signature. The private key never\n// leaves the provider - nothing sensitive passes through the story or its logs.\nexport const askCryptoSign = createActionRequester<string>()({\n actionType: CryptoActionType.Sign,\n errorTypes: [\n 'KeyNotConfigured', // no defineSigningKey for keyName in the service config\n 'KeyUnavailable', // key disabled, deleted, or access denied\n 'Throttling', // request rate exceeded\n ],\n getPayload: (keyName: string, message: string) => ({ keyName, message }),\n});\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CryptoActionType } from './CryptoActionType';
|
|
2
|
+
export declare const askCryptoVerify: import("../../types").ActionRequesterFunction<CryptoActionType.Verify, [keyName: string, message: string, signature: string], {
|
|
3
|
+
keyName: string;
|
|
4
|
+
message: string;
|
|
5
|
+
signature: string;
|
|
6
|
+
}, boolean, "Throttling" | "KeyNotConfigured" | "KeyUnavailable" | "MalformedSignature">;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askCryptoVerify = void 0;
|
|
4
|
+
const types_1 = require("../../types");
|
|
5
|
+
const CryptoActionType_1 = require("./CryptoActionType");
|
|
6
|
+
// Verifies a base64url RS256 signature produced by askCryptoSign against
|
|
7
|
+
// `message` using the public half of the signing key. Resolves to false for a
|
|
8
|
+
// signature that does not match; a signature that is not even decodable is a
|
|
9
|
+
// MalformedSignature error rather than false, so a wiring bug is distinguishable
|
|
10
|
+
// from a forged token.
|
|
11
|
+
exports.askCryptoVerify = (0, types_1.createActionRequester)()({
|
|
12
|
+
actionType: CryptoActionType_1.CryptoActionType.Verify,
|
|
13
|
+
errorTypes: [
|
|
14
|
+
'KeyNotConfigured', // no defineSigningKey for keyName in the service config
|
|
15
|
+
'MalformedSignature', // signature is not valid base64url
|
|
16
|
+
'KeyUnavailable', // key disabled, deleted, or access denied
|
|
17
|
+
'Throttling', // request rate exceeded
|
|
18
|
+
],
|
|
19
|
+
getPayload: (keyName, message, signature) => ({ keyName, message, signature }),
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=askCryptoVerify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"askCryptoVerify.js","sourceRoot":"","sources":["../../../../src/actions/crypto/askCryptoVerify.ts"],"names":[],"mappings":";;;AAAA,uCAAoD;AACpD,yDAAsD;AAEtD,yEAAyE;AACzE,8EAA8E;AAC9E,6EAA6E;AAC7E,iFAAiF;AACjF,uBAAuB;AACV,QAAA,eAAe,GAAG,IAAA,6BAAqB,GAAW,CAAC;IAC9D,UAAU,EAAE,mCAAgB,CAAC,MAAM;IACnC,UAAU,EAAE;QACV,kBAAkB,EAAE,wDAAwD;QAC5E,oBAAoB,EAAE,mCAAmC;QACzD,gBAAgB,EAAE,0CAA0C;QAC5D,YAAY,EAAE,wBAAwB;KACvC;IACD,UAAU,EAAE,CAAC,OAAe,EAAE,OAAe,EAAE,SAAiB,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;CACvG,CAAC,CAAC","sourcesContent":["import { createActionRequester } from '../../types';\nimport { CryptoActionType } from './CryptoActionType';\n\n// Verifies a base64url RS256 signature produced by askCryptoSign against\n// `message` using the public half of the signing key. Resolves to false for a\n// signature that does not match; a signature that is not even decodable is a\n// MalformedSignature error rather than false, so a wiring bug is distinguishable\n// from a forged token.\nexport const askCryptoVerify = createActionRequester<boolean>()({\n actionType: CryptoActionType.Verify,\n errorTypes: [\n 'KeyNotConfigured', // no defineSigningKey for keyName in the service config\n 'MalformedSignature', // signature is not valid base64url\n 'KeyUnavailable', // key disabled, deleted, or access denied\n 'Throttling', // request rate exceeded\n ],\n getPayload: (keyName: string, message: string, signature: string) => ({ keyName, message, signature }),\n});\n"]}
|
|
@@ -16,6 +16,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./askCryptoDecrypt"), exports);
|
|
18
18
|
__exportStar(require("./askCryptoEncrypt"), exports);
|
|
19
|
+
__exportStar(require("./askCryptoGetPublicKey"), exports);
|
|
20
|
+
__exportStar(require("./askCryptoSign"), exports);
|
|
21
|
+
__exportStar(require("./askCryptoVerify"), exports);
|
|
19
22
|
__exportStar(require("./CryptoActionType"), exports);
|
|
20
23
|
__exportStar(require("./CryptoContext"), exports);
|
|
21
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/actions/crypto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,qDAAmC;AACnC,qDAAmC;AACnC,kDAAgC","sourcesContent":["export * from './askCryptoDecrypt';\nexport * from './askCryptoEncrypt';\nexport * from './CryptoActionType';\nexport * from './CryptoContext';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/actions/crypto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,qDAAmC;AACnC,0DAAwC;AACxC,kDAAgC;AAChC,oDAAkC;AAClC,qDAAmC;AACnC,kDAAgC","sourcesContent":["export * from './askCryptoDecrypt';\nexport * from './askCryptoEncrypt';\nexport * from './askCryptoGetPublicKey';\nexport * from './askCryptoSign';\nexport * from './askCryptoVerify';\nexport * from './CryptoActionType';\nexport * from './CryptoContext';\n"]}
|
|
@@ -7,6 +7,7 @@ export declare enum FileActionType {
|
|
|
7
7
|
ListDirectory = "@quidproquo-core/File/ListDirectory",
|
|
8
8
|
Exists = "@quidproquo-core/File/Exists",
|
|
9
9
|
Delete = "@quidproquo-core/File/Delete",
|
|
10
|
+
Copy = "@quidproquo-core/File/Copy",
|
|
10
11
|
ReadBinaryContents = "@quidproquo-core/File/ReadBinaryContents",
|
|
11
12
|
WriteBinaryContents = "@quidproquo-core/File/WriteBinaryContents",
|
|
12
13
|
GenerateTemporarySecureUrl = "@quidproquo-core/File/GenerateTemporarySecureUrl",
|
|
@@ -10,6 +10,7 @@ var FileActionType;
|
|
|
10
10
|
FileActionType["ListDirectory"] = "@quidproquo-core/File/ListDirectory";
|
|
11
11
|
FileActionType["Exists"] = "@quidproquo-core/File/Exists";
|
|
12
12
|
FileActionType["Delete"] = "@quidproquo-core/File/Delete";
|
|
13
|
+
FileActionType["Copy"] = "@quidproquo-core/File/Copy";
|
|
13
14
|
FileActionType["ReadBinaryContents"] = "@quidproquo-core/File/ReadBinaryContents";
|
|
14
15
|
FileActionType["WriteBinaryContents"] = "@quidproquo-core/File/WriteBinaryContents";
|
|
15
16
|
FileActionType["GenerateTemporarySecureUrl"] = "@quidproquo-core/File/GenerateTemporarySecureUrl";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileActionType.js","sourceRoot":"","sources":["../../../../src/actions/file/FileActionType.ts"],"names":[],"mappings":";;;AAEA,IAAY,
|
|
1
|
+
{"version":3,"file":"FileActionType.js","sourceRoot":"","sources":["../../../../src/actions/file/FileActionType.ts"],"names":[],"mappings":";;;AAEA,IAAY,cAeX;AAfD,WAAY,cAAc;IACxB,6EAA2D,CAAA;IAC3D,+EAA6D,CAAA;IAC7D,2EAAyD,CAAA;IACzD,yEAAuD,CAAA;IACvD,uEAAqD,CAAA;IACrD,yDAAuC,CAAA;IACvC,yDAAuC,CAAA;IACvC,qDAAmC,CAAA;IACnC,iFAA+D,CAAA;IAC/D,mFAAiE,CAAA;IACjE,iGAA+E,CAAA;IAC/E,6GAA2F,CAAA;IAC3F,uEAAqD,CAAA;IACrD,iEAA+C,CAAA;AACjD,CAAC,EAfW,cAAc,8BAAd,cAAc,QAezB;AAEY,QAAA,iBAAiB,GAAG,GAAG,CAAC","sourcesContent":["import { StorageDriveTier } from '../../config';\n\nexport enum FileActionType {\n ReadTextContents = '@quidproquo-core/File/ReadTextContents',\n WriteTextContents = '@quidproquo-core/File/WriteTextContents',\n WriteObjectJson = '@quidproquo-core/File/WriteObjectJson',\n ReadObjectJson = '@quidproquo-core/File/ReadObjectJson',\n ListDirectory = '@quidproquo-core/File/ListDirectory',\n Exists = '@quidproquo-core/File/Exists',\n Delete = '@quidproquo-core/File/Delete',\n Copy = '@quidproquo-core/File/Copy',\n ReadBinaryContents = '@quidproquo-core/File/ReadBinaryContents',\n WriteBinaryContents = '@quidproquo-core/File/WriteBinaryContents',\n GenerateTemporarySecureUrl = '@quidproquo-core/File/GenerateTemporarySecureUrl',\n GenerateTemporaryUploadSecureUrl = '@quidproquo-core/File/GenerateTemporaryUploadSecureUrl',\n IsColdStorage = '@quidproquo-core/File/IsColdStorage',\n StreamOpen = '@quidproquo-core/File/StreamOpen',\n}\n\nexport const filePathDelimiter = `/`;\n\nexport interface FileInfo {\n filepath: string;\n drive: string;\n isDir: boolean;\n hashMd5?: string;\n}\n\nexport interface DirectoryList {\n fileInfos: FileInfo[];\n pageToken?: string;\n}\n\nexport interface StorageDriveAdvancedWriteOptions {\n storageDriveTier?: StorageDriveTier;\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FileActionType } from './FileActionType';
|
|
2
|
+
/**
|
|
3
|
+
* Copies one object to another path, possibly on another drive, without the bytes crossing the story (an S3
|
|
4
|
+
* server-side copy on lambda, a filesystem copy locally). The stored content type and content disposition come
|
|
5
|
+
* along with it. One `scope` applies to both sides: a copy never crosses a storage scope.
|
|
6
|
+
*/
|
|
7
|
+
export declare const askFileCopy: import("../../types").ActionRequesterFunction<FileActionType.Copy, [sourceDrive: string, sourceFilepath: string, targetDrive: string, targetFilepath: string, scope?: string | undefined], {
|
|
8
|
+
sourceDrive: string;
|
|
9
|
+
sourceFilepath: string;
|
|
10
|
+
targetDrive: string;
|
|
11
|
+
targetFilepath: string;
|
|
12
|
+
scope: string | undefined;
|
|
13
|
+
}, void, "AccessDenied" | "DriveNotFound" | "FileNotFound" | "InvalidScope">;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askFileCopy = void 0;
|
|
4
|
+
const types_1 = require("../../types");
|
|
5
|
+
const FileActionType_1 = require("./FileActionType");
|
|
6
|
+
/**
|
|
7
|
+
* Copies one object to another path, possibly on another drive, without the bytes crossing the story (an S3
|
|
8
|
+
* server-side copy on lambda, a filesystem copy locally). The stored content type and content disposition come
|
|
9
|
+
* along with it. One `scope` applies to both sides: a copy never crosses a storage scope.
|
|
10
|
+
*/
|
|
11
|
+
exports.askFileCopy = (0, types_1.createActionRequester)()({
|
|
12
|
+
actionType: FileActionType_1.FileActionType.Copy,
|
|
13
|
+
errorTypes: [
|
|
14
|
+
'AccessDenied', // caller lacks permission to read the source or write the target
|
|
15
|
+
'DriveNotFound', // the source or target storage drive does not exist
|
|
16
|
+
'FileNotFound', // no object exists at the source filepath
|
|
17
|
+
'InvalidScope', // scope is not a valid single path segment
|
|
18
|
+
],
|
|
19
|
+
getPayload: (sourceDrive, sourceFilepath, targetDrive, targetFilepath, scope) => ({
|
|
20
|
+
sourceDrive,
|
|
21
|
+
sourceFilepath,
|
|
22
|
+
targetDrive,
|
|
23
|
+
targetFilepath,
|
|
24
|
+
scope,
|
|
25
|
+
}),
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=askFileCopy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"askFileCopy.js","sourceRoot":"","sources":["../../../../src/actions/file/askFileCopy.ts"],"names":[],"mappings":";;;AAAA,uCAAoD;AACpD,qDAAkD;AAElD;;;;GAIG;AACU,QAAA,WAAW,GAAG,IAAA,6BAAqB,GAAQ,CAAC;IACvD,UAAU,EAAE,+BAAc,CAAC,IAAI;IAC/B,UAAU,EAAE;QACV,cAAc,EAAE,iEAAiE;QACjF,eAAe,EAAE,oDAAoD;QACrE,cAAc,EAAE,0CAA0C;QAC1D,cAAc,EAAE,2CAA2C;KAC5D;IACD,UAAU,EAAE,CAAC,WAAmB,EAAE,cAAsB,EAAE,WAAmB,EAAE,cAAsB,EAAE,KAAc,EAAE,EAAE,CAAC,CAAC;QACzH,WAAW;QACX,cAAc;QACd,WAAW;QACX,cAAc;QACd,KAAK;KACN,CAAC;CACH,CAAC,CAAC","sourcesContent":["import { createActionRequester } from '../../types';\nimport { FileActionType } from './FileActionType';\n\n/**\n * Copies one object to another path, possibly on another drive, without the bytes crossing the story (an S3\n * server-side copy on lambda, a filesystem copy locally). The stored content type and content disposition come\n * along with it. One `scope` applies to both sides: a copy never crosses a storage scope.\n */\nexport const askFileCopy = createActionRequester<void>()({\n actionType: FileActionType.Copy,\n errorTypes: [\n 'AccessDenied', // caller lacks permission to read the source or write the target\n 'DriveNotFound', // the source or target storage drive does not exist\n 'FileNotFound', // no object exists at the source filepath\n 'InvalidScope', // scope is not a valid single path segment\n ],\n getPayload: (sourceDrive: string, sourceFilepath: string, targetDrive: string, targetFilepath: string, scope?: string) => ({\n sourceDrive,\n sourceFilepath,\n targetDrive,\n targetFilepath,\n scope,\n }),\n});\n"]}
|
|
@@ -3,4 +3,4 @@ export declare const askFileIsColdStorage: import("../../types").ActionRequester
|
|
|
3
3
|
drive: string;
|
|
4
4
|
filepath: string;
|
|
5
5
|
scope: string | undefined;
|
|
6
|
-
}, boolean, "AccessDenied" | "DriveNotFound" | "
|
|
6
|
+
}, boolean, "AccessDenied" | "DriveNotFound" | "FileNotFound" | "InvalidScope">;
|
|
@@ -4,4 +4,4 @@ export declare const askFileReadBinaryContents: import("../../types").ActionRequ
|
|
|
4
4
|
drive: string;
|
|
5
5
|
filepath: string;
|
|
6
6
|
scope: string | undefined;
|
|
7
|
-
}, QPQBinaryData, "
|
|
7
|
+
}, QPQBinaryData, "FileNotFound" | "InvalidScope" | "InvalidStorageClass">;
|
|
@@ -4,5 +4,5 @@ export declare const askFileReadObjectJsonBase: import("../..").ActionRequesterF
|
|
|
4
4
|
drive: string;
|
|
5
5
|
filepath: string;
|
|
6
6
|
scope: string | undefined;
|
|
7
|
-
}, object, "
|
|
7
|
+
}, object, "FileNotFound" | "InvalidScope" | "InvalidStorageClass" | "InvalidJson">;
|
|
8
8
|
export declare function askFileReadObjectJson<T extends object>(drive: string, filepath: string, scope?: string): AskResponse<T>;
|
|
@@ -3,4 +3,4 @@ export declare const askFileReadTextContents: import("../../types").ActionReques
|
|
|
3
3
|
drive: string;
|
|
4
4
|
filepath: string;
|
|
5
5
|
scope: string | undefined;
|
|
6
|
-
}, string, "
|
|
6
|
+
}, string, "FileNotFound" | "InvalidScope" | "InvalidStorageClass">;
|
|
@@ -7,5 +7,5 @@ export declare const askFileStreamOpenBase: import("../..").ActionRequesterFunct
|
|
|
7
7
|
encoding: StreamEncoding;
|
|
8
8
|
chunkSize: number | undefined;
|
|
9
9
|
scope: string | undefined;
|
|
10
|
-
}, StreamHandle<StreamEncoding, unknown>, "
|
|
10
|
+
}, StreamHandle<StreamEncoding, unknown>, "FileNotFound" | "InvalidScope" | "InvalidStorageClass">;
|
|
11
11
|
export declare function askFileStreamOpen<E extends StreamEncoding = 'text'>(drive: string, filepath: string, encoding?: E, chunkSize?: number, scope?: string): AskResponse<StreamHandle<E>>;
|
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./askFileCopy"), exports);
|
|
17
18
|
__exportStar(require("./askFileDelete"), exports);
|
|
18
19
|
__exportStar(require("./askFileExists"), exports);
|
|
19
20
|
__exportStar(require("./askFileGenerateTemporarySecureUrl"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/actions/file/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,kDAAgC;AAChC,sEAAoD;AACpD,4EAA0D;AAC1D,yDAAuC;AACvC,yDAAuC;AACvC,8DAA4C;AAC5C,0DAAwC;AACxC,4DAA0C;AAC1C,sDAAoC;AACpC,+DAA6C;AAC7C,2DAAyC;AACzC,6DAA2C;AAC3C,mDAAiC","sourcesContent":["export * from './askFileDelete';\nexport * from './askFileExists';\nexport * from './askFileGenerateTemporarySecureUrl';\nexport * from './askFileGenerateTemporaryUploadSecureUrl';\nexport * from './askFileIsColdStorage';\nexport * from './askFileListDirectory';\nexport * from './askFileReadBinaryContents';\nexport * from './askFileReadObjectJson';\nexport * from './askFileReadTextContents';\nexport * from './askFileStreamOpen';\nexport * from './askFileWriteBinaryContents';\nexport * from './askFileWriteObjectJson';\nexport * from './askFileWriteTextContents';\nexport * from './FileActionType';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/actions/file/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,kDAAgC;AAChC,kDAAgC;AAChC,sEAAoD;AACpD,4EAA0D;AAC1D,yDAAuC;AACvC,yDAAuC;AACvC,8DAA4C;AAC5C,0DAAwC;AACxC,4DAA0C;AAC1C,sDAAoC;AACpC,+DAA6C;AAC7C,2DAAyC;AACzC,6DAA2C;AAC3C,mDAAiC","sourcesContent":["export * from './askFileCopy';\nexport * from './askFileDelete';\nexport * from './askFileExists';\nexport * from './askFileGenerateTemporarySecureUrl';\nexport * from './askFileGenerateTemporaryUploadSecureUrl';\nexport * from './askFileIsColdStorage';\nexport * from './askFileListDirectory';\nexport * from './askFileReadBinaryContents';\nexport * from './askFileReadObjectJson';\nexport * from './askFileReadTextContents';\nexport * from './askFileStreamOpen';\nexport * from './askFileWriteBinaryContents';\nexport * from './askFileWriteObjectJson';\nexport * from './askFileWriteTextContents';\nexport * from './FileActionType';\n"]}
|
|
@@ -18,6 +18,7 @@ export declare enum QPQCoreConfigSettingType {
|
|
|
18
18
|
keyValueStore = "@quidproquo-core/config/KeyValueStore",
|
|
19
19
|
configValue = "@quidproquo-core/config/ConfigValue",
|
|
20
20
|
cryptoKey = "@quidproquo-core/config/cryptoKey",
|
|
21
|
+
signingKey = "@quidproquo-core/config/signingKey",
|
|
21
22
|
environmentSettings = "@quidproquo-core/config/EnvironmentSettings",
|
|
22
23
|
serviceSettings = "@quidproquo-core/config/ServiceSettings",
|
|
23
24
|
deployEvent = "@quidproquo-core/config/DeployEvent",
|
|
@@ -21,6 +21,7 @@ var QPQCoreConfigSettingType;
|
|
|
21
21
|
QPQCoreConfigSettingType["keyValueStore"] = "@quidproquo-core/config/KeyValueStore";
|
|
22
22
|
QPQCoreConfigSettingType["configValue"] = "@quidproquo-core/config/ConfigValue";
|
|
23
23
|
QPQCoreConfigSettingType["cryptoKey"] = "@quidproquo-core/config/cryptoKey";
|
|
24
|
+
QPQCoreConfigSettingType["signingKey"] = "@quidproquo-core/config/signingKey";
|
|
24
25
|
QPQCoreConfigSettingType["environmentSettings"] = "@quidproquo-core/config/EnvironmentSettings";
|
|
25
26
|
QPQCoreConfigSettingType["serviceSettings"] = "@quidproquo-core/config/ServiceSettings";
|
|
26
27
|
QPQCoreConfigSettingType["deployEvent"] = "@quidproquo-core/config/DeployEvent";
|
|
@@ -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,6EAAiD,CAAA;IACjD,+FAAmE,CAAA;IACnE,uFAA2D,CAAA;IAC3D,+EAAmD,CAAA;IACnD,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 signingKey = '@quidproquo-core/config/signingKey',\n environmentSettings = '@quidproquo-core/config/EnvironmentSettings',\n serviceSettings = '@quidproquo-core/config/ServiceSettings',\n deployEvent = '@quidproquo-core/config/DeployEvent',\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"]}
|
|
@@ -26,6 +26,7 @@ export * from './queue';
|
|
|
26
26
|
export * from './schedule';
|
|
27
27
|
export * from './secret';
|
|
28
28
|
export * from './serviceSettings';
|
|
29
|
+
export * from './signingKey';
|
|
29
30
|
export * from './storageDrive';
|
|
30
31
|
export * from './userDirectory';
|
|
31
32
|
export * from './virtualNetwork';
|
|
@@ -42,6 +42,7 @@ __exportStar(require("./queue"), exports);
|
|
|
42
42
|
__exportStar(require("./schedule"), exports);
|
|
43
43
|
__exportStar(require("./secret"), exports);
|
|
44
44
|
__exportStar(require("./serviceSettings"), exports);
|
|
45
|
+
__exportStar(require("./signingKey"), exports);
|
|
45
46
|
__exportStar(require("./storageDrive"), exports);
|
|
46
47
|
__exportStar(require("./userDirectory"), exports);
|
|
47
48
|
__exportStar(require("./virtualNetwork"), 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,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 './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"]}
|
|
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,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,+CAA6B;AAC7B,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 './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 './signingKey';\nexport * from './storageDrive';\nexport * from './userDirectory';\nexport * from './virtualNetwork';\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CrossModuleOwner } from '../../types';
|
|
2
|
+
import { QPQConfigAdvancedSettings, QPQConfigSetting } from '../QPQConfig';
|
|
3
|
+
export interface QPQConfigAdvancedSigningKeySettings extends QPQConfigAdvancedSettings {
|
|
4
|
+
owner?: CrossModuleOwner<'signingKeyName'>;
|
|
5
|
+
}
|
|
6
|
+
export interface SigningKeyQPQConfigSetting extends QPQConfigSetting {
|
|
7
|
+
keyName: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const defineSigningKey: (keyName: string, options?: QPQConfigAdvancedSigningKeySettings) => SigningKeyQPQConfigSetting;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defineSigningKey = void 0;
|
|
4
|
+
const QPQConfig_1 = require("../QPQConfig");
|
|
5
|
+
const crossModuleUtils_1 = require("../utils/crossModuleUtils");
|
|
6
|
+
const defineSigningKey = (keyName, options) => ({
|
|
7
|
+
configSettingType: QPQConfig_1.QPQCoreConfigSettingType.signingKey,
|
|
8
|
+
uniqueKey: keyName,
|
|
9
|
+
keyName,
|
|
10
|
+
owner: (0, crossModuleUtils_1.convertCrossModuleOwnerToGenericResourceNameOverride)(options === null || options === void 0 ? void 0 : options.owner),
|
|
11
|
+
});
|
|
12
|
+
exports.defineSigningKey = defineSigningKey;
|
|
13
|
+
//# sourceMappingURL=signingKey.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signingKey.js","sourceRoot":"","sources":["../../../../src/config/settings/signingKey.ts"],"names":[],"mappings":";;;AACA,4CAAqG;AACrG,gEAAiG;AAe1F,MAAM,gBAAgB,GAAG,CAAC,OAAe,EAAE,OAA6C,EAA8B,EAAE,CAAC,CAAC;IAC/H,iBAAiB,EAAE,oCAAwB,CAAC,UAAU;IACtD,SAAS,EAAE,OAAO;IAElB,OAAO;IAEP,KAAK,EAAE,IAAA,uEAAoD,EAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,CAAC;CAC5E,CAAC,CAAC;AAPU,QAAA,gBAAgB,oBAO1B","sourcesContent":["import { CrossModuleOwner } from '../../types';\nimport { QPQConfigAdvancedSettings, QPQConfigSetting, QPQCoreConfigSettingType } from '../QPQConfig';\nimport { convertCrossModuleOwnerToGenericResourceNameOverride } from '../utils/crossModuleUtils';\n\nexport interface QPQConfigAdvancedSigningKeySettings extends QPQConfigAdvancedSettings {\n owner?: CrossModuleOwner<'signingKeyName'>;\n}\n\n// An asymmetric (RSA-2048, RS256) key pair whose private half never leaves the\n// provider. Stories sign with askCryptoSign, verify with askCryptoVerify and\n// publish the public half with askCryptoGetPublicKey. Distinct from\n// defineCryptoKey: a provider key is either encrypt/decrypt or sign/verify, never\n// both, so the two are separate resources with separate grants.\nexport interface SigningKeyQPQConfigSetting extends QPQConfigSetting {\n keyName: string;\n}\n\nexport const defineSigningKey = (keyName: string, options?: QPQConfigAdvancedSigningKeySettings): SigningKeyQPQConfigSetting => ({\n configSettingType: QPQCoreConfigSettingType.signingKey,\n uniqueKey: keyName,\n\n keyName,\n\n owner: convertCrossModuleOwnerToGenericResourceNameOverride(options?.owner),\n});\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AiQPQConfigSetting, ApplicationQPQConfigSetting, BackendBundleOptions, CryptoKeyQPQConfigSetting, DeployEventsQPQConfigSetting, DynamicFunctionsQPQConfigSetting, EmailTemplates, EventBusQPQConfigSetting, FederatedModuleStoreQPQConfigSetting, FrontendBundleOptions, GraphDatabaseQPQConfigSetting, InlineFunctionQPQConfigSetting, JavascriptRuntimeQPQConfigSetting, KeyValueStoreQPQConfigSetting, NotifyErrorQPQConfigSetting, ParameterQPQConfigSetting, QPQConfig, QPQConfigSetting, QpqQueueProcessors, QueueQPQConfigSetting, ScheduleQPQConfigSetting, SecretQPQConfigSetting, StorageDriveQPQConfigSetting, UserDirectoryQPQConfigSetting, VirtualNetworkQPQConfigSetting } from './config';
|
|
1
|
+
import { AiQPQConfigSetting, ApplicationQPQConfigSetting, BackendBundleOptions, CryptoKeyQPQConfigSetting, DeployEventsQPQConfigSetting, DynamicFunctionsQPQConfigSetting, EmailTemplates, EventBusQPQConfigSetting, FederatedModuleStoreQPQConfigSetting, FrontendBundleOptions, GraphDatabaseQPQConfigSetting, InlineFunctionQPQConfigSetting, JavascriptRuntimeQPQConfigSetting, KeyValueStoreQPQConfigSetting, NotifyErrorQPQConfigSetting, ParameterQPQConfigSetting, QPQConfig, QPQConfigSetting, QpqQueueProcessors, QueueQPQConfigSetting, ScheduleQPQConfigSetting, SecretQPQConfigSetting, SigningKeyQPQConfigSetting, StorageDriveQPQConfigSetting, UserDirectoryQPQConfigSetting, VirtualNetworkQPQConfigSetting } from './config';
|
|
2
2
|
import { ConfigUrl, CrossServiceResourceName, CustomFullyQualifiedResource, FullyQualifiedResource, QpqFunctionRuntime, ResourceName } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Flattens a QPQConfig array into a single array of QPQConfigSetting objects.
|
|
@@ -85,6 +85,9 @@ export declare const getOwnedSecrets: (qpqConfig: QPQConfig) => SecretQPQConfigS
|
|
|
85
85
|
export declare const getCryptoKeyByName: (cryptoKeyName: string, qpqConfig: QPQConfig) => CryptoKeyQPQConfigSetting;
|
|
86
86
|
export declare const getAllCryptoKeyConfigs: (qpqConfig: QPQConfig) => CryptoKeyQPQConfigSetting[];
|
|
87
87
|
export declare const getOwnedCryptoKeys: (qpqConfig: QPQConfig) => CryptoKeyQPQConfigSetting[];
|
|
88
|
+
export declare const getSigningKeyByName: (signingKeyName: string, qpqConfig: QPQConfig) => SigningKeyQPQConfigSetting;
|
|
89
|
+
export declare const getAllSigningKeyConfigs: (qpqConfig: QPQConfig) => SigningKeyQPQConfigSetting[];
|
|
90
|
+
export declare const getOwnedSigningKeys: (qpqConfig: QPQConfig) => SigningKeyQPQConfigSetting[];
|
|
88
91
|
export declare const getGlobalConfigValue: <T>(qpqConfig: QPQConfig, name: string) => T;
|
|
89
92
|
export declare const resolveGlobalValue: <T>(qpqConfig: QPQConfig, functionGlobals: Record<string, unknown> | undefined, name: string) => T;
|
|
90
93
|
export declare const getUserDirectories: (configs: QPQConfig) => UserDirectoryQPQConfigSetting[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getAllSecretConfigs = exports.getSecretByName = exports.getSrcFilenameFromQpqFunctionRuntime = exports.getApiBuildPath = exports.getAllSrcEntries = exports.expandSrcEntriesWithActionProcessors = exports.getOwnedDynamicFunctions = exports.getAllDynamicFunctions = exports.getOwnedInlineFunctions = exports.getAllInlineFunctions = exports.getUserDirectorySrcEntries = exports.getQueueSrcEntries = exports.getOwnedScheduleEvents = exports.getScheduleEvents = exports.getUserDirectoryEmailTemplates = exports.getActionProcessorSources = exports.getKeyValueStoreByName = exports.resolveCrossServiceResourceName = exports.getOwnedStorageDrives = exports.getOwnedGraphDatabases = exports.getOwnedKeyValueStores = exports.getVirualNetworkConfigs = exports.getDeployEventConfigs = exports.getAllGraphDatabaseConfigs = exports.getAllKeyValueStores = exports.getOwnedItems = exports.getEventBusConfigByName = exports.getOwnedEventBusConfigs = exports.getJavascriptRuntimeConfig = exports.getAllAiConfigs = exports.getAllEventBusConfigs = exports.getStorageDriveNames = exports.assertFifoQueueEventBusSubscriptionsAreValid = exports.getQueueByName = exports.getNotifyErrorConfigs = exports.getOwnedQueues = exports.getQueues = exports.getFederatedModuleStore = exports.getStorageDriveByName = exports.getStorageDrives = exports.getApplicationModuleEnvironment = exports.getConfigRoot = exports.getApplicationModuleFeature = exports.getApplicationName = exports.getApplicationConfigRoot = exports.getApplicationModuleName = exports.getApplicationConfigSetting = exports.getConfigSetting = exports.getConfigSettings = exports.flattenQpqConfig = void 0;
|
|
4
|
-
exports.getFullUrlFromConfigUrl = exports.isSameResource = exports.getKeyValueStoreFullyQualifiedResourceName = exports.getFullyQualifiedResourceName = exports.convertCustomFullyQualifiedResourceToGeneric = exports.getQueueQueueProcessors = exports.getQueueConfigSettingByName = exports.getUniqueKeyForSetting = exports.getFrontendBundleOptions = exports.getBackendBundleOptions = exports.getOwnedParameterConfigs = exports.getParameterConfig = exports.getAllParameterConfigs = exports.getUserDirectoryByName = exports.getOwnedUserDirectories = exports.getUserDirectories = exports.resolveGlobalValue = exports.getGlobalConfigValue = exports.getOwnedCryptoKeys = exports.getAllCryptoKeyConfigs = exports.getCryptoKeyByName = exports.getOwnedSecrets = void 0;
|
|
4
|
+
exports.getFullUrlFromConfigUrl = exports.isSameResource = exports.getKeyValueStoreFullyQualifiedResourceName = exports.getFullyQualifiedResourceName = exports.convertCustomFullyQualifiedResourceToGeneric = exports.getQueueQueueProcessors = exports.getQueueConfigSettingByName = exports.getUniqueKeyForSetting = exports.getFrontendBundleOptions = exports.getBackendBundleOptions = exports.getOwnedParameterConfigs = exports.getParameterConfig = exports.getAllParameterConfigs = exports.getUserDirectoryByName = exports.getOwnedUserDirectories = exports.getUserDirectories = exports.resolveGlobalValue = exports.getGlobalConfigValue = exports.getOwnedSigningKeys = exports.getAllSigningKeyConfigs = exports.getSigningKeyByName = exports.getOwnedCryptoKeys = exports.getAllCryptoKeyConfigs = exports.getCryptoKeyByName = exports.getOwnedSecrets = void 0;
|
|
5
5
|
const config_1 = require("./config");
|
|
6
6
|
const utils_1 = require("./utils");
|
|
7
7
|
/**
|
|
@@ -398,6 +398,24 @@ const getOwnedCryptoKeys = (qpqConfig) => {
|
|
|
398
398
|
return (0, exports.getOwnedItems)(cryptoKeys, qpqConfig);
|
|
399
399
|
};
|
|
400
400
|
exports.getOwnedCryptoKeys = getOwnedCryptoKeys;
|
|
401
|
+
const getSigningKeyByName = (signingKeyName, qpqConfig) => {
|
|
402
|
+
const signingKeys = (0, exports.getConfigSettings)(qpqConfig, config_1.QPQCoreConfigSettingType.signingKey);
|
|
403
|
+
const signingKey = signingKeys.find((k) => k.keyName === signingKeyName);
|
|
404
|
+
if (!signingKey) {
|
|
405
|
+
throw new Error(`Can not find signing key [${signingKeyName}]`);
|
|
406
|
+
}
|
|
407
|
+
return signingKey;
|
|
408
|
+
};
|
|
409
|
+
exports.getSigningKeyByName = getSigningKeyByName;
|
|
410
|
+
const getAllSigningKeyConfigs = (qpqConfig) => {
|
|
411
|
+
return (0, exports.getConfigSettings)(qpqConfig, config_1.QPQCoreConfigSettingType.signingKey);
|
|
412
|
+
};
|
|
413
|
+
exports.getAllSigningKeyConfigs = getAllSigningKeyConfigs;
|
|
414
|
+
const getOwnedSigningKeys = (qpqConfig) => {
|
|
415
|
+
const signingKeys = (0, exports.getAllSigningKeyConfigs)(qpqConfig);
|
|
416
|
+
return (0, exports.getOwnedItems)(signingKeys, qpqConfig);
|
|
417
|
+
};
|
|
418
|
+
exports.getOwnedSigningKeys = getOwnedSigningKeys;
|
|
401
419
|
const getGlobalConfigValue = (qpqConfig, name) => {
|
|
402
420
|
const global = (0, exports.getConfigSettings)(qpqConfig, config_1.QPQCoreConfigSettingType.global).find((g) => g.key === name);
|
|
403
421
|
if (!global) {
|