quidproquo-actionprocessor-node 0.1.15 → 0.1.17

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 (110) hide show
  1. package/README.md +15 -97
  2. package/lib/commonjs/actionProcessor/core/dynamicFunctions/getDynamicFunctionsExecuteActionProcessor.d.ts +1 -2
  3. package/lib/commonjs/actionProcessor/core/dynamicFunctions/getDynamicFunctionsExecuteActionProcessor.js +1 -6
  4. package/lib/commonjs/actionProcessor/core/dynamicFunctions/getDynamicFunctionsExecuteActionProcessor.js.map +1 -1
  5. package/lib/commonjs/actionProcessor/core/index.js +1 -1
  6. package/lib/commonjs/actionProcessor/core/index.js.map +1 -1
  7. package/lib/commonjs/actionProcessor/core/inlineFunction/getInlineFunctionExecuteActionProcessor.d.ts +1 -2
  8. package/lib/commonjs/actionProcessor/core/inlineFunction/getInlineFunctionExecuteActionProcessor.js +1 -6
  9. package/lib/commonjs/actionProcessor/core/inlineFunction/getInlineFunctionExecuteActionProcessor.js.map +1 -1
  10. package/lib/commonjs/actionProcessor/core/stream/getStreamCloseActionProcessor.d.ts +1 -2
  11. package/lib/commonjs/actionProcessor/core/stream/getStreamCloseActionProcessor.js +1 -6
  12. package/lib/commonjs/actionProcessor/core/stream/getStreamCloseActionProcessor.js.map +1 -1
  13. package/lib/commonjs/actionProcessor/core/stream/getStreamReadActionProcessor.d.ts +1 -2
  14. package/lib/commonjs/actionProcessor/core/stream/getStreamReadActionProcessor.js +1 -6
  15. package/lib/commonjs/actionProcessor/core/stream/getStreamReadActionProcessor.js.map +1 -1
  16. package/lib/commonjs/dynamicActionProcessor/file/getFileDeleteActionProcessor.d.ts +1 -2
  17. package/lib/commonjs/dynamicActionProcessor/file/getFileDeleteActionProcessor.js +3 -7
  18. package/lib/commonjs/dynamicActionProcessor/file/getFileDeleteActionProcessor.js.map +1 -1
  19. package/lib/commonjs/dynamicActionProcessor/file/getFileExistsActionProcessor.d.ts +1 -2
  20. package/lib/commonjs/dynamicActionProcessor/file/getFileExistsActionProcessor.js +3 -7
  21. package/lib/commonjs/dynamicActionProcessor/file/getFileExistsActionProcessor.js.map +1 -1
  22. package/lib/commonjs/dynamicActionProcessor/file/getFileGenerateTemporarySecureUrlActionProcessor.d.ts +1 -2
  23. package/lib/commonjs/dynamicActionProcessor/file/getFileGenerateTemporarySecureUrlActionProcessor.js +3 -7
  24. package/lib/commonjs/dynamicActionProcessor/file/getFileGenerateTemporarySecureUrlActionProcessor.js.map +1 -1
  25. package/lib/commonjs/dynamicActionProcessor/file/getFileGenerateTemporaryUploadSecureUrlActionProcessor.d.ts +1 -2
  26. package/lib/commonjs/dynamicActionProcessor/file/getFileGenerateTemporaryUploadSecureUrlActionProcessor.js +3 -7
  27. package/lib/commonjs/dynamicActionProcessor/file/getFileGenerateTemporaryUploadSecureUrlActionProcessor.js.map +1 -1
  28. package/lib/commonjs/dynamicActionProcessor/file/getFileIsColdStorageActionProcessor.d.ts +1 -2
  29. package/lib/commonjs/dynamicActionProcessor/file/getFileIsColdStorageActionProcessor.js +1 -5
  30. package/lib/commonjs/dynamicActionProcessor/file/getFileIsColdStorageActionProcessor.js.map +1 -1
  31. package/lib/commonjs/dynamicActionProcessor/file/getFileListDirectoryActionProcessor.d.ts +1 -2
  32. package/lib/commonjs/dynamicActionProcessor/file/getFileListDirectoryActionProcessor.js +5 -9
  33. package/lib/commonjs/dynamicActionProcessor/file/getFileListDirectoryActionProcessor.js.map +1 -1
  34. package/lib/commonjs/dynamicActionProcessor/file/getFileReadBinaryContentsActionProcessor.d.ts +1 -2
  35. package/lib/commonjs/dynamicActionProcessor/file/getFileReadBinaryContentsActionProcessor.js +3 -7
  36. package/lib/commonjs/dynamicActionProcessor/file/getFileReadBinaryContentsActionProcessor.js.map +1 -1
  37. package/lib/commonjs/dynamicActionProcessor/file/getFileReadObjectJsonActionProcessor.d.ts +1 -2
  38. package/lib/commonjs/dynamicActionProcessor/file/getFileReadObjectJsonActionProcessor.js +4 -8
  39. package/lib/commonjs/dynamicActionProcessor/file/getFileReadObjectJsonActionProcessor.js.map +1 -1
  40. package/lib/commonjs/dynamicActionProcessor/file/getFileReadTextContentsActionProcessor.d.ts +1 -2
  41. package/lib/commonjs/dynamicActionProcessor/file/getFileReadTextContentsActionProcessor.js +3 -7
  42. package/lib/commonjs/dynamicActionProcessor/file/getFileReadTextContentsActionProcessor.js.map +1 -1
  43. package/lib/commonjs/dynamicActionProcessor/file/getFileStreamOpenActionProcessor.d.ts +1 -2
  44. package/lib/commonjs/dynamicActionProcessor/file/getFileStreamOpenActionProcessor.js +3 -7
  45. package/lib/commonjs/dynamicActionProcessor/file/getFileStreamOpenActionProcessor.js.map +1 -1
  46. package/lib/commonjs/dynamicActionProcessor/file/getFileWriteBinaryContentsActionProcessor.d.ts +1 -2
  47. package/lib/commonjs/dynamicActionProcessor/file/getFileWriteBinaryContentsActionProcessor.js +3 -7
  48. package/lib/commonjs/dynamicActionProcessor/file/getFileWriteBinaryContentsActionProcessor.js.map +1 -1
  49. package/lib/commonjs/dynamicActionProcessor/file/getFileWriteObjectJsonActionProcessor.d.ts +1 -2
  50. package/lib/commonjs/dynamicActionProcessor/file/getFileWriteObjectJsonActionProcessor.js +3 -7
  51. package/lib/commonjs/dynamicActionProcessor/file/getFileWriteObjectJsonActionProcessor.js.map +1 -1
  52. package/lib/commonjs/dynamicActionProcessor/file/getFileWriteTextContentsActionProcessor.d.ts +1 -2
  53. package/lib/commonjs/dynamicActionProcessor/file/getFileWriteTextContentsActionProcessor.js +3 -7
  54. package/lib/commonjs/dynamicActionProcessor/file/getFileWriteTextContentsActionProcessor.js.map +1 -1
  55. package/lib/commonjs/traceStoryExecution/getSystemTraceStoryActionProcessor.js.map +1 -1
  56. package/lib/esm/actionProcessor/core/dynamicFunctions/getDynamicFunctionsExecuteActionProcessor.d.ts +1 -2
  57. package/lib/esm/actionProcessor/core/dynamicFunctions/getDynamicFunctionsExecuteActionProcessor.js +2 -4
  58. package/lib/esm/actionProcessor/core/dynamicFunctions/getDynamicFunctionsExecuteActionProcessor.js.map +1 -1
  59. package/lib/esm/actionProcessor/core/index.js +1 -1
  60. package/lib/esm/actionProcessor/core/index.js.map +1 -1
  61. package/lib/esm/actionProcessor/core/inlineFunction/getInlineFunctionExecuteActionProcessor.d.ts +1 -2
  62. package/lib/esm/actionProcessor/core/inlineFunction/getInlineFunctionExecuteActionProcessor.js +2 -4
  63. package/lib/esm/actionProcessor/core/inlineFunction/getInlineFunctionExecuteActionProcessor.js.map +1 -1
  64. package/lib/esm/actionProcessor/core/stream/getStreamCloseActionProcessor.d.ts +1 -2
  65. package/lib/esm/actionProcessor/core/stream/getStreamCloseActionProcessor.js +2 -4
  66. package/lib/esm/actionProcessor/core/stream/getStreamCloseActionProcessor.js.map +1 -1
  67. package/lib/esm/actionProcessor/core/stream/getStreamReadActionProcessor.d.ts +1 -2
  68. package/lib/esm/actionProcessor/core/stream/getStreamReadActionProcessor.js +2 -4
  69. package/lib/esm/actionProcessor/core/stream/getStreamReadActionProcessor.js.map +1 -1
  70. package/lib/esm/dynamicActionProcessor/file/getFileDeleteActionProcessor.d.ts +1 -2
  71. package/lib/esm/dynamicActionProcessor/file/getFileDeleteActionProcessor.js +4 -6
  72. package/lib/esm/dynamicActionProcessor/file/getFileDeleteActionProcessor.js.map +1 -1
  73. package/lib/esm/dynamicActionProcessor/file/getFileExistsActionProcessor.d.ts +1 -2
  74. package/lib/esm/dynamicActionProcessor/file/getFileExistsActionProcessor.js +4 -6
  75. package/lib/esm/dynamicActionProcessor/file/getFileExistsActionProcessor.js.map +1 -1
  76. package/lib/esm/dynamicActionProcessor/file/getFileGenerateTemporarySecureUrlActionProcessor.d.ts +1 -2
  77. package/lib/esm/dynamicActionProcessor/file/getFileGenerateTemporarySecureUrlActionProcessor.js +4 -6
  78. package/lib/esm/dynamicActionProcessor/file/getFileGenerateTemporarySecureUrlActionProcessor.js.map +1 -1
  79. package/lib/esm/dynamicActionProcessor/file/getFileGenerateTemporaryUploadSecureUrlActionProcessor.d.ts +1 -2
  80. package/lib/esm/dynamicActionProcessor/file/getFileGenerateTemporaryUploadSecureUrlActionProcessor.js +4 -6
  81. package/lib/esm/dynamicActionProcessor/file/getFileGenerateTemporaryUploadSecureUrlActionProcessor.js.map +1 -1
  82. package/lib/esm/dynamicActionProcessor/file/getFileIsColdStorageActionProcessor.d.ts +1 -2
  83. package/lib/esm/dynamicActionProcessor/file/getFileIsColdStorageActionProcessor.js +2 -4
  84. package/lib/esm/dynamicActionProcessor/file/getFileIsColdStorageActionProcessor.js.map +1 -1
  85. package/lib/esm/dynamicActionProcessor/file/getFileListDirectoryActionProcessor.d.ts +1 -2
  86. package/lib/esm/dynamicActionProcessor/file/getFileListDirectoryActionProcessor.js +6 -8
  87. package/lib/esm/dynamicActionProcessor/file/getFileListDirectoryActionProcessor.js.map +1 -1
  88. package/lib/esm/dynamicActionProcessor/file/getFileReadBinaryContentsActionProcessor.d.ts +1 -2
  89. package/lib/esm/dynamicActionProcessor/file/getFileReadBinaryContentsActionProcessor.js +4 -6
  90. package/lib/esm/dynamicActionProcessor/file/getFileReadBinaryContentsActionProcessor.js.map +1 -1
  91. package/lib/esm/dynamicActionProcessor/file/getFileReadObjectJsonActionProcessor.d.ts +1 -2
  92. package/lib/esm/dynamicActionProcessor/file/getFileReadObjectJsonActionProcessor.js +5 -7
  93. package/lib/esm/dynamicActionProcessor/file/getFileReadObjectJsonActionProcessor.js.map +1 -1
  94. package/lib/esm/dynamicActionProcessor/file/getFileReadTextContentsActionProcessor.d.ts +1 -2
  95. package/lib/esm/dynamicActionProcessor/file/getFileReadTextContentsActionProcessor.js +4 -6
  96. package/lib/esm/dynamicActionProcessor/file/getFileReadTextContentsActionProcessor.js.map +1 -1
  97. package/lib/esm/dynamicActionProcessor/file/getFileStreamOpenActionProcessor.d.ts +1 -2
  98. package/lib/esm/dynamicActionProcessor/file/getFileStreamOpenActionProcessor.js +4 -6
  99. package/lib/esm/dynamicActionProcessor/file/getFileStreamOpenActionProcessor.js.map +1 -1
  100. package/lib/esm/dynamicActionProcessor/file/getFileWriteBinaryContentsActionProcessor.d.ts +1 -2
  101. package/lib/esm/dynamicActionProcessor/file/getFileWriteBinaryContentsActionProcessor.js +4 -6
  102. package/lib/esm/dynamicActionProcessor/file/getFileWriteBinaryContentsActionProcessor.js.map +1 -1
  103. package/lib/esm/dynamicActionProcessor/file/getFileWriteObjectJsonActionProcessor.d.ts +1 -2
  104. package/lib/esm/dynamicActionProcessor/file/getFileWriteObjectJsonActionProcessor.js +4 -6
  105. package/lib/esm/dynamicActionProcessor/file/getFileWriteObjectJsonActionProcessor.js.map +1 -1
  106. package/lib/esm/dynamicActionProcessor/file/getFileWriteTextContentsActionProcessor.d.ts +1 -2
  107. package/lib/esm/dynamicActionProcessor/file/getFileWriteTextContentsActionProcessor.js +4 -6
  108. package/lib/esm/dynamicActionProcessor/file/getFileWriteTextContentsActionProcessor.js.map +1 -1
  109. package/lib/esm/traceStoryExecution/getSystemTraceStoryActionProcessor.js.map +1 -1
  110. package/package.json +11 -9
@@ -1,3 +1,2 @@
1
- import { ActionProcessorListResolver } from 'quidproquo-core';
2
1
  import { FileStorageConfig } from './types';
3
- export declare const getFileListDirectoryActionProcessor: (config: FileStorageConfig) => ActionProcessorListResolver;
2
+ export declare const getFileListDirectoryActionProcessor: (config: FileStorageConfig) => import("quidproquo-core").ActionProcessorListResolver;
@@ -80,18 +80,14 @@ const getProcessFileListDirectory = (config) => (qpqConfig) => {
80
80
  }
81
81
  catch (error) {
82
82
  return (0, quidproquo_core_1.actionResultErrorFromCaughtError)(error, {
83
- InvalidScopeError: (error) => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.FileListDirectoryErrorTypeEnum.InvalidScope, error.message),
84
- ENOENT: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.FileListDirectoryErrorTypeEnum.DirectoryNotFound, `Directory not found: ${folderPath}`), // node fs code
85
- ENOTDIR: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.FileListDirectoryErrorTypeEnum.NotADirectory, `Path is not a directory: ${folderPath}`), // node fs code
86
- EACCES: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.FileListDirectoryErrorTypeEnum.AccessDenied, `Access denied listing directory: ${folderPath}`), // node fs code
83
+ InvalidScopeError: (error) => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.askFileListDirectory.errorType.InvalidScope, error.message),
84
+ ENOENT: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.askFileListDirectory.errorType.DirectoryNotFound, `Directory not found: ${folderPath}`), // node fs code
85
+ ENOTDIR: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.askFileListDirectory.errorType.NotADirectory, `Path is not a directory: ${folderPath}`), // node fs code
86
+ EACCES: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.askFileListDirectory.errorType.AccessDenied, `Access denied listing directory: ${folderPath}`), // node fs code
87
87
  });
