@jongleberry/vurst-markdown 0.1.0 → 0.2.2
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/LICENSE +21 -0
- package/index.d.ts +0 -1
- package/index.js +54 -84
- package/package.json +9 -10
- package/vurst-markdown.darwin-arm64.node +0 -0
- package/vurst-markdown.linux-arm64-gnu.node +0 -0
- package/vurst-markdown.linux-x64-gnu.node +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jonathan Ong
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* auto-generated by NAPI-RS */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/// <reference types="node" />
|
|
4
|
-
|
|
5
4
|
export declare function chunk(text: Buffer, options?: ChunkOptions | undefined | null): Promise<Array<Chunk>>
|
|
6
5
|
|
|
7
6
|
export declare function extractMarkdownUrls(text: Buffer): Promise<MarkdownUrls>
|
package/index.js
CHANGED
|
@@ -6,17 +6,6 @@
|
|
|
6
6
|
const { readFileSync } = require('node:fs')
|
|
7
7
|
let nativeBinding = null
|
|
8
8
|
const loadErrors = []
|
|
9
|
-
const supportedPlatforms = 'macOS arm64, Linux x64 glibc, and Linux arm64 glibc'
|
|
10
|
-
|
|
11
|
-
const isPublishedPlatform = () => {
|
|
12
|
-
if (process.platform === 'darwin') {
|
|
13
|
-
return process.arch === 'arm64'
|
|
14
|
-
}
|
|
15
|
-
if (process.platform === 'linux') {
|
|
16
|
-
return (process.arch === 'x64' || process.arch === 'arm64') && !isMusl()
|
|
17
|
-
}
|
|
18
|
-
return false
|
|
19
|
-
}
|
|
20
9
|
|
|
21
10
|
const isMusl = () => {
|
|
22
11
|
let musl = false
|
|
@@ -45,13 +34,8 @@ const isMuslFromFilesystem = () => {
|
|
|
45
34
|
const isMuslFromReport = () => {
|
|
46
35
|
let report = null
|
|
47
36
|
if (typeof process.report?.getReport === 'function') {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
process.report.excludeNetwork = true
|
|
51
|
-
report = process.report.getReport()
|
|
52
|
-
} finally {
|
|
53
|
-
process.report.excludeNetwork = previousExcludeNetwork
|
|
54
|
-
}
|
|
37
|
+
process.report.excludeNetwork = true
|
|
38
|
+
report = process.report.getReport()
|
|
55
39
|
}
|
|
56
40
|
if (!report) {
|
|
57
41
|
return null
|
|
@@ -93,8 +77,8 @@ function requireNative() {
|
|
|
93
77
|
try {
|
|
94
78
|
const binding = require('@jongleberry/vurst-markdown-android-arm64')
|
|
95
79
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-android-arm64/package.json').version
|
|
96
|
-
if (bindingPackageVersion !== '0.
|
|
97
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
80
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
81
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
98
82
|
}
|
|
99
83
|
return binding
|
|
100
84
|
} catch (e) {
|
|
@@ -109,8 +93,8 @@ function requireNative() {
|
|
|
109
93
|
try {
|
|
110
94
|
const binding = require('@jongleberry/vurst-markdown-android-arm-eabi')
|
|
111
95
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-android-arm-eabi/package.json').version
|
|
112
|
-
if (bindingPackageVersion !== '0.
|
|
113
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
96
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
97
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
114
98
|
}
|
|
115
99
|
return binding
|
|
116
100
|
} catch (e) {
|
|
@@ -130,8 +114,8 @@ function requireNative() {
|
|
|
130
114
|
try {
|
|
131
115
|
const binding = require('@jongleberry/vurst-markdown-win32-x64-gnu')
|
|
132
116
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-win32-x64-gnu/package.json').version
|
|
133
|
-
if (bindingPackageVersion !== '0.
|
|
134
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
117
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
118
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
135
119
|
}
|
|
136
120
|
return binding
|
|
137
121
|
} catch (e) {
|
|
@@ -146,8 +130,8 @@ function requireNative() {
|
|
|
146
130
|
try {
|
|
147
131
|
const binding = require('@jongleberry/vurst-markdown-win32-x64-msvc')
|
|
148
132
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-win32-x64-msvc/package.json').version
|
|
149
|
-
if (bindingPackageVersion !== '0.
|
|
150
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
133
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
134
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
151
135
|
}
|
|
152
136
|
return binding
|
|
153
137
|
} catch (e) {
|
|
@@ -163,8 +147,8 @@ function requireNative() {
|
|
|
163
147
|
try {
|
|
164
148
|
const binding = require('@jongleberry/vurst-markdown-win32-ia32-msvc')
|
|
165
149
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-win32-ia32-msvc/package.json').version
|
|
166
|
-
if (bindingPackageVersion !== '0.
|
|
167
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
150
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
151
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
168
152
|
}
|
|
169
153
|
return binding
|
|
170
154
|
} catch (e) {
|
|
@@ -179,8 +163,8 @@ function requireNative() {
|
|
|
179
163
|
try {
|
|
180
164
|
const binding = require('@jongleberry/vurst-markdown-win32-arm64-msvc')
|
|
181
165
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-win32-arm64-msvc/package.json').version
|
|
182
|
-
if (bindingPackageVersion !== '0.
|
|
183
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
166
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
167
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
184
168
|
}
|
|
185
169
|
return binding
|
|
186
170
|
} catch (e) {
|
|
@@ -198,8 +182,8 @@ function requireNative() {
|
|
|
198
182
|
try {
|
|
199
183
|
const binding = require('@jongleberry/vurst-markdown-darwin-universal')
|
|
200
184
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-darwin-universal/package.json').version
|
|
201
|
-
if (bindingPackageVersion !== '0.
|
|
202
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
185
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
186
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
203
187
|
}
|
|
204
188
|
return binding
|
|
205
189
|
} catch (e) {
|
|
@@ -214,8 +198,8 @@ function requireNative() {
|
|
|
214
198
|
try {
|
|
215
199
|
const binding = require('@jongleberry/vurst-markdown-darwin-x64')
|
|
216
200
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-darwin-x64/package.json').version
|
|
217
|
-
if (bindingPackageVersion !== '0.
|
|
218
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
201
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
202
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
219
203
|
}
|
|
220
204
|
return binding
|
|
221
205
|
} catch (e) {
|
|
@@ -230,8 +214,8 @@ function requireNative() {
|
|
|
230
214
|
try {
|
|
231
215
|
const binding = require('@jongleberry/vurst-markdown-darwin-arm64')
|
|
232
216
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-darwin-arm64/package.json').version
|
|
233
|
-
if (bindingPackageVersion !== '0.
|
|
234
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
217
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
218
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
235
219
|
}
|
|
236
220
|
return binding
|
|
237
221
|
} catch (e) {
|
|
@@ -250,8 +234,8 @@ function requireNative() {
|
|
|
250
234
|
try {
|
|
251
235
|
const binding = require('@jongleberry/vurst-markdown-freebsd-x64')
|
|
252
236
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-freebsd-x64/package.json').version
|
|
253
|
-
if (bindingPackageVersion !== '0.
|
|
254
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
237
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
238
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
255
239
|
}
|
|
256
240
|
return binding
|
|
257
241
|
} catch (e) {
|
|
@@ -266,8 +250,8 @@ function requireNative() {
|
|
|
266
250
|
try {
|
|
267
251
|
const binding = require('@jongleberry/vurst-markdown-freebsd-arm64')
|
|
268
252
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-freebsd-arm64/package.json').version
|
|
269
|
-
if (bindingPackageVersion !== '0.
|
|
270
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
253
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
254
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
271
255
|
}
|
|
272
256
|
return binding
|
|
273
257
|
} catch (e) {
|
|
@@ -287,8 +271,8 @@ function requireNative() {
|
|
|
287
271
|
try {
|
|
288
272
|
const binding = require('@jongleberry/vurst-markdown-linux-x64-musl')
|
|
289
273
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-x64-musl/package.json').version
|
|
290
|
-
if (bindingPackageVersion !== '0.
|
|
291
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
274
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
275
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
292
276
|
}
|
|
293
277
|
return binding
|
|
294
278
|
} catch (e) {
|
|
@@ -303,8 +287,8 @@ function requireNative() {
|
|
|
303
287
|
try {
|
|
304
288
|
const binding = require('@jongleberry/vurst-markdown-linux-x64-gnu')
|
|
305
289
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-x64-gnu/package.json').version
|
|
306
|
-
if (bindingPackageVersion !== '0.
|
|
307
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
290
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
291
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
308
292
|
}
|
|
309
293
|
return binding
|
|
310
294
|
} catch (e) {
|
|
@@ -321,8 +305,8 @@ function requireNative() {
|
|
|
321
305
|
try {
|
|
322
306
|
const binding = require('@jongleberry/vurst-markdown-linux-arm64-musl')
|
|
323
307
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-arm64-musl/package.json').version
|
|
324
|
-
if (bindingPackageVersion !== '0.
|
|
325
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
308
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
309
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
326
310
|
}
|
|
327
311
|
return binding
|
|
328
312
|
} catch (e) {
|
|
@@ -337,8 +321,8 @@ function requireNative() {
|
|
|
337
321
|
try {
|
|
338
322
|
const binding = require('@jongleberry/vurst-markdown-linux-arm64-gnu')
|
|
339
323
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-arm64-gnu/package.json').version
|
|
340
|
-
if (bindingPackageVersion !== '0.
|
|
341
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
324
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
325
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
342
326
|
}
|
|
343
327
|
return binding
|
|
344
328
|
} catch (e) {
|
|
@@ -355,8 +339,8 @@ function requireNative() {
|
|
|
355
339
|
try {
|
|
356
340
|
const binding = require('@jongleberry/vurst-markdown-linux-arm-musleabihf')
|
|
357
341
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-arm-musleabihf/package.json').version
|
|
358
|
-
if (bindingPackageVersion !== '0.
|
|
359
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
342
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
343
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
360
344
|
}
|
|
361
345
|
return binding
|
|
362
346
|
} catch (e) {
|
|
@@ -371,8 +355,8 @@ function requireNative() {
|
|
|
371
355
|
try {
|
|
372
356
|
const binding = require('@jongleberry/vurst-markdown-linux-arm-gnueabihf')
|
|
373
357
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-arm-gnueabihf/package.json').version
|
|
374
|
-
if (bindingPackageVersion !== '0.
|
|
375
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
358
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
359
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
376
360
|
}
|
|
377
361
|
return binding
|
|
378
362
|
} catch (e) {
|
|
@@ -389,8 +373,8 @@ function requireNative() {
|
|
|
389
373
|
try {
|
|
390
374
|
const binding = require('@jongleberry/vurst-markdown-linux-loong64-musl')
|
|
391
375
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-loong64-musl/package.json').version
|
|
392
|
-
if (bindingPackageVersion !== '0.
|
|
393
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
376
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
377
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
394
378
|
}
|
|
395
379
|
return binding
|
|
396
380
|
} catch (e) {
|
|
@@ -405,8 +389,8 @@ function requireNative() {
|
|
|
405
389
|
try {
|
|
406
390
|
const binding = require('@jongleberry/vurst-markdown-linux-loong64-gnu')
|
|
407
391
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-loong64-gnu/package.json').version
|
|
408
|
-
if (bindingPackageVersion !== '0.
|
|
409
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
392
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
393
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
410
394
|
}
|
|
411
395
|
return binding
|
|
412
396
|
} catch (e) {
|
|
@@ -423,8 +407,8 @@ function requireNative() {
|
|
|
423
407
|
try {
|
|
424
408
|
const binding = require('@jongleberry/vurst-markdown-linux-riscv64-musl')
|
|
425
409
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-riscv64-musl/package.json').version
|
|
426
|
-
if (bindingPackageVersion !== '0.
|
|
427
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
410
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
411
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
428
412
|
}
|
|
429
413
|
return binding
|
|
430
414
|
} catch (e) {
|
|
@@ -439,8 +423,8 @@ function requireNative() {
|
|
|
439
423
|
try {
|
|
440
424
|
const binding = require('@jongleberry/vurst-markdown-linux-riscv64-gnu')
|
|
441
425
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-riscv64-gnu/package.json').version
|
|
442
|
-
if (bindingPackageVersion !== '0.
|
|
443
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
426
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
427
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
444
428
|
}
|
|
445
429
|
return binding
|
|
446
430
|
} catch (e) {
|
|
@@ -456,8 +440,8 @@ function requireNative() {
|
|
|
456
440
|
try {
|
|
457
441
|
const binding = require('@jongleberry/vurst-markdown-linux-ppc64-gnu')
|
|
458
442
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-ppc64-gnu/package.json').version
|
|
459
|
-
if (bindingPackageVersion !== '0.
|
|
460
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
443
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
444
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
461
445
|
}
|
|
462
446
|
return binding
|
|
463
447
|
} catch (e) {
|
|
@@ -472,8 +456,8 @@ function requireNative() {
|
|
|
472
456
|
try {
|
|
473
457
|
const binding = require('@jongleberry/vurst-markdown-linux-s390x-gnu')
|
|
474
458
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-s390x-gnu/package.json').version
|
|
475
|
-
if (bindingPackageVersion !== '0.
|
|
476
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
459
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
460
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
477
461
|
}
|
|
478
462
|
return binding
|
|
479
463
|
} catch (e) {
|
|
@@ -492,8 +476,8 @@ function requireNative() {
|
|
|
492
476
|
try {
|
|
493
477
|
const binding = require('@jongleberry/vurst-markdown-openharmony-arm64')
|
|
494
478
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-openharmony-arm64/package.json').version
|
|
495
|
-
if (bindingPackageVersion !== '0.
|
|
496
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
479
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
480
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
497
481
|
}
|
|
498
482
|
return binding
|
|
499
483
|
} catch (e) {
|
|
@@ -508,8 +492,8 @@ function requireNative() {
|
|
|
508
492
|
try {
|
|
509
493
|
const binding = require('@jongleberry/vurst-markdown-openharmony-x64')
|
|
510
494
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-openharmony-x64/package.json').version
|
|
511
|
-
if (bindingPackageVersion !== '0.
|
|
512
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
495
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
496
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
513
497
|
}
|
|
514
498
|
return binding
|
|
515
499
|
} catch (e) {
|
|
@@ -524,8 +508,8 @@ function requireNative() {
|
|
|
524
508
|
try {
|
|
525
509
|
const binding = require('@jongleberry/vurst-markdown-openharmony-arm')
|
|
526
510
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-openharmony-arm/package.json').version
|
|
527
|
-
if (bindingPackageVersion !== '0.
|
|
528
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
511
|
+
if (bindingPackageVersion !== '0.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
512
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
529
513
|
}
|
|
530
514
|
return binding
|
|
531
515
|
} catch (e) {
|
|
@@ -575,20 +559,6 @@ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
|
575
559
|
}
|
|
576
560
|
|
|
577
561
|
if (!nativeBinding) {
|
|
578
|
-
if (!isPublishedPlatform()) {
|
|
579
|
-
throw new Error(
|
|
580
|
-
`Unsupported platform for @jongleberry/vurst-markdown: ${process.platform} ${process.arch}. ` +
|
|
581
|
-
`Published native bindings currently support ${supportedPlatforms}.`,
|
|
582
|
-
{
|
|
583
|
-
cause: loadErrors.length > 0
|
|
584
|
-
? loadErrors.reduce((err, cur) => {
|
|
585
|
-
cur.cause = err
|
|
586
|
-
return cur
|
|
587
|
-
})
|
|
588
|
-
: undefined,
|
|
589
|
-
},
|
|
590
|
-
)
|
|
591
|
-
}
|
|
592
562
|
if (loadErrors.length > 0) {
|
|
593
563
|
throw new Error(
|
|
594
564
|
`Cannot find native binding. ` +
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jongleberry/vurst-markdown",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Rust + N-API: Markdown chunking and rendering.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -34,12 +34,6 @@
|
|
|
34
34
|
"x86_64-unknown-linux-gnu"
|
|
35
35
|
]
|
|
36
36
|
},
|
|
37
|
-
"scripts": {
|
|
38
|
-
"build": "napi build --platform --release",
|
|
39
|
-
"build:debug": "napi build --platform",
|
|
40
|
-
"test": "node --test __test__/*.test.mjs",
|
|
41
|
-
"prepublishOnly": "napi prepublish -t npm"
|
|
42
|
-
},
|
|
43
37
|
"publishConfig": {
|
|
44
38
|
"access": "public",
|
|
45
39
|
"provenance": true
|
|
@@ -49,8 +43,13 @@
|
|
|
49
43
|
"@types/node": "^24"
|
|
50
44
|
},
|
|
51
45
|
"optionalDependencies": {
|
|
52
|
-
"@jongleberry/vurst-markdown-darwin-arm64": "0.
|
|
53
|
-
"@jongleberry/vurst-markdown-linux-arm64-gnu": "0.
|
|
54
|
-
"@jongleberry/vurst-markdown-linux-x64-gnu": "0.
|
|
46
|
+
"@jongleberry/vurst-markdown-darwin-arm64": "0.2.2",
|
|
47
|
+
"@jongleberry/vurst-markdown-linux-arm64-gnu": "0.2.2",
|
|
48
|
+
"@jongleberry/vurst-markdown-linux-x64-gnu": "0.2.2"
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "napi build --platform --release",
|
|
52
|
+
"build:debug": "napi build --platform",
|
|
53
|
+
"test": "node --test __test__/*.test.mjs"
|
|
55
54
|
}
|
|
56
55
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|