@t4h.framework/fs 0.9.4 → 0.9.5
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 +20 -0
- package/dist/AssetClaim.d.ts +6 -0
- package/dist/AssetClaim.d.ts.map +1 -0
- package/dist/AssetClaim.js +8 -0
- package/dist/AssetClaim.js.map +1 -0
- package/dist/fs.d.ts +1 -0
- package/dist/fs.d.ts.map +1 -1
- package/dist/fs.js +1 -0
- package/dist/fs.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @t4h.framework/fs
|
|
2
2
|
|
|
3
|
+
## 0.9.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#174](https://github.com/tech4humans-brasil/framework/pull/174) [`7cd75e4`](https://github.com/tech4humans-brasil/framework/commit/7cd75e4f557d9f5fbe3e486d5a3981186fa38797) Thanks [@gusteycamargo](https://github.com/gusteycamargo)! - Adds `asset(path)`, which reads a file shipped with the project.
|
|
8
|
+
|
|
9
|
+
Fonts a PDF embeds, images a template draws, a fixed lookup table: they belong
|
|
10
|
+
to the project, not to a run. Reading them with `readFileSync` appears to work
|
|
11
|
+
and then costs dearly, because every primitive persists its input — a value
|
|
12
|
+
holding a `Buffer` is serialized whole, once per activity that receives it, so
|
|
13
|
+
a 1.5 MB font used by a workflow that runs per record is written into the
|
|
14
|
+
history per record. `asset` returns a `Binary`, which travels as a reference
|
|
15
|
+
and is read only where the bytes are needed.
|
|
16
|
+
|
|
17
|
+
Declare the files in `framework.config.ts` under `build.assets` (renamed from
|
|
18
|
+
`build.additionalFiles`, with no fallback — rename the key to keep shipping
|
|
19
|
+
files). `build` now records the copied paths and `publish` sends them, so a
|
|
20
|
+
runtime knows which entries of the artifact are assets. `AssetClaim` is the
|
|
21
|
+
contract each runtime implements.
|
|
22
|
+
|
|
3
23
|
## 0.9.4
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssetClaim.d.ts","sourceRoot":"","sources":["../src/AssetClaim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAExD,8BAAsB,UAAU;aACd,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAChE;AAED,wBAAsB,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAIzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssetClaim.js","sourceRoot":"","sources":["../src/AssetClaim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAe,MAAM,qBAAqB,CAAA;AAExD,MAAM,OAAgB,UAAU;CAE/B;AAED,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,IAAY;IACtC,MAAM,MAAM,GAAG,IAAI,KAAK,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAA;IAEhD,OAAO,MAAM,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;AAC1C,CAAC"}
|
package/dist/fs.d.ts
CHANGED
package/dist/fs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../src/fs.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,mCAAmC,CAAA;AACjD,cAAc,mCAAmC,CAAA;AACjD,cAAc,qCAAqC,CAAA"}
|
|
1
|
+
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../src/fs.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,mCAAmC,CAAA;AACjD,cAAc,mCAAmC,CAAA;AACjD,cAAc,qCAAqC,CAAA"}
|
package/dist/fs.js
CHANGED
package/dist/fs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.js","sourceRoot":"","sources":["../src/fs.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,mCAAmC,CAAA;AACjD,cAAc,mCAAmC,CAAA;AACjD,cAAc,qCAAqC,CAAA"}
|
|
1
|
+
{"version":3,"file":"fs.js","sourceRoot":"","sources":["../src/fs.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,mCAAmC,CAAA;AACjD,cAAc,mCAAmC,CAAA;AACjD,cAAc,qCAAqC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@t4h.framework/fs",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.5",
|
|
4
4
|
"description": "File system module for the T4H Framework",
|
|
5
5
|
"homepage": "https://github.com/tech4humans-brasil/framework/tree/main/packages/fs",
|
|
6
6
|
"bugs": "https://github.com/tech4humans-brasil/framework/issues",
|