88
88
  }
89
89
  });
90
90
  };
91
- const getFileListDirectoryActionProcessor = (config) => (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
92
- return ({
93
- [quidproquo_core_1.FileActionType.ListDirectory]: getProcessFileListDirectory(config)(qpqConfig),
94
- });
95
- });
91
+ const getFileListDirectoryActionProcessor = (config) => (0, quidproquo_core_1.createActionProcessor)(quidproquo_core_1.askFileListDirectory, (qpqConfig) => getProcessFileListDirectory(config)(qpqConfig));
96
92
  exports.getFileListDirectoryActionProcessor = getFileListDirectoryActionProcessor;
97
93
  //# sourceMappingURL=getFileListDirectoryActionProcessor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getFileListDirectoryActionProcessor.js","sourceRoot":"","sources":["../../../../src/dynamicActionProcessor/file/getFileListDirectoryActionProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAYyB;AAEzB,gDAAkC;AAClC,2CAA6B;AAG7B,mCAA0C;AAE1C,MAAM,2BAA2B,GAC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ActionProcessorListResolver,\n actionResult,\n actionResultError,\n actionResultErrorFromCaughtError,\n DirectoryList,\n FileActionType,\n FileInfo,\n FileListDirectoryActionProcessor,\n FileListDirectoryErrorTypeEnum,\n QPQConfig,\n} from 'quidproquo-core';\n\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\n\nimport { FileStorageConfig } from './types';\nimport { resolveFilePath } from './utils';\n\nconst getProcessFileListDirectory =\n (config: FileStorageConfig) =>\n (qpqConfig: QPQConfig): FileListDirectoryActionProcessor => {\n return async ({ drive, folderPath, maxFiles, pageToken, scope }) => {\n try {\n const fullPath = resolveFilePath(config, qpqConfig, drive, folderPath || '', scope);\n\n // Read all entries in the directory\n const entries = await fs.readdir(fullPath, { withFileTypes: true });\n\n // Build file info list\n const allFiles: FileInfo[] = [];\n for (const entry of entries) {\n allFiles.push({\n filepath: path.join(folderPath || '', entry.name),\n drive: drive,\n isDir: entry.isDirectory(),\n hashMd5: undefined,\n });\n }\n\n // Sort by filepath for consistent pagination\n allFiles.sort((a, b) => a.filepath.localeCompare(b.filepath));\n\n // Handle pagination\n const startIndex = pageToken ? parseInt(pageToken, 10) : 0;\n const endIndex = Math.min(startIndex + maxFiles, allFiles.length);\n const paginatedFiles = allFiles.slice(startIndex, endIndex);\n\n const result: DirectoryList = {\n fileInfos: paginatedFiles,\n };\n\n // Add page token if there are more files\n if (endIndex < allFiles.length) {\n result.pageToken = endIndex.toString();\n }\n\n return actionResult(result);\n } catch (error: unknown) {\n return actionResultErrorFromCaughtError(error, {\n InvalidScopeError: (error) => actionResultError(FileListDirectoryErrorTypeEnum.InvalidScope, error.message),\n ENOENT: () => actionResultError(FileListDirectoryErrorTypeEnum.DirectoryNotFound, `Directory not found: ${folderPath}`), // node fs code\n ENOTDIR: () => actionResultError(FileListDirectoryErrorTypeEnum.NotADirectory, `Path is not a directory: ${folderPath}`), // node fs code\n EACCES: () => actionResultError(FileListDirectoryErrorTypeEnum.AccessDenied, `Access denied listing directory: ${folderPath}`), // node fs code\n });\n }\n };\n };\n\nexport const getFileListDirectoryActionProcessor =\n (config: FileStorageConfig): ActionProcessorListResolver =>\n async (qpqConfig: QPQConfig): Promise<ActionProcessorList> => ({\n [FileActionType.ListDirectory]: getProcessFileListDirectory(config)(qpqConfig),\n });\n"]}
1
+ {"version":3,"file":"getFileListDirectoryActionProcessor.js","sourceRoot":"","sources":["../../../../src/dynamicActionProcessor/file/getFileListDirectoryActionProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAWyB;AAEzB,gDAAkC;AAClC,2CAA6B;AAG7B,mCAA0C;AAE1C,MAAM,2BAA2B,GAC/B,CAAC,MAAyB,EAAE,EAAE,CAC9B,CAAC,SAAoB,EAA6C,EAAE;IAClE,OAAO,KAA0D,EAAE,4CAArD,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE;QAC7D,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,IAAA,uBAAe,EAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC;YAEpF,oCAAoC;YACpC,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;YAEpE,uBAAuB;YACvB,MAAM,QAAQ,GAAe,EAAE,CAAC;YAChC,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;gBAC5B,QAAQ,CAAC,IAAI,CAAC;oBACZ,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC;oBACjD,KAAK,EAAE,KAAK;oBACZ,KAAK,EAAE,KAAK,CAAC,WAAW,EAAE;oBAC1B,OAAO,EAAE,SAAS;iBACnB,CAAC,CAAC;YACL,CAAC;YAED,6CAA6C;YAC7C,QAAQ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E,GAAG,EAAE,CAAC,IAAA,mCAAiB,EAAC,sCAAoB,CAAC,SAAS,CAAC,YAAY,EAAE,oCAAoC,UAAU,EAAE,CAAC,EAAE,eAAe;aAChJ,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAA,CAAC;AACJ,CAAC,CAAC;AAEG,MAAM,mCAAmC,GAAG,CAAC,MAAyB,EAAE,EAAE,CAC/E,IAAA,uCAAqB,EAAC,sCAAoB,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AADhG,QAAA,mCAAmC,uCAC6D","sourcesContent":["import {\n actionResult,\n actionResultError,\n actionResultErrorFromCaughtError,\n askFileListDirectory,\n createActionProcessor,\n DirectoryList,\n FileActionType,\n FileInfo,\n ProcessorFor,\n QPQConfig,\n} from 'quidproquo-core';\n\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\n\nimport { FileStorageConfig } from './types';\nimport { resolveFilePath } from './utils';\n\nconst getProcessFileListDirectory =\n (config: FileStorageConfig) =>\n (qpqConfig: QPQConfig): ProcessorFor<typeof askFileListDirectory> => {\n return async ({ drive, folderPath, maxFiles, pageToken, scope }) => {\n try {\n const fullPath = resolveFilePath(config, qpqConfig, drive, folderPath || '', scope);\n\n // Read all entries in the directory\n const entries = await fs.readdir(fullPath, { withFileTypes: true });\n\n // Build file info list\n const allFiles: FileInfo[] = [];\n for (const entry of entries) {\n allFiles.push({\n filepath: path.join(folderPath || '', entry.name),\n drive: drive,\n isDir: entry.isDirectory(),\n hashMd5: undefined,\n });\n }\n\n // Sort by filepath for consistent pagination\n allFiles.sort((a, b) => a.filepath.localeCompare(b.filepath));\n\n // Handle pagination\n const startIndex = pageToken ? parseInt(pageToken, 10) : 0;\n const endIndex = Math.min(startIndex + maxFiles, allFiles.length);\n const paginatedFiles = allFiles.slice(startIndex, endIndex);\n\n const result: DirectoryList = {\n fileInfos: paginatedFiles,\n };\n\n // Add page token if there are more files\n if (endIndex < allFiles.length) {\n result.pageToken = endIndex.toString();\n }\n\n return actionResult(result);\n } catch (error: unknown) {\n return actionResultErrorFromCaughtError(error, {\n InvalidScopeError: (error) => actionResultError(askFileListDirectory.errorType.InvalidScope, error.message),\n ENOENT: () => actionResultError(askFileListDirectory.errorType.DirectoryNotFound, `Directory not found: ${folderPath}`), // node fs code\n ENOTDIR: () => actionResultError(askFileListDirectory.errorType.NotADirectory, `Path is not a directory: ${folderPath}`), // node fs code\n EACCES: () => actionResultError(askFileListDirectory.errorType.AccessDenied, `Access denied listing directory: ${folderPath}`), // node fs code\n });\n }\n };\n };\n\nexport const getFileListDirectoryActionProcessor = (config: FileStorageConfig) =>\n createActionProcessor(askFileListDirectory, (qpqConfig) => getProcessFileListDirectory(config)(qpqConfig));\n"]}
@@ -1,3 +1,2 @@
1
- import { ActionProcessorListResolver } from 'quidproquo-core';
2
1
  import { FileStorageConfig } from './types';
3
- export declare const getFileReadBinaryContentsActionProcessor: (config: FileStorageConfig) => ActionProcessorListResolver;
2
+ export declare const getFileReadBinaryContentsActionProcessor: (config: FileStorageConfig) => import("quidproquo-core").ActionProcessorListResolver;
@@ -62,16 +62,12 @@ const getProcessFileReadBinaryContents = (config) => (qpqConfig) => {
62
62
  }
63
63
  catch (error) {
64
64
  return (0, quidproquo_core_1.actionResultErrorFromCaughtError)(error, {
65
- InvalidScopeError: (error) => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.FileReadBinaryContentsErrorTypeEnum.InvalidScope, error.message),
66
- ENOENT: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.FileReadBinaryContentsErrorTypeEnum.FileNotFound, `File not found: ${filepath}`), // node fs code
65
+ InvalidScopeError: (error) => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.askFileReadBinaryContents.errorType.InvalidScope, error.message),
66
+ ENOENT: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.askFileReadBinaryContents.errorType.FileNotFound, `File not found: ${filepath}`), // node fs code
67
67
  });
68
68
  }
69
69
  });
70
70
  };
71
- const getFileReadBinaryContentsActionProcessor = (config) => (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
72
- return ({
73
- [quidproquo_core_1.FileActionType.ReadBinaryContents]: getProcessFileReadBinaryContents(config)(qpqConfig),
74
- });
75
- });
71
+ const getFileReadBinaryContentsActionProcessor = (config) => (0, quidproquo_core_1.createActionProcessor)(quidproquo_core_1.askFileReadBinaryContents, (qpqConfig) => getProcessFileReadBinaryContents(config)(qpqConfig));
76
72
  exports.getFileReadBinaryContentsActionProcessor = getFileReadBinaryContentsActionProcessor;
77
73
  //# sourceMappingURL=getFileReadBinaryContentsActionProcessor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getFileReadBinaryContentsActionProcessor.js","sourceRoot":"","sources":["../../../../src/dynamicActionProcessor/file/getFileReadBinaryContentsActionProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAWyB;AAEzB,gDAAkC;AAClC,2CAA6B;AAG7B,mCAA0C;AAE1C,MAAM,gCAAgC,GACpC,CAAC,MAAyB,EAAE,EAAE,CAC9B,CAAC,SAAoB,EAAyC,EAAE;IAC9D,OAAO,KAAmC,EAAE,4CAA9B,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;QACtC,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,IAAA,uBAAe,EAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC5E,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAE3C,kCAAkC;YAClC,MAAM,UAAU,GAAkB;gBAChC,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC;gBACrC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;gBACjC,QAAQ,EAAE,0BAA0B,EAAE,oCAAoC;aAC3E,CAAC;YAEF,OAAO,IAAA,8BAAY,EAAC,UAAU,CAAC,CAAC;QAClC,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,OAAO,IAAA,kDAAgC,EAAC,KAAK,EAAE;gBAC7C,iBAAiB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,mCAAiB,EAAC,qDAAmC,CAAC,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC;gBAChH,MAAM,EAAE,GAAG,EAAE,CAAC,IAAA,mCAAiB,EAAC,qDAAmC,CAAC,YAAY,EAAE,mBAAmB,QAAQ,EAAE,CAAC,EAAE,eAAe;aAClI,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAA,CAAC;AACJ,CAAC,CAAC;AAEG,MAAM,wCAAwC,GACnD,CAAC,MAAyB,EAA+B,EAAE,CAC3D,CAAO,SAAoB,EAAgC,EAAE;IAAC,OAAA,CAAC;QAC7D,CAAC,gCAAc,CAAC,kBAAkB,CAAC,EAAE,gCAAgC,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC;KACzF,CAAC,CAAA;EAAA,CAAC;AAJQ,QAAA,wCAAwC,4CAIhD","sourcesContent":["import {\n ActionProcessorList,\n ActionProcessorListResolver,\n actionResult,\n actionResultError,\n actionResultErrorFromCaughtError,\n FileActionType,\n FileReadBinaryContentsActionProcessor,\n FileReadBinaryContentsErrorTypeEnum,\n QPQBinaryData,\n QPQConfig,\n} from 'quidproquo-core';\n\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\n\nimport { FileStorageConfig } from './types';\nimport { resolveFilePath } from './utils';\n\nconst getProcessFileReadBinaryContents =\n (config: FileStorageConfig) =>\n (qpqConfig: QPQConfig): FileReadBinaryContentsActionProcessor => {\n return async ({ drive, filepath, scope }) => {\n try {\n const fullPath = resolveFilePath(config, qpqConfig, drive, filepath, scope);\n const buffer = await fs.readFile(fullPath);\n\n // Convert Buffer to QPQBinaryData\n const binaryData: QPQBinaryData = {\n base64Data: buffer.toString('base64'),\n filename: path.basename(filepath),\n mimetype: 'application/octet-stream', // Default mimetype for binary files\n };\n\n return actionResult(binaryData);\n } catch (error: unknown) {\n return actionResultErrorFromCaughtError(error, {\n InvalidScopeError: (error) => actionResultError(FileReadBinaryContentsErrorTypeEnum.InvalidScope, error.message),\n ENOENT: () => actionResultError(FileReadBinaryContentsErrorTypeEnum.FileNotFound, `File not found: ${filepath}`), // node fs code\n });\n }\n };\n };\n\nexport const getFileReadBinaryContentsActionProcessor =\n (config: FileStorageConfig): ActionProcessorListResolver =>\n async (qpqConfig: QPQConfig): Promise<ActionProcessorList> => ({\n [FileActionType.ReadBinaryContents]: getProcessFileReadBinaryContents(config)(qpqConfig),\n });\n"]}
