@t4h.framework/dev 0.0.0-experimental-20260909045544 → 0.0.0-experimental-20260911032608
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 +32 -14
- package/dist/tools/json-codec.js +2 -2
- package/dist/tools/json-codec.js.map +1 -1
- package/package.json +23 -23
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
# @t4h.framework/dev
|
|
2
2
|
|
|
3
|
-
## 0.0.0-experimental-
|
|
3
|
+
## 0.0.0-experimental-20260911032608
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
- [#
|
|
7
|
+
- [#172](https://github.com/tech4humans-brasil/framework/pull/172) [`103c1a8`](https://github.com/tech4humans-brasil/framework/commit/103c1a8a3b7ba177c68a0e4e683aead1e4ba1b3f) Thanks [@gusteycamargo](https://github.com/gusteycamargo)! - Rejects a `Binary` the dev server cannot address instead of trying to serialize
|
|
8
|
+
it.
|
|
9
|
+
|
|
10
|
+
A `Binary` implemented in the App matched no codec kind and fell through to the
|
|
11
|
+
generic object branch, which walks a `Buffer` one property per byte — around
|
|
12
|
+
100 MB of heap and 8 MB of JSON for a 760 KB file, on every serialization. It
|
|
13
|
+
surfaced as an out-of-memory crash with nothing pointing at the cause, and only
|
|
14
|
+
in development: a published project fails on the same value with a clear error.
|
|
15
|
+
|
|
16
|
+
It now fails the same way, with `Unsupported binary instance`, so the mistake
|
|
17
|
+
shows up while you are writing the workflow. Always take a `Binary` from the
|
|
18
|
+
framework — a response body, `sftp.get`, `read`, `write`, `join`, `asset` — and
|
|
19
|
+
never implement the class yourself.
|
|
20
|
+
|
|
21
|
+
## 0.20.1
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- [#170](https://github.com/tech4humans-brasil/framework/pull/170) [`aa72268`](https://github.com/tech4humans-brasil/framework/commit/aa72268d040a743743cac31cc14e26b8620b0e3f) Thanks [@gusteycamargo](https://github.com/gusteycamargo)! - Adds the `jwks` callback auth: a detached signature over the callback body,
|
|
8
26
|
verified with the public key the `kid` resolves to at a JWKS URL — the way Amber
|
|
9
27
|
signs its webhooks.
|
|
10
28
|
|
|
@@ -21,18 +39,18 @@
|
|
|
21
39
|
|
|
22
40
|
**webhook**: documents the new type.
|
|
23
41
|
|
|
24
|
-
- Updated dependencies [[`
|
|
25
|
-
- @t4h.framework/core@0.
|
|
26
|
-
- @t4h.framework/jwks@0.
|
|
27
|
-
- @t4h.framework/webhook@0.
|
|
28
|
-
- @t4h.framework/cache@0.
|
|
29
|
-
- @t4h.framework/fs@0.
|
|
30
|
-
- @t4h.framework/hmac@0.
|
|
31
|
-
- @t4h.framework/http@0.
|
|
32
|
-
- @t4h.framework/oidc@0.
|
|
33
|
-
- @t4h.framework/orm@0.
|
|
34
|
-
- @t4h.framework/sftp@0.
|
|
35
|
-
- @t4h.framework/smtp@0.
|
|
42
|
+
- Updated dependencies [[`aa72268`](https://github.com/tech4humans-brasil/framework/commit/aa72268d040a743743cac31cc14e26b8620b0e3f)]:
|
|
43
|
+
- @t4h.framework/core@0.14.0
|
|
44
|
+
- @t4h.framework/jwks@0.7.0
|
|
45
|
+
- @t4h.framework/webhook@0.2.1
|
|
46
|
+
- @t4h.framework/cache@0.6.4
|
|
47
|
+
- @t4h.framework/fs@0.9.4
|
|
48
|
+
- @t4h.framework/hmac@0.3.1
|
|
49
|
+
- @t4h.framework/http@0.6.3
|
|
50
|
+
- @t4h.framework/oidc@0.6.4
|
|
51
|
+
- @t4h.framework/orm@0.7.5
|
|
52
|
+
- @t4h.framework/sftp@0.7.4
|
|
53
|
+
- @t4h.framework/smtp@0.6.4
|
|
36
54
|
|
|
37
55
|
## 0.20.0
|
|
38
56
|
|
package/dist/tools/json-codec.js
CHANGED
|
@@ -3,14 +3,14 @@ import { getIntegrations } from '../integrations/index.js';
|
|
|
3
3
|
import { DevFileBinary } from '../models/DevFileBinary.js';
|
|
4
4
|
import { JSONCodec, JSONCodecKind } from '../models/JSONCodec.js';
|
|
5
5
|
const jsonDateKind = new JSONCodecKind('date', value => value instanceof Date, (date) => date.toISOString(), (date) => new Date(date));
|
|
6
|
-
const
|
|
6
|
+
const jsonBinaryKind = new JSONCodecKind('binary', value => value instanceof Binary, (binary) => {
|
|
7
7
|
if (!(binary instanceof DevFileBinary))
|
|
8
8
|
throw new TypeError('Unsupported binary instance');
|
|
9
9
|
return binary.toJSON();
|
|
10
10
|
}, json => DevFileBinary.from(json));
|
|
11
11
|
const load = async () => {
|
|
12
12
|
const integrations = await getIntegrations();
|
|
13
|
-
return new JSONCodec(jsonDateKind,
|
|
13
|
+
return new JSONCodec(jsonDateKind, ...integrations.flatMap(({ kinds }) => kinds ?? []), jsonBinaryKind);
|
|
14
14
|
};
|
|
15
15
|
let codec;
|
|
16
16
|
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,qBAAqB,CAAA;AAE5C,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;AAED,MAAM,
|
|
1
|
+
{"version":3,"file":"json-codec.js","sourceRoot":"","sources":["../../src/tools/json-codec.ts"],"names":[],"mappings":"AAAA,OAAO,EA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
|
1
1
|
{
|
|
2
2
|
"name": "@t4h.framework/dev",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-20260911032608",
|
|
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.
|
|
62
|
+
"@t4h.framework/cache": "^0.6.4",
|
|
63
|
+
"@t4h.framework/core": "^0.14.0",
|
|
64
|
+
"@t4h.framework/fs": "^0.9.4",
|
|
65
|
+
"@t4h.framework/hmac": "^0.3.1",
|
|
66
|
+
"@t4h.framework/http": "^0.6.3",
|
|
67
|
+
"@t4h.framework/jwks": "^0.7.0",
|
|
68
|
+
"@t4h.framework/oidc": "^0.6.4",
|
|
69
|
+
"@t4h.framework/orm": "^0.7.5",
|
|
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.7.4",
|
|
72
|
+
"@t4h.framework/smtp": "^0.6.4",
|
|
73
|
+
"@t4h.framework/webhook": "^0.2.1",
|
|
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.
|
|
85
|
-
"@t4h.framework/core": "^0.
|
|
86
|
-
"@t4h.framework/fs": "^0.
|
|
87
|
-
"@t4h.framework/hmac": "^0.
|
|
88
|
-
"@t4h.framework/http": "^0.
|
|
89
|
-
"@t4h.framework/jwks": "^0.
|
|
90
|
-
"@t4h.framework/oidc": "^0.
|
|
91
|
-
"@t4h.framework/orm": "^0.
|
|
84
|
+
"@t4h.framework/cache": "^0.6.4",
|
|
85
|
+
"@t4h.framework/core": "^0.14.0",
|
|
86
|
+
"@t4h.framework/fs": "^0.9.4",
|
|
87
|
+
"@t4h.framework/hmac": "^0.3.1",
|
|
88
|
+
"@t4h.framework/http": "^0.6.3",
|
|
89
|
+
"@t4h.framework/jwks": "^0.7.0",
|
|
90
|
+
"@t4h.framework/oidc": "^0.6.4",
|
|
91
|
+
"@t4h.framework/orm": "^0.7.5",
|
|
92
92
|
"@t4h.framework/runtime-claims": "^0.1.0",
|
|
93
|
-
"@t4h.framework/sftp": "^0.
|
|
94
|
-
"@t4h.framework/smtp": "^0.
|
|
95
|
-
"@t4h.framework/webhook": "^0.
|
|
93
|
+
"@t4h.framework/sftp": "^0.7.4",
|
|
94
|
+
"@t4h.framework/smtp": "^0.6.4",
|
|
95
|
+
"@t4h.framework/webhook": "^0.2.1",
|
|
96
96
|
"typescript": "^5.9.3"
|
|
97
97
|
},
|
|
98
98
|
"peerDependenciesMeta": {
|