quidproquo-core 0.0.261 → 0.0.263
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/actions/ai/AiActionType.d.ts +4 -0
- package/lib/commonjs/actions/ai/AiActionType.js +8 -0
- package/lib/commonjs/actions/ai/AiMessage.d.ts +4 -0
- package/lib/commonjs/actions/ai/AiMessage.js +2 -0
- package/lib/commonjs/actions/ai/AiModel.d.ts +11 -0
- package/lib/commonjs/actions/ai/AiModel.js +15 -0
- package/lib/commonjs/actions/ai/AiPromptActionRequester.d.ts +7 -0
- package/lib/commonjs/actions/ai/AiPromptActionRequester.js +15 -0
- package/lib/commonjs/actions/ai/AiPromptActionTypes.d.ts +18 -0
- package/lib/commonjs/actions/ai/AiPromptActionTypes.js +2 -0
- package/lib/commonjs/actions/ai/AiPromptStreamActionRequester.d.ts +9 -0
- package/lib/commonjs/actions/ai/AiPromptStreamActionRequester.js +16 -0
- package/lib/commonjs/actions/ai/AiPromptStreamActionTypes.d.ts +19 -0
- package/lib/commonjs/actions/ai/AiPromptStreamActionTypes.js +2 -0
- package/lib/commonjs/actions/ai/AiStreamPart.d.ts +15 -0
- package/lib/commonjs/actions/ai/AiStreamPart.js +2 -0
- package/lib/commonjs/actions/ai/index.d.ts +8 -0
- package/lib/commonjs/actions/ai/index.js +24 -0
- package/lib/commonjs/actions/eventBus/EventBusSendMessageActionRequester.js +1 -6
- package/lib/commonjs/actions/eventBus/EventBusSendMessageActionTypes.d.ts +2 -4
- package/lib/commonjs/actions/file/FileActionType.d.ts +2 -1
- package/lib/commonjs/actions/file/FileActionType.js +1 -0
- package/lib/commonjs/actions/file/FileStreamOpenActionTypes.d.ts +15 -0
- package/lib/commonjs/actions/file/FileStreamOpenActionTypes.js +2 -0
- package/lib/commonjs/actions/file/FileStreamOpenRequester.d.ts +3 -0
- package/lib/commonjs/actions/file/FileStreamOpenRequester.js +15 -0
- package/lib/commonjs/actions/file/index.d.ts +2 -0
- package/lib/commonjs/actions/file/index.js +2 -0
- package/lib/commonjs/actions/index.d.ts +3 -0
- package/lib/commonjs/actions/index.js +3 -0
- package/lib/commonjs/actions/inlineFunction/InlineFunctionActionType.d.ts +3 -0
- package/lib/commonjs/actions/inlineFunction/InlineFunctionActionType.js +7 -0
- package/lib/commonjs/actions/inlineFunction/InlineFunctionExecuteActionRequester.d.ts +2 -0
- package/lib/commonjs/actions/inlineFunction/InlineFunctionExecuteActionRequester.js +13 -0
- package/lib/commonjs/actions/inlineFunction/InlineFunctionExecuteActionTypes.d.ts +12 -0
- package/lib/commonjs/actions/inlineFunction/InlineFunctionExecuteActionTypes.js +2 -0
- package/lib/commonjs/actions/inlineFunction/index.d.ts +3 -0
- package/lib/commonjs/actions/inlineFunction/index.js +19 -0
- package/lib/commonjs/actions/network/NetworkActionType.d.ts +1 -1
- package/lib/commonjs/actions/queue/QueueSendMessageActionRequester.js +0 -6
- package/lib/commonjs/actions/queue/QueueSendMessageActionTypes.d.ts +2 -4
- package/lib/commonjs/actions/stream/StreamActionType.d.ts +4 -0
- package/lib/commonjs/actions/stream/StreamActionType.js +8 -0
- package/lib/commonjs/actions/stream/StreamCloseActionTypes.d.ts +11 -0
- package/lib/commonjs/actions/stream/StreamCloseActionTypes.js +2 -0
- package/lib/commonjs/actions/stream/StreamCloseRequester.d.ts +3 -0
- package/lib/commonjs/actions/stream/StreamCloseRequester.js +12 -0
- package/lib/commonjs/actions/stream/StreamReadActionTypes.d.ts +13 -0
- package/lib/commonjs/actions/stream/StreamReadActionTypes.js +2 -0
- package/lib/commonjs/actions/stream/StreamReadRequester.d.ts +3 -0
- package/lib/commonjs/actions/stream/StreamReadRequester.js +31 -0
- package/lib/commonjs/actions/stream/index.d.ts +5 -0
- package/lib/commonjs/actions/stream/index.js +21 -0
- package/lib/commonjs/config/QPQConfig.d.ts +3 -1
- package/lib/commonjs/config/QPQConfig.js +2 -0
- package/lib/commonjs/config/settings/ai.d.ts +17 -0
- package/lib/commonjs/config/settings/ai.js +13 -0
- package/lib/commonjs/config/settings/index.d.ts +2 -0
- package/lib/commonjs/config/settings/index.js +2 -0
- package/lib/commonjs/config/settings/inlineFunction.d.ts +11 -0
- package/lib/commonjs/config/settings/inlineFunction.js +17 -0
- package/lib/commonjs/createImplementationRuntime.d.ts +2 -2
- package/lib/commonjs/createImplementationRuntime.js +4 -4
- package/lib/commonjs/logic/index.d.ts +1 -0
- package/lib/commonjs/logic/index.js +1 -0
- package/lib/commonjs/logic/stream/createStreamRegistry.d.ts +2 -0
- package/lib/commonjs/logic/stream/createStreamRegistry.js +69 -0
- package/lib/commonjs/logic/stream/index.d.ts +1 -0
- package/lib/commonjs/logic/stream/index.js +17 -0
- package/lib/commonjs/proiseify/getSystemExecuteStoryActionProcessor.js +4 -4
- package/lib/commonjs/qpqCoreUtils.d.ts +4 -1
- package/lib/commonjs/qpqCoreUtils.js +15 -2
- package/lib/commonjs/qpqCoreUtilsLib.d.ts +3 -0
- package/lib/commonjs/runtime/createRuntime.d.ts +2 -2
- package/lib/commonjs/runtime/createRuntime.js +2 -2
- package/lib/commonjs/runtime/processAction.d.ts +2 -2
- package/lib/commonjs/runtime/processAction.js +6 -2
- package/lib/commonjs/runtime/resolveStory.d.ts +2 -2
- package/lib/commonjs/runtime/resolveStory.js +4 -2
- package/lib/commonjs/runtime/resolveStoryWithLogs.d.ts +2 -2
- package/lib/commonjs/runtime/resolveStoryWithLogs.js +2 -2
- package/lib/commonjs/stories/context/askContextProvideValue.js +19 -99
- package/lib/commonjs/stories/context/index.d.ts +0 -1
- package/lib/commonjs/stories/context/index.js +0 -1
- package/lib/commonjs/stories/system/askCatch.d.ts +1 -1
- package/lib/commonjs/stories/system/askCatch.js +6 -1
- package/lib/commonjs/stories/system/askOverrideActions.js +3 -3
- package/lib/commonjs/types/Action.d.ts +4 -1
- package/lib/commonjs/types/StreamRegistry.d.ts +17 -0
- package/lib/commonjs/types/StreamRegistry.js +2 -0
- package/lib/commonjs/types/index.d.ts +1 -0
- package/lib/commonjs/types/index.js +1 -0
- package/lib/esm/actions/ai/AiActionType.d.ts +4 -0
- package/lib/esm/actions/ai/AiActionType.js +5 -0
- package/lib/esm/actions/ai/AiMessage.d.ts +4 -0
- package/lib/esm/actions/ai/AiMessage.js +1 -0
- package/lib/esm/actions/ai/AiModel.d.ts +11 -0
- package/lib/esm/actions/ai/AiModel.js +12 -0
- package/lib/esm/actions/ai/AiPromptActionRequester.d.ts +7 -0
- package/lib/esm/actions/ai/AiPromptActionRequester.js +12 -0
- package/lib/esm/actions/ai/AiPromptActionTypes.d.ts +18 -0
- package/lib/esm/actions/ai/AiPromptActionTypes.js +1 -0
- package/lib/esm/actions/ai/AiPromptStreamActionRequester.d.ts +9 -0
- package/lib/esm/actions/ai/AiPromptStreamActionRequester.js +13 -0
- package/lib/esm/actions/ai/AiPromptStreamActionTypes.d.ts +19 -0
- package/lib/esm/actions/ai/AiPromptStreamActionTypes.js +1 -0
- package/lib/esm/actions/ai/AiStreamPart.d.ts +15 -0
- package/lib/esm/actions/ai/AiStreamPart.js +1 -0
- package/lib/esm/actions/ai/index.d.ts +8 -0
- package/lib/esm/actions/ai/index.js +8 -0
- package/lib/esm/actions/eventBus/EventBusSendMessageActionRequester.js +1 -9
- package/lib/esm/actions/eventBus/EventBusSendMessageActionTypes.d.ts +2 -4
- package/lib/esm/actions/file/FileActionType.d.ts +2 -1
- package/lib/esm/actions/file/FileActionType.js +1 -0
- package/lib/esm/actions/file/FileStreamOpenActionTypes.d.ts +15 -0
- package/lib/esm/actions/file/FileStreamOpenActionTypes.js +1 -0
- package/lib/esm/actions/file/FileStreamOpenRequester.d.ts +3 -0
- package/lib/esm/actions/file/FileStreamOpenRequester.js +12 -0
- package/lib/esm/actions/file/index.d.ts +2 -0
- package/lib/esm/actions/file/index.js +2 -0
- package/lib/esm/actions/index.d.ts +3 -0
- package/lib/esm/actions/index.js +3 -0
- package/lib/esm/actions/inlineFunction/InlineFunctionActionType.d.ts +3 -0
- package/lib/esm/actions/inlineFunction/InlineFunctionActionType.js +4 -0
- package/lib/esm/actions/inlineFunction/InlineFunctionExecuteActionRequester.d.ts +2 -0
- package/lib/esm/actions/inlineFunction/InlineFunctionExecuteActionRequester.js +10 -0
- package/lib/esm/actions/inlineFunction/InlineFunctionExecuteActionTypes.d.ts +12 -0
- package/lib/esm/actions/inlineFunction/InlineFunctionExecuteActionTypes.js +1 -0
- package/lib/esm/actions/inlineFunction/index.d.ts +3 -0
- package/lib/esm/actions/inlineFunction/index.js +3 -0
- package/lib/esm/actions/network/NetworkActionType.d.ts +1 -1
- package/lib/esm/actions/queue/QueueSendMessageActionRequester.js +0 -6
- package/lib/esm/actions/queue/QueueSendMessageActionTypes.d.ts +2 -4
- package/lib/esm/actions/stream/StreamActionType.d.ts +4 -0
- package/lib/esm/actions/stream/StreamActionType.js +5 -0
- package/lib/esm/actions/stream/StreamCloseActionTypes.d.ts +11 -0
- package/lib/esm/actions/stream/StreamCloseActionTypes.js +1 -0
- package/lib/esm/actions/stream/StreamCloseRequester.d.ts +3 -0
- package/lib/esm/actions/stream/StreamCloseRequester.js +9 -0
- package/lib/esm/actions/stream/StreamReadActionTypes.d.ts +13 -0
- package/lib/esm/actions/stream/StreamReadActionTypes.js +1 -0
- package/lib/esm/actions/stream/StreamReadRequester.d.ts +3 -0
- package/lib/esm/actions/stream/StreamReadRequester.js +28 -0
- package/lib/esm/actions/stream/index.d.ts +5 -0
- package/lib/esm/actions/stream/index.js +5 -0
- package/lib/esm/config/QPQConfig.d.ts +3 -1
- package/lib/esm/config/QPQConfig.js +2 -0
- package/lib/esm/config/settings/ai.d.ts +17 -0
- package/lib/esm/config/settings/ai.js +9 -0
- package/lib/esm/config/settings/index.d.ts +2 -0
- package/lib/esm/config/settings/index.js +2 -0
- package/lib/esm/config/settings/inlineFunction.d.ts +11 -0
- package/lib/esm/config/settings/inlineFunction.js +13 -0
- package/lib/esm/createImplementationRuntime.d.ts +2 -2
- package/lib/esm/createImplementationRuntime.js +4 -4
- package/lib/esm/logic/index.d.ts +1 -0
- package/lib/esm/logic/index.js +1 -0
- package/lib/esm/logic/stream/createStreamRegistry.d.ts +2 -0
- package/lib/esm/logic/stream/createStreamRegistry.js +53 -0
- package/lib/esm/logic/stream/index.d.ts +1 -0
- package/lib/esm/logic/stream/index.js +1 -0
- package/lib/esm/proiseify/getSystemExecuteStoryActionProcessor.js +4 -4
- package/lib/esm/qpqCoreUtils.d.ts +4 -1
- package/lib/esm/qpqCoreUtils.js +10 -0
- package/lib/esm/qpqCoreUtilsLib.d.ts +3 -0
- package/lib/esm/runtime/createRuntime.d.ts +2 -2
- package/lib/esm/runtime/createRuntime.js +2 -2
- package/lib/esm/runtime/processAction.d.ts +2 -2
- package/lib/esm/runtime/processAction.js +6 -2
- package/lib/esm/runtime/resolveStory.d.ts +2 -2
- package/lib/esm/runtime/resolveStory.js +4 -2
- package/lib/esm/runtime/resolveStoryWithLogs.d.ts +2 -2
- package/lib/esm/runtime/resolveStoryWithLogs.js +2 -2
- package/lib/esm/stories/context/askContextProvideValue.js +24 -101
- package/lib/esm/stories/context/index.d.ts +0 -1
- package/lib/esm/stories/context/index.js +0 -1
- package/lib/esm/stories/system/askCatch.d.ts +1 -1
- package/lib/esm/stories/system/askCatch.js +6 -1
- package/lib/esm/stories/system/askOverrideActions.js +3 -3
- package/lib/esm/types/Action.d.ts +4 -1
- package/lib/esm/types/StreamRegistry.d.ts +17 -0
- package/lib/esm/types/StreamRegistry.js +1 -0
- package/lib/esm/types/index.d.ts +1 -0
- package/lib/esm/types/index.js +1 -0
- package/package.json +2 -2
- package/lib/commonjs/stories/context/askContextProvideValueV2.d.ts +0 -2
- package/lib/commonjs/stories/context/askContextProvideValueV2.js +0 -27
- package/lib/esm/stories/context/askContextProvideValueV2.d.ts +0 -2
- package/lib/esm/stories/context/askContextProvideValueV2.js +0 -27
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AiActionType = void 0;
|
|
4
|
+
var AiActionType;
|
|
5
|
+
(function (AiActionType) {
|
|
6
|
+
AiActionType["Prompt"] = "@quidproquo-core/Ai/Prompt";
|
|
7
|
+
AiActionType["PromptStream"] = "@quidproquo-core/Ai/PromptStream";
|
|
8
|
+
})(AiActionType || (exports.AiActionType = AiActionType = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum AiModel {
|
|
2
|
+
ClaudeHaiku35 = "claude-3-5-haiku",
|
|
3
|
+
ClaudeSonnet35 = "claude-3-5-sonnet",
|
|
4
|
+
ClaudeSonnet4 = "claude-sonnet-4",
|
|
5
|
+
ClaudeOpus4 = "claude-opus-4",
|
|
6
|
+
ClaudeHaiku45 = "claude-haiku-4-5",
|
|
7
|
+
ClaudeSonnet45 = "claude-sonnet-4-5",
|
|
8
|
+
ClaudeOpus45 = "claude-opus-4-5",
|
|
9
|
+
ClaudeSonnet46 = "claude-sonnet-4-6",
|
|
10
|
+
ClaudeOpus46 = "claude-opus-4-6"
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AiModel = void 0;
|
|
4
|
+
var AiModel;
|
|
5
|
+
(function (AiModel) {
|
|
6
|
+
AiModel["ClaudeHaiku35"] = "claude-3-5-haiku";
|
|
7
|
+
AiModel["ClaudeSonnet35"] = "claude-3-5-sonnet";
|
|
8
|
+
AiModel["ClaudeSonnet4"] = "claude-sonnet-4";
|
|
9
|
+
AiModel["ClaudeOpus4"] = "claude-opus-4";
|
|
10
|
+
AiModel["ClaudeHaiku45"] = "claude-haiku-4-5";
|
|
11
|
+
AiModel["ClaudeSonnet45"] = "claude-sonnet-4-5";
|
|
12
|
+
AiModel["ClaudeOpus45"] = "claude-opus-4-5";
|
|
13
|
+
AiModel["ClaudeSonnet46"] = "claude-sonnet-4-6";
|
|
14
|
+
AiModel["ClaudeOpus46"] = "claude-opus-4-6";
|
|
15
|
+
})(AiModel || (exports.AiModel = AiModel = {}));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AiModel } from './AiModel';
|
|
2
|
+
import { AiPromptActionRequester } from './AiPromptActionTypes';
|
|
3
|
+
export interface AskAiPromptOptions {
|
|
4
|
+
system?: string;
|
|
5
|
+
aiName?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function askAiPrompt(model: AiModel, prompt: string, options?: AskAiPromptOptions): AiPromptActionRequester;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askAiPrompt = askAiPrompt;
|
|
4
|
+
const AiActionType_1 = require("./AiActionType");
|
|
5
|
+
function* askAiPrompt(model, prompt, options) {
|
|
6
|
+
return yield {
|
|
7
|
+
type: AiActionType_1.AiActionType.Prompt,
|
|
8
|
+
payload: {
|
|
9
|
+
model,
|
|
10
|
+
prompt,
|
|
11
|
+
system: options === null || options === void 0 ? void 0 : options.system,
|
|
12
|
+
aiName: options === null || options === void 0 ? void 0 : options.aiName,
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
+
import { AiActionType } from './AiActionType';
|
|
3
|
+
import { AiModel } from './AiModel';
|
|
4
|
+
export interface AiPromptActionPayload {
|
|
5
|
+
model: AiModel;
|
|
6
|
+
prompt: string;
|
|
7
|
+
system?: string;
|
|
8
|
+
aiName?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface AiPromptActionResult {
|
|
11
|
+
text: string;
|
|
12
|
+
}
|
|
13
|
+
export interface AiPromptAction extends Action<AiPromptActionPayload> {
|
|
14
|
+
type: AiActionType.Prompt;
|
|
15
|
+
payload: AiPromptActionPayload;
|
|
16
|
+
}
|
|
17
|
+
export type AiPromptActionProcessor = ActionProcessor<AiPromptAction, AiPromptActionResult>;
|
|
18
|
+
export type AiPromptActionRequester = ActionRequester<AiPromptAction, AiPromptActionResult>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AiMessage } from './AiMessage';
|
|
2
|
+
import { AiModel } from './AiModel';
|
|
3
|
+
import { AiPromptStreamActionRequester } from './AiPromptStreamActionTypes';
|
|
4
|
+
export interface AskAiPromptStreamOptions {
|
|
5
|
+
system?: string;
|
|
6
|
+
aiName?: string;
|
|
7
|
+
messages?: AiMessage[];
|
|
8
|
+
}
|
|
9
|
+
export declare function askAiPromptStream(model: AiModel, prompt: string, options?: AskAiPromptStreamOptions): AiPromptStreamActionRequester;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askAiPromptStream = askAiPromptStream;
|
|
4
|
+
const AiActionType_1 = require("./AiActionType");
|
|
5
|
+
function* askAiPromptStream(model, prompt, options) {
|
|
6
|
+
return yield {
|
|
7
|
+
type: AiActionType_1.AiActionType.PromptStream,
|
|
8
|
+
payload: {
|
|
9
|
+
model,
|
|
10
|
+
prompt,
|
|
11
|
+
messages: options === null || options === void 0 ? void 0 : options.messages,
|
|
12
|
+
system: options === null || options === void 0 ? void 0 : options.system,
|
|
13
|
+
aiName: options === null || options === void 0 ? void 0 : options.aiName,
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
+
import { StreamHandle } from '../../types/StreamRegistry';
|
|
3
|
+
import { AiActionType } from './AiActionType';
|
|
4
|
+
import { AiMessage } from './AiMessage';
|
|
5
|
+
import { AiModel } from './AiModel';
|
|
6
|
+
import { AiStreamPart } from './AiStreamPart';
|
|
7
|
+
export interface AiPromptStreamActionPayload {
|
|
8
|
+
model: AiModel;
|
|
9
|
+
prompt: string;
|
|
10
|
+
messages?: AiMessage[];
|
|
11
|
+
system?: string;
|
|
12
|
+
aiName?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface AiPromptStreamAction extends Action<AiPromptStreamActionPayload> {
|
|
15
|
+
type: AiActionType.PromptStream;
|
|
16
|
+
payload: AiPromptStreamActionPayload;
|
|
17
|
+
}
|
|
18
|
+
export type AiPromptStreamActionProcessor = ActionProcessor<AiPromptStreamAction, StreamHandle<'json'>>;
|
|
19
|
+
export type AiPromptStreamActionRequester = ActionRequester<AiPromptStreamAction, StreamHandle<'json', AiStreamPart>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface AiStreamTextDelta {
|
|
2
|
+
type: 'text-delta';
|
|
3
|
+
text: string;
|
|
4
|
+
}
|
|
5
|
+
export interface AiStreamToolCall {
|
|
6
|
+
type: 'tool-call';
|
|
7
|
+
toolName: string;
|
|
8
|
+
input: unknown;
|
|
9
|
+
}
|
|
10
|
+
export interface AiStreamToolResult {
|
|
11
|
+
type: 'tool-result';
|
|
12
|
+
toolName: string;
|
|
13
|
+
output: unknown;
|
|
14
|
+
}
|
|
15
|
+
export type AiStreamPart = AiStreamTextDelta | AiStreamToolCall | AiStreamToolResult;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './AiActionType';
|
|
2
|
+
export * from './AiMessage';
|
|
3
|
+
export * from './AiModel';
|
|
4
|
+
export * from './AiPromptActionRequester';
|
|
5
|
+
export * from './AiPromptActionTypes';
|
|
6
|
+
export * from './AiPromptStreamActionRequester';
|
|
7
|
+
export * from './AiPromptStreamActionTypes';
|
|
8
|
+
export * from './AiStreamPart';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./AiActionType"), exports);
|
|
18
|
+
__exportStar(require("./AiMessage"), exports);
|
|
19
|
+
__exportStar(require("./AiModel"), exports);
|
|
20
|
+
__exportStar(require("./AiPromptActionRequester"), exports);
|
|
21
|
+
__exportStar(require("./AiPromptActionTypes"), exports);
|
|
22
|
+
__exportStar(require("./AiPromptStreamActionRequester"), exports);
|
|
23
|
+
__exportStar(require("./AiPromptStreamActionTypes"), exports);
|
|
24
|
+
__exportStar(require("./AiStreamPart"), exports);
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.askEventBusSendMessages = askEventBusSendMessages;
|
|
4
|
-
const context_1 = require("../context");
|
|
5
4
|
const EventBusActionType_1 = require("./EventBusActionType");
|
|
6
5
|
function* askEventBusSendMessages(eventBusSendMessageOptions) {
|
|
7
|
-
// Read the context so we can send it with the queue message
|
|
8
|
-
const context = (yield {
|
|
9
|
-
type: context_1.ContextActionType.List,
|
|
10
|
-
});
|
|
11
6
|
yield {
|
|
12
7
|
type: EventBusActionType_1.EventBusActionType.SendMessages,
|
|
13
|
-
payload:
|
|
8
|
+
payload: eventBusSendMessageOptions,
|
|
14
9
|
};
|
|
15
10
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Action, ActionProcessor, ActionRequester, CrossModuleMessage
|
|
2
|
-
import { ContextListAction } from '../context';
|
|
1
|
+
import { Action, ActionProcessor, ActionRequester, CrossModuleMessage } from '../../types';
|
|
3
2
|
import { EventBusActionType } from './EventBusActionType';
|
|
4
3
|
export type EventBusMessage<T> = CrossModuleMessage<T>;
|
|
5
4
|
export interface EventBusSendMessageOptions<T> {
|
|
@@ -7,11 +6,10 @@ export interface EventBusSendMessageOptions<T> {
|
|
|
7
6
|
eventBusMessages: EventBusMessage<T>[];
|
|
8
7
|
}
|
|
9
8
|
export interface EventBusSendMessageActionPayload<T> extends EventBusSendMessageOptions<T> {
|
|
10
|
-
context: QpqContext<any>;
|
|
11
9
|
}
|
|
12
10
|
export interface EventBusSendMessageAction<T> extends Action<EventBusSendMessageActionPayload<T>> {
|
|
13
11
|
type: EventBusActionType.SendMessages;
|
|
14
12
|
payload: EventBusSendMessageActionPayload<T>;
|
|
15
13
|
}
|
|
16
14
|
export type EventBusSendMessageActionProcessor<T> = ActionProcessor<EventBusSendMessageAction<T>, void>;
|
|
17
|
-
export type EventBusSendMessageActionRequester<T> = ActionRequester<EventBusSendMessageAction<T
|
|
15
|
+
export type EventBusSendMessageActionRequester<T> = ActionRequester<EventBusSendMessageAction<T>, void>;
|
|
@@ -11,7 +11,8 @@ export declare enum FileActionType {
|
|
|
11
11
|
WriteBinaryContents = "@quidproquo-core/File/WriteBinaryContents",
|
|
12
12
|
GenerateTemporarySecureUrl = "@quidproquo-core/File/GenerateTemporarySecureUrl",
|
|
13
13
|
GenerateTemporaryUploadSecureUrl = "@quidproquo-core/File/GenerateTemporaryUploadSecureUrl",
|
|
14
|
-
IsColdStorage = "@quidproquo-core/File/IsColdStorage"
|
|
14
|
+
IsColdStorage = "@quidproquo-core/File/IsColdStorage",
|
|
15
|
+
StreamOpen = "@quidproquo-core/File/StreamOpen"
|
|
15
16
|
}
|
|
16
17
|
export declare const filePathDelimiter = "/";
|
|
17
18
|
export interface FileInfo {
|
|
@@ -15,5 +15,6 @@ var FileActionType;
|
|
|
15
15
|
FileActionType["GenerateTemporarySecureUrl"] = "@quidproquo-core/File/GenerateTemporarySecureUrl";
|
|
16
16
|
FileActionType["GenerateTemporaryUploadSecureUrl"] = "@quidproquo-core/File/GenerateTemporaryUploadSecureUrl";
|
|
17
17
|
FileActionType["IsColdStorage"] = "@quidproquo-core/File/IsColdStorage";
|
|
18
|
+
FileActionType["StreamOpen"] = "@quidproquo-core/File/StreamOpen";
|
|
18
19
|
})(FileActionType || (exports.FileActionType = FileActionType = {}));
|
|
19
20
|
exports.filePathDelimiter = `/`;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
+
import { StreamEncoding, StreamHandle } from '../../types/StreamRegistry';
|
|
3
|
+
import { FileActionType } from './FileActionType';
|
|
4
|
+
export interface FileStreamOpenActionPayload {
|
|
5
|
+
drive: string;
|
|
6
|
+
filepath: string;
|
|
7
|
+
encoding: StreamEncoding;
|
|
8
|
+
chunkSize?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface FileStreamOpenAction extends Action<FileStreamOpenActionPayload> {
|
|
11
|
+
type: FileActionType.StreamOpen;
|
|
12
|
+
payload: FileStreamOpenActionPayload;
|
|
13
|
+
}
|
|
14
|
+
export type FileStreamOpenActionProcessor = ActionProcessor<FileStreamOpenAction, StreamHandle>;
|
|
15
|
+
export type FileStreamOpenActionRequester<E extends StreamEncoding = StreamEncoding> = ActionRequester<FileStreamOpenAction, StreamHandle<E>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { StreamEncoding } from '../../types/StreamRegistry';
|
|
2
|
+
import { FileStreamOpenActionRequester } from './FileStreamOpenActionTypes';
|
|
3
|
+
export declare function askFileStreamOpen<E extends StreamEncoding = 'text'>(drive: string, filepath: string, encoding?: E, chunkSize?: number): FileStreamOpenActionRequester<E>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askFileStreamOpen = askFileStreamOpen;
|
|
4
|
+
const FileActionType_1 = require("./FileActionType");
|
|
5
|
+
function* askFileStreamOpen(drive, filepath, encoding = 'text', chunkSize) {
|
|
6
|
+
return yield {
|
|
7
|
+
type: FileActionType_1.FileActionType.StreamOpen,
|
|
8
|
+
payload: {
|
|
9
|
+
drive,
|
|
10
|
+
filepath,
|
|
11
|
+
encoding,
|
|
12
|
+
chunkSize,
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -17,6 +17,8 @@ export * from './FileReadObjectJsonActionRequester';
|
|
|
17
17
|
export * from './FileReadObjectJsonActionTypes';
|
|
18
18
|
export * from './FileReadTextContentsActionRequester';
|
|
19
19
|
export * from './FileReadTextContentsActionTypes';
|
|
20
|
+
export * from './FileStreamOpenActionTypes';
|
|
21
|
+
export * from './FileStreamOpenRequester';
|
|
20
22
|
export * from './FileWriteBinaryContentsActionRequester';
|
|
21
23
|
export * from './FileWriteBinaryContentsActionTypes';
|
|
22
24
|
export * from './FileWriteObjectJsonActionRequester';
|
|
@@ -33,6 +33,8 @@ __exportStar(require("./FileReadObjectJsonActionRequester"), exports);
|
|
|
33
33
|
__exportStar(require("./FileReadObjectJsonActionTypes"), exports);
|
|
34
34
|
__exportStar(require("./FileReadTextContentsActionRequester"), exports);
|
|
35
35
|
__exportStar(require("./FileReadTextContentsActionTypes"), exports);
|
|
36
|
+
__exportStar(require("./FileStreamOpenActionTypes"), exports);
|
|
37
|
+
__exportStar(require("./FileStreamOpenRequester"), exports);
|
|
36
38
|
__exportStar(require("./FileWriteBinaryContentsActionRequester"), exports);
|
|
37
39
|
__exportStar(require("./FileWriteBinaryContentsActionTypes"), exports);
|
|
38
40
|
__exportStar(require("./FileWriteObjectJsonActionRequester"), exports);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './ai';
|
|
1
2
|
export * from './claudeAi';
|
|
2
3
|
export * from './config';
|
|
3
4
|
export * from './context';
|
|
@@ -8,6 +9,7 @@ export * from './eventBus';
|
|
|
8
9
|
export * from './file';
|
|
9
10
|
export * from './graphDatabase';
|
|
10
11
|
export * from './guid';
|
|
12
|
+
export * from './inlineFunction';
|
|
11
13
|
export * from './keyValueStore';
|
|
12
14
|
export * from './log';
|
|
13
15
|
export * from './math';
|
|
@@ -15,5 +17,6 @@ export * from './network';
|
|
|
15
17
|
export * from './platform';
|
|
16
18
|
export * from './queue';
|
|
17
19
|
export * from './state';
|
|
20
|
+
export * from './stream';
|
|
18
21
|
export * from './system';
|
|
19
22
|
export * from './userDirectory';
|
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ai"), exports);
|
|
17
18
|
__exportStar(require("./claudeAi"), exports);
|
|
18
19
|
__exportStar(require("./config"), exports);
|
|
19
20
|
__exportStar(require("./context"), exports);
|
|
@@ -24,6 +25,7 @@ __exportStar(require("./eventBus"), exports);
|
|
|
24
25
|
__exportStar(require("./file"), exports);
|
|
25
26
|
__exportStar(require("./graphDatabase"), exports);
|
|
26
27
|
__exportStar(require("./guid"), exports);
|
|
28
|
+
__exportStar(require("./inlineFunction"), exports);
|
|
27
29
|
__exportStar(require("./keyValueStore"), exports);
|
|
28
30
|
__exportStar(require("./log"), exports);
|
|
29
31
|
__exportStar(require("./math"), exports);
|
|
@@ -31,5 +33,6 @@ __exportStar(require("./network"), exports);
|
|
|
31
33
|
__exportStar(require("./platform"), exports);
|
|
32
34
|
__exportStar(require("./queue"), exports);
|
|
33
35
|
__exportStar(require("./state"), exports);
|
|
36
|
+
__exportStar(require("./stream"), exports);
|
|
34
37
|
__exportStar(require("./system"), exports);
|
|
35
38
|
__exportStar(require("./userDirectory"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InlineFunctionActionType = void 0;
|
|
4
|
+
var InlineFunctionActionType;
|
|
5
|
+
(function (InlineFunctionActionType) {
|
|
6
|
+
InlineFunctionActionType["Execute"] = "@quidproquo-core/InlineFunction/Execute";
|
|
7
|
+
})(InlineFunctionActionType || (exports.InlineFunctionActionType = InlineFunctionActionType = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askInlineFunctionExecute = askInlineFunctionExecute;
|
|
4
|
+
const InlineFunctionActionType_1 = require("./InlineFunctionActionType");
|
|
5
|
+
function* askInlineFunctionExecute(functionName, payload) {
|
|
6
|
+
return yield {
|
|
7
|
+
type: InlineFunctionActionType_1.InlineFunctionActionType.Execute,
|
|
8
|
+
payload: {
|
|
9
|
+
functionName,
|
|
10
|
+
payload,
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
+
import { InlineFunctionActionType } from './InlineFunctionActionType';
|
|
3
|
+
export interface InlineFunctionExecuteActionPayload<T> {
|
|
4
|
+
functionName: string;
|
|
5
|
+
payload: T;
|
|
6
|
+
}
|
|
7
|
+
export interface InlineFunctionExecuteAction<T> extends Action<InlineFunctionExecuteActionPayload<T>> {
|
|
8
|
+
type: InlineFunctionActionType.Execute;
|
|
9
|
+
payload: InlineFunctionExecuteActionPayload<T>;
|
|
10
|
+
}
|
|
11
|
+
export type InlineFunctionExecuteActionProcessor<R, T> = ActionProcessor<InlineFunctionExecuteAction<T>, R>;
|
|
12
|
+
export type InlineFunctionExecuteActionRequester<R, T> = ActionRequester<InlineFunctionExecuteAction<T>, R>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./InlineFunctionActionType"), exports);
|
|
18
|
+
__exportStar(require("./InlineFunctionExecuteActionRequester"), exports);
|
|
19
|
+
__exportStar(require("./InlineFunctionExecuteActionTypes"), exports);
|
|
@@ -2,7 +2,7 @@ export declare enum NetworkActionType {
|
|
|
2
2
|
Request = "@quidproquo-core/Network/Request"
|
|
3
3
|
}
|
|
4
4
|
export type HTTPMethod = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'PATCH';
|
|
5
|
-
export type ResponseType = 'binary' | 'json';
|
|
5
|
+
export type ResponseType = 'binary' | 'json' | 'text';
|
|
6
6
|
export interface HTTPRequestOptions<T> {
|
|
7
7
|
basePath?: string;
|
|
8
8
|
params?: Record<string, string>;
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.askQueueSendMessages = askQueueSendMessages;
|
|
4
|
-
const context_1 = require("../context");
|
|
5
4
|
const QueueActionType_1 = require("./QueueActionType");
|
|
6
5
|
function* askQueueSendMessages(queueName, ...queueMessages) {
|
|
7
|
-
// Read the context so we can send it with the queue message
|
|
8
|
-
const context = (yield {
|
|
9
|
-
type: context_1.ContextActionType.List,
|
|
10
|
-
});
|
|
11
6
|
yield {
|
|
12
7
|
type: QueueActionType_1.QueueActionType.SendMessages,
|
|
13
8
|
payload: {
|
|
14
9
|
queueMessages,
|
|
15
10
|
queueName,
|
|
16
|
-
context,
|
|
17
11
|
},
|
|
18
12
|
};
|
|
19
13
|
}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { Action, ActionProcessor, ActionRequester, CrossModuleMessage
|
|
2
|
-
import { ContextListAction } from '../context';
|
|
1
|
+
import { Action, ActionProcessor, ActionRequester, CrossModuleMessage } from '../../types';
|
|
3
2
|
import { QueueActionType } from './QueueActionType';
|
|
4
3
|
export type QueueMessage<T> = CrossModuleMessage<T>;
|
|
5
4
|
export interface QueueSendMessageActionPayload<T> {
|
|
6
5
|
queueName: string;
|
|
7
6
|
queueMessages: QueueMessage<T>[];
|
|
8
|
-
context: QpqContext<any>;
|
|
9
7
|
}
|
|
10
8
|
export interface QueueSendMessageAction<T> extends Action<QueueSendMessageActionPayload<T>> {
|
|
11
9
|
type: QueueActionType.SendMessages;
|
|
12
10
|
payload: QueueSendMessageActionPayload<T>;
|
|
13
11
|
}
|
|
14
12
|
export type QueueSendMessageActionProcessor<T> = ActionProcessor<QueueSendMessageAction<T>, void>;
|
|
15
|
-
export type QueueSendMessageActionRequester<T> = ActionRequester<QueueSendMessageAction<T
|
|
13
|
+
export type QueueSendMessageActionRequester<T> = ActionRequester<QueueSendMessageAction<T>, void>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StreamActionType = void 0;
|
|
4
|
+
var StreamActionType;
|
|
5
|
+
(function (StreamActionType) {
|
|
6
|
+
StreamActionType["Read"] = "@quidproquo-core/Stream/Read";
|
|
7
|
+
StreamActionType["Close"] = "@quidproquo-core/Stream/Close";
|
|
8
|
+
})(StreamActionType || (exports.StreamActionType = StreamActionType = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
+
import { StreamActionType } from './StreamActionType';
|
|
3
|
+
export interface StreamCloseActionPayload {
|
|
4
|
+
streamId: string;
|
|
5
|
+
}
|
|
6
|
+
export interface StreamCloseAction extends Action<StreamCloseActionPayload> {
|
|
7
|
+
type: StreamActionType.Close;
|
|
8
|
+
payload: StreamCloseActionPayload;
|
|
9
|
+
}
|
|
10
|
+
export type StreamCloseActionProcessor = ActionProcessor<StreamCloseAction, void>;
|
|
11
|
+
export type StreamCloseActionRequester = ActionRequester<StreamCloseAction, void>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askStreamClose = askStreamClose;
|
|
4
|
+
const StreamActionType_1 = require("./StreamActionType");
|
|
5
|
+
function* askStreamClose(handle) {
|
|
6
|
+
return yield {
|
|
7
|
+
type: StreamActionType_1.StreamActionType.Close,
|
|
8
|
+
payload: {
|
|
9
|
+
streamId: handle.id,
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
+
import { StreamChunk, StreamDataType, StreamEncoding } from '../../types/StreamRegistry';
|
|
3
|
+
import { StreamActionType } from './StreamActionType';
|
|
4
|
+
export interface StreamReadActionPayload {
|
|
5
|
+
streamId: string;
|
|
6
|
+
noWait?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface StreamReadAction extends Action<StreamReadActionPayload> {
|
|
9
|
+
type: StreamActionType.Read;
|
|
10
|
+
payload: StreamReadActionPayload;
|
|
11
|
+
}
|
|
12
|
+
export type StreamReadActionProcessor = ActionProcessor<StreamReadAction, StreamChunk<string>>;
|
|
13
|
+
export type StreamReadActionRequester<E extends StreamEncoding = StreamEncoding, T = unknown> = ActionRequester<StreamReadAction, StreamChunk<StreamDataType<E, T>>, StreamChunk<string>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { StreamEncoding, StreamHandle } from '../../types/StreamRegistry';
|
|
2
|
+
import { StreamReadActionRequester } from './StreamReadActionTypes';
|
|
3
|
+
export declare function askStreamRead<E extends StreamEncoding, T = unknown>(handle: StreamHandle<E, T>, noWait?: boolean): StreamReadActionRequester<E, T>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askStreamRead = askStreamRead;
|
|
4
|
+
const StreamActionType_1 = require("./StreamActionType");
|
|
5
|
+
const decodeBase64ToUint8Array = (base64) => {
|
|
6
|
+
const binary = atob(base64);
|
|
7
|
+
const bytes = new Uint8Array(binary.length);
|
|
8
|
+
for (let i = 0; i < binary.length; i++) {
|
|
9
|
+
bytes[i] = binary.charCodeAt(i);
|
|
10
|
+
}
|
|
11
|
+
return bytes;
|
|
12
|
+
};
|
|
13
|
+
function* askStreamRead(handle, noWait) {
|
|
14
|
+
const rawChunk = yield {
|
|
15
|
+
type: StreamActionType_1.StreamActionType.Read,
|
|
16
|
+
payload: {
|
|
17
|
+
streamId: handle.id,
|
|
18
|
+
noWait,
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
if (!rawChunk.data || rawChunk.done || rawChunk.skipped) {
|
|
22
|
+
return rawChunk;
|
|
23
|
+
}
|
|
24
|
+
if (handle.encoding === 'binary') {
|
|
25
|
+
return Object.assign(Object.assign({}, rawChunk), { data: decodeBase64ToUint8Array(rawChunk.data) });
|
|
26
|
+
}
|
|
27
|
+
if (handle.encoding === 'json') {
|
|
28
|
+
return Object.assign(Object.assign({}, rawChunk), { data: JSON.parse(rawChunk.data) });
|
|
29
|
+
}
|
|
30
|
+
return rawChunk;
|
|
31
|
+
}
|