quidproquo-actionprocessor-node 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.
Files changed (53) hide show
  1. package/lib/commonjs/dynamicActionProcessor/file/getFileCopyActionProcessor.d.ts +2 -0
  2. package/lib/commonjs/dynamicActionProcessor/file/getFileCopyActionProcessor.js +81 -0
  3. package/lib/commonjs/dynamicActionProcessor/file/getFileCopyActionProcessor.js.map +1 -0
  4. package/lib/commonjs/dynamicActionProcessor/file/index.js +2 -1
  5. package/lib/commonjs/dynamicActionProcessor/file/index.js.map +1 -1
  6. package/lib/commonjs/logic/index.d.ts +1 -0
  7. package/lib/commonjs/logic/index.js +1 -0
  8. package/lib/commonjs/logic/index.js.map +1 -1
  9. package/lib/commonjs/logic/signing/SigningMalformedSignatureError.d.ts +4 -0
  10. package/lib/commonjs/logic/signing/SigningMalformedSignatureError.js +15 -0
  11. package/lib/commonjs/logic/signing/SigningMalformedSignatureError.js.map +1 -0
  12. package/lib/commonjs/logic/signing/base64Url.d.ts +2 -0
  13. package/lib/commonjs/logic/signing/base64Url.js +17 -0
  14. package/lib/commonjs/logic/signing/base64Url.js.map +1 -0
  15. package/lib/commonjs/logic/signing/generateRs256KeyPair.d.ts +5 -0
  16. package/lib/commonjs/logic/signing/generateRs256KeyPair.js +16 -0
  17. package/lib/commonjs/logic/signing/generateRs256KeyPair.js.map +1 -0
  18. package/lib/commonjs/logic/signing/index.d.ts +5 -0
  19. package/lib/commonjs/logic/signing/index.js +22 -0
  20. package/lib/commonjs/logic/signing/index.js.map +1 -0
  21. package/lib/commonjs/logic/signing/rs256.d.ts +3 -0
  22. package/lib/commonjs/logic/signing/rs256.js +14 -0
  23. package/lib/commonjs/logic/signing/rs256.js.map +1 -0
  24. package/lib/commonjs/logic/signing/spkiDerToPem.d.ts +1 -0
  25. package/lib/commonjs/logic/signing/spkiDerToPem.js +12 -0
  26. package/lib/commonjs/logic/signing/spkiDerToPem.js.map +1 -0
  27. package/lib/esm/dynamicActionProcessor/file/getFileCopyActionProcessor.d.ts +2 -0
  28. package/lib/esm/dynamicActionProcessor/file/getFileCopyActionProcessor.js +35 -0
  29. package/lib/esm/dynamicActionProcessor/file/getFileCopyActionProcessor.js.map +1 -0
  30. package/lib/esm/dynamicActionProcessor/file/index.js +2 -0
  31. package/lib/esm/dynamicActionProcessor/file/index.js.map +1 -1
  32. package/lib/esm/logic/index.d.ts +1 -0
  33. package/lib/esm/logic/index.js +1 -0
  34. package/lib/esm/logic/index.js.map +1 -1
  35. package/lib/esm/logic/signing/SigningMalformedSignatureError.d.ts +4 -0
  36. package/lib/esm/logic/signing/SigningMalformedSignatureError.js +11 -0
  37. package/lib/esm/logic/signing/SigningMalformedSignatureError.js.map +1 -0
  38. package/lib/esm/logic/signing/base64Url.d.ts +2 -0
  39. package/lib/esm/logic/signing/base64Url.js +12 -0
  40. package/lib/esm/logic/signing/base64Url.js.map +1 -0
  41. package/lib/esm/logic/signing/generateRs256KeyPair.d.ts +5 -0
  42. package/lib/esm/logic/signing/generateRs256KeyPair.js +12 -0
  43. package/lib/esm/logic/signing/generateRs256KeyPair.js.map +1 -0
  44. package/lib/esm/logic/signing/index.d.ts +5 -0
  45. package/lib/esm/logic/signing/index.js +6 -0
  46. package/lib/esm/logic/signing/index.js.map +1 -0
  47. package/lib/esm/logic/signing/rs256.d.ts +3 -0
  48. package/lib/esm/logic/signing/rs256.js +9 -0
  49. package/lib/esm/logic/signing/rs256.js.map +1 -0
  50. package/lib/esm/logic/signing/spkiDerToPem.d.ts +1 -0
  51. package/lib/esm/logic/signing/spkiDerToPem.js +7 -0
  52. package/lib/esm/logic/signing/spkiDerToPem.js.map +1 -0
  53. package/package.json +5 -5
@@ -0,0 +1,2 @@
1
+ import { FileStorageConfig } from './types';
2
+ export declare const getFileCopyActionProcessor: (config: FileStorageConfig) => import("quidproquo-core").ActionProcessorListResolver;
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
+ return new (P || (P = Promise))(function (resolve, reject) {
38
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
42
+ });
43
+ };
44
+ Object.defineProperty(exports, "__esModule", { value: true });
45
+ exports.getFileCopyActionProcessor = void 0;
46
+ const quidproquo_core_1 = require("quidproquo-core");
47
+ const fs = __importStar(require("fs/promises"));
48
+ const utils_1 = require("./utils");
49
+ // The sidecar the binary-write processor and the secure-upload endpoint persist beside an object
50
+ // (mimetype + content disposition). Copied with the object so the copy serves the same way.
51
+ const metaPath = (fullPath) => `${fullPath}.qpqmeta.json`;
52
+ const getProcessFileCopy = (config) => (qpqConfig) => {
53
+ return (_a) => __awaiter(void 0, [_a], void 0, function* ({ sourceDrive, sourceFilepath, targetDrive, targetFilepath, scope }) {
54
+ try {
55
+ const sourcePath = (0, utils_1.resolveFilePath)(config, qpqConfig, sourceDrive, sourceFilepath, scope);
56
+ const targetPath = (0, utils_1.resolveFilePath)(config, qpqConfig, targetDrive, targetFilepath, scope);
57
+ yield (0, utils_1.ensureParentDirectoryExists)(targetPath);
58
+ yield fs.copyFile(sourcePath, targetPath);
59
+ try {
60
+ yield fs.copyFile(metaPath(sourcePath), metaPath(targetPath));
61
+ }
62
+ catch (error) {
63
+ // No sidecar on the source → nothing to carry across.
64
+ if (error.code !== 'ENOENT') {
65
+ throw error;
66
+ }
67
+ }
68
+ return (0, quidproquo_core_1.actionResult)(void 0);
69
+ }
70
+ catch (error) {
71
+ return (0, quidproquo_core_1.actionResultErrorFromCaughtError)(error, {
72
+ InvalidScopeError: (error) => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.askFileCopy.errorType.InvalidScope, error.message),
73
+ ENOENT: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.askFileCopy.errorType.FileNotFound, `File not found: ${sourceFilepath}`), // node fs code
74
+ EACCES: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.askFileCopy.errorType.AccessDenied, `Access denied copying file: ${sourceFilepath}`), // node fs code
75
+ });
76
+ }
77
+ });
78
+ };
79
+ const getFileCopyActionProcessor = (config) => (0, quidproquo_core_1.createActionProcessor)(quidproquo_core_1.askFileCopy, (qpqConfig) => getProcessFileCopy(config)(qpqConfig));
80
+ exports.getFileCopyActionProcessor = getFileCopyActionProcessor;
81
+ //# sourceMappingURL=getFileCopyActionProcessor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFileCopyActionProcessor.js","sourceRoot":"","sources":["../../../../src/dynamicActionProcessor/file/getFileCopyActionProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDASyB;AAEzB,gDAAkC;AAGlC,mCAAuE;AAEvE,iGAAiG;AACjG,4FAA4F;AAC5F,MAAM,QAAQ,GAAG,CAAC,QAAgB,EAAU,EAAE,CAAC,GAAG,QAAQ,eAAe,CAAC;AAE1E,MAAM,kBAAkB,GACtB,CAAC,MAAyB,EAAE,EAAE,CAC9B,CAAC,SAAoB,EAAoC,EAAE;IACzD,OAAO,KAA4E,EAAE,4CAAvE,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,EAAE;QAC/E,IAAI,CAAC;YACH,MAAM,UAAU,GAAG,IAAA,uBAAe,EAAC,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC;YAC1F,MAAM,UAAU,GAAG,IAAA,uBAAe,EAAC,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC;YAC1F,MAAM,IAAA,mCAA2B,EAAC,UAAU,CAAC,CAAC;YAE9C,MAAM,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;YAE1C,IAAI,CAAC;gBACH,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;YAChE,CAAC;YAAC,OAAO,KAAc,EAAE,CAAC;gBACxB,sDAAsD;gBACtD,IAAK,KAA2B,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;oBACnD,MAAM,KAAK,CAAC;gBACd,CAAC;YACH,CAAC;YAED,OAAO,IAAA,8BAAY,EAAC,KAAK,CAAC,CAAC,CAAC;QAC9B,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,OAAO,IAAA,kDAAgC,EAAC,KAAK,EAAE;gBAC7C,iBAAiB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,mCAAiB,EAAC,6BAAW,CAAC,SAAS,CAAC,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC;gBAClG,MAAM,EAAE,GAAG,EAAE,CAAC,IAAA,mCAAiB,EAAC,6BAAW,CAAC,SAAS,CAAC,YAAY,EAAE,mBAAmB,cAAc,EAAE,CAAC,EAAE,eAAe;gBACzH,MAAM,EAAE,GAAG,EAAE,CAAC,IAAA,mCAAiB,EAAC,6BAAW,CAAC,SAAS,CAAC,YAAY,EAAE,+BAA+B,cAAc,EAAE,CAAC,EAAE,eAAe;aACtI,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAA,CAAC;AACJ,CAAC,CAAC;AAEG,MAAM,0BAA0B,GAAG,CAAC,MAAyB,EAAE,EAAE,CACtE,IAAA,uCAAqB,EAAC,6BAAW,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AAD9E,QAAA,0BAA0B,8BACoD","sourcesContent":["import {\n actionResult,\n actionResultError,\n actionResultErrorFromCaughtError,\n askFileCopy,\n createActionProcessor,\n FileActionType,\n ProcessorFor,\n QPQConfig,\n} from 'quidproquo-core';\n\nimport * as fs from 'fs/promises';\n\nimport { FileStorageConfig } from './types';\nimport { ensureParentDirectoryExists, resolveFilePath } from './utils';\n\n// The sidecar the binary-write processor and the secure-upload endpoint persist beside an object\n// (mimetype + content disposition). Copied with the object so the copy serves the same way.\nconst metaPath = (fullPath: string): string => `${fullPath}.qpqmeta.json`;\n\nconst getProcessFileCopy =\n (config: FileStorageConfig) =>\n (qpqConfig: QPQConfig): ProcessorFor<typeof askFileCopy> => {\n return async ({ sourceDrive, sourceFilepath, targetDrive, targetFilepath, scope }) => {\n try {\n const sourcePath = resolveFilePath(config, qpqConfig, sourceDrive, sourceFilepath, scope);\n const targetPath = resolveFilePath(config, qpqConfig, targetDrive, targetFilepath, scope);\n await ensureParentDirectoryExists(targetPath);\n\n await fs.copyFile(sourcePath, targetPath);\n\n try {\n await fs.copyFile(metaPath(sourcePath), metaPath(targetPath));\n } catch (error: unknown) {\n // No sidecar on the source → nothing to carry across.\n if ((error as { code?: string }).code !== 'ENOENT') {\n throw error;\n }\n }\n\n return actionResult(void 0);\n } catch (error: unknown) {\n return actionResultErrorFromCaughtError(error, {\n InvalidScopeError: (error) => actionResultError(askFileCopy.errorType.InvalidScope, error.message),\n ENOENT: () => actionResultError(askFileCopy.errorType.FileNotFound, `File not found: ${sourceFilepath}`), // node fs code\n EACCES: () => actionResultError(askFileCopy.errorType.AccessDenied, `Access denied copying file: ${sourceFilepath}`), // node fs code\n });\n }\n };\n };\n\nexport const getFileCopyActionProcessor = (config: FileStorageConfig) =>\n createActionProcessor(askFileCopy, (qpqConfig) => getProcessFileCopy(config)(qpqConfig));\n"]}
@@ -24,6 +24,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.getFileActionProcessor = void 0;
27
+ const getFileCopyActionProcessor_1 = require("./getFileCopyActionProcessor");
27
28
  const getFileDeleteActionProcessor_1 = require("./getFileDeleteActionProcessor");
