janus-parse 2.1.0 → 2.1.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/README.md CHANGED
@@ -118,7 +118,7 @@ type JanusServerStreamConfig = {
118
118
  config?: Config;
119
119
  encoding?: BufferEncoding;
120
120
  fetchOptions?: RequestInit;
121
- filePath?: string;
121
+ filePath?: string;
122
122
  };
123
123
  ```
124
124
 
@@ -133,9 +133,9 @@ type JanusServerStreamConfig = {
133
133
 
134
134
  This package is split into targeted modules. Modern bundlers will only bundle the exact module you import, keeping your builds incredibly lightweight.
135
135
 
136
- | Import Path | Target Environment | Size (Minified + Gzipped) |
137
- | :-------------------------- | :----------------- | :------------------------ |
138
- | `janus-parse/server` | Node.js | **~47.6 KB** |
139
- | `janus-parse/server:stream` | Node.js | **~49 KB** |
140
- | `janus-parse/client` | Browser | **~700 B** |
141
- | `janus-parse/client:stream` | Browser | **~1 KB** |
136
+ | Import Path | Target Environment | Size (Gzipped) |
137
+ | :-------------------------- | :----------------- | :------------- |
138
+ | `janus-parse/server` | Node.js | **~47.6 KB** |
139
+ | `janus-parse/server:stream` | Node.js | **~49 KB** |
140
+ | `janus-parse/client` | Browser | **~700 B** |
141
+ | `janus-parse/client:stream` | Browser | **~1 KB** |
@@ -1 +1 @@
1
- {"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../lib/server/stream.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,KAAK,aAAa,GAAG;IACnB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAMF,KAAK,eAAe,GAAG,IAAI,CAAC,aAAa,EAAE,cAAc,CAAC,GAAG;IAC3D,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AACF,KAAK,uBAAuB,GAAG,aAAa,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/D,wBAAsB,iBAAiB,CAAC,EACtC,MAAM,EACN,QAAQ,EACR,QAAQ,GACT,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AACrC,wBAAsB,iBAAiB,CAAC,EACtC,GAAG,EACH,QAAQ,EACR,YAAY,EACZ,MAAM,GACP,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../lib/server/stream.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,KAAK,aAAa,GAAG;IACnB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAMF,KAAK,eAAe,GAAG,IAAI,CAAC,aAAa,EAAE,cAAc,CAAC,GAAG;IAC3D,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AACF,KAAK,uBAAuB,GAAG,aAAa,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/D,wBAAsB,iBAAiB,CAAC,EACtC,MAAM,EACN,QAAQ,EACR,QAAQ,GACT,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AACrC,wBAAsB,iBAAiB,CAAC,EACtC,GAAG,EACH,QAAQ,EACR,YAAY,EACZ,MAAM,GACP,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { open } from "node:fs/promises";
2
2
  import { Readable } from "node:stream";
3
3
  import { buffer } from "node:stream/consumers";
4
- import { janusServer } from "./server.js";
5
4
  export async function janusServerStream({ encoding = "utf8", filePath = "", fetchOptions = {}, config = {}, url = "", }) {
6
5
  if (url.trim().length > 0) {
7
6
  const response = await fetch(url, fetchOptions);
@@ -28,5 +27,6 @@ async function _janusServer(inputStream, config, encoding = "utf8") {
28
27
  const bytesBuffer = await buffer(inputStream);
29
28
  const decoder = new TextDecoder(encoding);
30
29
  const text = decoder.decode(bytesBuffer);
30
+ const { janusServer } = await import("./server.js");
31
31
  return await janusServer(text, config);
32
32
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "janus-parse",
3
3
  "license": "MIT",
4
- "version": "2.1.0",
5
- "packageManager": "pnpm@11.17.0",
4
+ "version": "2.1.1",
5
+ "packageManager": "pnpm@11.20.0",
6
6
  "keywords": [
7
7
  "html-parser",
8
8
  "text-extractor",
@@ -17,8 +17,8 @@
17
17
  ],
18
18
  "exports": {
19
19
  ".": {
20
- "types": "./dist/server/server.d.js",
21
- "import": "./dist/server/server.js"
20
+ "types": "./dist/client/client.d.js",
21
+ "import": "./dist/client/client.js"
22
22
  },
23
23
  "./server/stream": {
24
24
  "types": "./dist/server/stream.d.ts",