content-entry-transform 1.4.39 → 1.5.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "content-entry-transform",
3
- "version": "1.4.39",
3
+ "version": "1.5.1",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -27,12 +27,12 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@types/node": "^22.15.17",
30
- "content-entry": "^13.3.0",
30
+ "content-entry": "^14.1.2",
31
31
  "iterable-string-interceptor": "^3.0.2"
32
32
  },
33
33
  "devDependencies": {
34
34
  "ava": "^6.3.0",
35
- "browser-ava": "^2.3.30",
35
+ "browser-ava": "^2.3.31",
36
36
  "c8": "^10.1.3",
37
37
  "documentation": "^14.0.3",
38
38
  "semantic-release": "^24.2.3"
@@ -1,8 +1,6 @@
1
- import { ReadableStreamContentEntry } from "content-entry";
1
+ import { IteratorContentEntry } from "content-entry";
2
2
  import { iterableStringInterceptor } from "iterable-string-interceptor";
3
3
 
4
- export const utf8StreamOptions = { encoding: "utf8" };
5
-
6
4
  export function createPropertiesInterceptor(properties) {
7
5
  return async function* transformer(
8
6
  expression,
@@ -72,15 +70,14 @@ export function createExpressionTransformer(
72
70
  name,
73
71
  match,
74
72
  transform: async entry => {
75
- const ne = new ReadableStreamContentEntry(
73
+ const ne = new IteratorContentEntry(
76
74
  entry.name,
77
- undefined,
75
+ { destination: entry.destination },
78
76
  iterableStringInterceptor(
79
- streamToText(await entry.getReadStream()),
77
+ streamToText(await entry.stream),
80
78
  createPropertiesInterceptor(properties)
81
79
  )
82
80
  );
83
- ne.destination = entry.destination; // TODO all the other attributes ?
84
81
  return ne;
85
82
  }
86
83
  };