28
29
  const getFileExistsActionProcessor_1 = require("./getFileExistsActionProcessor");
29
30
  const getFileGenerateTemporarySecureUrlActionProcessor_1 = require("./getFileGenerateTemporarySecureUrlActionProcessor");
@@ -41,7 +42,7 @@ __exportStar(require("./types"), exports);
41
42
  // Main export that accepts configuration
42
43
  const getFileActionProcessor = (fileStorageConfig) => {
43
44
  return (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
44
- return (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (yield (0, getFileReadTextContentsActionProcessor_1.getFileReadTextContentsActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileWriteTextContentsActionProcessor_1.getFileWriteTextContentsActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileReadObjectJsonActionProcessor_1.getFileReadObjectJsonActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileWriteObjectJsonActionProcessor_1.getFileWriteObjectJsonActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileReadBinaryContentsActionProcessor_1.getFileReadBinaryContentsActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileWriteBinaryContentsActionProcessor_1.getFileWriteBinaryContentsActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileListDirectoryActionProcessor_1.getFileListDirectoryActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileExistsActionProcessor_1.getFileExistsActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileDeleteActionProcessor_1.getFileDeleteActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileGenerateTemporarySecureUrlActionProcessor_1.getFileGenerateTemporarySecureUrlActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileGenerateTemporaryUploadSecureUrlActionProcessor_1.getFileGenerateTemporaryUploadSecureUrlActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileIsColdStorageActionProcessor_1.getFileIsColdStorageActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileStreamOpenActionProcessor_1.getFileStreamOpenActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))));
45
+ return (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (yield (0, getFileReadTextContentsActionProcessor_1.getFileReadTextContentsActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileWriteTextContentsActionProcessor_1.getFileWriteTextContentsActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileReadObjectJsonActionProcessor_1.getFileReadObjectJsonActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileWriteObjectJsonActionProcessor_1.getFileWriteObjectJsonActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileReadBinaryContentsActionProcessor_1.getFileReadBinaryContentsActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileWriteBinaryContentsActionProcessor_1.getFileWriteBinaryContentsActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileListDirectoryActionProcessor_1.getFileListDirectoryActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileExistsActionProcessor_1.getFileExistsActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileDeleteActionProcessor_1.getFileDeleteActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileCopyActionProcessor_1.getFileCopyActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileGenerateTemporarySecureUrlActionProcessor_1.getFileGenerateTemporarySecureUrlActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileGenerateTemporaryUploadSecureUrlActionProcessor_1.getFileGenerateTemporaryUploadSecureUrlActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileIsColdStorageActionProcessor_1.getFileIsColdStorageActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))), (yield (0, getFileStreamOpenActionProcessor_1.getFileStreamOpenActionProcessor)(fileStorageConfig)(qpqConfig, dynamicModuleLoader))));
45
46
  });
46
47
  };