1
+ {"version":3,"file":"getFileReadBinaryContentsActionProcessor.js","sourceRoot":"","sources":["../../../../src/dynamicActionProcessor/file/getFileReadBinaryContentsActionProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAUyB;AAEzB,gDAAkC;AAClC,2CAA6B;AAG7B,mCAA0C;AAE1C,MAAM,gCAAgC,GACpC,CAAC,MAAyB,EAAE,EAAE,CAC9B,CAAC,SAAoB,EAAkD,EAAE;IACvE,OAAO,KAAmC,EAAE,4CAA9B,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;QACtC,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,IAAA,uBAAe,EAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC5E,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAE3C,kCAAkC;YAClC,MAAM,UAAU,GAAkB;gBAChC,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC;gBACrC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;gBACjC,QAAQ,EAAE,0BAA0B,EAAE,oCAAoC;aAC3E,CAAC;YAEF,OAAO,IAAA,8BAAY,EAAC,UAAU,CAAC,CAAC;QAClC,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,OAAO,IAAA,kDAAgC,EAAC,KAAK,EAAE;gBAC7C,iBAAiB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,mCAAiB,EAAC,2CAAyB,CAAC,SAAS,CAAC,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC;gBAChH,MAAM,EAAE,GAAG,EAAE,CAAC,IAAA,mCAAiB,EAAC,2CAAyB,CAAC,SAAS,CAAC,YAAY,EAAE,mBAAmB,QAAQ,EAAE,CAAC,EAAE,eAAe;aAClI,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAA,CAAC;AACJ,CAAC,CAAC;AAEG,MAAM,wCAAwC,GAAG,CAAC,MAAyB,EAAE,EAAE,CACpF,IAAA,uCAAqB,EAAC,2CAAyB,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,gCAAgC,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AAD1G,QAAA,wCAAwC,4CACkE","sourcesContent":["import {\n actionResult,\n actionResultError,\n actionResultErrorFromCaughtError,\n askFileReadBinaryContents,\n createActionProcessor,\n FileActionType,\n ProcessorFor,\n QPQBinaryData,\n QPQConfig,\n} from 'quidproquo-core';\n\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\n\nimport { FileStorageConfig } from './types';\nimport { resolveFilePath } from './utils';\n\nconst getProcessFileReadBinaryContents =\n (config: FileStorageConfig) =>\n (qpqConfig: QPQConfig): ProcessorFor<typeof askFileReadBinaryContents> => {\n return async ({ drive, filepath, scope }) => {\n try {\n const fullPath = resolveFilePath(config, qpqConfig, drive, filepath, scope);\n const buffer = await fs.readFile(fullPath);\n\n // Convert Buffer to QPQBinaryData\n const binaryData: QPQBinaryData = {\n base64Data: buffer.toString('base64'),\n filename: path.basename(filepath),\n mimetype: 'application/octet-stream', // Default mimetype for binary files\n };\n\n return actionResult(binaryData);\n } catch (error: unknown) {\n return actionResultErrorFromCaughtError(error, {\n InvalidScopeError: (error) => actionResultError(askFileReadBinaryContents.errorType.InvalidScope, error.message),\n ENOENT: () => actionResultError(askFileReadBinaryContents.errorType.FileNotFound, `File not found: ${filepath}`), // node fs code\n });\n }\n };\n };\n\nexport const getFileReadBinaryContentsActionProcessor = (config: FileStorageConfig) =>\n createActionProcessor(askFileReadBinaryContents, (qpqConfig) => getProcessFileReadBinaryContents(config)(qpqConfig));\n"]}
@@ -1,3 +1,2 @@
1
- import { ActionProcessorListResolver } from 'quidproquo-core';
2
1
  import { FileStorageConfig } from './types';
3
- export declare const getFileReadObjectJsonActionProcessor: (config: FileStorageConfig) => ActionProcessorListResolver;
2
+ export declare const getFileReadObjectJsonActionProcessor: (config: FileStorageConfig) => import("quidproquo-core").ActionProcessorListResolver;
@@ -56,17 +56,13 @@ const getProcessFileReadObjectJson = (config) => (qpqConfig) => {
56
56
  }
57
57
  catch (error) {
58
58
  return (0, quidproquo_core_1.actionResultErrorFromCaughtError)(error, {
59
- InvalidScopeError: (error) => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.FileReadObjectJsonErrorTypeEnum.InvalidScope, error.message),
60
- ENOENT: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.FileReadObjectJsonErrorTypeEnum.FileNotFound, `File not found: ${filepath}`), // node fs code
61
- SyntaxError: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.FileReadObjectJsonErrorTypeEnum.InvalidJson, `Invalid JSON in file: ${filepath}`), // JSON.parse failure
59
+ InvalidScopeError: (error) => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.askFileReadObjectJsonBase.errorType.InvalidScope, error.message),
60
+ ENOENT: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.askFileReadObjectJsonBase.errorType.FileNotFound, `File not found: ${filepath}`), // node fs code
61
+ SyntaxError: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.askFileReadObjectJsonBase.errorType.InvalidJson, `Invalid JSON in file: ${filepath}`), // JSON.parse failure
62
62
  });
63
63
  }
64
64
  });
65
65
  };
66
- const getFileReadObjectJsonActionProcessor = (config) => (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
67
- return ({
68
- [quidproquo_core_1.FileActionType.ReadObjectJson]: getProcessFileReadObjectJson(config)(qpqConfig),
69
- });
70
- });
66
+ const getFileReadObjectJsonActionProcessor = (config) => (0, quidproquo_core_1.createActionProcessor)(quidproquo_core_1.askFileReadObjectJsonBase, (qpqConfig) => getProcessFileReadObjectJson(config)(qpqConfig));
71
67
  exports.getFileReadObjectJsonActionProcessor = getFileReadObjectJsonActionProcessor;
72
68
  //# sourceMappingURL=getFileReadObjectJsonActionProcessor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getFileReadObjectJsonActionProcessor.js","sourceRoot":"","sources":["../../../../src/dynamicActionProcessor/file/getFileReadObjectJsonActionProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAUyB;AAEzB,gDAAkC;AAGlC,mCAA0C;AAE1C,MAAM,4BAA4B,GAChC,CAAC,MAAyB,EAAE,EAAE,CAC9B,CAAC,SAAoB,EAA0C,EAAE;IAC/D,OAAO,KAAmC,EAAE,4CAA9B,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;QACtC,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,IAAA,uBAAe,EAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC5E,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YACpD,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACvC,OAAO,IAAA,8BAAY,EAAC,UAAU,CAAC,CAAC;QAClC,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,OAAO,IAAA,kDAAgC,EAAC,KAAK,EAAE;gBAC7C,iBAAiB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,mCAAiB,EAAC,iDAA+B,CAAC,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC;gBAC5G,MAAM,EAAE,GAAG,EAAE,CAAC,IAAA,mCAAiB,EAAC,iDAA+B,CAAC,YAAY,EAAE,mBAAmB,QAAQ,EAAE,CAAC,EAAE,eAAe;gBAC7H,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,mCAAiB,EAAC,iDAA+B,CAAC,WAAW,EAAE,yBAAyB,QAAQ,EAAE,CAAC,EAAE,qBAAqB;aAC9I,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAA,CAAC;AACJ,CAAC,CAAC;AAEG,MAAM,oCAAoC,GAC/C,CAAC,MAAyB,EAA+B,EAAE,CAC3D,CAAO,SAAoB,EAAgC,EAAE;IAAC,OAAA,CAAC;QAC7D,CAAC,gCAAc,CAAC,cAAc,CAAC,EAAE,4BAA4B,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC;KACjF,CAAC,CAAA;EAAA,CAAC;AAJQ,QAAA,oCAAoC,wCAI5C","sourcesContent":["import {\n ActionProcessorList,\n ActionProcessorListResolver,\n actionResult,\n actionResultError,\n actionResultErrorFromCaughtError,\n FileActionType,\n FileReadObjectJsonActionProcessor,\n FileReadObjectJsonErrorTypeEnum,\n QPQConfig,\n} from 'quidproquo-core';\n\nimport * as fs from 'fs/promises';\n\nimport { FileStorageConfig } from './types';\nimport { resolveFilePath } from './utils';\n\nconst getProcessFileReadObjectJson =\n (config: FileStorageConfig) =>\n (qpqConfig: QPQConfig): FileReadObjectJsonActionProcessor<any> => {\n return async ({ drive, filepath, scope }) => {\n try {\n const fullPath = resolveFilePath(config, qpqConfig, drive, filepath, scope);\n const content = await fs.readFile(fullPath, 'utf8');\n const jsonObject = JSON.parse(content);\n return actionResult(jsonObject);\n } catch (error: unknown) {\n return actionResultErrorFromCaughtError(error, {\n InvalidScopeError: (error) => actionResultError(FileReadObjectJsonErrorTypeEnum.InvalidScope, error.message),\n ENOENT: () => actionResultError(FileReadObjectJsonErrorTypeEnum.FileNotFound, `File not found: ${filepath}`), // node fs code\n SyntaxError: () => actionResultError(FileReadObjectJsonErrorTypeEnum.InvalidJson, `Invalid JSON in file: ${filepath}`), // JSON.parse failure\n });\n }\n };\n };\n\nexport const getFileReadObjectJsonActionProcessor =\n (config: FileStorageConfig): ActionProcessorListResolver =>\n async (qpqConfig: QPQConfig): Promise<ActionProcessorList> => ({\n [FileActionType.ReadObjectJson]: getProcessFileReadObjectJson(config)(qpqConfig),\n });\n"]}
1
+ {"version":3,"file":"getFileReadObjectJsonActionProcessor.js","sourceRoot":"","sources":["../../../../src/dynamicActionProcessor/file/getFileReadObjectJsonActionProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDASyB;AAEzB,gDAAkC;AAGlC,mCAA0C;AAE1C,MAAM,4BAA4B,GAChC,CAAC,MAAyB,EAAE,EAAE,CAC9B,CAAC,SAAoB,EAAkD,EAAE;IACvE,OAAO,KAAmC,EAAE,4CAA9B,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;QACtC,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,IAAA,uBAAe,EAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC5E,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YACpD,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACvC,OAAO,IAAA,8BAAY,EAAC,UAAU,CAAC,CAAC;QAClC,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,OAAO,IAAA,kDAAgC,EAAC,KAAK,EAAE;gBAC7C,iBAAiB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,mCAAiB,EAAC,2CAAyB,CAAC,SAAS,CAAC,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC;gBAChH,MAAM,EAAE,GAAG,EAAE,CAAC,IAAA,mCAAiB,EAAC,2CAAyB,CAAC,SAAS,CAAC,YAAY,EAAE,mBAAmB,QAAQ,EAAE,CAAC,EAAE,eAAe;gBACjI,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,mCAAiB,EAAC,2CAAyB,CAAC,SAAS,CAAC,WAAW,EAAE,yBAAyB,QAAQ,EAAE,CAAC,EAAE,qBAAqB;aAClJ,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAA,CAAC;AACJ,CAAC,CAAC;AAEG,MAAM,oCAAoC,GAAG,CAAC,MAAyB,EAAE,EAAE,CAChF,IAAA,uCAAqB,EAAC,2CAAyB,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,4BAA4B,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AADtG,QAAA,oCAAoC,wCACkE","sourcesContent":["import {\n actionResult,\n actionResultError,\n actionResultErrorFromCaughtError,\n askFileReadObjectJsonBase,\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 { resolveFilePath } from './utils';\n\nconst getProcessFileReadObjectJson =\n (config: FileStorageConfig) =>\n (qpqConfig: QPQConfig): ProcessorFor<typeof askFileReadObjectJsonBase> => {\n return async ({ drive, filepath, scope }) => {\n try {\n const fullPath = resolveFilePath(config, qpqConfig, drive, filepath, scope);\n const content = await fs.readFile(fullPath, 'utf8');\n const jsonObject = JSON.parse(content);\n return actionResult(jsonObject);\n } catch (error: unknown) {\n return actionResultErrorFromCaughtError(error, {\n InvalidScopeError: (error) => actionResultError(askFileReadObjectJsonBase.errorType.InvalidScope, error.message),\n ENOENT: () => actionResultError(askFileReadObjectJsonBase.errorType.FileNotFound, `File not found: ${filepath}`), // node fs code\n SyntaxError: () => actionResultError(askFileReadObjectJsonBase.errorType.InvalidJson, `Invalid JSON in file: ${filepath}`), // JSON.parse failure\n });\n }\n };\n };\n\nexport const getFileReadObjectJsonActionProcessor = (config: FileStorageConfig) =>\n createActionProcessor(askFileReadObjectJsonBase, (qpqConfig) => getProcessFileReadObjectJson(config)(qpqConfig));\n"]}
@@ -1,3 +1,2 @@
1
- import { ActionProcessorListResolver } from 'quidproquo-core';
2
1
  import { FileStorageConfig } from './types';
3
- export declare const getFileReadTextContentsActionProcessor: (config: FileStorageConfig) => ActionProcessorListResolver;
2
+ export declare const getFileReadTextContentsActionProcessor: (config: FileStorageConfig) => import("quidproquo-core").ActionProcessorListResolver;
@@ -55,16 +55,12 @@ const getProcessFileReadTextContents = (qpqConfig, config) => {
55
55
  }
56
56
  catch (error) {
57
57
  return (0, quidproquo_core_1.actionResultErrorFromCaughtError)(error, {
58
- InvalidScopeError: (error) => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.FileReadTextContentsErrorTypeEnum.InvalidScope, error.message),
59
- ENOENT: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.FileReadTextContentsErrorTypeEnum.FileNotFound, `File not found: ${filepath}`), // node fs code
58
+ InvalidScopeError: (error) => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.askFileReadTextContents.errorType.InvalidScope, error.message),
59
+ ENOENT: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.askFileReadTextContents.errorType.FileNotFound, `File not found: ${filepath}`), // node fs code
60
60
  });
61
61
  }
62
62
  });
63
63
  };
64
- const getFileReadTextContentsActionProcessor = (config) => (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
65
- return ({
66
- [quidproquo_core_1.FileActionType.ReadTextContents]: getProcessFileReadTextContents(qpqConfig, config),
67
- });
68
- });
64
+ const getFileReadTextContentsActionProcessor = (config) => (0, quidproquo_core_1.createActionProcessor)(quidproquo_core_1.askFileReadTextContents, (qpqConfig) => getProcessFileReadTextContents(qpqConfig, config));
69
65
  exports.getFileReadTextContentsActionProcessor = getFileReadTextContentsActionProcessor;
