@t4h.framework/dev 0.0.0-experimental-20260925181830 → 0.0.0-experimental-20260925183248
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/CHANGELOG.md +3 -21
- package/dist/constants/server.d.ts +0 -1
- package/dist/constants/server.js +0 -1
- package/dist/constants/server.js.map +1 -1
- package/dist/models/claims/DevWorkflowClaim.d.ts +2 -2
- package/dist/models/claims/DevWorkflowClaim.js +2 -2
- package/dist/models/claims/DevWorkflowClaim.js.map +1 -1
- package/dist/repositories/WorkflowRunActivity.repository.js +1 -11
- package/dist/repositories/WorkflowRunActivity.repository.js.map +1 -1
- package/dist/tools/json-codec.js +2 -4
- package/dist/tools/json-codec.js.map +1 -1
- package/package.json +23 -23
- package/dist/exceptions/ActivityOutputTooLarge.exception.d.ts +0 -6
- package/dist/exceptions/ActivityOutputTooLarge.exception.js +0 -11
- package/dist/exceptions/ActivityOutputTooLarge.exception.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,29 +1,11 @@
|
|
|
1
1
|
# @t4h.framework/dev
|
|
2
2
|
|
|
3
|
-
## 0.0.0-experimental-
|
|
4
|
-
|
|
5
|
-
### Minor Changes
|
|
6
|
-
|
|
7
|
-
- [#190](https://github.com/tech4humans-brasil/framework/pull/190) [`01795ea`](https://github.com/tech4humans-brasil/framework/commit/01795ea8d91927ac425a80d57aab9d0108ccc7d3) Thanks [@gusteycamargo](https://github.com/gusteycamargo)! - Adds `WorkflowBatchCollectionRef`, a serializable batch handle (`id`, `count`) that can be narrowed with `filter({ status, where })`. Filters are immutable and compose (statuses intersect, wheres are `$and`ed); `join` from `@t4h.framework/fs` applies them on top of its own `status`/`where`. `WorkflowBatchRef` remains as a deprecated alias of the same class, so existing `new WorkflowBatchRef(...)`, `instanceof` checks and `split`/`join` calls keep working, and a join over an unfiltered ref records the same history input as before. The dev codec serializes the ref as the `workflow:batch-collection-ref` kind.
|
|
8
|
-
|
|
9
|
-
Adds `size()`, `take(limit)` and `toArray()` to `WorkflowBatchCollectionRef`, each recorded as a single sync activity (`WorkflowBatchSizeActivity`, `WorkflowBatchTakeActivity`, `WorkflowBatchToArrayActivity`) built on the existing `WorkflowBatchClaim.outputs`. Runtimes that register activities explicitly must register the three new activities. The `where` operators and their validation moved to core as `WorkflowBatchQuery` (core now depends on `sift`), and `filter()` rejects a non-serializable `where` immediately.
|
|
10
|
-
|
|
11
|
-
The dev server now rejects an activity whose serialized output is above 1 MiB (`ActivityOutputTooLargeException`), matching the runtime's limit on the size of an activity output.
|
|
3
|
+
## 0.0.0-experimental-20260925183248
|
|
12
4
|
|
|
13
5
|
### Patch Changes
|
|
14
6
|
|
|
15
|
-
- Updated dependencies [[`
|
|
16
|
-
- @t4h.framework/
|
|
17
|
-
- @t4h.framework/fs@0.0.0-experimental-20260925181830
|
|
18
|
-
- @t4h.framework/cache@0.0.0-experimental-20260925181830
|
|
19
|
-
- @t4h.framework/hmac@0.0.0-experimental-20260925181830
|
|
20
|
-
- @t4h.framework/http@0.0.0-experimental-20260925181830
|
|
21
|
-
- @t4h.framework/jwks@0.0.0-experimental-20260925181830
|
|
22
|
-
- @t4h.framework/oidc@0.0.0-experimental-20260925181830
|
|
23
|
-
- @t4h.framework/orm@0.0.0-experimental-20260925181830
|
|
24
|
-
- @t4h.framework/sftp@0.0.0-experimental-20260925181830
|
|
25
|
-
- @t4h.framework/smtp@0.0.0-experimental-20260925181830
|
|
26
|
-
- @t4h.framework/webhook@0.0.0-experimental-20260925181830
|
|
7
|
+
- Updated dependencies [[`fe933c4`](https://github.com/tech4humans-brasil/framework/commit/fe933c480856f25b3233e6d626a0b6bd03cbee86)]:
|
|
8
|
+
- @t4h.framework/orm@0.0.0-experimental-20260925183248
|
|
27
9
|
|
|
28
10
|
## 0.21.1
|
|
29
11
|
|
|
@@ -2,7 +2,6 @@ export declare const DEFAULT_PORT = 3000;
|
|
|
2
2
|
export declare const DEFAULT_HOST = "localhost";
|
|
3
3
|
export declare const JSON_BODY_LIMIT_IN_BYTES: number;
|
|
4
4
|
export declare const CALLBACK_BODY_LIMIT_IN_BYTES: number;
|
|
5
|
-
export declare const ACTIVITY_OUTPUT_LIMIT_IN_BYTES: number;
|
|
6
5
|
export declare const APP_READY_TIMEOUT_IN_MS = 30000;
|
|
7
6
|
export declare const APP_KILL_TIMEOUT_IN_MS = 5000;
|
|
8
7
|
export declare const SSE_HEARTBEAT_INTERVAL_IN_MS = 15000;
|
package/dist/constants/server.js
CHANGED
|
@@ -2,7 +2,6 @@ export const DEFAULT_PORT = 3000;
|
|
|
2
2
|
export const DEFAULT_HOST = 'localhost';
|
|
3
3
|
export const JSON_BODY_LIMIT_IN_BYTES = 150 * 1024;
|
|
4
4
|
export const CALLBACK_BODY_LIMIT_IN_BYTES = 1024 * 1024;
|
|
5
|
-
export const ACTIVITY_OUTPUT_LIMIT_IN_BYTES = 1024 * 1024;
|
|
6
5
|
export const APP_READY_TIMEOUT_IN_MS = 30_000;
|
|
7
6
|
export const APP_KILL_TIMEOUT_IN_MS = 5_000;
|
|
8
7
|
export const SSE_HEARTBEAT_INTERVAL_IN_MS = 15_000;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/constants/server.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAA;AAEhC,MAAM,CAAC,MAAM,YAAY,GAAG,WAAW,CAAA;AAEvC,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,GAAG,IAAI,CAAA;AAElD,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,GAAG,IAAI,CAAA;AAEvD,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/constants/server.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAA;AAEhC,MAAM,CAAC,MAAM,YAAY,GAAG,WAAW,CAAA;AAEvC,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,GAAG,IAAI,CAAA;AAElD,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,GAAG,IAAI,CAAA;AAEvD,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAA;AAE7C,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,CAAA;AAE3C,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAA;AAElD,MAAM,CAAC,MAAM,sBAAsB,GAAG,WAAW,CAAA;AAEjD,MAAM,CAAC,MAAM,iBAAiB,GAAG,OAAO,CAAA;AAExC,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,CAAA;AAE7C,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,aAAa,EAAE,aAAa,CAAU,CAAA;AAE1E,MAAM,CAAC,MAAM,kCAAkC,GAAG,EAAE,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WorkflowBatchRef, WorkflowClaim, type Binary, type Serializable, type Workflow, type WorkflowInput } from '@t4h.framework/core';
|
|
2
2
|
import { RuntimeContextService } from '../../services/RuntimeContext.service.js';
|
|
3
3
|
export declare class DevWorkflowClaim extends WorkflowClaim {
|
|
4
4
|
private readonly context;
|
|
5
5
|
constructor(context: RuntimeContextService);
|
|
6
6
|
start<TWorkflow extends Workflow<any, any>>(workflow: TWorkflow | string, input?: WorkflowInput<TWorkflow>): Promise<Serializable>;
|
|
7
|
-
startMany<TWorkflow extends Workflow<any, any>>(workflow: TWorkflow | string, inputs: WorkflowInput<TWorkflow>[] | Binary[]): Promise<
|
|
7
|
+
startMany<TWorkflow extends Workflow<any, any>>(workflow: TWorkflow | string, inputs: WorkflowInput<TWorkflow>[] | Binary[]): Promise<WorkflowBatchRef>;
|
|
8
8
|
}
|
|
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
8
8
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
9
9
|
};
|
|
10
|
-
import {
|
|
10
|
+
import { WorkflowBatchRef, WorkflowClaim, } from '@t4h.framework/core';
|
|
11
11
|
import { container, Inject, Injectable } from 'pleroma';
|
|
12
12
|
import { RuntimeContextService } from '../../services/RuntimeContext.service.js';
|
|
13
13
|
import { WorkflowRunFacade } from '../../services/WorkflowRunFacade.service.js';
|
|
@@ -41,7 +41,7 @@ let DevWorkflowClaim = class DevWorkflowClaim extends WorkflowClaim {
|
|
|
41
41
|
parentWorkflowRunId: parentContext.runId,
|
|
42
42
|
parentWorkflowRunActivityId: parentContext.activityId,
|
|
43
43
|
});
|
|
44
|
-
return new
|
|
44
|
+
return new WorkflowBatchRef(parentContext.activityId, inputs.length);
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
DevWorkflowClaim = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevWorkflowClaim.js","sourceRoot":"","sources":["../../../src/models/claims/DevWorkflowClaim.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"DevWorkflowClaim.js","sourceRoot":"","sources":["../../../src/models/claims/DevWorkflowClaim.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,gBAAgB,EAChB,aAAa,GAKd,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAA;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAA;AAGxE,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,aAAa;IAG9B;IAFnB,YAEmB,OAA8B;QAE/C,KAAK,EAAE,CAAA;QAFU,YAAO,GAAP,OAAO,CAAuB;IAGjD,CAAC;IAEM,KAAK,CAAC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gBAAgB,CAAC,aAAa,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;IACtE,CAAC;CACF,CAAA;AApDY,gBAAgB;IAD5B,UAAU,EAAE;IAGR,WAAA,MAAM,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC,CAAA;GAF3B,gBAAgB,CAoD5B"}
|
|
@@ -8,11 +8,8 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
8
8
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
9
9
|
};
|
|
10
10
|
import { Inject, Injectable } from 'pleroma';
|
|
11
|
-
import { ACTIVITY_OUTPUT_LIMIT_IN_BYTES } from '../constants/server.js';
|
|
12
|
-
import { ActivityOutputTooLargeException } from '../exceptions/ActivityOutputTooLarge.exception.js';
|
|
13
11
|
import { WorkflowRunActivity, } from '../models/WorkflowRunActivity.js';
|
|
14
12
|
import { DatabaseService } from '../services/Database.service.js';
|
|
15
|
-
import { toRejectedReason } from '../tools/to-rejected-reason.js';
|
|
16
13
|
let WorkflowRunActivityRepository = class WorkflowRunActivityRepository {
|
|
17
14
|
database;
|
|
18
15
|
constructor(database) {
|
|
@@ -57,18 +54,11 @@ let WorkflowRunActivityRepository = class WorkflowRunActivityRepository {
|
|
|
57
54
|
return row.count;
|
|
58
55
|
}
|
|
59
56
|
async complete(id, output) {
|
|
60
|
-
const encoded = await this.database.encode(output);
|
|
61
|
-
const bytes = encoded === null ? 0 : Buffer.byteLength(encoded, 'utf8');
|
|
62
|
-
if (bytes > ACTIVITY_OUTPUT_LIMIT_IN_BYTES) {
|
|
63
|
-
const error = new ActivityOutputTooLargeException(bytes, ACTIVITY_OUTPUT_LIMIT_IN_BYTES);
|
|
64
|
-
await this.fail(id, toRejectedReason(error));
|
|
65
|
-
throw error;
|
|
66
|
-
}
|
|
67
57
|
this.db
|
|
68
58
|
.prepare(`UPDATE workflow_run_activities
|
|
69
59
|
SET output = ?, completed_at = ?, status = 'fulfilled'
|
|
70
60
|
WHERE id = ?`)
|
|
71
|
-
.run(
|
|
61
|
+
.run(await this.database.encode(output), Date.now(), id);
|
|
72
62
|
}
|
|
73
63
|
async fail(id, output) {
|
|
74
64
|
this.db
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkflowRunActivity.repository.js","sourceRoot":"","sources":["../../src/repositories/WorkflowRunActivity.repository.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAE5C,OAAO,
|
|
1
|
+
{"version":3,"file":"WorkflowRunActivity.repository.js","sourceRoot":"","sources":["../../src/repositories/WorkflowRunActivity.repository.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAE5C,OAAO,EACL,mBAAmB,GAGpB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AAiB1D,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IAGrB;IAFnB,YAEmB,QAAyB;QAAzB,aAAQ,GAAR,QAAQ,CAAiB;IACzC,CAAC;IAEJ,IAAY,EAAE;QACZ,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAA;IACzB,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,QAA6B;QAC/C,IAAI,CAAC,EAAE;aACJ,OAAO,CACN;;iDAEyC,CAC1C;aACA,GAAG,CACF,QAAQ,CAAC,EAAE,EACX,QAAQ,CAAC,KAAK,EACd,QAAQ,CAAC,QAAQ,EACjB,QAAQ,CAAC,IAAI,EACb,QAAQ,CAAC,IAAI,EACb,QAAQ,CAAC,MAAM,EACf,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAC1C,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,EAC3C,QAAQ,CAAC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C;SACpC,CACF,CAAA;IACH,CAAC;CACF,CAAA;AAvHY,6BAA6B;IADzC,UAAU,EAAE;IAGR,WAAA,MAAM,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,CAAA;GAFrB,6BAA6B,CAuHzC"}
|
package/dist/tools/json-codec.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Binary, Secret
|
|
1
|
+
import { Binary, Secret } from '@t4h.framework/core';
|
|
2
2
|
import { getIntegrations } from '../integrations/index.js';
|
|
3
3
|
import { DevFileBinary } from '../models/DevFileBinary.js';
|
|
4
4
|
import { JSONCodec, JSONCodecKind } from '../models/JSONCodec.js';
|
|
5
|
-
import { JSONCodecKindFrameworkSerializableClass } from '../models/JSONCodecKindFrameworkSerializableClass.js';
|
|
6
5
|
const jsonDateKind = new JSONCodecKind('date', value => value instanceof Date, (date) => date.toISOString(), (date) => new Date(date));
|
|
7
6
|
const jsonSecretKind = new JSONCodecKind('secret', value => value instanceof Secret, (secret) => ({ name: secret.name }), async (json, options) => {
|
|
8
7
|
if (!options.readSecret)
|
|
@@ -14,10 +13,9 @@ const jsonBinaryKind = new JSONCodecKind('binary', value => value instanceof Bin
|
|
|
14
13
|
throw new TypeError('Unsupported binary instance');
|
|
15
14
|
return binary.toJSON();
|
|
16
15
|
}, json => DevFileBinary.from(json));
|
|
17
|
-
const jsonWorkflowBatchCollectionRefKind = new JSONCodecKindFrameworkSerializableClass('workflow:batch-collection-ref', WorkflowBatchCollectionRef);
|
|
18
16
|
const load = async () => {
|
|
19
17
|
const integrations = await getIntegrations();
|
|
20
|
-
return new JSONCodec(jsonDateKind, jsonSecretKind,
|
|
18
|
+
return new JSONCodec(jsonDateKind, jsonSecretKind, ...integrations.flatMap(({ kinds }) => kinds ?? []), jsonBinaryKind);
|
|
21
19
|
};
|
|
22
20
|
let codec;
|
|
23
21
|
export const getJsonCodec = () => (codec ??= load());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-codec.js","sourceRoot":"","sources":["../../src/tools/json-codec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"json-codec.js","sourceRoot":"","sources":["../../src/tools/json-codec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAIjE,MAAM,YAAY,GAAG,IAAI,aAAa,CACpC,MAAM,EACN,KAAK,CAAC,EAAE,CAAC,KAAK,YAAY,IAAI,EAC9B,CAAC,IAAU,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,EAClC,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CACjC,CAAA;AAMD,MAAM,cAAc,GAAG,IAAI,aAAa,CACtC,QAAQ,EACR,KAAK,CAAC,EAAE,CAAC,KAAK,YAAY,MAAM,EAChC,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,EAC3C,KAAK,EAAE,IAAsB,EAAE,OAAmC,EAAE,EAAE;IACpE,IAAI,CAAC,OAAO,CAAC,UAAU;QAAE,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAErD,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;AACvE,CAAC,CACF,CAAA;AAED,MAAM,cAAc,GAAG,IAAI,aAAa,CACtC,QAAQ,EACR,KAAK,CAAC,EAAE,CAAC,KAAK,YAAY,MAAM,EAChC,CAAC,MAAc,EAAE,EAAE;IACjB,IAAI,CAAC,CAAC,MAAM,YAAY,aAAa,CAAC;QACpC,MAAM,IAAI,SAAS,CAAC,6BAA6B,CAAC,CAAA;IAEpD,OAAO,MAAM,CAAC,MAAM,EAAE,CAAA;AACxB,CAAC,EACD,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CACjC,CAAA;AAED,MAAM,IAAI,GAAG,KAAK,IAA+B,EAAE;IACjD,MAAM,YAAY,GAAG,MAAM,eAAe,EAAE,CAAA;IAE5C,OAAO,IAAI,SAAS,CAClB,YAAY,EACZ,cAAc,EACd,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,EACnD,cAAc,CACf,CAAA;AACH,CAAC,CAAA;AAED,IAAI,KAA4C,CAAA;AAEhD,MAAM,CAAC,MAAM,YAAY,GAAG,GAA8B,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@t4h.framework/dev",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-20260925183248",
|
|
4
4
|
"description": "Dev server for the T4H Framework",
|
|
5
5
|
"homepage": "https://github.com/tech4humans-brasil/framework/tree/main/packages/dev",
|
|
6
6
|
"bugs": "https://github.com/tech4humans-brasil/framework/issues",
|
|
@@ -59,18 +59,18 @@
|
|
|
59
59
|
"vite": "^8.0.3"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@t4h.framework/cache": "^0.
|
|
63
|
-
"@t4h.framework/core": "^0.
|
|
64
|
-
"@t4h.framework/fs": "^0.
|
|
65
|
-
"@t4h.framework/hmac": "^0.
|
|
66
|
-
"@t4h.framework/http": "^0.
|
|
67
|
-
"@t4h.framework/jwks": "^0.
|
|
68
|
-
"@t4h.framework/oidc": "^0.
|
|
69
|
-
"@t4h.framework/orm": "^0.0.0-experimental-
|
|
62
|
+
"@t4h.framework/cache": "^0.6.6",
|
|
63
|
+
"@t4h.framework/core": "^0.16.0",
|
|
64
|
+
"@t4h.framework/fs": "^0.11.0",
|
|
65
|
+
"@t4h.framework/hmac": "^0.3.3",
|
|
66
|
+
"@t4h.framework/http": "^0.7.1",
|
|
67
|
+
"@t4h.framework/jwks": "^0.7.2",
|
|
68
|
+
"@t4h.framework/oidc": "^0.6.6",
|
|
69
|
+
"@t4h.framework/orm": "^0.0.0-experimental-20260925183248",
|
|
70
70
|
"@t4h.framework/runtime-claims": "^0.1.0",
|
|
71
|
-
"@t4h.framework/sftp": "^0.
|
|
72
|
-
"@t4h.framework/smtp": "^0.
|
|
73
|
-
"@t4h.framework/webhook": "^0.
|
|
71
|
+
"@t4h.framework/sftp": "^0.8.1",
|
|
72
|
+
"@t4h.framework/smtp": "^0.7.1",
|
|
73
|
+
"@t4h.framework/webhook": "^0.2.3",
|
|
74
74
|
"@types/dot-object": "^2.1.6",
|
|
75
75
|
"@types/json-schema": "^7.0.15",
|
|
76
76
|
"@types/mime-types": "^3",
|
|
@@ -81,18 +81,18 @@
|
|
|
81
81
|
"vitest": "^4.0.18"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
|
-
"@t4h.framework/cache": "0.0.0
|
|
85
|
-
"@t4h.framework/core": "0.0.0
|
|
86
|
-
"@t4h.framework/fs": "0.0.0
|
|
87
|
-
"@t4h.framework/hmac": "0.0.0
|
|
88
|
-
"@t4h.framework/http": "0.0.0
|
|
89
|
-
"@t4h.framework/jwks": "0.0.0
|
|
90
|
-
"@t4h.framework/oidc": "0.0.0
|
|
91
|
-
"@t4h.framework/orm": "0.0.0-experimental-
|
|
84
|
+
"@t4h.framework/cache": ">=0.6.5 <1.0.0",
|
|
85
|
+
"@t4h.framework/core": ">=0.15.0 <1.0.0",
|
|
86
|
+
"@t4h.framework/fs": ">=0.10.0 <1.0.0",
|
|
87
|
+
"@t4h.framework/hmac": ">=0.3.2 <1.0.0",
|
|
88
|
+
"@t4h.framework/http": ">=0.7.0 <1.0.0",
|
|
89
|
+
"@t4h.framework/jwks": ">=0.7.1 <1.0.0",
|
|
90
|
+
"@t4h.framework/oidc": ">=0.6.5 <1.0.0",
|
|
91
|
+
"@t4h.framework/orm": "0.0.0-experimental-20260925183248",
|
|
92
92
|
"@t4h.framework/runtime-claims": "^0.1.0",
|
|
93
|
-
"@t4h.framework/sftp": "0.0.0
|
|
94
|
-
"@t4h.framework/smtp": "0.0.0
|
|
95
|
-
"@t4h.framework/webhook": "0.0.0
|
|
93
|
+
"@t4h.framework/sftp": ">=0.8.0 <1.0.0",
|
|
94
|
+
"@t4h.framework/smtp": ">=0.7.0 <1.0.0",
|
|
95
|
+
"@t4h.framework/webhook": ">=0.2.2 <1.0.0",
|
|
96
96
|
"typescript": "^5.9.3"
|
|
97
97
|
},
|
|
98
98
|
"peerDependenciesMeta": {
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export class ActivityOutputTooLargeException extends RangeError {
|
|
2
|
-
bytes;
|
|
3
|
-
maxBytes;
|
|
4
|
-
name = 'ActivityOutputTooLargeException';
|
|
5
|
-
constructor(bytes, maxBytes) {
|
|
6
|
-
super(`An activity output of ${bytes} bytes is above the ${maxBytes} bytes the workflow history accepts. Return a Binary instead, e.g. write a batch to a file with join()`);
|
|
7
|
-
this.bytes = bytes;
|
|
8
|
-
this.maxBytes = maxBytes;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=ActivityOutputTooLarge.exception.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ActivityOutputTooLarge.exception.js","sourceRoot":"","sources":["../../src/exceptions/ActivityOutputTooLarge.exception.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,+BAAgC,SAAQ,UAAU;IAI3C;IACA;IAJO,IAAI,GAAG,iCAAiC,CAAA;IAEjE,YACkB,KAAa,EACb,QAAgB;QAEhC,KAAK,CACH,yBAAyB,KAAK,uBAAuB,QAAQ,wGAAwG,CACtK,CAAA;QALe,UAAK,GAAL,KAAK,CAAQ;QACb,aAAQ,GAAR,QAAQ,CAAQ;IAKlC,CAAC;CACF"}
|