47
48
  exports.getFileActionProcessor = getFileActionProcessor;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dynamicActionProcessor/file/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,iFAA8E;AAC9E,iFAA8E;AAC9E,yHAAsH;AACtH,qIAAkI;AAClI,+FAA4F;AAC5F,+FAA4F;AAC5F,yGAAsG;AACtG,iGAA8F;AAC9F,qGAAkG;AAClG,yFAAsF;AACtF,2GAAwG;AACxG,mGAAgG;AAChG,uGAAoG;AAGpG,0CAAwB;AAExB,yCAAyC;AAClC,MAAM,sBAAsB,GAAG,CAAC,iBAAoC,EAA+B,EAAE;IAC1G,OAAO,CAAO,SAAoB,EAAE,mBAAwC,EAAgC,EAAE;QAAC,OAAA,2LAC1G,CAAC,MAAM,IAAA,+EAAsC,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GACjG,CAAC,MAAM,IAAA,iFAAuC,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GAClG,CAAC,MAAM,IAAA,2EAAoC,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GAC/F,CAAC,MAAM,IAAA,6EAAqC,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GAChG,CAAC,MAAM,IAAA,mFAAwC,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GACnG,CAAC,MAAM,IAAA,qFAAyC,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GACpG,CAAC,MAAM,IAAA,yEAAmC,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GAC9F,CAAC,MAAM,IAAA,2DAA4B,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GACvF,CAAC,MAAM,IAAA,2DAA4B,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GACvF,CAAC,MAAM,IAAA,mGAAgD,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GAC3G,CAAC,MAAM,IAAA,+GAAsD,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GACjH,CAAC,MAAM,IAAA,yEAAmC,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GAC9F,CAAC,MAAM,IAAA,mEAAgC,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,EAC9F,CAAA;MAAA,CAAC;AACL,CAAC,CAAC;AAhBW,QAAA,sBAAsB,0BAgBjC;AAEF,mDAAiC;AACjC,0CAAwB","sourcesContent":["import { ActionProcessorList, ActionProcessorListResolver, DynamicModuleLoader, QPQConfig } from 'quidproquo-core';\n\nimport { getFileDeleteActionProcessor } from './getFileDeleteActionProcessor';\nimport { getFileExistsActionProcessor } from './getFileExistsActionProcessor';\nimport { getFileGenerateTemporarySecureUrlActionProcessor } from './getFileGenerateTemporarySecureUrlActionProcessor';\nimport { getFileGenerateTemporaryUploadSecureUrlActionProcessor } from './getFileGenerateTemporaryUploadSecureUrlActionProcessor';\nimport { getFileIsColdStorageActionProcessor } from './getFileIsColdStorageActionProcessor';\nimport { getFileListDirectoryActionProcessor } from './getFileListDirectoryActionProcessor';\nimport { getFileReadBinaryContentsActionProcessor } from './getFileReadBinaryContentsActionProcessor';\nimport { getFileReadObjectJsonActionProcessor } from './getFileReadObjectJsonActionProcessor';\nimport { getFileReadTextContentsActionProcessor } from './getFileReadTextContentsActionProcessor';\nimport { getFileStreamOpenActionProcessor } from './getFileStreamOpenActionProcessor';\nimport { getFileWriteBinaryContentsActionProcessor } from './getFileWriteBinaryContentsActionProcessor';\nimport { getFileWriteObjectJsonActionProcessor } from './getFileWriteObjectJsonActionProcessor';\nimport { getFileWriteTextContentsActionProcessor } from './getFileWriteTextContentsActionProcessor';\nimport { FileStorageConfig } from './types';\n\nexport * from './types';\n\n// Main export that accepts configuration\nexport const getFileActionProcessor = (fileStorageConfig: FileStorageConfig): ActionProcessorListResolver => {\n return async (qpqConfig: QPQConfig, dynamicModuleLoader: DynamicModuleLoader): Promise<ActionProcessorList> => ({\n ...(await getFileReadTextContentsActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileWriteTextContentsActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileReadObjectJsonActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileWriteObjectJsonActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileReadBinaryContentsActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileWriteBinaryContentsActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileListDirectoryActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileExistsActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileDeleteActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileGenerateTemporarySecureUrlActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileGenerateTemporaryUploadSecureUrlActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileIsColdStorageActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileStreamOpenActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n });\n};\n\nexport * from './secureUrlUtils';\nexport * from './utils';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dynamicActionProcessor/file/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,6EAA0E;AAC1E,iFAA8E;AAC9E,iFAA8E;AAC9E,yHAAsH;AACtH,qIAAkI;AAClI,+FAA4F;AAC5F,+FAA4F;AAC5F,yGAAsG;AACtG,iGAA8F;AAC9F,qGAAkG;AAClG,yFAAsF;AACtF,2GAAwG;AACxG,mGAAgG;AAChG,uGAAoG;AAGpG,0CAAwB;AAExB,yCAAyC;AAClC,MAAM,sBAAsB,GAAG,CAAC,iBAAoC,EAA+B,EAAE;IAC1G,OAAO,CAAO,SAAoB,EAAE,mBAAwC,EAAgC,EAAE;QAAC,OAAA,yMAC1G,CAAC,MAAM,IAAA,+EAAsC,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GACjG,CAAC,MAAM,IAAA,iFAAuC,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GAClG,CAAC,MAAM,IAAA,2EAAoC,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GAC/F,CAAC,MAAM,IAAA,6EAAqC,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GAChG,CAAC,MAAM,IAAA,mFAAwC,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GACnG,CAAC,MAAM,IAAA,qFAAyC,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GACpG,CAAC,MAAM,IAAA,yEAAmC,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GAC9F,CAAC,MAAM,IAAA,2DAA4B,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GACvF,CAAC,MAAM,IAAA,2DAA4B,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GACvF,CAAC,MAAM,IAAA,uDAA0B,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GACrF,CAAC,MAAM,IAAA,mGAAgD,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GAC3G,CAAC,MAAM,IAAA,+GAAsD,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GACjH,CAAC,MAAM,IAAA,yEAAmC,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,GAC9F,CAAC,MAAM,IAAA,mEAAgC,EAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,EAC9F,CAAA;MAAA,CAAC;AACL,CAAC,CAAC;AAjBW,QAAA,sBAAsB,0BAiBjC;AAEF,mDAAiC;AACjC,0CAAwB","sourcesContent":["import { ActionProcessorList, ActionProcessorListResolver, DynamicModuleLoader, QPQConfig } from 'quidproquo-core';\n\nimport { getFileCopyActionProcessor } from './getFileCopyActionProcessor';\nimport { getFileDeleteActionProcessor } from './getFileDeleteActionProcessor';\nimport { getFileExistsActionProcessor } from './getFileExistsActionProcessor';\nimport { getFileGenerateTemporarySecureUrlActionProcessor } from './getFileGenerateTemporarySecureUrlActionProcessor';\nimport { getFileGenerateTemporaryUploadSecureUrlActionProcessor } from './getFileGenerateTemporaryUploadSecureUrlActionProcessor';\nimport { getFileIsColdStorageActionProcessor } from './getFileIsColdStorageActionProcessor';\nimport { getFileListDirectoryActionProcessor } from './getFileListDirectoryActionProcessor';\nimport { getFileReadBinaryContentsActionProcessor } from './getFileReadBinaryContentsActionProcessor';\nimport { getFileReadObjectJsonActionProcessor } from './getFileReadObjectJsonActionProcessor';\nimport { getFileReadTextContentsActionProcessor } from './getFileReadTextContentsActionProcessor';\nimport { getFileStreamOpenActionProcessor } from './getFileStreamOpenActionProcessor';\nimport { getFileWriteBinaryContentsActionProcessor } from './getFileWriteBinaryContentsActionProcessor';\nimport { getFileWriteObjectJsonActionProcessor } from './getFileWriteObjectJsonActionProcessor';\nimport { getFileWriteTextContentsActionProcessor } from './getFileWriteTextContentsActionProcessor';\nimport { FileStorageConfig } from './types';\n\nexport * from './types';\n\n// Main export that accepts configuration\nexport const getFileActionProcessor = (fileStorageConfig: FileStorageConfig): ActionProcessorListResolver => {\n return async (qpqConfig: QPQConfig, dynamicModuleLoader: DynamicModuleLoader): Promise<ActionProcessorList> => ({\n ...(await getFileReadTextContentsActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileWriteTextContentsActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileReadObjectJsonActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileWriteObjectJsonActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileReadBinaryContentsActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileWriteBinaryContentsActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileListDirectoryActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileExistsActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileDeleteActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileCopyActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileGenerateTemporarySecureUrlActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileGenerateTemporaryUploadSecureUrlActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileIsColdStorageActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileStreamOpenActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n });\n};\n\nexport * from './secureUrlUtils';\nexport * from './utils';\n"]}
@@ -1 +1,2 @@
1
1
  export * from './cryptoEnvelope';