70
66
  //# sourceMappingURL=getFileReadTextContentsActionProcessor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getFileReadTextContentsActionProcessor.js","sourceRoot":"","sources":["../../../../src/dynamicActionProcessor/file/getFileReadTextContentsActionProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAUyB;AAEzB,gDAAkC;AAGlC,mCAA0C;AAE1C,MAAM,8BAA8B,GAAG,CAAC,SAAoB,EAAE,MAAyB,EAAuC,EAAE;IAC9H,OAAO,KAAmC,EAAE,4CAA9B,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;QACtC,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,IAAA,uBAAe,EAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC5E,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YACpD,OAAO,IAAA,8BAAY,EAAC,OAAO,CAAC,CAAC;QAC/B,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,OAAO,IAAA,kDAAgC,EAAC,KAAK,EAAE;gBAC7C,iBAAiB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,mCAAiB,EAAC,mDAAiC,CAAC,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC;gBAC9G,MAAM,EAAE,GAAG,EAAE,CAAC,IAAA,mCAAiB,EAAC,mDAAiC,CAAC,YAAY,EAAE,mBAAmB,QAAQ,EAAE,CAAC,EAAE,eAAe;aAChI,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAA,CAAC;AACJ,CAAC,CAAC;AAEK,MAAM,sCAAsC,GACjD,CAAC,MAAyB,EAA+B,EAAE,CAC3D,CAAO,SAAoB,EAAgC,EAAE;IAAC,OAAA,CAAC;QAC7D,CAAC,gCAAc,CAAC,gBAAgB,CAAC,EAAE,8BAA8B,CAAC,SAAS,EAAE,MAAM,CAAC;KACrF,CAAC,CAAA;EAAA,CAAC;AAJQ,QAAA,sCAAsC,0CAI9C","sourcesContent":["import {\n ActionProcessorList,\n ActionProcessorListResolver,\n actionResult,\n actionResultError,\n actionResultErrorFromCaughtError,\n FileActionType,\n FileReadTextContentsActionProcessor,\n FileReadTextContentsErrorTypeEnum,\n QPQConfig,\n} from 'quidproquo-core';\n\nimport * as fs from 'fs/promises';\n\nimport { FileStorageConfig } from './types';\nimport { resolveFilePath } from './utils';\n\nconst getProcessFileReadTextContents = (qpqConfig: QPQConfig, config: FileStorageConfig): FileReadTextContentsActionProcessor => {\n return async ({ drive, filepath, scope }) => {\n try {\n const fullPath = resolveFilePath(config, qpqConfig, drive, filepath, scope);\n const content = await fs.readFile(fullPath, 'utf8');\n return actionResult(content);\n } catch (error: unknown) {\n return actionResultErrorFromCaughtError(error, {\n InvalidScopeError: (error) => actionResultError(FileReadTextContentsErrorTypeEnum.InvalidScope, error.message),\n ENOENT: () => actionResultError(FileReadTextContentsErrorTypeEnum.FileNotFound, `File not found: ${filepath}`), // node fs code\n });\n }\n };\n};\n\nexport const getFileReadTextContentsActionProcessor =\n (config: FileStorageConfig): ActionProcessorListResolver =>\n async (qpqConfig: QPQConfig): Promise<ActionProcessorList> => ({\n [FileActionType.ReadTextContents]: getProcessFileReadTextContents(qpqConfig, config),\n });\n"]}
1
+ {"version":3,"file":"getFileReadTextContentsActionProcessor.js","sourceRoot":"","sources":["../../../../src/dynamicActionProcessor/file/getFileReadTextContentsActionProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDASyB;AAEzB,gDAAkC;AAGlC,mCAA0C;AAE1C,MAAM,8BAA8B,GAAG,CAAC,SAAoB,EAAE,MAAyB,EAAgD,EAAE;IACvI,OAAO,KAAmC,EAAE,4CAA9B,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;QACtC,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,IAAA,uBAAe,EAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC5E,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YACpD,OAAO,IAAA,8BAAY,EAAC,OAAO,CAAC,CAAC;QAC/B,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,OAAO,IAAA,kDAAgC,EAAC,KAAK,EAAE;gBAC7C,iBAAiB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,mCAAiB,EAAC,yCAAuB,CAAC,SAAS,CAAC,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC;gBAC9G,MAAM,EAAE,GAAG,EAAE,CAAC,IAAA,mCAAiB,EAAC,yCAAuB,CAAC,SAAS,CAAC,YAAY,EAAE,mBAAmB,QAAQ,EAAE,CAAC,EAAE,eAAe;aAChI,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAA,CAAC;AACJ,CAAC,CAAC;AAEK,MAAM,sCAAsC,GAAG,CAAC,MAAyB,EAAE,EAAE,CAClF,IAAA,uCAAqB,EAAC,yCAAuB,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,8BAA8B,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;AADtG,QAAA,sCAAsC,0CACgE","sourcesContent":["import {\n actionResult,\n actionResultError,\n actionResultErrorFromCaughtError,\n askFileReadTextContents,\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 { resolveFilePath } from './utils';\n\nconst getProcessFileReadTextContents = (qpqConfig: QPQConfig, config: FileStorageConfig): ProcessorFor<typeof askFileReadTextContents> => {\n return async ({ drive, filepath, scope }) => {\n try {\n const fullPath = resolveFilePath(config, qpqConfig, drive, filepath, scope);\n const content = await fs.readFile(fullPath, 'utf8');\n return actionResult(content);\n } catch (error: unknown) {\n return actionResultErrorFromCaughtError(error, {\n InvalidScopeError: (error) => actionResultError(askFileReadTextContents.errorType.InvalidScope, error.message),\n ENOENT: () => actionResultError(askFileReadTextContents.errorType.FileNotFound, `File not found: ${filepath}`), // node fs code\n });\n }\n };\n};\n\nexport const getFileReadTextContentsActionProcessor = (config: FileStorageConfig) =>\n createActionProcessor(askFileReadTextContents, (qpqConfig) => getProcessFileReadTextContents(qpqConfig, config));\n"]}
@@ -1,3 +1,2 @@
1
- import { ActionProcessorListResolver } from 'quidproquo-core';
2
1
  import { FileStorageConfig } from './types';
3
- export declare const getFileStreamOpenActionProcessor: (config: FileStorageConfig) => ActionProcessorListResolver;
2
+ export declare const getFileStreamOpenActionProcessor: (config: FileStorageConfig) => import("quidproquo-core").ActionProcessorListResolver;
@@ -122,16 +122,12 @@ const getProcessFileStreamOpen = (qpqConfig, config) => {
122
122
  }
123
123
  catch (error) {
124
124
  return (0, quidproquo_core_1.actionResultErrorFromCaughtError)(error, {
125
- InvalidScopeError: (error) => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.FileStreamOpenErrorTypeEnum.InvalidScope, error.message),
126
- ENOENT: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.FileStreamOpenErrorTypeEnum.FileNotFound, `File not found: ${filepath}`), // node fs code
125
+ InvalidScopeError: (error) => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.askFileStreamOpenBase.errorType.InvalidScope, error.message),
126
+ ENOENT: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.askFileStreamOpenBase.errorType.FileNotFound, `File not found: ${filepath}`), // node fs code
127
127
  });
128
128
  }
129
129
  });
130
130
  };
131
- const getFileStreamOpenActionProcessor = (config) => (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
132
- return ({
133
- [quidproquo_core_1.FileActionType.StreamOpen]: getProcessFileStreamOpen(qpqConfig, config),
134
- });
135
- });
131
+ const getFileStreamOpenActionProcessor = (config) => (0, quidproquo_core_1.createActionProcessor)(quidproquo_core_1.askFileStreamOpenBase, (qpqConfig) => getProcessFileStreamOpen(qpqConfig, config));
136
132
  exports.getFileStreamOpenActionProcessor = getFileStreamOpenActionProcessor;
137
133
  //# sourceMappingURL=getFileStreamOpenActionProcessor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getFileStreamOpenActionProcessor.js","sourceRoot":"","sources":["../../../../src/dynamicActionProcessor/file/getFileStreamOpenActionProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAUyB;AAEzB,mCAAoC;AACpC,uCAAyB;AAIzB,mCAA0C;AAE1C,SAAgB,kBAAkB,CAAC,MAAgB;;;;YACjD,KAA0B,eAAA,WAAA,cAAA,MAAM,CAAA,YAAA,qFAAE,CAAC;gBAAT,sBAAM;gBAAN,WAAM;gBAArB,MAAM,KAAK,KAAA,CAAA;gBACpB,oBAAM,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAE,KAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA,CAAC;YAC/E,CAAC;;;;;;;;;IACH,CAAC;CAAA;AAED,SAAgB,oBAAoB,CAAC,MAAgB;;;;YACnD,KAA0B,eAAA,WAAA,cAAA,MAAM,CAAA,YAAA,qFAAE,CAAC;gBAAT,sBAAM;gBAAN,WAAM;gBAArB,MAAM,KAAK,KAAA,CAAA;gBACpB,MAAM,MAAM,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM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AO,IAAA,kDAAgC,EAAC,KAAK,EAAE;gBAC7C,iBAAiB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,mCAAiB,EAAC,6CAA2B,CAAC,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC;gBACxG,MAAM,EAAE,GAAG,EAAE,CAAC,IAAA,mCAAiB,EAAC,6CAA2B,CAAC,YAAY,EAAE,mBAAmB,QAAQ,EAAE,CAAC,EAAE,eAAe;aAC1H,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAA,CAAC;AACJ,CAAC,CAAC;AAEK,MAAM,gCAAgC,GAC3C,CAAC,MAAyB,EAA+B,EAAE,CAC3D,CAAO,SAAoB,EAAgC,EAAE;IAAC,OAAA,CAAC;QAC7D,CAAC,gCAAc,CAAC,UAAU,CAAC,EAAE,wBAAwB,CAAC,SAAS,EAAE,MAAM,CAAC;KACzE,CAAC,CAAA;EAAA,CAAC;AAJQ,QAAA,gCAAgC,oCAIxC","sourcesContent":["import {\n ActionProcessorList,\n ActionProcessorListResolver,\n actionResult,\n actionResultError,\n actionResultErrorFromCaughtError,\n FileActionType,\n FileStreamOpenActionProcessor,\n FileStreamOpenErrorTypeEnum,\n QPQConfig,\n} from 'quidproquo-core';\n\nimport { randomUUID } from 'crypto';\nimport * as fs from 'fs';\nimport { Readable } from 'stream';\n\nimport { FileStorageConfig } from './types';\nimport { resolveFilePath } from './utils';\n\nasync function* textStreamIterator(stream: Readable): AsyncIterableIterator<string> {\n for await (const chunk of stream) {\n yield typeof chunk === 'string' ? chunk : (chunk as Buffer).toString('utf8');\n }\n}\n\nasync function* binaryStreamIterator(stream: Readable): AsyncIterableIterator<string> {\n for await (const chunk of stream) {\n const buffer = typeof chunk === 'string' ? Buffer.from(chunk) : (chunk as Buffer);\n yield buffer.toString('base64');\n }\n}\n\nconst getProcessFileStreamOpen = (qpqConfig: QPQConfig, config: FileStorageConfig): FileStreamOpenActionProcessor => {\n return async (\n { drive, filepath, encoding, chunkSize, scope },\n session,\n actionProcessors,\n logger,\n updateSession,\n dynamicModuleLoader,\n streamRegistry,\n ) => {\n try {\n const fullPath = resolveFilePath(config, qpqConfig, drive, filepath, scope);\n const isText = encoding === 'text';\n const highWaterMark = chunkSize ?? 65536;\n const readStream = fs.createReadStream(fullPath, isText ? { encoding: 'utf8', highWaterMark } : { highWaterMark });\n const streamId = `file-${randomUUID()}`;\n\n const iterator = isText ? textStreamIterator(readStream) : binaryStreamIterator(readStream);\n streamRegistry.register(streamId, iterator);\n\n return actionResult({ id: streamId, encoding });\n } catch (error: unknown) {\n return actionResultErrorFromCaughtError(error, {\n InvalidScopeError: (error) => actionResultError(FileStreamOpenErrorTypeEnum.InvalidScope, error.message),\n ENOENT: () => actionResultError(FileStreamOpenErrorTypeEnum.FileNotFound, `File not found: ${filepath}`), // node fs code\n });\n }\n };\n};\n\nexport const getFileStreamOpenActionProcessor =\n (config: FileStorageConfig): ActionProcessorListResolver =>\n async (qpqConfig: QPQConfig): Promise<ActionProcessorList> => ({\n [FileActionType.StreamOpen]: getProcessFileStreamOpen(qpqConfig, config),\n });\n"]}
1
+ {"version":3,"file":"getFileStreamOpenActionProcessor.js","sourceRoot":"","sources":["../../../../src/dynamicActionProcessor/file/getFileStreamOpenActionProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDASyB;AAEzB,mCAAoC;AACpC,uCAAyB;AAIzB,mCAA0C;AAE1C,SAAgB,kBAAkB,CAAC,MAAgB;;;;YACjD,KAA0B,eAAA,WAAA,cAAA,MAAM,CAAA,YAAA,qFAAE,CAAC;gBAAT,sBAAM;gBAAN,WAAM;gBAArB,MAAM,KAAK,KAAA,CAAA;gBACpB,oBAAM,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAE,KAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA,CAAC;YAC/E,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AAU,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;YAC5F,cAAc,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;YAE5C,OAAO,IAAA,8BAAY,EAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;QAClD,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,OAAO,IAAA,kDAAgC,EAAC,KAAK,EAAE;gBAC7C,iBAAiB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,mCAAiB,EAAC,uCAAqB,CAAC,SAAS,CAAC,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC;gBAC5G,MAAM,EAAE,GAAG,EAAE,CAAC,IAAA,mCAAiB,EAAC,uCAAqB,CAAC,SAAS,CAAC,YAAY,EAAE,mBAAmB,QAAQ,EAAE,CAAC,EAAE,eAAe;aAC9H,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAA,CAAC;AACJ,CAAC,CAAC;AAEK,MAAM,gCAAgC,GAAG,CAAC,MAAyB,EAAE,EAAE,CAC5E,IAAA,uCAAqB,EAAC,uCAAqB,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,wBAAwB,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;AAD9F,QAAA,gCAAgC,oCAC8D","sourcesContent":["import {\n actionResult,\n actionResultError,\n actionResultErrorFromCaughtError,\n askFileStreamOpenBase,\n createActionProcessor,\n FileActionType,\n ProcessorFor,\n QPQConfig,\n} from 'quidproquo-core';\n\nimport { randomUUID } from 'crypto';\nimport * as fs from 'fs';\nimport { Readable } from 'stream';\n\nimport { FileStorageConfig } from './types';\nimport { resolveFilePath } from './utils';\n\nasync function* textStreamIterator(stream: Readable): AsyncIterableIterator<string> {\n for await (const chunk of stream) {\n yield typeof chunk === 'string' ? chunk : (chunk as Buffer).toString('utf8');\n }\n}\n\nasync function* binaryStreamIterator(stream: Readable): AsyncIterableIterator<string> {\n for await (const chunk of stream) {\n const buffer = typeof chunk === 'string' ? Buffer.from(chunk) : (chunk as Buffer);\n yield buffer.toString('base64');\n }\n}\n\nconst getProcessFileStreamOpen = (qpqConfig: QPQConfig, config: FileStorageConfig): ProcessorFor<typeof askFileStreamOpenBase> => {\n return async (\n { drive, filepath, encoding, chunkSize, scope },\n session,\n actionProcessors,\n logger,\n updateSession,\n dynamicModuleLoader,\n streamRegistry,\n ) => {\n try {\n const fullPath = resolveFilePath(config, qpqConfig, drive, filepath, scope);\n const isText = encoding === 'text';\n const highWaterMark = chunkSize ?? 65536;\n const readStream = fs.createReadStream(fullPath, isText ? { encoding: 'utf8', highWaterMark } : { highWaterMark });\n const streamId = `file-${randomUUID()}`;\n\n const iterator = isText ? textStreamIterator(readStream) : binaryStreamIterator(readStream);\n streamRegistry.register(streamId, iterator);\n\n return actionResult({ id: streamId, encoding });\n } catch (error: unknown) {\n return actionResultErrorFromCaughtError(error, {\n InvalidScopeError: (error) => actionResultError(askFileStreamOpenBase.errorType.InvalidScope, error.message),\n ENOENT: () => actionResultError(askFileStreamOpenBase.errorType.FileNotFound, `File not found: ${filepath}`), // node fs code\n });\n }\n };\n};\n\nexport const getFileStreamOpenActionProcessor = (config: FileStorageConfig) =>\n createActionProcessor(askFileStreamOpenBase, (qpqConfig) => getProcessFileStreamOpen(qpqConfig, config));\n"]}
@@ -1,3 +1,2 @@
1
- import { ActionProcessorListResolver } from 'quidproquo-core';
2
1
  import { FileStorageConfig } from './types';
3
- export declare const getFileWriteBinaryContentsActionProcessor: (config: FileStorageConfig) => ActionProcessorListResolver;
2
+ export declare const getFileWriteBinaryContentsActionProcessor: (config: FileStorageConfig) => import("quidproquo-core").ActionProcessorListResolver;
@@ -64,16 +64,12 @@ const getProcessFileWriteBinaryContents = (config) => (qpqConfig) => {
64
64
  }
65
65
  catch (error) {
66
66
  return (0, quidproquo_core_1.actionResultErrorFromCaughtError)(error, {
67
- InvalidScopeError: (error) => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.FileWriteBinaryContentsErrorTypeEnum.InvalidScope, error.message),
68
- EACCES: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.FileWriteBinaryContentsErrorTypeEnum.AccessDenied, `Access denied writing file: ${filepath}`), // node fs code
67
+ InvalidScopeError: (error) => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.askFileWriteBinaryContents.errorType.InvalidScope, error.message),
68
+ EACCES: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.askFileWriteBinaryContents.errorType.AccessDenied, `Access denied writing file: ${filepath}`), // node fs code
69
69
  });
70
70
  }
71
71
  });
72
72
  };
73
- const getFileWriteBinaryContentsActionProcessor = (config) => (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
74
- return ({
75
- [quidproquo_core_1.FileActionType.WriteBinaryContents]: getProcessFileWriteBinaryContents(config)(qpqConfig),
76
- });
77
- });
73
+ const getFileWriteBinaryContentsActionProcessor = (config) => (0, quidproquo_core_1.createActionProcessor)(quidproquo_core_1.askFileWriteBinaryContents, (qpqConfig) => getProcessFileWriteBinaryContents(config)(qpqConfig));
78
74
  exports.getFileWriteBinaryContentsActionProcessor = getFileWriteBinaryContentsActionProcessor;
79
75
  //# sourceMappingURL=getFileWriteBinaryContentsActionProcessor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getFileWriteBinaryContentsActionProcessor.js","sourceRoot":"","sources":["../../../../src/dynamicActionProcessor/file/getFileWriteBinaryContentsActionProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAUyB;AAEzB,gDAAkC;AAGlC,mCAAuE;AAEvE,MAAM,iCAAiC,GACrC,CAAC,MAAyB,EAAE,EAAE,CAC9B,CAAC,SAAoB,EAA0C,EAAE;IAC/D,OAAO,KAAyC,EAAE,4CAApC,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE;QAC5C,I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EAAE,iCAAiC,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC;KAC3F,CAAC,CAAA;EAAA,CAAC;AAJQ,QAAA,yCAAyC,6CAIjD","sourcesContent":["import {\n ActionProcessorList,\n ActionProcessorListResolver,\n actionResult,\n actionResultError,\n actionResultErrorFromCaughtError,\n FileActionType,\n FileWriteBinaryContentsActionProcessor,\n FileWriteBinaryContentsErrorTypeEnum,\n QPQConfig,\n} from 'quidproquo-core';\n\nimport * as fs from 'fs/promises';\n\nimport { FileStorageConfig } from './types';\nimport { ensureParentDirectoryExists, resolveFilePath } from './utils';\n\nconst getProcessFileWriteBinaryContents =\n (config: FileStorageConfig) =>\n (qpqConfig: QPQConfig): FileWriteBinaryContentsActionProcessor => {\n return async ({ drive, filepath, data, scope }) => {\n try {\n const fullPath = resolveFilePath(config, qpqConfig, drive, filepath, scope);\n await ensureParentDirectoryExists(fullPath);\n\n // Convert QPQBinaryData to Buffer\n const buffer = Buffer.from(data.base64Data, 'base64');\n await fs.writeFile(fullPath, buffer);\n\n if (data.mimetype || data.contentDisposition) {\n await fs.writeFile(\n `${fullPath}.qpqmeta.json`,\n JSON.stringify({\n mimetype: data.mimetype,\n contentDisposition: data.contentDisposition,\n }),\n );\n }\n\n return actionResult(void 0);\n } catch (error: unknown) {\n return actionResultErrorFromCaughtError(error, {\n InvalidScopeError: (error) => actionResultError(FileWriteBinaryContentsErrorTypeEnum.InvalidScope, error.message),\n EACCES: () => actionResultError(FileWriteBinaryContentsErrorTypeEnum.AccessDenied, `Access denied writing file: ${filepath}`), // node fs code\n });\n }\n };\n };\n\nexport const getFileWriteBinaryContentsActionProcessor =\n (config: FileStorageConfig): ActionProcessorListResolver =>\n async (qpqConfig: QPQConfig): Promise<ActionProcessorList> => ({\n [FileActionType.WriteBinaryContents]: getProcessFileWriteBinaryContents(config)(qpqConfig),\n });\n"]}
1
+ {"version":3,"file":"getFileWriteBinaryContentsActionProcessor.js","sourceRoot":"","sources":["../../../../src/dynamicActionProcessor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ACjH,MAAM,EAAE,GAAG,EAAE,CAAC,IAAA,mCAAiB,EAAC,4CAA0B,CAAC,SAAS,CAAC,YAAY,EAAE,+BAA+B,QAAQ,EAAE,CAAC,EAAE,eAAe;aAC/I,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAA,CAAC;AACJ,CAAC,CAAC;AAEG,MAAM,yCAAyC,GAAG,CAAC,MAAyB,EAAE,EAAE,CACrF,IAAA,uCAAqB,EAAC,4CAA0B,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,iCAAiC,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AAD5G,QAAA,yCAAyC,6CACmE","sourcesContent":["import {\n actionResult,\n actionResultError,\n actionResultErrorFromCaughtError,\n askFileWriteBinaryContents,\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\nconst getProcessFileWriteBinaryContents =\n (config: FileStorageConfig) =>\n (qpqConfig: QPQConfig): ProcessorFor<typeof askFileWriteBinaryContents> => {\n return async ({ drive, filepath, data, scope }) => {\n try {\n const fullPath = resolveFilePath(config, qpqConfig, drive, filepath, scope);\n await ensureParentDirectoryExists(fullPath);\n\n // Convert QPQBinaryData to Buffer\n const buffer = Buffer.from(data.base64Data, 'base64');\n await fs.writeFile(fullPath, buffer);\n\n if (data.mimetype || data.contentDisposition) {\n await fs.writeFile(\n `${fullPath}.qpqmeta.json`,\n JSON.stringify({\n mimetype: data.mimetype,\n contentDisposition: data.contentDisposition,\n }),\n );\n }\n\n return actionResult(void 0);\n } catch (error: unknown) {\n return actionResultErrorFromCaughtError(error, {\n InvalidScopeError: (error) => actionResultError(askFileWriteBinaryContents.errorType.InvalidScope, error.message),\n EACCES: () => actionResultError(askFileWriteBinaryContents.errorType.AccessDenied, `Access denied writing file: ${filepath}`), // node fs code\n });\n }\n };\n };\n\nexport const getFileWriteBinaryContentsActionProcessor = (config: FileStorageConfig) =>\n createActionProcessor(askFileWriteBinaryContents, (qpqConfig) => getProcessFileWriteBinaryContents(config)(qpqConfig));\n"]}
@@ -1,3 +1,2 @@
1
- import { ActionProcessorListResolver } from 'quidproquo-core';
2
1
  import { FileStorageConfig } from './types';
3
- export declare const getFileWriteObjectJsonActionProcessor: (config: FileStorageConfig) => ActionProcessorListResolver;
2
+ export declare const getFileWriteObjectJsonActionProcessor: (config: FileStorageConfig) => import("quidproquo-core").ActionProcessorListResolver;
@@ -57,16 +57,12 @@ const getProcessFileWriteObjectJson = (config) => (qpqConfig) => {
57
57
  }
58
58
  catch (error) {
59
59
  return (0, quidproquo_core_1.actionResultErrorFromCaughtError)(error, {
60
- InvalidScopeError: (error) => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.FileWriteObjectJsonErrorTypeEnum.InvalidScope, error.message),
61
- EACCES: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.FileWriteObjectJsonErrorTypeEnum.AccessDenied, `Access denied writing file: ${filepath}`), // node fs code
60
+ InvalidScopeError: (error) => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.askFileWriteObjectJsonBase.errorType.InvalidScope, error.message),
61
+ EACCES: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.askFileWriteObjectJsonBase.errorType.AccessDenied, `Access denied writing file: ${filepath}`), // node fs code
62
62
  });
63
63
  }
64
64
  });
65
65
  };
66
- const getFileWriteObjectJsonActionProcessor = (config) => (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
67
- return ({
68
- [quidproquo_core_1.FileActionType.WriteObjectJson]: getProcessFileWriteObjectJson(config)(qpqConfig),
69
- });
70
- });
66
+ const getFileWriteObjectJsonActionProcessor = (config) => (0, quidproquo_core_1.createActionProcessor)(quidproquo_core_1.askFileWriteObjectJsonBase, (qpqConfig) => getProcessFileWriteObjectJson(config)(qpqConfig));
71
67
  exports.getFileWriteObjectJsonActionProcessor = getFileWriteObjectJsonActionProcessor;
72
68
  //# sourceMappingURL=getFileWriteObjectJsonActionProcessor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getFileWriteObjectJsonActionProcessor.js","sourceRoot":"","sources":["../../../../src/dynamicActionProcessor/file/getFileWriteObjectJsonActionProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAUyB;AAEzB,gDAAkC;AAGlC,mCAAuE;AAEvE,MAAM,6BAA6B,GACjC,CAAC,MAAyB,EAAE,EAAE,CAC9B,CAAC,SAAoB,EAA2C,EAAE;IAChE,OAAO,KAAyC,EAAE,4CAApC,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE;QAC5C,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,IAAA,uBAAe,EAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC5E,MAAM,IAAA,mCAA2B,EAAC,QAAQ,CAAC,CAAC;YAC5C,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YACjD,MAAM,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;YACjD,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,kDAAgC,CAAC,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC;gBAC7G,MAAM,EAAE,GAAG,EAAE,CAAC,IAAA,mCAAiB,EAAC,kDAAgC,CAAC,YAAY,EAAE,+BAA+B,QAAQ,EAAE,CAAC,EAAE,eAAe;aAC3I,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAA,CAAC;AACJ,CAAC,CAAC;AAEG,MAAM,qCAAqC,GAChD,CAAC,MAAyB,EAA+B,EAAE,CAC3D,CAAO,SAAoB,EAAgC,EAAE;IAAC,OAAA,CAAC;QAC7D,CAAC,gCAAc,CAAC,eAAe,CAAC,EAAE,6BAA6B,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC;KACnF,CAAC,CAAA;EAAA,CAAC;AAJQ,QAAA,qCAAqC,yCAI7C","sourcesContent":["import {\n ActionProcessorList,\n ActionProcessorListResolver,\n actionResult,\n actionResultError,\n actionResultErrorFromCaughtError,\n FileActionType,\n FileWriteObjectJsonActionProcessor,\n FileWriteObjectJsonErrorTypeEnum,\n QPQConfig,\n} from 'quidproquo-core';\n\nimport * as fs from 'fs/promises';\n\nimport { FileStorageConfig } from './types';\nimport { ensureParentDirectoryExists, resolveFilePath } from './utils';\n\nconst getProcessFileWriteObjectJson =\n (config: FileStorageConfig) =>\n (qpqConfig: QPQConfig): FileWriteObjectJsonActionProcessor<any> => {\n return async ({ drive, filepath, data, scope }) => {\n try {\n const fullPath = resolveFilePath(config, qpqConfig, drive, filepath, scope);\n await ensureParentDirectoryExists(fullPath);\n const jsonString = JSON.stringify(data, null, 2);\n await fs.writeFile(fullPath, jsonString, 'utf8');\n return actionResult(void 0);\n } catch (error: unknown) {\n return actionResultErrorFromCaughtError(error, {\n InvalidScopeError: (error) => actionResultError(FileWriteObjectJsonErrorTypeEnum.InvalidScope, error.message),\n EACCES: () => actionResultError(FileWriteObjectJsonErrorTypeEnum.AccessDenied, `Access denied writing file: ${filepath}`), // node fs code\n });\n }\n };\n };\n\nexport const getFileWriteObjectJsonActionProcessor =\n (config: FileStorageConfig): ActionProcessorListResolver =>\n async (qpqConfig: QPQConfig): Promise<ActionProcessorList> => ({\n [FileActionType.WriteObjectJson]: getProcessFileWriteObjectJson(config)(qpqConfig),\n });\n"]}
1
+ {"version":3,"file":"getFileWrite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AG,CAAC,MAAyB,EAAE,EAAE,CACjF,IAAA,uCAAqB,EAAC,4CAA0B,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,6BAA6B,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AADxG,QAAA,qCAAqC,yCACmE","sourcesContent":["import {\n actionResult,\n actionResultError,\n actionResultErrorFromCaughtError,\n askFileWriteObjectJsonBase,\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\nconst getProcessFileWriteObjectJson =\n (config: FileStorageConfig) =>\n (qpqConfig: QPQConfig): ProcessorFor<typeof askFileWriteObjectJsonBase> => {\n return async ({ drive, filepath, data, scope }) => {\n try {\n const fullPath = resolveFilePath(config, qpqConfig, drive, filepath, scope);\n await ensureParentDirectoryExists(fullPath);\n const jsonString = JSON.stringify(data, null, 2);\n await fs.writeFile(fullPath, jsonString, 'utf8');\n return actionResult(void 0);\n } catch (error: unknown) {\n return actionResultErrorFromCaughtError(error, {\n InvalidScopeError: (error) => actionResultError(askFileWriteObjectJsonBase.errorType.InvalidScope, error.message),\n EACCES: () => actionResultError(askFileWriteObjectJsonBase.errorType.AccessDenied, `Access denied writing file: ${filepath}`), // node fs code\n });\n }\n };\n };\n\nexport const getFileWriteObjectJsonActionProcessor = (config: FileStorageConfig) =>\n createActionProcessor(askFileWriteObjectJsonBase, (qpqConfig) => getProcessFileWriteObjectJson(config)(qpqConfig));\n"]}
@@ -1,3 +1,2 @@
1
- import { ActionProcessorListResolver } from 'quidproquo-core';
2
1
  import { FileStorageConfig } from './types';