2
+ export * from './signing';
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./cryptoEnvelope"), exports);
18
+ __exportStar(require("./signing"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/logic/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC","sourcesContent":["export * from './cryptoEnvelope';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/logic/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,4CAA0B","sourcesContent":["export * from './cryptoEnvelope';\nexport * from './signing';\n"]}
@@ -0,0 +1,4 @@
1
+ export declare class SigningMalformedSignatureError extends Error {
2
+ code: string;
3
+ constructor(message: string);
4
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SigningMalformedSignatureError = void 0;
4
+ // Thrown when a signature is not decodable as base64url. Carries a stable `code`
5
+ // so processors can map it to askCryptoVerify's MalformedSignature error type
6
+ // without depending on the class identity across bundles.
7
+ class SigningMalformedSignatureError extends Error {
8
+ constructor(message) {
9
+ super(message);
10
+ this.code = 'QpqSigningMalformedSignature';
11
+ this.name = 'SigningMalformedSignatureError';
12
+ }
13
+ }
14
+ exports.SigningMalformedSignatureError = SigningMalformedSignatureError;
15
+ //# sourceMappingURL=SigningMalformedSignatureError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SigningMalformedSignatureError.js","sourceRoot":"","sources":["../../../../src/logic/signing/SigningMalformedSignatureError.ts"],"names":[],"mappings":";;;AAAA,iFAAiF;AACjF,8EAA8E;AAC9E,0DAA0D;AAC1D,MAAa,8BAA+B,SAAQ,KAAK;IAGvD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QAHjB,SAAI,GAAG,8BAA8B,CAAC;QAIpC,IAAI,CAAC,IAAI,GAAG,gCAAgC,CAAC;IAC/C,CAAC;CACF;AAPD,wEAOC","sourcesContent":["// Thrown when a signature is not decodable as base64url. Carries a stable `code`\n// so processors can map it to askCryptoVerify's MalformedSignature error type\n// without depending on the class identity across bundles.\nexport class SigningMalformedSignatureError extends Error {\n code = 'QpqSigningMalformedSignature';\n\n constructor(message: string) {\n super(message);\n this.name = 'SigningMalformedSignatureError';\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const base64UrlEncode: (bytes: Buffer) => string;
2
+ export declare const base64UrlDecode: (value: string) => Buffer;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.base64UrlDecode = exports.base64UrlEncode = void 0;
4
+ const SigningMalformedSignatureError_1 = require("./SigningMalformedSignatureError");
5
+ const BASE64_URL_PATTERN = /^[A-Za-z0-9_-]*$/;
6
+ const base64UrlEncode = (bytes) => bytes.toString('base64url');
7
+ exports.base64UrlEncode = base64UrlEncode;
8
+ // Strict: rejects standard base64 characters (+ / =) and whitespace rather than
9
+ // silently decoding them, so a caller pasting the wrong encoding fails loudly.
10
+ const base64UrlDecode = (value) => {
11
+ if (!BASE64_URL_PATTERN.test(value)) {
12
+ throw new SigningMalformedSignatureError_1.SigningMalformedSignatureError('Signature is not base64url encoded');
13
+ }
14
+ return Buffer.from(value, 'base64url');
15
+ };
16
+ exports.base64UrlDecode = base64UrlDecode;
17
+ //# sourceMappingURL=base64Url.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base64Url.js","sourceRoot":"","sources":["../../../../src/logic/signing/base64Url.ts"],"names":[],"mappings":";;;AAAA,qFAAkF;AAElF,MAAM,kBAAkB,GAAG,kBAAkB,CAAC;AAEvC,MAAM,eAAe,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AAAzE,QAAA,eAAe,mBAA0D;AAEtF,gFAAgF;AAChF,+EAA+E;AACxE,MAAM,eAAe,GAAG,CAAC,KAAa,EAAU,EAAE;IACvD,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,+DAA8B,CAAC,oCAAoC,CAAC,CAAC;IACjF,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;AACzC,CAAC,CAAC;AANW,QAAA,eAAe,mBAM1B","sourcesContent":["import { SigningMalformedSignatureError } from './SigningMalformedSignatureError';\n\nconst BASE64_URL_PATTERN = /^[A-Za-z0-9_-]*$/;\n\nexport const base64UrlEncode = (bytes: Buffer): string => bytes.toString('base64url');\n\n// Strict: rejects standard base64 characters (+ / =) and whitespace rather than\n// silently decoding them, so a caller pasting the wrong encoding fails loudly.\nexport const base64UrlDecode = (value: string): Buffer => {\n if (!BASE64_URL_PATTERN.test(value)) {\n throw new SigningMalformedSignatureError('Signature is not base64url encoded');\n }\n\n return Buffer.from(value, 'base64url');\n};\n"]}
@@ -0,0 +1,5 @@
1
+ export type Rs256KeyPair = {
2
+ privateKeyPem: string;
3
+ publicKeyPem: string;
4
+ };
5
+ export declare const generateRs256KeyPair: () => Rs256KeyPair;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateRs256KeyPair = void 0;
4
+ const crypto_1 = require("crypto");
5
+ // A local RSA-2048 pair in the same PEM encodings KMS uses (PKCS#8 private,
6
+ // SPKI public), for the dev server and tests.
7
+ const generateRs256KeyPair = () => {
8
+ const { privateKey, publicKey } = (0, crypto_1.generateKeyPairSync)('rsa', {
9
+ modulusLength: 2048,
10
+ privateKeyEncoding: { type: 'pkcs8', format: 'pem' },
11
+ publicKeyEncoding: { type: 'spki', format: 'pem' },
12
+ });
13
+ return { privateKeyPem: privateKey, publicKeyPem: publicKey };
14
+ };
15
+ exports.generateRs256KeyPair = generateRs256KeyPair;
16
+ //# sourceMappingURL=generateRs256KeyPair.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateRs256KeyPair.js","sourceRoot":"","sources":["../../../../src/logic/signing/generateRs256KeyPair.ts"],"names":[],"mappings":";;;AAAA,mCAA6C;AAO7C,4EAA4E;AAC5E,8CAA8C;AACvC,MAAM,oBAAoB,GAAG,GAAiB,EAAE;IACrD,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,IAAA,4BAAmB,EAAC,KAAK,EAAE;QAC3D,aAAa,EAAE,IAAI;QACnB,kBAAkB,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE;QACpD,iBAAiB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE;KACnD,CAAC,CAAC;IAEH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;AAChE,CAAC,CAAC;AARW,QAAA,oBAAoB,wBAQ/B","sourcesContent":["import { generateKeyPairSync } from 'crypto';\n\nexport type Rs256KeyPair = {\n privateKeyPem: string;\n publicKeyPem: string;\n};\n\n// A local RSA-2048 pair in the same PEM encodings KMS uses (PKCS#8 private,\n// SPKI public), for the dev server and tests.\nexport const generateRs256KeyPair = (): Rs256KeyPair => {\n const { privateKey, publicKey } = generateKeyPairSync('rsa', {\n modulusLength: 2048,\n privateKeyEncoding: { type: 'pkcs8', format: 'pem' },\n publicKeyEncoding: { type: 'spki', format: 'pem' },\n });\n\n return { privateKeyPem: privateKey, publicKeyPem: publicKey };\n};\n"]}
@@ -0,0 +1,5 @@
1
+ export * from './base64Url';
2
+ export * from './generateRs256KeyPair';
3
+ export * from './rs256';
4
+ export * from './SigningMalformedSignatureError';
5
+ export * from './spkiDerToPem';
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./base64Url"), exports);
18
+ __exportStar(require("./generateRs256KeyPair"), exports);
19
+ __exportStar(require("./rs256"), exports);
20
+ __exportStar(require("./SigningMalformedSignatureError"), exports);
21
+ __exportStar(require("./spkiDerToPem"), exports);
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/logic/signing/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,yDAAuC;AACvC,0CAAwB;AACxB,mEAAiD;AACjD,iDAA+B","sourcesContent":["export * from './base64Url';\nexport * from './generateRs256KeyPair';\nexport * from './rs256';\nexport * from './SigningMalformedSignatureError';\nexport * from './spkiDerToPem';\n"]}
@@ -0,0 +1,3 @@
1
+ export declare const RS256_KMS_SIGNING_ALGORITHM = "RSASSA_PKCS1_V1_5_SHA_256";
2
+ export declare const rs256Sign: (privateKeyPem: string, message: string) => string;
3
+ export declare const rs256Verify: (publicKeyPem: string, message: string, signature: string) => boolean;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.rs256Verify = exports.rs256Sign = exports.RS256_KMS_SIGNING_ALGORITHM = void 0;
4
+ const crypto_1 = require("crypto");
5
+ const base64Url_1 = require("./base64Url");
6
+ // RS256 = RSASSA-PKCS1-v1_5 over SHA-256, the JWT default for RSA keys and what
7
+ // KMS calls RSASSA_PKCS1_V1_5_SHA_256. Deterministic (no salt), so local and
8
+ // KMS-produced signatures for the same key + message are byte-identical.
9
+ exports.RS256_KMS_SIGNING_ALGORITHM = 'RSASSA_PKCS1_V1_5_SHA_256';
10
+ const rs256Sign = (privateKeyPem, message) => (0, base64Url_1.base64UrlEncode)((0, crypto_1.sign)('sha256', Buffer.from(message, 'utf8'), { key: privateKeyPem, padding: crypto_1.constants.RSA_PKCS1_PADDING }));
11
+ exports.rs256Sign = rs256Sign;
12
+ const rs256Verify = (publicKeyPem, message, signature) => (0, crypto_1.verify)('sha256', Buffer.from(message, 'utf8'), { key: publicKeyPem, padding: crypto_1.constants.RSA_PKCS1_PADDING }, (0, base64Url_1.base64UrlDecode)(signature));
13
+ exports.rs256Verify = rs256Verify;
14
+ //# sourceMappingURL=rs256.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rs256.js","sourceRoot":"","sources":["../../../../src/logic/signing/rs256.ts"],"names":[],"mappings":";;;AAAA,mCAAiD;AAEjD,2CAA+D;AAE/D,gFAAgF;AAChF,6EAA6E;AAC7E,yEAAyE;AAE5D,QAAA,2BAA2B,GAAG,2BAA2B,CAAC;AAEhE,MAAM,SAAS,GAAG,CAAC,aAAqB,EAAE,OAAe,EAAU,EAAE,CAC1E,IAAA,2BAAe,EAAC,IAAA,aAAI,EAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,EAAE,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,kBAAS,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC;AADjH,QAAA,SAAS,aACwG;AAEvH,MAAM,WAAW,GAAG,CAAC,YAAoB,EAAE,OAAe,EAAE,SAAiB,EAAW,EAAE,CAC/F,IAAA,eAAM,EAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,EAAE,kBAAS,CAAC,iBAAiB,EAAE,EAAE,IAAA,2BAAe,EAAC,SAAS,CAAC,CAAC,CAAC;AAD7H,QAAA,WAAW,eACkH","sourcesContent":["import { constants, sign, verify } from 'crypto';\n\nimport { base64UrlDecode, base64UrlEncode } from './base64Url';\n\n// RS256 = RSASSA-PKCS1-v1_5 over SHA-256, the JWT default for RSA keys and what\n// KMS calls RSASSA_PKCS1_V1_5_SHA_256. Deterministic (no salt), so local and\n// KMS-produced signatures for the same key + message are byte-identical.\n\nexport const RS256_KMS_SIGNING_ALGORITHM = 'RSASSA_PKCS1_V1_5_SHA_256';\n\nexport const rs256Sign = (privateKeyPem: string, message: string): string =>\n base64UrlEncode(sign('sha256', Buffer.from(message, 'utf8'), { key: privateKeyPem, padding: constants.RSA_PKCS1_PADDING }));\n\nexport const rs256Verify = (publicKeyPem: string, message: string, signature: string): boolean =>\n verify('sha256', Buffer.from(message, 'utf8'), { key: publicKeyPem, padding: constants.RSA_PKCS1_PADDING }, base64UrlDecode(signature));\n"]}
@@ -0,0 +1 @@
1
+ export declare const spkiDerToPem: (der: Buffer) => string;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.spkiDerToPem = void 0;
4
+ // KMS GetPublicKey returns the SubjectPublicKeyInfo as raw DER; every JWT/JWKS
5
+ // consumer wants the PEM framing.
6
+ const spkiDerToPem = (der) => {
7
+ var _a;
8
+ const lines = (_a = der.toString('base64').match(/.{1,64}/g)) !== null && _a !== void 0 ? _a : [];
9
+ return ['-----BEGIN PUBLIC KEY-----', ...lines, '-----END PUBLIC KEY-----'].join('\n');
10
+ };
11
+ exports.spkiDerToPem = spkiDerToPem;
12
+ //# sourceMappingURL=spkiDerToPem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spkiDerToPem.js","sourceRoot":"","sources":["../../../../src/logic/signing/spkiDerToPem.ts"],"names":[],"mappings":";;;AAAA,+EAA+E;AAC/E,kCAAkC;AAC3B,MAAM,YAAY,GAAG,CAAC,GAAW,EAAU,EAAE;;IAClD,MAAM,KAAK,GAAG,MAAA,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,mCAAI,EAAE,CAAC;IAE7D,OAAO,CAAC,4BAA4B,EAAE,GAAG,KAAK,EAAE,0BAA0B,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzF,CAAC,CAAC;AAJW,QAAA,YAAY,gBAIvB","sourcesContent":["// KMS GetPublicKey returns the SubjectPublicKeyInfo as raw DER; every JWT/JWKS\n// consumer wants the PEM framing.\nexport const spkiDerToPem = (der: Buffer): string => {\n const lines = der.toString('base64').match(/.{1,64}/g) ?? [];\n\n return ['-----BEGIN PUBLIC KEY-----', ...lines, '-----END PUBLIC KEY-----'].join('\\n');\n};\n"]}
@@ -0,0 +1,2 @@
1
+ import { FileStorageConfig } from './types';
2
+ export declare const getFileCopyActionProcessor: (config: FileStorageConfig) => import("quidproquo-core").ActionProcessorListResolver;
@@ -0,0 +1,35 @@
1
+ import { actionResult, actionResultError, actionResultErrorFromCaughtError, askFileCopy, createActionProcessor, } from 'quidproquo-core';
2
+ import * as fs from 'fs/promises';
3
+ import { ensureParentDirectoryExists, resolveFilePath } from './utils';
4
+ // The sidecar the binary-write processor and the secure-upload endpoint persist beside an object
5
+ // (mimetype + content disposition). Copied with the object so the copy serves the same way.
6
+ const metaPath = (fullPath) => `${fullPath}.qpqmeta.json`;
7
+ const getProcessFileCopy = (config) => (qpqConfig) => {
8
+ return async ({ sourceDrive, sourceFilepath, targetDrive, targetFilepath, scope }) => {
9
+ try {
10
+ const sourcePath = resolveFilePath(config, qpqConfig, sourceDrive, sourceFilepath, scope);
11
+ const targetPath = resolveFilePath(config, qpqConfig, targetDrive, targetFilepath, scope);
12
+ await ensureParentDirectoryExists(targetPath);
13
+ await fs.copyFile(sourcePath, targetPath);
14
+ try {
15
+ await fs.copyFile(metaPath(sourcePath), metaPath(targetPath));
16
+ }
17
+ catch (error) {
18
+ // No sidecar on the source → nothing to carry across.
19
+ if (error.code !== 'ENOENT') {
20
+ throw error;
21
+ }
22
+ }
23
+ return actionResult(void 0);
24
+ }
25
+ catch (error) {
26
+ return actionResultErrorFromCaughtError(error, {
27
+ InvalidScopeError: (error) => actionResultError(askFileCopy.errorType.InvalidScope, error.message),
28
+ ENOENT: () => actionResultError(askFileCopy.errorType.FileNotFound, `File not found: ${sourceFilepath}`), // node fs code
29
+ EACCES: () => actionResultError(askFileCopy.errorType.AccessDenied, `Access denied copying file: ${sourceFilepath}`), // node fs code
30
+ });
31
+ }
32
+ };
33
+ };
34
+ export const getFileCopyActionProcessor = (config) => createActionProcessor(askFileCopy, (qpqConfig) => getProcessFileCopy(config)(qpqConfig));
35
+ //# sourceMappingURL=getFileCopyActionProcessor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFileCopyActionProcessor.js","sourceRoot":"","sources":["../../../../src/dynamicActionProcessor/file/getFileCopyActionProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,gCAAgC,EAChC,WAAW,EACX,qBAAqB,GAItB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAGlC,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAEvE,iGAAiG;AACjG,4FAA4F;AAC5F,MAAM,QAAQ,GAAG,CAAC,QAAgB,EAAU,EAAE,CAAC,GAAG,QAAQ,eAAe,CAAC;AAE1E,MAAM,kBAAkB,GACtB,CAAC,MAAyB,EAAE,EAAE,CAC9B,CAAC,SAAoB,EAAoC,EAAE;IACzD,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,EAAE,EAAE,EAAE;QACnF,IAAI,CAAC;YACH,MAAM,UAAU,GAAG,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC;YAC1F,MAAM,UAAU,GAAG,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC;YAC1F,MAAM,2BAA2B,CAAC,UAAU,CAAC,CAAC;YAE9C,MAAM,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;YAE1C,IAAI,CAAC;gBACH,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;YAChE,CAAC;YAAC,OAAO,KAAc,EAAE,CAAC;gBACxB,sDAAsD;gBACtD,IAAK,KAA2B,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;oBACnD,MAAM,KAAK,CAAC;gBACd,CAAC;YACH,CAAC;YAED,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;QAC9B,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,OAAO,gCAAgC,CAAC,KAAK,EAAE;gBAC7C,iBAAiB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,iBAAiB,CAAC,WAAW,CAAC,SAAS,CAAC,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC;gBAClG,MAAM,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,WAAW,CAAC,SAAS,CAAC,YAAY,EAAE,mBAAmB,cAAc,EAAE,CAAC,EAAE,eAAe;gBACzH,MAAM,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,WAAW,CAAC,SAAS,CAAC,YAAY,EAAE,+BAA+B,cAAc,EAAE,CAAC,EAAE,eAAe;aACtI,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC;AACJ,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,MAAyB,EAAE,EAAE,CACtE,qBAAqB,CAAC,WAAW,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC","sourcesContent":["import {\n actionResult,\n actionResultError,\n actionResultErrorFromCaughtError,\n askFileCopy,\n createActionProcessor,\n FileActionType,\n ProcessorFor,\n QPQConfig,\n} from 'quidproquo-core';\n\nimport * as fs from 'fs/promises';\n\nimport { FileStorageConfig } from './types';\nimport { ensureParentDirectoryExists, resolveFilePath } from './utils';\n\n// The sidecar the binary-write processor and the secure-upload endpoint persist beside an object\n// (mimetype + content disposition). Copied with the object so the copy serves the same way.\nconst metaPath = (fullPath: string): string => `${fullPath}.qpqmeta.json`;\n\nconst getProcessFileCopy =\n (config: FileStorageConfig) =>\n (qpqConfig: QPQConfig): ProcessorFor<typeof askFileCopy> => {\n return async ({ sourceDrive, sourceFilepath, targetDrive, targetFilepath, scope }) => {\n try {\n const sourcePath = resolveFilePath(config, qpqConfig, sourceDrive, sourceFilepath, scope);\n const targetPath = resolveFilePath(config, qpqConfig, targetDrive, targetFilepath, scope);\n await ensureParentDirectoryExists(targetPath);\n\n await fs.copyFile(sourcePath, targetPath);\n\n try {\n await fs.copyFile(metaPath(sourcePath), metaPath(targetPath));\n } catch (error: unknown) {\n // No sidecar on the source → nothing to carry across.\n if ((error as { code?: string }).code !== 'ENOENT') {\n throw error;\n }\n }\n\n return actionResult(void 0);\n } catch (error: unknown) {\n return actionResultErrorFromCaughtError(error, {\n InvalidScopeError: (error) => actionResultError(askFileCopy.errorType.InvalidScope, error.message),\n ENOENT: () => actionResultError(askFileCopy.errorType.FileNotFound, `File not found: ${sourceFilepath}`), // node fs code\n EACCES: () => actionResultError(askFileCopy.errorType.AccessDenied, `Access denied copying file: ${sourceFilepath}`), // node fs code\n });\n }\n };\n };\n\nexport const getFileCopyActionProcessor = (config: FileStorageConfig) =>\n createActionProcessor(askFileCopy, (qpqConfig) => getProcessFileCopy(config)(qpqConfig));\n"]}
@@ -1,3 +1,4 @@
1
+ import { getFileCopyActionProcessor } from './getFileCopyActionProcessor';
1
2
  import { getFileDeleteActionProcessor } from './getFileDeleteActionProcessor';
2
3
  import { getFileExistsActionProcessor } from './getFileExistsActionProcessor';
3
4
  import { getFileGenerateTemporarySecureUrlActionProcessor } from './getFileGenerateTemporarySecureUrlActionProcessor';
@@ -24,6 +25,7 @@ export const getFileActionProcessor = (fileStorageConfig) => {
24
25
  ...(await getFileListDirectoryActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),
25
26
  ...(await getFileExistsActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),
26
27
  ...(await getFileDeleteActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),
28
+ ...(await getFileCopyActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),
27
29
  ...(await getFileGenerateTemporarySecureUrlActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),
28
30
  ...(await getFileGenerateTemporaryUploadSecureUrlActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),
29
31
  ...(await getFileIsColdStorageActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dynamicActionProcessor/file/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,gDAAgD,EAAE,MAAM,oDAAoD,CAAC;AACtH,OAAO,EAAE,sDAAsD,EAAE,MAAM,0DAA0D,CAAC;AAClI,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAC5F,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAC5F,OAAO,EAAE,wCAAwC,EAAE,MAAM,4CAA4C,CAAC;AACtG,OAAO,EAAE,oCAAoC,EAAE,MAAM,wCAAwC,CAAC;AAC9F,OAAO,EAAE,sCAAsC,EAAE,MAAM,0CAA0C,CAAC;AAClG,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,yCAAyC,EAAE,MAAM,6CAA6C,CAAC;AACxG,OAAO,EAAE,qCAAqC,EAAE,MAAM,yCAAyC,CAAC;AAChG,OAAO,EAAE,uCAAuC,EAAE,MAAM,2CAA2C,CAAC;AAGpG,cAAc,SAAS,CAAC;AAExB,yCAAyC;AACzC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,iBAAoC,EAA+B,EAAE;IAC1G,OAAO,KAAK,EAAE,SAAoB,EAAE,mBAAwC,EAAgC,EAAE,CAAC,CAAC;QAC9G,GAAG,CAAC,MAAM,sCAAsC,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QACpG,GAAG,CAAC,MAAM,uCAAuC,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QACrG,GAAG,CAAC,MAAM,oCAAoC,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QAClG,GAAG,CAAC,MAAM,qCAAqC,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QACnG,GAAG,CAAC,MAAM,wCAAwC,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QACtG,GAAG,CAAC,MAAM,yCAAyC,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QACvG,GAAG,CAAC,MAAM,mCAAmC,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QACjG,GAAG,CAAC,MAAM,4BAA4B,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QAC1F,GAAG,CAAC,MAAM,4BAA4B,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QAC1F,GAAG,CAAC,MAAM,gDAAgD,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QAC9G,GAAG,CAAC,MAAM,sDAAsD,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QACpH,GAAG,CAAC,MAAM,mCAAmC,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QACjG,GAAG,CAAC,MAAM,gCAAgC,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;KAC/F,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC","sourcesContent":["import { ActionProcessorList, ActionProcessorListResolver, DynamicModuleLoader, QPQConfig } from 'quidproquo-core';\n\nimport { getFileDeleteActionProcessor } from './getFileDeleteActionProcessor';\nimport { getFileExistsActionProcessor } from './getFileExistsActionProcessor';\nimport { getFileGenerateTemporarySecureUrlActionProcessor } from './getFileGenerateTemporarySecureUrlActionProcessor';\nimport { getFileGenerateTemporaryUploadSecureUrlActionProcessor } from './getFileGenerateTemporaryUploadSecureUrlActionProcessor';\nimport { getFileIsColdStorageActionProcessor } from './getFileIsColdStorageActionProcessor';\nimport { getFileListDirectoryActionProcessor } from './getFileListDirectoryActionProcessor';\nimport { getFileReadBinaryContentsActionProcessor } from './getFileReadBinaryContentsActionProcessor';\nimport { getFileReadObjectJsonActionProcessor } from './getFileReadObjectJsonActionProcessor';\nimport { getFileReadTextContentsActionProcessor } from './getFileReadTextContentsActionProcessor';\nimport { getFileStreamOpenActionProcessor } from './getFileStreamOpenActionProcessor';\nimport { getFileWriteBinaryContentsActionProcessor } from './getFileWriteBinaryContentsActionProcessor';\nimport { getFileWriteObjectJsonActionProcessor } from './getFileWriteObjectJsonActionProcessor';\nimport { getFileWriteTextContentsActionProcessor } from './getFileWriteTextContentsActionProcessor';\nimport { FileStorageConfig } from './types';\n\nexport * from './types';\n\n// Main export that accepts configuration\nexport const getFileActionProcessor = (fileStorageConfig: FileStorageConfig): ActionProcessorListResolver => {\n return async (qpqConfig: QPQConfig, dynamicModuleLoader: DynamicModuleLoader): Promise<ActionProcessorList> => ({\n ...(await getFileReadTextContentsActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileWriteTextContentsActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileReadObjectJsonActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileWriteObjectJsonActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileReadBinaryContentsActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileWriteBinaryContentsActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileListDirectoryActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileExistsActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileDeleteActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileGenerateTemporarySecureUrlActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileGenerateTemporaryUploadSecureUrlActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileIsColdStorageActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileStreamOpenActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n });\n};\n\nexport * from './secureUrlUtils';\nexport * from './utils';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dynamicActionProcessor/file/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,gDAAgD,EAAE,MAAM,oDAAoD,CAAC;AACtH,OAAO,EAAE,sDAAsD,EAAE,MAAM,0DAA0D,CAAC;AAClI,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAC5F,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAC5F,OAAO,EAAE,wCAAwC,EAAE,MAAM,4CAA4C,CAAC;AACtG,OAAO,EAAE,oCAAoC,EAAE,MAAM,wCAAwC,CAAC;AAC9F,OAAO,EAAE,sCAAsC,EAAE,MAAM,0CAA0C,CAAC;AAClG,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,yCAAyC,EAAE,MAAM,6CAA6C,CAAC;AACxG,OAAO,EAAE,qCAAqC,EAAE,MAAM,yCAAyC,CAAC;AAChG,OAAO,EAAE,uCAAuC,EAAE,MAAM,2CAA2C,CAAC;AAGpG,cAAc,SAAS,CAAC;AAExB,yCAAyC;AACzC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,iBAAoC,EAA+B,EAAE;IAC1G,OAAO,KAAK,EAAE,SAAoB,EAAE,mBAAwC,EAAgC,EAAE,CAAC,CAAC;QAC9G,GAAG,CAAC,MAAM,sCAAsC,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QACpG,GAAG,CAAC,MAAM,uCAAuC,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QACrG,GAAG,CAAC,MAAM,oCAAoC,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QAClG,GAAG,CAAC,MAAM,qCAAqC,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QACnG,GAAG,CAAC,MAAM,wCAAwC,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QACtG,GAAG,CAAC,MAAM,yCAAyC,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QACvG,GAAG,CAAC,MAAM,mCAAmC,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QACjG,GAAG,CAAC,MAAM,4BAA4B,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QAC1F,GAAG,CAAC,MAAM,4BAA4B,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QAC1F,GAAG,CAAC,MAAM,0BAA0B,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QACxF,GAAG,CAAC,MAAM,gDAAgD,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QAC9G,GAAG,CAAC,MAAM,sDAAsD,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QACpH,GAAG,CAAC,MAAM,mCAAmC,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QACjG,GAAG,CAAC,MAAM,gCAAgC,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;KAC/F,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC","sourcesContent":["import { ActionProcessorList, ActionProcessorListResolver, DynamicModuleLoader, QPQConfig } from 'quidproquo-core';\n\nimport { getFileCopyActionProcessor } from './getFileCopyActionProcessor';\nimport { getFileDeleteActionProcessor } from './getFileDeleteActionProcessor';\nimport { getFileExistsActionProcessor } from './getFileExistsActionProcessor';\nimport { getFileGenerateTemporarySecureUrlActionProcessor } from './getFileGenerateTemporarySecureUrlActionProcessor';\nimport { getFileGenerateTemporaryUploadSecureUrlActionProcessor } from './getFileGenerateTemporaryUploadSecureUrlActionProcessor';\nimport { getFileIsColdStorageActionProcessor } from './getFileIsColdStorageActionProcessor';\nimport { getFileListDirectoryActionProcessor } from './getFileListDirectoryActionProcessor';\nimport { getFileReadBinaryContentsActionProcessor } from './getFileReadBinaryContentsActionProcessor';\nimport { getFileReadObjectJsonActionProcessor } from './getFileReadObjectJsonActionProcessor';\nimport { getFileReadTextContentsActionProcessor } from './getFileReadTextContentsActionProcessor';\nimport { getFileStreamOpenActionProcessor } from './getFileStreamOpenActionProcessor';\nimport { getFileWriteBinaryContentsActionProcessor } from './getFileWriteBinaryContentsActionProcessor';\nimport { getFileWriteObjectJsonActionProcessor } from './getFileWriteObjectJsonActionProcessor';\nimport { getFileWriteTextContentsActionProcessor } from './getFileWriteTextContentsActionProcessor';\nimport { FileStorageConfig } from './types';\n\nexport * from './types';\n\n// Main export that accepts configuration\nexport const getFileActionProcessor = (fileStorageConfig: FileStorageConfig): ActionProcessorListResolver => {\n return async (qpqConfig: QPQConfig, dynamicModuleLoader: DynamicModuleLoader): Promise<ActionProcessorList> => ({\n ...(await getFileReadTextContentsActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileWriteTextContentsActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileReadObjectJsonActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileWriteObjectJsonActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileReadBinaryContentsActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileWriteBinaryContentsActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileListDirectoryActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileExistsActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileDeleteActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileCopyActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileGenerateTemporarySecureUrlActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileGenerateTemporaryUploadSecureUrlActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileIsColdStorageActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n ...(await getFileStreamOpenActionProcessor(fileStorageConfig)(qpqConfig, dynamicModuleLoader)),\n });\n};\n\nexport * from './secureUrlUtils';\nexport * from './utils';\n"]}
@@ -1 +1,2 @@
1
1
  export * from './cryptoEnvelope';
2
+ export * from './signing';
@@ -1,2 +1,3 @@
1
1
  export * from './cryptoEnvelope';
2
+ export * from './signing';
2
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/logic/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './cryptoEnvelope';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/logic/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC","sourcesContent":["export * from './cryptoEnvelope';\nexport * from './signing';\n"]}
@@ -0,0 +1,4 @@
1
+ export declare class SigningMalformedSignatureError extends Error {
2
+ code: string;
3
+ constructor(message: string);
4
+ }
@@ -0,0 +1,11 @@
1
+ // Thrown when a signature is not decodable as base64url. Carries a stable `code`
2
+ // so processors can map it to askCryptoVerify's MalformedSignature error type
3
+ // without depending on the class identity across bundles.
4
+ export class SigningMalformedSignatureError extends Error {
5
+ code = 'QpqSigningMalformedSignature';
6
+ constructor(message) {
7
+ super(message);
8
+ this.name = 'SigningMalformedSignatureError';
9
+ }
10
+ }
11
+ //# sourceMappingURL=SigningMalformedSignatureError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SigningMalformedSignatureError.js","sourceRoot":"","sources":["../../../../src/logic/signing/SigningMalformedSignatureError.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,8EAA8E;AAC9E,0DAA0D;AAC1D,MAAM,OAAO,8BAA+B,SAAQ,KAAK;IACvD,IAAI,GAAG,8BAA8B,CAAC;IAEtC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,gCAAgC,CAAC;IAC/C,CAAC;CACF","sourcesContent":["// Thrown when a signature is not decodable as base64url. Carries a stable `code`\n// so processors can map it to askCryptoVerify's MalformedSignature error type\n// without depending on the class identity across bundles.\nexport class SigningMalformedSignatureError extends Error {\n code = 'QpqSigningMalformedSignature';\n\n constructor(message: string) {\n super(message);\n this.name = 'SigningMalformedSignatureError';\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const base64UrlEncode: (bytes: Buffer) => string;
2
+ export declare const base64UrlDecode: (value: string) => Buffer;
@@ -0,0 +1,12 @@
1
+ import { SigningMalformedSignatureError } from './SigningMalformedSignatureError';
2
+ const BASE64_URL_PATTERN = /^[A-Za-z0-9_-]*$/;
3
+ export const base64UrlEncode = (bytes) => bytes.toString('base64url');
4
+ // Strict: rejects standard base64 characters (+ / =) and whitespace rather than
5
+ // silently decoding them, so a caller pasting the wrong encoding fails loudly.
6
+ export const base64UrlDecode = (value) => {
7
+ if (!BASE64_URL_PATTERN.test(value)) {
8
+ throw new SigningMalformedSignatureError('Signature is not base64url encoded');
9
+ }
10
+ return Buffer.from(value, 'base64url');
11
+ };
12
+ //# sourceMappingURL=base64Url.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base64Url.js","sourceRoot":"","sources":["../../../../src/logic/signing/base64Url.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAElF,MAAM,kBAAkB,GAAG,kBAAkB,CAAC;AAE9C,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AAEtF,gFAAgF;AAChF,+EAA+E;AAC/E,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAa,EAAU,EAAE;IACvD,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,8BAA8B,CAAC,oCAAoC,CAAC,CAAC;IACjF,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;AACzC,CAAC,CAAC","sourcesContent":["import { SigningMalformedSignatureError } from './SigningMalformedSignatureError';\n\nconst BASE64_URL_PATTERN = /^[A-Za-z0-9_-]*$/;\n\nexport const base64UrlEncode = (bytes: Buffer): string => bytes.toString('base64url');\n\n// Strict: rejects standard base64 characters (+ / =) and whitespace rather than\n// silently decoding them, so a caller pasting the wrong encoding fails loudly.\nexport const base64UrlDecode = (value: string): Buffer => {\n if (!BASE64_URL_PATTERN.test(value)) {\n throw new SigningMalformedSignatureError('Signature is not base64url encoded');\n }\n\n return Buffer.from(value, 'base64url');\n};\n"]}
@@ -0,0 +1,5 @@
1
+ export type Rs256KeyPair = {
2
+ privateKeyPem: string;
3
+ publicKeyPem: string;
4
+ };
5
+ export declare const generateRs256KeyPair: () => Rs256KeyPair;
@@ -0,0 +1,12 @@
1
+ import { generateKeyPairSync } from 'crypto';
2
+ // A local RSA-2048 pair in the same PEM encodings KMS uses (PKCS#8 private,
3
+ // SPKI public), for the dev server and tests.
4
+ export const generateRs256KeyPair = () => {
5
+ const { privateKey, publicKey } = generateKeyPairSync('rsa', {
6
+ modulusLength: 2048,
7
+ privateKeyEncoding: { type: 'pkcs8', format: 'pem' },
8
+ publicKeyEncoding: { type: 'spki', format: 'pem' },
9
+ });
10
+ return { privateKeyPem: privateKey, publicKeyPem: publicKey };
11
+ };
12
+ //# sourceMappingURL=generateRs256KeyPair.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateRs256KeyPair.js","sourceRoot":"","sources":["../../../../src/logic/signing/generateRs256KeyPair.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAO7C,4EAA4E;AAC5E,8CAA8C;AAC9C,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAiB,EAAE;IACrD,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,mBAAmB,CAAC,KAAK,EAAE;QAC3D,aAAa,EAAE,IAAI;QACnB,kBAAkB,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE;QACpD,iBAAiB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE;KACnD,CAAC,CAAC;IAEH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;AAChE,CAAC,CAAC","sourcesContent":["import { generateKeyPairSync } from 'crypto';\n\nexport type Rs256KeyPair = {\n privateKeyPem: string;\n publicKeyPem: string;\n};\n\n// A local RSA-2048 pair in the same PEM encodings KMS uses (PKCS#8 private,\n// SPKI public), for the dev server and tests.\nexport const generateRs256KeyPair = (): Rs256KeyPair => {\n const { privateKey, publicKey } = generateKeyPairSync('rsa', {\n modulusLength: 2048,\n privateKeyEncoding: { type: 'pkcs8', format: 'pem' },\n publicKeyEncoding: { type: 'spki', format: 'pem' },\n });\n\n return { privateKeyPem: privateKey, publicKeyPem: publicKey };\n};\n"]}
@@ -0,0 +1,5 @@
1
+ export * from './base64Url';
2
+ export * from './generateRs256KeyPair';
3
+ export * from './rs256';
4
+ export * from './SigningMalformedSignatureError';
5
+ export * from './spkiDerToPem';
@@ -0,0 +1,6 @@
1
+ export * from './base64Url';
2
+ export * from './generateRs256KeyPair';
3
+ export * from './rs256';
4
+ export * from './SigningMalformedSignatureError';
5
+ export * from './spkiDerToPem';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/logic/signing/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,SAAS,CAAC;AACxB,cAAc,kCAAkC,CAAC;AACjD,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './base64Url';\nexport * from './generateRs256KeyPair';\nexport * from './rs256';\nexport * from './SigningMalformedSignatureError';\nexport * from './spkiDerToPem';\n"]}
@@ -0,0 +1,3 @@
1
+ export declare const RS256_KMS_SIGNING_ALGORITHM = "RSASSA_PKCS1_V1_5_SHA_256";
2
+ export declare const rs256Sign: (privateKeyPem: string, message: string) => string;
3
+ export declare const rs256Verify: (publicKeyPem: string, message: string, signature: string) => boolean;
@@ -0,0 +1,9 @@
1
+ import { constants, sign, verify } from 'crypto';
2
+ import { base64UrlDecode, base64UrlEncode } from './base64Url';
3
+ // RS256 = RSASSA-PKCS1-v1_5 over SHA-256, the JWT default for RSA keys and what
4
+ // KMS calls RSASSA_PKCS1_V1_5_SHA_256. Deterministic (no salt), so local and
5
+ // KMS-produced signatures for the same key + message are byte-identical.
6
+ export const RS256_KMS_SIGNING_ALGORITHM = 'RSASSA_PKCS1_V1_5_SHA_256';
7
+ export const rs256Sign = (privateKeyPem, message) => base64UrlEncode(sign('sha256', Buffer.from(message, 'utf8'), { key: privateKeyPem, padding: constants.RSA_PKCS1_PADDING }));
8
+ export const rs256Verify = (publicKeyPem, message, signature) => verify('sha256', Buffer.from(message, 'utf8'), { key: publicKeyPem, padding: constants.RSA_PKCS1_PADDING }, base64UrlDecode(signature));
9
+ //# sourceMappingURL=rs256.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rs256.js","sourceRoot":"","sources":["../../../../src/logic/signing/rs256.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE/D,gFAAgF;AAChF,6EAA6E;AAC7E,yEAAyE;AAEzE,MAAM,CAAC,MAAM,2BAA2B,GAAG,2BAA2B,CAAC;AAEvE,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,aAAqB,EAAE,OAAe,EAAU,EAAE,CAC1E,eAAe,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,EAAE,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC;AAE9H,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,YAAoB,EAAE,OAAe,EAAE,SAAiB,EAAW,EAAE,CAC/F,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,CAAC,iBAAiB,EAAE,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC","sourcesContent":["import { constants, sign, verify } from 'crypto';\n\nimport { base64UrlDecode, base64UrlEncode } from './base64Url';\n\n// RS256 = RSASSA-PKCS1-v1_5 over SHA-256, the JWT default for RSA keys and what\n// KMS calls RSASSA_PKCS1_V1_5_SHA_256. Deterministic (no salt), so local and\n// KMS-produced signatures for the same key + message are byte-identical.\n\nexport const RS256_KMS_SIGNING_ALGORITHM = 'RSASSA_PKCS1_V1_5_SHA_256';\n\nexport const rs256Sign = (privateKeyPem: string, message: string): string =>\n base64UrlEncode(sign('sha256', Buffer.from(message, 'utf8'), { key: privateKeyPem, padding: constants.RSA_PKCS1_PADDING }));\n\nexport const rs256Verify = (publicKeyPem: string, message: string, signature: string): boolean =>\n verify('sha256', Buffer.from(message, 'utf8'), { key: publicKeyPem, padding: constants.RSA_PKCS1_PADDING }, base64UrlDecode(signature));\n"]}
@@ -0,0 +1 @@
1
+ export declare const spkiDerToPem: (der: Buffer) => string;
@@ -0,0 +1,7 @@
1
+ // KMS GetPublicKey returns the SubjectPublicKeyInfo as raw DER; every JWT/JWKS
2
+ // consumer wants the PEM framing.
3
+ export const spkiDerToPem = (der) => {
4
+ const lines = der.toString('base64').match(/.{1,64}/g) ?? [];
5
+ return ['-----BEGIN PUBLIC KEY-----', ...lines, '-----END PUBLIC KEY-----'].join('\n');
6
+ };
7
+ //# sourceMappingURL=spkiDerToPem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spkiDerToPem.js","sourceRoot":"","sources":["../../../../src/logic/signing/spkiDerToPem.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,kCAAkC;AAClC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAW,EAAU,EAAE;IAClD,MAAM,KAAK,GAAG,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;IAE7D,OAAO,CAAC,4BAA4B,EAAE,GAAG,KAAK,EAAE,0BAA0B,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzF,CAAC,CAAC","sourcesContent":["// KMS GetPublicKey returns the SubjectPublicKeyInfo as raw DER; every JWT/JWKS\n// consumer wants the PEM framing.\nexport const spkiDerToPem = (der: Buffer): string => {\n const lines = der.toString('base64').match(/.{1,64}/g) ?? [];\n\n return ['-----BEGIN PUBLIC KEY-----', ...lines, '-----END PUBLIC KEY-----'].join('\\n');\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quidproquo-actionprocessor-node",
3
- "version": "0.1.22",
3
+ "version": "0.1.24",
4
4
  "description": "",
5
5
  "main": "./lib/commonjs/index.js",
6
6
  "module": "./lib/esm/index.js",
@@ -36,15 +36,15 @@
36
36
  "homepage": "https://github.com/qpqjs/quidproquo#readme",
37
37
  "dependencies": {
38
38
  "@jridgewell/trace-mapping": "^0.3.25",
39
- "quidproquo-actionprocessor-js": "0.1.22",
40
- "quidproquo-core": "0.1.22",
41
- "quidproquo-webserver": "0.1.22",
39
+ "quidproquo-actionprocessor-js": "0.1.24",
40
+ "quidproquo-core": "0.1.24",
41
+ "quidproquo-webserver": "0.1.24",
42
42
  "uuidv7": "^1.0.1"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@jridgewell/gen-mapping": "^0.3.13",
46
46
  "@types/node": "^22.13.13",
47
- "quidproquo-tsconfig": "0.1.22",
47
+ "quidproquo-tsconfig": "0.1.24",
48
48
  "typescript": "^5.8.2"
49
49
  }
50
50
  }