3
- export declare const getFileWriteTextContentsActionProcessor: (config: FileStorageConfig) => ActionProcessorListResolver;
2
+ export declare const getFileWriteTextContentsActionProcessor: (config: FileStorageConfig) => import("quidproquo-core").ActionProcessorListResolver;
@@ -56,16 +56,12 @@ const getProcessFileWriteTextContents = (qpqConfig, config) => {
56
56
  }
57
57
  catch (error) {
58
58
  return (0, quidproquo_core_1.actionResultErrorFromCaughtError)(error, {
59
- InvalidScopeError: (error) => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.FileWriteTextContentsErrorTypeEnum.InvalidScope, error.message),
60
- EACCES: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.FileWriteTextContentsErrorTypeEnum.AccessDenied, `Access denied writing file: ${filepath}`), // node fs code
59
+ InvalidScopeError: (error) => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.askFileWriteTextContents.errorType.InvalidScope, error.message),
60
+ EACCES: () => (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.askFileWriteTextContents.errorType.AccessDenied, `Access denied writing file: ${filepath}`), // node fs code
61
61
  });
62
62
  }
63
63
  });
64
64
  };
65
- const getFileWriteTextContentsActionProcessor = (config) => (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
66
- return ({
67
- [quidproquo_core_1.FileActionType.WriteTextContents]: getProcessFileWriteTextContents(qpqConfig, config),
68
- });
69
- });
65
+ const getFileWriteTextContentsActionProcessor = (config) => (0, quidproquo_core_1.createActionProcessor)(quidproquo_core_1.askFileWriteTextContents, (qpqConfig) => getProcessFileWriteTextContents(qpqConfig, config));
70
66
  exports.getFileWriteTextContentsActionProcessor = getFileWriteTextContentsActionProcessor;
71
67
  //# sourceMappingURL=getFileWriteTextContentsActionProcessor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getFileWriteTextContentsActionProcessor.js","sourceRoot":"","sources":["../../../../src/dynamicActionProcessor/file/getFileWriteTextContentsActionProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAUyB;AAEzB,gDAAkC;AAGlC,mCAAuE;AAEvE,MAAM,+BAA+B,GAAG,CAAC,SAAoB,EAAE,MAAyB,EAAwC,EAAE;IAChI,OAAO,KAAyC,EAAE,4CAApC,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE;QAC5C,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,IAAA,uBAAe,EAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC5E,MAAM,IAAA,mCAA2B,EAAC,QAAQ,CAAC,CAAC;YAC5C,MAAM,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;YAC3C,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,oDAAkC,CAAC,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC;gBAC/G,MAAM,EAAE,GAAG,EAAE,CAAC,IAAA,mCAAiB,EAAC,oDAAkC,CAAC,YAAY,EAAE,+BAA+B,QAAQ,EAAE,CAAC,EAAE,eAAe;aAC7I,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAA,CAAC;AACJ,CAAC,CAAC;AAEK,MAAM,uCAAuC,GAClD,CAAC,MAAyB,EAA+B,EAAE,CAC3D,CAAO,SAAoB,EAAgC,EAAE;IAAC,OAAA,CAAC;QAC7D,CAAC,gCAAc,CAAC,iBAAiB,CAAC,EAAE,+BAA+B,CAAC,SAAS,EAAE,MAAM,CAAC;KACvF,CAAC,CAAA;EAAA,CAAC;AAJQ,QAAA,uCAAuC,2CAI/C","sourcesContent":["import {\n ActionProcessorList,\n ActionProcessorListResolver,\n actionResult,\n actionResultError,\n actionResultErrorFromCaughtError,\n FileActionType,\n FileWriteTextContentsActionProcessor,\n FileWriteTextContentsErrorTypeEnum,\n QPQConfig,\n} from 'quidproquo-core';\n\nimport * as fs from 'fs/promises';\n\nimport { FileStorageConfig } from './types';\nimport { ensureParentDirectoryExists, resolveFilePath } from './utils';\n\nconst getProcessFileWriteTextContents = (qpqConfig: QPQConfig, config: FileStorageConfig): FileWriteTextContentsActionProcessor => {\n return async ({ drive, filepath, data, scope }) => {\n try {\n const fullPath = resolveFilePath(config, qpqConfig, drive, filepath, scope);\n await ensureParentDirectoryExists(fullPath);\n await fs.writeFile(fullPath, data, 'utf8');\n return actionResult(void 0);\n } catch (error: unknown) {\n return actionResultErrorFromCaughtError(error, {\n InvalidScopeError: (error) => actionResultError(FileWriteTextContentsErrorTypeEnum.InvalidScope, error.message),\n EACCES: () => actionResultError(FileWriteTextContentsErrorTypeEnum.AccessDenied, `Access denied writing file: ${filepath}`), // node fs code\n });\n }\n };\n};\n\nexport const getFileWriteTextContentsActionProcessor =\n (config: FileStorageConfig): ActionProcessorListResolver =>\n async (qpqConfig: QPQConfig): Promise<ActionProcessorList> => ({\n [FileActionType.WriteTextContents]: getProcessFileWriteTextContents(qpqConfig, config),\n });\n"]}
1
+ {"version":3,"file":"getFileWriteTextContentsActionProcessor.js","sourceRoot":"","sources":["../../../../src/dynamicActionProcessor/file/getFileWriteTextContentsActionProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDASyB;AAEzB,gDAAkC;AAGlC,mCAAuE;AAEvE,MAAM,+BAA+B,GAAG,CAAC,SAAoB,EAAE,MAAyB,EAAiD,EAAE;IACzI,OAAO,KAAyC,EAAE,4CAApC,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE;QAC5C,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,IAAA,uBAAe,EAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC5E,MAAM,IAAA,mCAA2B,EAAC,QAAQ,CAAC,CAAC;YAC5C,MAAM,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;YAC3C,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,0CAAwB,CAAC,SAAS,CAAC,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC;gBAC/G,MAAM,EAAE,GAAG,EAAE,CAAC,IAAA,mCAAiB,EAAC,0CAAwB,CAAC,SAAS,CAAC,YAAY,EAAE,+BAA+B,QAAQ,EAAE,CAAC,EAAE,eAAe;aAC7I,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAA,CAAC;AACJ,CAAC,CAAC;AAEK,MAAM,uCAAuC,GAAG,CAAC,MAAyB,EAAE,EAAE,CACnF,IAAA,uCAAqB,EAAC,0CAAwB,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,+BAA+B,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;AADxG,QAAA,uCAAuC,2CACiE","sourcesContent":["import {\n actionResult,\n actionResultError,\n actionResultErrorFromCaughtError,\n askFileWriteTextContents,\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\nconst getProcessFileWriteTextContents = (qpqConfig: QPQConfig, config: FileStorageConfig): ProcessorFor<typeof askFileWriteTextContents> => {\n return async ({ drive, filepath, data, scope }) => {\n try {\n const fullPath = resolveFilePath(config, qpqConfig, drive, filepath, scope);\n await ensureParentDirectoryExists(fullPath);\n await fs.writeFile(fullPath, data, 'utf8');\n return actionResult(void 0);\n } catch (error: unknown) {\n return actionResultErrorFromCaughtError(error, {\n InvalidScopeError: (error) => actionResultError(askFileWriteTextContents.errorType.InvalidScope, error.message),\n EACCES: () => actionResultError(askFileWriteTextContents.errorType.AccessDenied, `Access denied writing file: ${filepath}`), // node fs code\n });\n }\n };\n};\n\nexport const getFileWriteTextContentsActionProcessor = (config: FileStorageConfig) =>\n createActionProcessor(askFileWriteTextContents, (qpqConfig) => getProcessFileWriteTextContents(qpqConfig, config));\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"getSystemTraceStoryActionProcessor.js","sourceRoot":"","sources":["../../../src/traceStoryExecution/getSystemTraceStoryActionProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAeyB;AAEzB,+DAA4D;AAS5D,qFAAqF;AACrF,wFAAwF;AACxF,yFAAyF;AACzF,yFAAyF;AACzF,MAAM,oBAAoB,GAAG,CAC3B,SAAoB,EACpB,qBAA+B,EAC/B,qBAA8C,EACb,EAAE;IACnC,OAAO,CACL,OAAsC,EACtC,OAAqB,EACrB,gBAAqC,EACrC,MAAiB,EACjB,aAAkC,EAClC,mBAAwC,EACxC,EAAE;QACF,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;QAE7D,IAAI,CAAC,WAAW,CAAC,sBAAsB,EAAE,CAAC;YACxC,OAAO,IAAA,mCAAiB,EACtB,+BAAa,CAAC,UAAU,EACxB,UAAU,WAAW,CAAC,WAAW,mEAAmE,CACrG,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,mBAAmB,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;QAC5E,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,IAAA,mCAAiB,EAAC,+BAAa,CAAC,QAAQ,EAAE,yCAAyC,WAAW,CAAC,WAAW,GAAG,CAAC,CAAC;QACxH,CAAC;QAED,IAAI,CAAC;YACH,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAA,yCAAmB,EAAC,WAAW,EAAE,KAAK,EAAE;gBAC9D,cAAc,EAAE,CAAC,GAAG,qBAAqB,EAAE,GAAG,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC;gBACrE,WAAW;gBACX,cAAc,EAAE,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAG,WAAW,CAAC,sBAAsB,EAAE,SAAS,CAAC;aACvF,CAAC,CAAC;YAEH,OAAO,IAAA,8BAAY,EAAC,KAAK,CAAC,CAAC;QAC7B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAA,mCAAiB,EAAC,+BAAa,CAAC,YAAY,EAAE,qBAAqB,WAAW,CAAC,WAAW,MAAO,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC;QACrI,CAAC;IACH,CAAC,CAAA,CAAC;AACJ,CAAC,CAAC;AAEK,MAAM,kCAAkC,GAC7C,CAAC,wBAAkC,EAAE,EAAE,qBAA8C,EAA+B,EAAE,CACtH,CAAO,SAAoB,EAAgC,EAAE;IAAC,OAAA,CAAC;QAC7D,CAAC,kCAAgB,CAAC,UAAU,CAAC,EAAE,oBAAoB,CAAC,SAAS,EAAE,qBAAqB,EAAE,qBAAqB,CAAC;KAC7G,CAAC,CAAA;EAAA,CAAC;AAJQ,QAAA,kCAAkC,sCAI1C","sourcesContent":["import {\n ActionProcessorList,\n ActionProcessorListResolver,\n actionResult,\n actionResultError,\n DynamicModuleLoader,\n ErrorTypeEnum,\n QPQConfig,\n QpqFunctionRuntime,\n QpqLogger,\n StorySession,\n StorySessionUpdater,\n SystemActionType,\n SystemTraceStoryActionPayload,\n SystemTraceStoryActionProcessor,\n} from 'quidproquo-core';\n\nimport { traceStoryExecution } from './traceStoryExecution';\n\n// Resolves extra own-code markers (see resolveSourceMaps.filterOwnCodeLocations) for the\n// story being traced. Opt-in: lambda's federated remotes stay on the plain \"not\n// node_modules\" heuristic that already works for them; hosts whose bundle layout defeats\n// that heuristic (the dev server bundles every hosted service plus the whole framework\n// into one script) pass a resolver to narrow onlyOwnCode to the traced service.\nexport type OwnCodeMarkersResolver = (qpqFunctionRuntimeInfo: QpqFunctionRuntime | undefined, qpqConfig: QPQConfig) => string[] | undefined;\n\n// Shared System::TraceStory processor for node runtimes (lambda and the dev server).\n// Loads the recorded story's real code through the runtime's dynamicModuleLoader (which\n// federates on lambda), then replays it under the tracer. defaultScriptPatterns lets the\n// host add environment-specific scripts to trace (e.g. the lambda federated code cache).\nconst getProcessTraceStory = (\n qpqConfig: QPQConfig,\n defaultScriptPatterns: string[],\n resolveOwnCodeMarkers?: OwnCodeMarkersResolver,\n): SystemTraceStoryActionProcessor => {\n return async (\n payload: SystemTraceStoryActionPayload,\n session: StorySession,\n actionProcessors: ActionProcessorList,\n logger: QpqLogger,\n updateSession: StorySessionUpdater,\n dynamicModuleLoader: DynamicModuleLoader,\n ) => {\n const { storyResult, scriptPatterns, onlyOwnCode } = payload;\n\n if (!storyResult.qpqFunctionRuntimeInfo) {\n return actionResultError(\n ErrorTypeEnum.BadRequest,\n `Story [${storyResult.correlation}] has no qpqFunctionRuntimeInfo - cannot locate its code to trace`,\n );\n }\n\n const story = await dynamicModuleLoader(storyResult.qpqFunctionRuntimeInfo);\n if (!story) {\n return actionResultError(ErrorTypeEnum.NotFound, `Unable to dynamically load story for [${storyResult.correlation}]`);\n }\n\n try {\n const { trace } = await traceStoryExecution(storyResult, story, {\n scriptPatterns: [...defaultScriptPatterns, ...(scriptPatterns || [])],\n onlyOwnCode,\n ownCodeMarkers: resolveOwnCodeMarkers?.(storyResult.qpqFunctionRuntimeInfo, qpqConfig),\n });\n\n return actionResult(trace);\n } catch (error) {\n return actionResultError(ErrorTypeEnum.GenericError, `Trace failed for [${storyResult.correlation}]: ${(error as Error).message}`);\n }\n };\n};\n\nexport const getSystemTraceStoryActionProcessor =\n (defaultScriptPatterns: string[] = [], resolveOwnCodeMarkers?: OwnCodeMarkersResolver): ActionProcessorListResolver =>\n async (qpqConfig: QPQConfig): Promise<ActionProcessorList> => ({\n [SystemActionType.TraceStory]: getProcessTraceStory(qpqConfig, defaultScriptPatterns, resolveOwnCodeMarkers),\n });\n"]}
1
+ {"version":3,"file":"getSystemTraceStoryActionProcessor.js","sourceRoot":"","sources":["../../../src/traceStoryExecution/getSystemTraceStoryActionProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAiByB;AAEzB,+DAA4D;AAS5D,qFAAqF;AACrF,wFAAwF;AACxF,yFAAyF;AACzF,yFAAyF;AACzF,MAAM,oBAAoB,GAAG,CAC3B,SAAoB,EACpB,qBAA+B,EAC/B,qBAA8C,EACV,EAAE;IACtC,OAAO,CACL,OAAsC,EACtC,OAAqB,EACrB,gBAAqC,EACrC,MAAiB,EACjB,aAAkC,EAClC,mBAAwC,EACxC,EAAE;QACF,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;QAE7D,IAAI,CAAC,WAAW,CAAC,sBAAsB,EAAE,CAAC;YACxC,OAAO,IAAA,mCAAiB,EACtB,+BAAa,CAAC,UAAU,EACxB,UAAU,WAAW,CAAC,WAAW,mEAAmE,CACrG,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,mBAAmB,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;QAC5E,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,IAAA,mCAAiB,EAAC,+BAAa,CAAC,QAAQ,EAAE,yCAAyC,WAAW,CAAC,WAAW,GAAG,CAAC,CAAC;QACxH,CAAC;QAED,IAAI,CAAC;YACH,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAA,yCAAmB,EAAC,WAAW,EAAE,KAAK,EAAE;gBAC9D,cAAc,EAAE,CAAC,GAAG,qBAAqB,EAAE,GAAG,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC;gBACrE,WAAW;gBACX,cAAc,EAAE,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAG,WAAW,CAAC,sBAAsB,EAAE,SAAS,CAAC;aACvF,CAAC,CAAC;YAEH,OAAO,IAAA,8BAAY,EAAC,KAAK,CAAC,CAAC;QAC7B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAA,mCAAiB,EAAC,+BAAa,CAAC,YAAY,EAAE,qBAAqB,WAAW,CAAC,WAAW,MAAO,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC;QACrI,CAAC;IACH,CAAC,CAAA,CAAC;AACJ,CAAC,CAAC;AAEK,MAAM,kCAAkC,GAC7C,CAAC,wBAAkC,EAAE,EAAE,qBAA8C,EAA+B,EAAE,CACtH,CAAO,SAAoB,EAAgC,EAAE;IAAC,OAAA,CAAC;QAC7D,CAAC,kCAAgB,CAAC,UAAU,CAAC,EAAE,oBAAoB,CAAC,SAAS,EAAE,qBAAqB,EAAE,qBAAqB,CAAC;KAC7G,CAAC,CAAA;EAAA,CAAC;AAJQ,QAAA,kCAAkC,sCAI1C","sourcesContent":["import {\n ActionProcessorList,\n ActionProcessorListResolver,\n actionResult,\n actionResultError,\n askTraceStory,\n createActionProcessor,\n DynamicModuleLoader,\n ErrorTypeEnum,\n ProcessorFor,\n QPQConfig,\n QpqFunctionRuntime,\n QpqLogger,\n StorySession,\n StorySessionUpdater,\n SystemActionType,\n SystemTraceStoryActionPayload,\n} from 'quidproquo-core';\n\nimport { traceStoryExecution } from './traceStoryExecution';\n\n// Resolves extra own-code markers (see resolveSourceMaps.filterOwnCodeLocations) for the\n// story being traced. Opt-in: lambda's federated remotes stay on the plain \"not\n// node_modules\" heuristic that already works for them; hosts whose bundle layout defeats\n// that heuristic (the dev server bundles every hosted service plus the whole framework\n// into one script) pass a resolver to narrow onlyOwnCode to the traced service.\nexport type OwnCodeMarkersResolver = (qpqFunctionRuntimeInfo: QpqFunctionRuntime | undefined, qpqConfig: QPQConfig) => string[] | undefined;\n\n// Shared System::TraceStory processor for node runtimes (lambda and the dev server).\n// Loads the recorded story's real code through the runtime's dynamicModuleLoader (which\n// federates on lambda), then replays it under the tracer. defaultScriptPatterns lets the\n// host add environment-specific scripts to trace (e.g. the lambda federated code cache).\nconst getProcessTraceStory = (\n qpqConfig: QPQConfig,\n defaultScriptPatterns: string[],\n resolveOwnCodeMarkers?: OwnCodeMarkersResolver,\n): ProcessorFor<typeof askTraceStory> => {\n return async (\n payload: SystemTraceStoryActionPayload,\n session: StorySession,\n actionProcessors: ActionProcessorList,\n logger: QpqLogger,\n updateSession: StorySessionUpdater,\n dynamicModuleLoader: DynamicModuleLoader,\n ) => {\n const { storyResult, scriptPatterns, onlyOwnCode } = payload;\n\n if (!storyResult.qpqFunctionRuntimeInfo) {\n return actionResultError(\n ErrorTypeEnum.BadRequest,\n `Story [${storyResult.correlation}] has no qpqFunctionRuntimeInfo - cannot locate its code to trace`,\n );\n }\n\n const story = await dynamicModuleLoader(storyResult.qpqFunctionRuntimeInfo);\n if (!story) {\n return actionResultError(ErrorTypeEnum.NotFound, `Unable to dynamically load story for [${storyResult.correlation}]`);\n }\n\n try {\n const { trace } = await traceStoryExecution(storyResult, story, {\n scriptPatterns: [...defaultScriptPatterns, ...(scriptPatterns || [])],\n onlyOwnCode,\n ownCodeMarkers: resolveOwnCodeMarkers?.(storyResult.qpqFunctionRuntimeInfo, qpqConfig),\n });\n\n return actionResult(trace);\n } catch (error) {\n return actionResultError(ErrorTypeEnum.GenericError, `Trace failed for [${storyResult.correlation}]: ${(error as Error).message}`);\n }\n };\n};\n\nexport const getSystemTraceStoryActionProcessor =\n (defaultScriptPatterns: string[] = [], resolveOwnCodeMarkers?: OwnCodeMarkersResolver): ActionProcessorListResolver =>\n async (qpqConfig: QPQConfig): Promise<ActionProcessorList> => ({\n [SystemActionType.TraceStory]: getProcessTraceStory(qpqConfig, defaultScriptPatterns, resolveOwnCodeMarkers),\n });\n"]}
@@ -1,2 +1 @@
1
- import { ActionProcessorListResolver } from 'quidproquo-core';
2
- export declare const getDynamicFunctionsExecuteActionProcessor: ActionProcessorListResolver;
1
+ export declare const getDynamicFunctionsExecuteActionProcessor: import("quidproquo-core").ActionProcessorListResolver;
@@ -1,4 +1,4 @@
1
- import { actionResult, actionResultError, createRuntime, DynamicFunctionsActionType, DynamicFunctionsExecuteErrorTypeEnum, qpqCoreUtils, QpqRuntimeType, } from 'quidproquo-core';
1
+ import { actionResult, actionResultError, askDynamicFunctionExecuteBase, createActionProcessor, createRuntime, DynamicFunctionsExecuteErrorTypeEnum, qpqCoreUtils, QpqRuntimeType, } from 'quidproquo-core';
2
2
  import { randomUUID } from 'crypto';
3
3
  const getDateNow = () => new Date().toISOString();
4
4
  // The member execution contract: a member returning an iterable iterator (a sync
@@ -64,7 +64,5 @@ const getProcessExecute = (qpqConfig) => {
64
64
  }
65
65
  };
66
66
  };
67
- export const getDynamicFunctionsExecuteActionProcessor = async (qpqConfig) => ({
68
- [DynamicFunctionsActionType.Execute]: getProcessExecute(qpqConfig),
69
- });
67
+ export const getDynamicFunctionsExecuteActionProcessor = createActionProcessor(askDynamicFunctionExecuteBase, getProcessExecute);
70
68
  //# sourceMappingURL=getDynamicFunctionsExecuteActionProcessor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getDynamicFunctionsExecuteActionProcessor.js","sourceRoot":"","sources":["../../../../../src/actionProcessor/core/dynamicFunctions/getDynamicFunctionsExecuteActionProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EACZ,iBAAiB,EAEjB,aAAa,EACb,0BAA0B,EAG1B,oCAAoC,EAIpC,YAAY,EAEZ,cAAc,GAIf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AAElD,iFAAiF;AACjF,+EAA+E;AAC/E,iFAAiF;AACjF,MAAM,eAAe,GAAG,CAAC,KAAc,EAAiC,EAAE;IACxE,MAAM,SAAS,GAAG,KAAkE,CAAC;IAErF,OAAO,OAAO,SAAS,EAAE,IAAI,KAAK,UA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AAc,CACf,CAAC;YAEF,4EAA4E;YAC5E,sEAAsE;YACtE,MAAM,WAAW,GAAG,MAAM,YAAY,CAAC,GAAG,EAAE,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;YAEnE,IAAI,WAAW,CAAC,KAAK,EAAE,CAAC;gBACtB,OAAO,iBAAiB,CACtB,WAAW,CAAC,KAAK,CAAC,SAAS,EAC3B,WAAW,CAAC,KAAK,CAAC,SAAS,EAC3B,WAAW,CAAC,KAAK,CAAC,UAAU;oBAC1B,CAAC,CAAC,GAAG,OAAO,CAAC,oBAAoB,IAAI,OAAO,CAAC,YAAY,QAAQ,WAAW,CAAC,KAAK,CAAC,UAAU,GAAG;oBAChG,CAAC,CAAC,GAAG,OAAO,CAAC,oBAAoB,IAAI,OAAO,CAAC,YAAY,EAAE,CAC9D,CAAC;YACJ,CAAC;YAED,OAAO,YAAY,CAAI,WAAW,CAAC,MAAM,CAAC,CAAC;QAC7C,CAAC;QAED,IAAI,CAAC;YACH,OAAO,YAAY,CAAI,CAAC,MAAM,gBAAgB,CAAM,CAAC,CAAC;QACxD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,iBAAiB,CACtB,oCAAoC,CAAC,aAAa,EAClD,IAAI,OAAO,CAAC,oBAAoB,IAAI,OAAO,CAAC,YAAY,YAAY,eAAe,CAAC,KAAK,CAAC,EAAE,CAC7F,CAAC;QACJ,CAAC;IACH,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,yCAAyC,GAAgC,KAAK,EAAE,SAAoB,EAAgC,EAAE,CAAC,CAAC;IACnJ,CAAC,0BAA0B,CAAC,OAAO,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC;CACnE,CAAC,CAAC","sourcesContent":["import {\n ActionProcessorList,\n ActionProcessorListResolver,\n actionResult,\n actionResultError,\n AskResponse,\n createRuntime,\n DynamicFunctionsActionType,\n DynamicFunctionsExecuteActionPayload,\n DynamicFunctionsExecuteActionProcessor,\n DynamicFunctionsExecuteErrorTypeEnum,\n DynamicModuleLoader,\n Nullable,\n QPQConfig,\n qpqCoreUtils,\n QpqLogger,\n QpqRuntimeType,\n StorySession,\n StorySessionUpdater,\n StreamRegistry,\n} from 'quidproquo-core';\n\nimport { randomUUID } from 'crypto';\n\nconst getDateNow = () => new Date().toISOString();\n\n// The member execution contract: a member returning an iterable iterator (a sync\n// generator - the shape of every qpq story) is driven through the runtime as a\n// logged sub-story; anything else is a plain result, awaited if it is a promise.\nconst isStoryIterator = (value: unknown): value is AskResponse<unknown> => {\n const candidate = value as Nullable<{ next?: unknown; [Symbol.iterator]?: unknown }>;\n\n return typeof candidate?.next === 'function' && typeof candidate?.[Symbol.iterator] === 'function';\n};\n\nconst getErrorMessage = (error: unknown): string => (error instanceof Error ? error.message : String(error));\n\nconst getProcessExecute = <R>(qpqConfig: QPQConfig): DynamicFunctionsExecuteActionProcessor<R> => {\n const moduleName = qpqCoreUtils.getApplicationModuleName(qpqConfig);\n\n return async (\n payload: DynamicFunctionsExecuteActionPayload,\n session: StorySession,\n actionProcessors: ActionProcessorList,\n logger: QpqLogger,\n updateSession: StorySessionUpdater,\n dynamicModuleLoader: DynamicModuleLoader,\n streamRegistry: StreamRegistry,\n ): Promise<any> => {\n const dynamicFunctions = qpqCoreUtils.getAllDynamicFunctions(qpqConfig);\n const dynamicFunctionsSetting = dynamicFunctions.find((f) => f.dynamicFunctionsName === payload.dynamicFunctionsName);\n\n if (!dynamicFunctionsSetting) {\n return actionResultError(\n DynamicFunctionsExecuteErrorTypeEnum.DynamicFunctionsNotFound,\n `Dynamic functions not found: [${payload.dynamicFunctionsName}]`,\n );\n }\n\n const functionsObject = await dynamicModuleLoader(dynamicFunctionsSetting.runtime);\n\n if (!functionsObject) {\n return actionResultError(\n DynamicFunctionsExecuteErrorTypeEnum.ModuleLoadFailed,\n `Unable to dynamically load dynamic functions: [${payload.dynamicFunctionsName}]`,\n );\n }\n\n // Own enumerable function properties only - the registered object IS the callable\n // surface, nothing is reachable through its prototype.\n const members = functionsObject as Record<string, unknown>;\n const member = Object.prototype.hasOwnProperty.call(members, payload.functionName) ? members[payload.functionName] : undefined;\n\n if (typeof member !== 'function') {\n return actionResultError(\n DynamicFunctionsExecuteErrorTypeEnum.FunctionNotFound,\n `Function not found: [${payload.dynamicFunctionsName}.${payload.functionName}]`,\n );\n }\n\n let invocationResult: unknown;\n try {\n invocationResult = member(...payload.args);\n } catch (error) {\n return actionResultError(\n DynamicFunctionsExecuteErrorTypeEnum.FunctionThrew,\n `[${payload.dynamicFunctionsName}.${payload.functionName}] threw: ${getErrorMessage(error)}`,\n );\n }\n\n if (isStoryIterator(invocationResult)) {\n const resolveStory = createRuntime(\n qpqConfig,\n {\n context: session.context,\n localContext: session.localContext,\n depth: (session.depth || 0) + 1,\n decodedAccessToken: session.decodedAccessToken,\n correlation: session.correlation,\n // Dynamic function members run WITHIN the caller's function - carry its\n // globals so stories can read route config (same rule as inline functions).\n functionGlobals: session.functionGlobals,\n },\n async () => actionProcessors,\n getDateNow,\n logger,\n `${moduleName}::${randomUUID()}`,\n QpqRuntimeType.EXECUTE_STORY,\n dynamicModuleLoader,\n dynamicFunctionsSetting.runtime,\n [],\n streamRegistry,\n );\n\n // The member was already invoked to discover it is a story; the thunk hands\n // the live iterator to the runtime without invoking it a second time.\n const storyResult = await resolveStory(() => invocationResult, []);\n\n if (storyResult.error) {\n return actionResultError(\n storyResult.error.errorType,\n storyResult.error.errorText,\n storyResult.error.errorStack\n ? `${payload.dynamicFunctionsName}.${payload.functionName} -> [${storyResult.error.errorStack}]`\n : `${payload.dynamicFunctionsName}.${payload.functionName}`,\n );\n }\n\n return actionResult<R>(storyResult.result);\n }\n\n try {\n return actionResult<R>((await invocationResult) as R);\n } catch (error) {\n return actionResultError(\n DynamicFunctionsExecuteErrorTypeEnum.FunctionThrew,\n `[${payload.dynamicFunctionsName}.${payload.functionName}] threw: ${getErrorMessage(error)}`,\n );\n }\n };\n};\n\nexport const getDynamicFunctionsExecuteActionProcessor: ActionProcessorListResolver = async (qpqConfig: QPQConfig): Promise<ActionProcessorList> => ({\n [DynamicFunctionsActionType.Execute]: getProcessExecute(qpqConfig),\n});\n"]}
1
+ {"version":3,"file":"getDynamicFunctionsExecuteActionProcessor.js","sourceRoot":"","sources":["../../../../../src/actionProcessor/core/dynamicFunctions/getDynamicFunctionsExecuteActionProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EACZ,iBAAiB,EACjB,6BAA6B,EAE7B,qBAAqB,EACrB,aAAa,EAGb,oCAAoC,EAKpC,YAAY,EAEZ,cAAc,GAIf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AAElD,iFAAiF;AACjF,+EAA+E;AAC/E,iFAAiF;AACjF,MAAM,eAAe,GAAG,CAAC,KAAc,EAAiC,EAAE;IACxE,MAAM,SAAS,GAAG,KAAkE,CAAC;IAErF,OAAO,OAAO,SAAS,EAAE,IAAI,KAAK,UAAU,IAAI,OAAO,SAAS,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,UAAU,CAAC;AACrG,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,KAAc,EAAU,EAAE,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AAE7G,MAAM,iBAAiB,GAAG,CAAI,SAAoB,EAAsD,EAAE;IACxG,MAAM,UAAU,GAAG,YAAY,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC;IAEpE,OAAO,KAAK,EACV,OAA6C,EAC7C,OAAqB,EACrB,gBAAqC,EACrC,MAAiB,EACjB,aAAkC,EAClC,mBAAwC,EACxC,cAA8B,EAChB,EAAE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AAC;YACJ,CAAC;YAED,OAAO,YAAY,CAAI,WAAW,CAAC,MAAM,CAAC,CAAC;QAC7C,CAAC;QAED,IAAI,CAAC;YACH,OAAO,YAAY,CAAI,CAAC,MAAM,gBAAgB,CAAM,CAAC,CAAC;QACxD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,iBAAiB,CACtB,oCAAoC,CAAC,aAAa,EAClD,IAAI,OAAO,CAAC,oBAAoB,IAAI,OAAO,CAAC,YAAY,YAAY,eAAe,CAAC,KAAK,CAAC,EAAE,CAC7F,CAAC;QACJ,CAAC;IACH,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,yCAAyC,GAAG,qBAAqB,CAAC,6BAA6B,EAAE,iBAAiB,CAAC,CAAC","sourcesContent":["import {\n ActionProcessorList,\n actionResult,\n actionResultError,\n askDynamicFunctionExecuteBase,\n AskResponse,\n createActionProcessor,\n createRuntime,\n DynamicFunctionsActionType,\n DynamicFunctionsExecuteActionPayload,\n DynamicFunctionsExecuteErrorTypeEnum,\n DynamicModuleLoader,\n Nullable,\n ProcessorFor,\n QPQConfig,\n qpqCoreUtils,\n QpqLogger,\n QpqRuntimeType,\n StorySession,\n StorySessionUpdater,\n StreamRegistry,\n} from 'quidproquo-core';\n\nimport { randomUUID } from 'crypto';\n\nconst getDateNow = () => new Date().toISOString();\n\n// The member execution contract: a member returning an iterable iterator (a sync\n// generator - the shape of every qpq story) is driven through the runtime as a\n// logged sub-story; anything else is a plain result, awaited if it is a promise.\nconst isStoryIterator = (value: unknown): value is AskResponse<unknown> => {\n const candidate = value as Nullable<{ next?: unknown; [Symbol.iterator]?: unknown }>;\n\n return typeof candidate?.next === 'function' && typeof candidate?.[Symbol.iterator] === 'function';\n};\n\nconst getErrorMessage = (error: unknown): string => (error instanceof Error ? error.message : String(error));\n\nconst getProcessExecute = <R>(qpqConfig: QPQConfig): ProcessorFor<typeof askDynamicFunctionExecuteBase> => {\n const moduleName = qpqCoreUtils.getApplicationModuleName(qpqConfig);\n\n return async (\n payload: DynamicFunctionsExecuteActionPayload,\n session: StorySession,\n actionProcessors: ActionProcessorList,\n logger: QpqLogger,\n updateSession: StorySessionUpdater,\n dynamicModuleLoader: DynamicModuleLoader,\n streamRegistry: StreamRegistry,\n ): Promise<any> => {\n const dynamicFunctions = qpqCoreUtils.getAllDynamicFunctions(qpqConfig);\n const dynamicFunctionsSetting = dynamicFunctions.find((f) => f.dynamicFunctionsName === payload.dynamicFunctionsName);\n\n if (!dynamicFunctionsSetting) {\n return actionResultError(\n DynamicFunctionsExecuteErrorTypeEnum.DynamicFunctionsNotFound,\n `Dynamic functions not found: [${payload.dynamicFunctionsName}]`,\n );\n }\n\n const functionsObject = await dynamicModuleLoader(dynamicFunctionsSetting.runtime);\n\n if (!functionsObject) {\n return actionResultError(\n DynamicFunctionsExecuteErrorTypeEnum.ModuleLoadFailed,\n `Unable to dynamically load dynamic functions: [${payload.dynamicFunctionsName}]`,\n );\n }\n\n // Own enumerable function properties only - the registered object IS the callable\n // surface, nothing is reachable through its prototype.\n const members = functionsObject as Record<string, unknown>;\n const member = Object.prototype.hasOwnProperty.call(members, payload.functionName) ? members[payload.functionName] : undefined;\n\n if (typeof member !== 'function') {\n return actionResultError(\n DynamicFunctionsExecuteErrorTypeEnum.FunctionNotFound,\n `Function not found: [${payload.dynamicFunctionsName}.${payload.functionName}]`,\n );\n }\n\n let invocationResult: unknown;\n try {\n invocationResult = member(...payload.args);\n } catch (error) {\n return actionResultError(\n DynamicFunctionsExecuteErrorTypeEnum.FunctionThrew,\n `[${payload.dynamicFunctionsName}.${payload.functionName}] threw: ${getErrorMessage(error)}`,\n );\n }\n\n if (isStoryIterator(invocationResult)) {\n const resolveStory = createRuntime(\n qpqConfig,\n {\n context: session.context,\n localContext: session.localContext,\n depth: (session.depth || 0) + 1,\n decodedAccessToken: session.decodedAccessToken,\n correlation: session.correlation,\n // Dynamic function members run WITHIN the caller's function - carry its\n // globals so stories can read route config (same rule as inline functions).\n functionGlobals: session.functionGlobals,\n },\n async () => actionProcessors,\n getDateNow,\n logger,\n `${moduleName}::${randomUUID()}`,\n QpqRuntimeType.EXECUTE_STORY,\n dynamicModuleLoader,\n dynamicFunctionsSetting.runtime,\n [],\n streamRegistry,\n );\n\n // The member was already invoked to discover it is a story; the thunk hands\n // the live iterator to the runtime without invoking it a second time.\n const storyResult = await resolveStory(() => invocationResult, []);\n\n if (storyResult.error) {\n return actionResultError(\n storyResult.error.errorType,\n storyResult.error.errorText,\n storyResult.error.errorStack\n ? `${payload.dynamicFunctionsName}.${payload.functionName} -> [${storyResult.error.errorStack}]`\n : `${payload.dynamicFunctionsName}.${payload.functionName}`,\n );\n }\n\n return actionResult<R>(storyResult.result);\n }\n\n try {\n return actionResult<R>((await invocationResult) as R);\n } catch (error) {\n return actionResultError(\n DynamicFunctionsExecuteErrorTypeEnum.FunctionThrew,\n `[${payload.dynamicFunctionsName}.${payload.functionName}] threw: ${getErrorMessage(error)}`,\n );\n }\n };\n};\n\nexport const getDynamicFunctionsExecuteActionProcessor = createActionProcessor(askDynamicFunctionExecuteBase, getProcessExecute);\n"]}
@@ -2,7 +2,7 @@ import { getCoreActionProcessor as getJsCoreActionProcessor } from 'quidproquo-a
2
2
  import { getDynamicFunctionsActionProcessor } from './dynamicFunctions';
3
3
  import { getInlineFunctionActionProcessor } from './inlineFunction';
4
4
  import { getStreamActionProcessor } from './stream';
5
- // The shared core processors (config, context, claudeAi, date, error, guid, log,
5
+ // The shared core processors (config, context, date, error, guid, log,
6
6
  // math, network, platform, system, customActions) are owned by
7
7
  // quidproquo-actionprocessor-js. Node builds on top of js and only adds the
8
8
  // processors that need a Node runtime (stream, inlineFunction, dynamicFunctions).
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/actionProcessor/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,IAAI,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAGnG,OAAO,EAAE,kCAAkC,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAEpD,iFAAiF;AACjF,+DAA+D;AAC/D,4EAA4E;AAC5E,kFAAkF;AAClF,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AAEzB,MAAM,CAAC,MAAM,sBAAsB,GAAgC,KAAK,EACtE,SAAoB,EACpB,mBAAwC,EACV,EAAE,CAAC,CAAC;IAClC,GAAG,CAAC,MAAM,wBAAwB,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;IACnE,GAAG,CAAC,MAAM,wBAAwB,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;IACnE,GAAG,CAAC,MAAM,gCAAgC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;IAC3E,GAAG,CAAC,MAAM,kCAAkC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;CAC9E,CAAC,CAAC","sourcesContent":["import { getCoreActionProcessor as getJsCoreActionProcessor } from 'quidproquo-actionprocessor-js';\nimport { ActionProcessorList, ActionProcessorListResolver, DynamicModuleLoader, QPQConfig } from 'quidproquo-core';\n\nimport { getDynamicFunctionsActionProcessor } from './dynamicFunctions';\nimport { getInlineFunctionActionProcessor } from './inlineFunction';\nimport { getStreamActionProcessor } from './stream';\n\n// The shared core processors (config, context, claudeAi, date, error, guid, log,\n// math, network, platform, system, customActions) are owned by\n// quidproquo-actionprocessor-js. Node builds on top of js and only adds the\n// processors that need a Node runtime (stream, inlineFunction, dynamicFunctions).\nexport * from './dynamicFunctions';\nexport * from './inlineFunction';\nexport * from './stream';\n\nexport const getCoreActionProcessor: ActionProcessorListResolver = async (\n qpqConfig: QPQConfig,\n dynamicModuleLoader: DynamicModuleLoader,\n): Promise<ActionProcessorList> => ({\n ...(await getJsCoreActionProcessor(qpqConfig, dynamicModuleLoader)),\n ...(await getStreamActionProcessor(qpqConfig, dynamicModuleLoader)),\n ...(await getInlineFunctionActionProcessor(qpqConfig, dynamicModuleLoader)),\n ...(await getDynamicFunctionsActionProcessor(qpqConfig, dynamicModuleLoader)),\n});\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/actionProcessor/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,IAAI,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAGnG,OAAO,EAAE,kCAAkC,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAEpD,uEAAuE;AACvE,+DAA+D;AAC/D,4EAA4E;AAC5E,kFAAkF;AAClF,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AAEzB,MAAM,CAAC,MAAM,sBAAsB,GAAgC,KAAK,EACtE,SAAoB,EACpB,mBAAwC,EACV,EAAE,CAAC,CAAC;IAClC,GAAG,CAAC,MAAM,wBAAwB,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;IACnE,GAAG,CAAC,MAAM,wBAAwB,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;IACnE,GAAG,CAAC,MAAM,gCAAgC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;IAC3E,GAAG,CAAC,MAAM,kCAAkC,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;CAC9E,CAAC,CAAC","sourcesContent":["import { getCoreActionProcessor as getJsCoreActionProcessor } from 'quidproquo-actionprocessor-js';\nimport { ActionProcessorList, ActionProcessorListResolver, DynamicModuleLoader, QPQConfig } from 'quidproquo-core';\n\nimport { getDynamicFunctionsActionProcessor } from './dynamicFunctions';\nimport { getInlineFunctionActionProcessor } from './inlineFunction';\nimport { getStreamActionProcessor } from './stream';\n\n// The shared core processors (config, context, date, error, guid, log,\n// math, network, platform, system, customActions) are owned by\n// quidproquo-actionprocessor-js. Node builds on top of js and only adds the\n// processors that need a Node runtime (stream, inlineFunction, dynamicFunctions).\nexport * from './dynamicFunctions';\nexport * from './inlineFunction';\nexport * from './stream';\n\nexport const getCoreActionProcessor: ActionProcessorListResolver = async (\n qpqConfig: QPQConfig,\n dynamicModuleLoader: DynamicModuleLoader,\n): Promise<ActionProcessorList> => ({\n ...(await getJsCoreActionProcessor(qpqConfig, dynamicModuleLoader)),\n ...(await getStreamActionProcessor(qpqConfig, dynamicModuleLoader)),\n ...(await getInlineFunctionActionProcessor(qpqConfig, dynamicModuleLoader)),\n ...(await getDynamicFunctionsActionProcessor(qpqConfig, dynamicModuleLoader)),\n});\n"]}
@@ -1,2 +1 @@
1
- import { ActionProcessorListResolver } from 'quidproquo-core';
2
- export declare const getInlineFunctionExecuteActionProcessor: ActionProcessorListResolver;
1
+ export declare const getInlineFunctionExecuteActionProcessor: import("quidproquo-core").ActionProcessorListResolver;
@@ -1,4 +1,4 @@
1
- import { actionResult, actionResultError, createRuntime, ErrorTypeEnum, InlineFunctionActionType, qpqCoreUtils, QpqRuntimeType, } from 'quidproquo-core';
1
+ import { actionResult, actionResultError, askInlineFunctionExecuteBase, createActionProcessor, createRuntime, ErrorTypeEnum, qpqCoreUtils, QpqRuntimeType, } from 'quidproquo-core';
2
2
  import { randomUUID } from 'crypto';
3
3
  const getDateNow = () => new Date().toISOString();
4
4
  const getProcessExecute = (qpqConfig) => {
@@ -31,7 +31,5 @@ const getProcessExecute = (qpqConfig) => {
31
31
  return actionResult(storyResult.result);
32
32
  };
33
33
  };
34
- export const getInlineFunctionExecuteActionProcessor = async (qpqConfig) => ({
35
- [InlineFunctionActionType.Execute]: getProcessExecute(qpqConfig),
36
- });
34
+ export const getInlineFunctionExecuteActionProcessor = createActionProcessor(askInlineFunctionExecuteBase, getProcessExecute);
37
35
  //# sourceMappingURL=getInlineFunctionExecuteActionProcessor.js.map