nuxt-ai-ready 2.5.2 → 3.0.0
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 +13 -12
- package/dist/chunks/agent-skills.mjs +35 -12
- package/dist/chunks/prerender.mjs +35 -24
- package/dist/cli.mjs +5 -2
- package/dist/module.d.mts +4 -0
- package/dist/module.json +2 -2
- package/dist/module.mjs +8 -4
- package/dist/runtime/app/index.d.ts +3 -0
- package/dist/runtime/app/index.js +2 -0
- package/dist/runtime/cache-control.d.ts +2 -0
- package/dist/runtime/cache-control.js +11 -0
- package/dist/runtime/llms-txt-utils.js +1 -1
- package/dist/runtime/server/db/context.d.ts +13 -0
- package/dist/runtime/server/db/drizzle/client.d.ts +6 -7
- package/dist/runtime/server/db/drizzle/client.js +13 -2
- package/dist/runtime/server/db/drizzle/providers/bun.d.ts +2 -2
- package/dist/runtime/server/db/drizzle/providers/bun.js +2 -2
- package/dist/runtime/server/db/drizzle/providers/d1.d.ts +2 -2
- package/dist/runtime/server/db/drizzle/providers/d1.js +3 -2
- package/dist/runtime/server/db/drizzle/providers/libsql.d.ts +2 -2
- package/dist/runtime/server/db/drizzle/providers/libsql.js +2 -2
- package/dist/runtime/server/db/drizzle/providers/neon.d.ts +2 -2
- package/dist/runtime/server/db/drizzle/providers/neon.js +2 -2
- package/dist/runtime/server/db/drizzle/providers/node-sqlite.d.ts +2 -2
- package/dist/runtime/server/db/drizzle/providers/node-sqlite.js +2 -2
- package/dist/runtime/server/db/drizzle/providers/postgres.d.ts +2 -2
- package/dist/runtime/server/db/drizzle/providers/postgres.js +2 -2
- package/dist/runtime/server/db/drizzle/queries.d.ts +27 -27
- package/dist/runtime/server/db/drizzle/queries.js +6 -5
- package/dist/runtime/server/db/drizzle/raw.d.ts +2 -6
- package/dist/runtime/server/db/index.d.ts +1 -1
- package/dist/runtime/server/db/index.js +1 -1
- package/dist/runtime/server/db/queries.d.ts +36 -36
- package/dist/runtime/server/db/queries.js +8 -9
- package/dist/runtime/server/db/seed.d.ts +2 -2
- package/dist/runtime/server/db/seed.js +4 -3
- package/dist/runtime/server/db/shared.d.ts +8 -0
- package/dist/runtime/server/db/shared.js +8 -2
- package/dist/runtime/server/index.d.ts +2 -0
- package/dist/runtime/server/index.js +17 -0
- package/dist/runtime/server/mcp/tools/get-page-markdown.js +1 -1
- package/dist/runtime/server/mcp/tools/list-pages.js +1 -1
- package/dist/runtime/server/mcp/tools/search-pages.js +1 -1
- package/dist/runtime/server/middleware/markdown.js +3 -3
- package/dist/runtime/server/middleware/markdown.prerender.js +1 -1
- package/dist/runtime/server/plugins/db-lifecycle-nitro3.d.ts +2 -0
- package/dist/runtime/server/plugins/db-lifecycle-nitro3.js +16 -0
- package/dist/runtime/server/plugins/html-capture.prerender.js +6 -4
- package/dist/runtime/server/plugins/link-header-nitro3.d.ts +2 -0
- package/dist/runtime/server/plugins/link-header-nitro3.js +20 -0
- package/dist/runtime/server/plugins/link-header.d.ts +6 -0
- package/dist/runtime/server/plugins/link-header.js +7 -11
- package/dist/runtime/server/plugins/markdown-negotiation.js +8 -1
- package/dist/runtime/server/plugins/sitemap-seeder.js +3 -3
- package/dist/runtime/server/routes/agent-skills-artifact.d.ts +1 -1
- package/dist/runtime/server/routes/agent-skills-artifact.js +10 -10
- package/dist/runtime/server/routes/agent-skills-index.d.ts +1 -1
- package/dist/runtime/server/routes/agent-skills-index.js +7 -6
- package/dist/runtime/server/routes/ai-catalog.d.ts +2 -1
- package/dist/runtime/server/routes/ai-catalog.js +7 -8
- package/dist/runtime/server/routes/api-catalog.d.ts +3 -1
- package/dist/runtime/server/routes/api-catalog.js +12 -12
- package/dist/runtime/server/routes/llms-full.txt.get.js +1 -1
- package/dist/runtime/server/routes/mcp-server-card.d.ts +1 -1
- package/dist/runtime/server/routes/mcp-server-card.js +7 -8
- package/dist/runtime/server/utils/checkStale.d.ts +2 -2
- package/dist/runtime/server/utils/cloudflare-prerendered.d.ts +3 -0
- package/dist/runtime/server/utils/cloudflare-prerendered.js +23 -0
- package/dist/runtime/server/utils/cloudflare.d.ts +5 -5
- package/dist/runtime/server/utils/cloudflare.js +31 -7
- package/dist/runtime/server/utils/content-negotiation.d.ts +5 -3
- package/dist/runtime/server/utils/content-negotiation.js +8 -7
- package/dist/runtime/server/utils/context.d.ts +3 -3
- package/dist/runtime/server/utils/context.js +1 -1
- package/dist/runtime/server/utils/discovery-response.d.ts +2 -0
- package/dist/runtime/server/utils/link-header.d.ts +5 -3
- package/dist/runtime/server/utils/link-header.js +26 -2
- package/dist/runtime/server/utils/markdown-request.d.ts +4 -3
- package/dist/runtime/server/utils/markdown-request.js +15 -13
- package/dist/runtime/server/utils/negotiation-decision.d.ts +4 -0
- package/dist/runtime/server/utils/negotiation-decision.js +6 -5
- package/dist/runtime/server/utils/negotiation-response.d.ts +1 -1
- package/dist/runtime/server/utils/negotiation-response.js +63 -23
- package/dist/runtime/server/utils/prerender-html.d.ts +2 -1
- package/dist/runtime/server/utils/prerender-html.js +3 -1
- package/dist/runtime/types.d.ts +15 -7
- package/dist/shared/nuxt-ai-ready.B3hAuOLQ.mjs +29 -0
- package/dist/shared/{nuxt-ai-ready.CLSWou20.mjs → nuxt-ai-ready.C34F0LJo.mjs} +560 -219
- package/package.json +85 -20
- package/skills/nuxt-ai-ready/SKILL.md +26 -12
- package/skills/nuxt-ai-ready/references/runtime-indexing.md +7 -6
- package/dist/runtime/server/db/drizzle/providers/sqlite.d.ts +0 -8
- package/dist/runtime/server/db/drizzle/providers/sqlite.js +0 -15
- package/node_modules/@mdream/js/LICENSE.md +0 -9
- package/node_modules/@mdream/js/README.md +0 -792
- package/node_modules/@mdream/js/bin/mdream.mjs +0 -2
- package/node_modules/@mdream/js/dist/_chunks/const.mjs +0 -134
- package/node_modules/@mdream/js/dist/_chunks/index.d.mts +0 -9
- package/node_modules/@mdream/js/dist/_chunks/markdown-processor.mjs +0 -1968
- package/node_modules/@mdream/js/dist/_chunks/minimal.d.mts +0 -6
- package/node_modules/@mdream/js/dist/_chunks/parse.mjs +0 -2756
- package/node_modules/@mdream/js/dist/_chunks/plugins.mjs +0 -725
- package/node_modules/@mdream/js/dist/_chunks/resolve-plugins.mjs +0 -44
- package/node_modules/@mdream/js/dist/_chunks/stream.mjs +0 -37
- package/node_modules/@mdream/js/dist/_chunks/types.d.mts +0 -473
- package/node_modules/@mdream/js/dist/cli.d.mts +0 -1
- package/node_modules/@mdream/js/dist/cli.mjs +0 -32
- package/node_modules/@mdream/js/dist/core.d.mts +0 -15
- package/node_modules/@mdream/js/dist/core.mjs +0 -28
- package/node_modules/@mdream/js/dist/index.d.mts +0 -4
- package/node_modules/@mdream/js/dist/index.mjs +0 -58
- package/node_modules/@mdream/js/dist/llms-txt.d.mts +0 -86
- package/node_modules/@mdream/js/dist/llms-txt.mjs +0 -308
- package/node_modules/@mdream/js/dist/negotiate.d.mts +0 -35
- package/node_modules/@mdream/js/dist/negotiate.mjs +0 -121
- package/node_modules/@mdream/js/dist/parse.d.mts +0 -90
- package/node_modules/@mdream/js/dist/parse.mjs +0 -2
- package/node_modules/@mdream/js/dist/plugins.d.mts +0 -85
- package/node_modules/@mdream/js/dist/plugins.mjs +0 -2
- package/node_modules/@mdream/js/dist/preset/minimal.d.mts +0 -2
- package/node_modules/@mdream/js/dist/preset/minimal.mjs +0 -33
- package/node_modules/@mdream/js/dist/splitter.d.mts +0 -18
- package/node_modules/@mdream/js/dist/splitter.mjs +0 -194
- package/node_modules/@mdream/js/package.json +0 -103
- package/node_modules/cac/LICENSE +0 -21
- package/node_modules/cac/README.md +0 -492
- package/node_modules/cac/dist/index.d.ts +0 -196
- package/node_modules/cac/dist/index.js +0 -638
- package/node_modules/cac/package.json +0 -72
- package/node_modules/mdream/LICENSE.md +0 -9
- package/node_modules/mdream/README.md +0 -1091
- package/node_modules/mdream/bin/mdream.mjs +0 -46
- package/node_modules/mdream/dist/browser.d.mts +0 -105
- package/node_modules/mdream/dist/browser.mjs +0 -262
- package/node_modules/mdream/dist/edge.d.mts +0 -100
- package/node_modules/mdream/dist/edge.mjs +0 -250
- package/node_modules/mdream/dist/iife.js +0 -605
- package/node_modules/mdream/dist/index.d.mts +0 -89
- package/node_modules/mdream/dist/index.mjs +0 -184
- package/node_modules/mdream/dist/wasm.d.mts +0 -100
- package/node_modules/mdream/dist/wasm.mjs +0 -140
- package/node_modules/mdream/dist/worker.d.mts +0 -101
- package/node_modules/mdream/dist/worker.mjs +0 -217
- package/node_modules/mdream/napi/index.d.mts +0 -127
- package/node_modules/mdream/napi/index.d.ts +0 -127
- package/node_modules/mdream/napi/index.mjs +0 -725
- package/node_modules/mdream/napi/rust.android-arm-eabi.node +0 -0
- package/node_modules/mdream/napi/rust.android-arm64.node +0 -0
- package/node_modules/mdream/napi/rust.darwin-arm64.node +0 -0
- package/node_modules/mdream/napi/rust.darwin-x64.node +0 -0
- package/node_modules/mdream/napi/rust.freebsd-x64.node +0 -0
- package/node_modules/mdream/napi/rust.linux-arm-gnueabihf.node +0 -0
- package/node_modules/mdream/napi/rust.linux-arm64-gnu.node +0 -0
- package/node_modules/mdream/napi/rust.linux-arm64-musl.node +0 -0
- package/node_modules/mdream/napi/rust.linux-x64-gnu.node +0 -0
- package/node_modules/mdream/napi/rust.linux-x64-musl.node +0 -0
- package/node_modules/mdream/napi/rust.wasi.cjs +0 -2144
- package/node_modules/mdream/napi/rust.wasm32-wasi.wasm +0 -0
- package/node_modules/mdream/napi/rust.win32-arm64-msvc.node +0 -0
- package/node_modules/mdream/napi/rust.win32-x64-msvc.node +0 -0
- package/node_modules/mdream/node_modules/@emnapi/core/LICENSE +0 -21
- package/node_modules/mdream/node_modules/@emnapi/core/README.md +0 -1
- package/node_modules/mdream/node_modules/@emnapi/core/dist/emnapi-core.d.ts +0 -392
- package/node_modules/mdream/node_modules/@emnapi/core/dist/emnapi-core.full.d.ts +0 -392
- package/node_modules/mdream/node_modules/@emnapi/core/dist/emnapi-core.full.js +0 -8351
- package/node_modules/mdream/node_modules/@emnapi/core/dist/emnapi-core.js +0 -7268
- package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/async-work.d.ts +0 -5
- package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/async-work.js +0 -843
- package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/index.d.ts +0 -4
- package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/index.js +0 -3
- package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/threadsafe-function.d.ts +0 -5
- package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/threadsafe-function.js +0 -1010
- package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/v8.d.ts +0 -5
- package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/v8.js +0 -1446
- package/node_modules/mdream/node_modules/@emnapi/core/package.json +0 -39
- package/node_modules/mdream/node_modules/@emnapi/core/rollup.config.js +0 -60
- package/node_modules/mdream/node_modules/@emnapi/runtime/LICENSE +0 -21
- package/node_modules/mdream/node_modules/@emnapi/runtime/README.md +0 -1
- package/node_modules/mdream/node_modules/@emnapi/runtime/dist/emnapi.d.ts +0 -833
- package/node_modules/mdream/node_modules/@emnapi/runtime/dist/emnapi.js +0 -2306
- package/node_modules/mdream/node_modules/@emnapi/runtime/dist/emnapi.js.map +0 -1
- package/node_modules/mdream/node_modules/@emnapi/runtime/index.cjs +0 -63
- package/node_modules/mdream/node_modules/@emnapi/runtime/package.json +0 -39
- package/node_modules/mdream/node_modules/@emnapi/runtime/rollup.config.js +0 -25
- package/node_modules/mdream/node_modules/@emnapi/wasi-threads/LICENSE +0 -21
- package/node_modules/mdream/node_modules/@emnapi/wasi-threads/README.md +0 -203
- package/node_modules/mdream/node_modules/@emnapi/wasi-threads/dist/wasi-threads.d.ts +0 -236
- package/node_modules/mdream/node_modules/@emnapi/wasi-threads/dist/wasi-threads.js +0 -1086
- package/node_modules/mdream/node_modules/@emnapi/wasi-threads/package.json +0 -35
- package/node_modules/mdream/node_modules/@emnapi/wasi-threads/rollup.config.js +0 -6
- package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/dist/emnapi-plugins.cjs +0 -1472
- package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/dist/emnapi-plugins.js +0 -1470
- package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/dist/fs-proxy.cjs +0 -237
- package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/dist/fs.js +0 -18260
- package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/fs-proxy.js +0 -317
- package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/package.json +0 -67
- package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/runtime.cjs +0 -39
- package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/runtime.js +0 -36
- package/node_modules/mdream/node_modules/@tybys/wasm-util/LICENSE +0 -21
- package/node_modules/mdream/node_modules/@tybys/wasm-util/README.md +0 -193
- package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/tsdoc-metadata.json +0 -11
- package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.d.ts +0 -423
- package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.esm-bundler.js +0 -2932
- package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.esm.js +0 -2932
- package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.esm.min.js +0 -1
- package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.js +0 -2954
- package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.min.js +0 -1
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/asyncify.js +0 -158
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/index.js +0 -13
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/jspi.js +0 -46
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/load.js +0 -97
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/memory.js +0 -35
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/error.js +0 -103
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/fd.js +0 -268
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/fs.js +0 -3
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/index.js +0 -192
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/path.js +0 -316
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/preview1.js +0 -1599
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/rights.js +0 -141
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/types.js +0 -220
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/util.js +0 -128
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/webassembly.js +0 -13
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/asyncify.mjs +0 -153
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/index.mjs +0 -9
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/jspi.mjs +0 -39
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/load.mjs +0 -89
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/memory.mjs +0 -28
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/error.mjs +0 -97
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/fd.mjs +0 -256
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/fs.mjs +0 -1
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/index.mjs +0 -186
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/path.mjs +0 -310
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/preview1.mjs +0 -1593
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/rights.mjs +0 -135
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/types.mjs +0 -216
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/util.mjs +0 -113
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/webassembly.mjs +0 -9
- package/node_modules/mdream/node_modules/@tybys/wasm-util/package.json +0 -58
- package/node_modules/mdream/node_modules/tslib/CopyrightNotice.txt +0 -15
- package/node_modules/mdream/node_modules/tslib/LICENSE.txt +0 -12
- package/node_modules/mdream/node_modules/tslib/README.md +0 -164
- package/node_modules/mdream/node_modules/tslib/SECURITY.md +0 -41
- package/node_modules/mdream/node_modules/tslib/modules/index.d.ts +0 -38
- package/node_modules/mdream/node_modules/tslib/modules/index.js +0 -70
- package/node_modules/mdream/node_modules/tslib/modules/package.json +0 -3
- package/node_modules/mdream/node_modules/tslib/package.json +0 -47
- package/node_modules/mdream/node_modules/tslib/tslib.d.ts +0 -460
- package/node_modules/mdream/node_modules/tslib/tslib.es6.html +0 -1
- package/node_modules/mdream/node_modules/tslib/tslib.es6.js +0 -402
- package/node_modules/mdream/node_modules/tslib/tslib.es6.mjs +0 -401
- package/node_modules/mdream/node_modules/tslib/tslib.html +0 -1
- package/node_modules/mdream/node_modules/tslib/tslib.js +0 -484
- package/node_modules/mdream/package.json +0 -110
- package/node_modules/mdream/skills/mdream/SKILL.md +0 -124
- package/node_modules/mdream/skills/mdream/references/runtimes.md +0 -49
- package/node_modules/mdream/wasm/mdream_edge.d.ts +0 -90
- package/node_modules/mdream/wasm/mdream_edge.js +0 -517
- package/node_modules/mdream/wasm/mdream_edge_bg.wasm +0 -0
- package/node_modules/mdream/wasm/mdream_edge_bg.wasm.d.ts +0 -20
- package/node_modules/mdream/wasm/package.json +0 -17
- package/node_modules/mdream/wasm-bundler/mdream_edge.d.ts +0 -45
- package/node_modules/mdream/wasm-bundler/mdream_edge.js +0 -13
- package/node_modules/mdream/wasm-bundler/mdream_edge_bg.js +0 -413
- package/node_modules/mdream/wasm-bundler/mdream_edge_bg.wasm +0 -0
- package/node_modules/mdream/wasm-bundler/mdream_edge_bg.wasm.d.ts +0 -20
- package/node_modules/mdream/wasm-bundler/package.json +0 -19
- package/node_modules/pathe/LICENSE +0 -70
- package/node_modules/pathe/README.md +0 -73
- package/node_modules/pathe/dist/index.cjs +0 -39
- package/node_modules/pathe/dist/index.d.cts +0 -47
- package/node_modules/pathe/dist/index.d.mts +0 -47
- package/node_modules/pathe/dist/index.d.ts +0 -47
- package/node_modules/pathe/dist/index.mjs +0 -19
- package/node_modules/pathe/dist/shared/pathe.BSlhyZSM.cjs +0 -266
- package/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs +0 -249
- package/node_modules/pathe/dist/utils.cjs +0 -82
- package/node_modules/pathe/dist/utils.d.cts +0 -32
- package/node_modules/pathe/dist/utils.d.mts +0 -32
- package/node_modules/pathe/dist/utils.d.ts +0 -32
- package/node_modules/pathe/dist/utils.mjs +0 -77
- package/node_modules/pathe/package.json +0 -61
- package/node_modules/pathe/utils.d.ts +0 -1
|
@@ -1,413 +0,0 @@
|
|
|
1
|
-
export class MarkdownStream {
|
|
2
|
-
__destroy_into_raw() {
|
|
3
|
-
const ptr = this.__wbg_ptr;
|
|
4
|
-
this.__wbg_ptr = 0;
|
|
5
|
-
MarkdownStreamFinalization.unregister(this);
|
|
6
|
-
return ptr;
|
|
7
|
-
}
|
|
8
|
-
free() {
|
|
9
|
-
const ptr = this.__destroy_into_raw();
|
|
10
|
-
wasm.__wbg_markdownstream_free(ptr, 0);
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* @returns {string}
|
|
14
|
-
*/
|
|
15
|
-
finish() {
|
|
16
|
-
let deferred1_0;
|
|
17
|
-
let deferred1_1;
|
|
18
|
-
try {
|
|
19
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
20
|
-
wasm.markdownstream_finish(retptr, this.__wbg_ptr);
|
|
21
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
22
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
23
|
-
deferred1_0 = r0;
|
|
24
|
-
deferred1_1 = r1;
|
|
25
|
-
return getStringFromWasm0(r0, r1);
|
|
26
|
-
} finally {
|
|
27
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
28
|
-
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* @param {any} options
|
|
33
|
-
*/
|
|
34
|
-
constructor(options) {
|
|
35
|
-
const ret = wasm.markdownstream_new(addHeapObject(options));
|
|
36
|
-
this.__wbg_ptr = ret;
|
|
37
|
-
MarkdownStreamFinalization.register(this, this.__wbg_ptr, this);
|
|
38
|
-
return this;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Byte chunk in, string out, skipping the transcode per chunk. A sequence
|
|
42
|
-
* split across chunks carries to the next call rather than decoding early,
|
|
43
|
-
* matching `TextDecoder({ stream: true })`; invalid bytes become U+FFFD.
|
|
44
|
-
* @param {Uint8Array} chunk
|
|
45
|
-
* @returns {string}
|
|
46
|
-
*/
|
|
47
|
-
processChunkBytes(chunk) {
|
|
48
|
-
let deferred2_0;
|
|
49
|
-
let deferred2_1;
|
|
50
|
-
try {
|
|
51
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
52
|
-
const ptr0 = passArray8ToWasm0(chunk, wasm.__wbindgen_export);
|
|
53
|
-
const len0 = WASM_VECTOR_LEN;
|
|
54
|
-
wasm.markdownstream_processChunkBytes(retptr, this.__wbg_ptr, ptr0, len0);
|
|
55
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
56
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
57
|
-
deferred2_0 = r0;
|
|
58
|
-
deferred2_1 = r1;
|
|
59
|
-
return getStringFromWasm0(r0, r1);
|
|
60
|
-
} finally {
|
|
61
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
62
|
-
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* A carried byte tail cannot be completed by a string chunk, so it is
|
|
67
|
-
* flushed first. Byte and string chunks may be mixed freely.
|
|
68
|
-
* @param {string} chunk
|
|
69
|
-
* @returns {string}
|
|
70
|
-
*/
|
|
71
|
-
processChunk(chunk) {
|
|
72
|
-
let deferred2_0;
|
|
73
|
-
let deferred2_1;
|
|
74
|
-
try {
|
|
75
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
76
|
-
const ptr0 = passStringToWasm0(chunk, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
77
|
-
const len0 = WASM_VECTOR_LEN;
|
|
78
|
-
wasm.markdownstream_processChunk(retptr, this.__wbg_ptr, ptr0, len0);
|
|
79
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
80
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
81
|
-
deferred2_0 = r0;
|
|
82
|
-
deferred2_1 = r1;
|
|
83
|
-
return getStringFromWasm0(r0, r1);
|
|
84
|
-
} finally {
|
|
85
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
86
|
-
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Frontmatter and extracted elements collected so far, as
|
|
91
|
-
* `{ frontmatter?, extracted? }`. Call after `finish()` for the complete
|
|
92
|
-
* data. Extracted elements drain on each call.
|
|
93
|
-
* @returns {any}
|
|
94
|
-
*/
|
|
95
|
-
takeData() {
|
|
96
|
-
const ret = wasm.markdownstream_takeData(this.__wbg_ptr);
|
|
97
|
-
return takeObject(ret);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
if (Symbol.dispose) MarkdownStream.prototype[Symbol.dispose] = MarkdownStream.prototype.free;
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Consumes the message of the panic that aborted the last export call.
|
|
104
|
-
* @returns {string | undefined}
|
|
105
|
-
*/
|
|
106
|
-
export function __mdreamTakePanicMessage() {
|
|
107
|
-
try {
|
|
108
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
109
|
-
wasm.__mdreamTakePanicMessage(retptr);
|
|
110
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
111
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
112
|
-
let v1;
|
|
113
|
-
if (r0 !== 0) {
|
|
114
|
-
v1 = getStringFromWasm0(r0, r1);
|
|
115
|
-
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
116
|
-
}
|
|
117
|
-
return v1;
|
|
118
|
-
} finally {
|
|
119
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* @param {string} html
|
|
125
|
-
* @param {any} options
|
|
126
|
-
* @returns {string}
|
|
127
|
-
*/
|
|
128
|
-
export function htmlToMarkdown(html, options) {
|
|
129
|
-
let deferred2_0;
|
|
130
|
-
let deferred2_1;
|
|
131
|
-
try {
|
|
132
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
133
|
-
const ptr0 = passStringToWasm0(html, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
134
|
-
const len0 = WASM_VECTOR_LEN;
|
|
135
|
-
wasm.htmlToMarkdown(retptr, ptr0, len0, addHeapObject(options));
|
|
136
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
137
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
138
|
-
deferred2_0 = r0;
|
|
139
|
-
deferred2_1 = r1;
|
|
140
|
-
return getStringFromWasm0(r0, r1);
|
|
141
|
-
} finally {
|
|
142
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
143
|
-
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Bytes in, string out: skips the transcode (~14% of a convert) for a
|
|
149
|
-
* caller already holding UTF-8 bytes. Encoding a string to get here
|
|
150
|
-
* measures 1-16% *slower* than [`html_to_markdown`] — only worth it when
|
|
151
|
-
* the bytes are already in hand.
|
|
152
|
-
* @param {Uint8Array} html
|
|
153
|
-
* @param {any} options
|
|
154
|
-
* @returns {string}
|
|
155
|
-
*/
|
|
156
|
-
export function htmlToMarkdownBytes(html, options) {
|
|
157
|
-
let deferred2_0;
|
|
158
|
-
let deferred2_1;
|
|
159
|
-
try {
|
|
160
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
161
|
-
const ptr0 = passArray8ToWasm0(html, wasm.__wbindgen_export);
|
|
162
|
-
const len0 = WASM_VECTOR_LEN;
|
|
163
|
-
wasm.htmlToMarkdownBytes(retptr, ptr0, len0, addHeapObject(options));
|
|
164
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
165
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
166
|
-
deferred2_0 = r0;
|
|
167
|
-
deferred2_1 = r1;
|
|
168
|
-
return getStringFromWasm0(r0, r1);
|
|
169
|
-
} finally {
|
|
170
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
171
|
-
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* @param {string} html
|
|
177
|
-
* @param {any} options
|
|
178
|
-
* @returns {any}
|
|
179
|
-
*/
|
|
180
|
-
export function htmlToMarkdownResult(html, options) {
|
|
181
|
-
const ptr0 = passStringToWasm0(html, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
182
|
-
const len0 = WASM_VECTOR_LEN;
|
|
183
|
-
const ret = wasm.htmlToMarkdownResult(ptr0, len0, addHeapObject(options));
|
|
184
|
-
return takeObject(ret);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export function install_panic_hook() {
|
|
188
|
-
wasm.install_panic_hook();
|
|
189
|
-
}
|
|
190
|
-
export function __wbg___wbindgen_boolean_get_5b446f51afd21013(arg0) {
|
|
191
|
-
const v = getObject(arg0);
|
|
192
|
-
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
193
|
-
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
194
|
-
}
|
|
195
|
-
export function __wbg___wbindgen_is_null_e343b7d08827ba72(arg0) {
|
|
196
|
-
const ret = getObject(arg0) === null;
|
|
197
|
-
return ret;
|
|
198
|
-
}
|
|
199
|
-
export function __wbg___wbindgen_is_undefined_8865fb403f8fe9d8(arg0) {
|
|
200
|
-
const ret = getObject(arg0) === undefined;
|
|
201
|
-
return ret;
|
|
202
|
-
}
|
|
203
|
-
export function __wbg___wbindgen_number_get_2e0e7dee9f701a71(arg0, arg1) {
|
|
204
|
-
const obj = getObject(arg1);
|
|
205
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
206
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
207
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
208
|
-
}
|
|
209
|
-
export function __wbg___wbindgen_string_get_0380ccaa2f57f0d9(arg0, arg1) {
|
|
210
|
-
const obj = getObject(arg1);
|
|
211
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
212
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
213
|
-
var len1 = WASM_VECTOR_LEN;
|
|
214
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
215
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
216
|
-
}
|
|
217
|
-
export function __wbg___wbindgen_throw_41e9ee4f547fc59a(arg0, arg1) {
|
|
218
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
219
|
-
}
|
|
220
|
-
export function __wbg_entries_fb6397112b1de25f(arg0) {
|
|
221
|
-
const ret = Object.entries(getObject(arg0));
|
|
222
|
-
return addHeapObject(ret);
|
|
223
|
-
}
|
|
224
|
-
export function __wbg_from_296ca31f8d0f1c52(arg0) {
|
|
225
|
-
const ret = Array.from(getObject(arg0));
|
|
226
|
-
return addHeapObject(ret);
|
|
227
|
-
}
|
|
228
|
-
export function __wbg_get_31af05bd4842a84f() { return handleError(function (arg0, arg1) {
|
|
229
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
230
|
-
return addHeapObject(ret);
|
|
231
|
-
}, arguments); }
|
|
232
|
-
export function __wbg_get_6c896e0571ddae51(arg0, arg1) {
|
|
233
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
234
|
-
return addHeapObject(ret);
|
|
235
|
-
}
|
|
236
|
-
export function __wbg_isArray_e15a2ff68ffdbef2(arg0) {
|
|
237
|
-
const ret = Array.isArray(getObject(arg0));
|
|
238
|
-
return ret;
|
|
239
|
-
}
|
|
240
|
-
export function __wbg_length_d4bdea10311bd9cf(arg0) {
|
|
241
|
-
const ret = getObject(arg0).length;
|
|
242
|
-
return ret;
|
|
243
|
-
}
|
|
244
|
-
export function __wbg_new_617a8cdb8bb1130e() {
|
|
245
|
-
const ret = new Object();
|
|
246
|
-
return addHeapObject(ret);
|
|
247
|
-
}
|
|
248
|
-
export function __wbg_new_ee2291f50781bf1d() {
|
|
249
|
-
const ret = new Array();
|
|
250
|
-
return addHeapObject(ret);
|
|
251
|
-
}
|
|
252
|
-
export function __wbg_push_2baf45db356cf468(arg0, arg1) {
|
|
253
|
-
const ret = getObject(arg0).push(getObject(arg1));
|
|
254
|
-
return ret;
|
|
255
|
-
}
|
|
256
|
-
export function __wbg_set_145a351398b48c65() { return handleError(function (arg0, arg1, arg2) {
|
|
257
|
-
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
258
|
-
return ret;
|
|
259
|
-
}, arguments); }
|
|
260
|
-
export function __wbindgen_generic_0000000000000001(arg0, arg1) {
|
|
261
|
-
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
262
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
263
|
-
return addHeapObject(ret);
|
|
264
|
-
}
|
|
265
|
-
export function __wbindgen_object_clone_ref(arg0) {
|
|
266
|
-
const ret = getObject(arg0);
|
|
267
|
-
return addHeapObject(ret);
|
|
268
|
-
}
|
|
269
|
-
export function __wbindgen_object_drop_ref(arg0) {
|
|
270
|
-
takeObject(arg0);
|
|
271
|
-
}
|
|
272
|
-
const MarkdownStreamFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
273
|
-
? { register: () => {}, unregister: () => {} }
|
|
274
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_markdownstream_free(ptr, 1));
|
|
275
|
-
|
|
276
|
-
function addHeapObject(obj) {
|
|
277
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
278
|
-
const idx = heap_next;
|
|
279
|
-
heap_next = heap[idx];
|
|
280
|
-
|
|
281
|
-
heap[idx] = obj;
|
|
282
|
-
return idx;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
function dropObject(idx) {
|
|
286
|
-
if (idx < 1028) return;
|
|
287
|
-
heap[idx] = heap_next;
|
|
288
|
-
heap_next = idx;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
let cachedDataViewMemory0 = null;
|
|
292
|
-
function getDataViewMemory0() {
|
|
293
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
294
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
295
|
-
}
|
|
296
|
-
return cachedDataViewMemory0;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
function getStringFromWasm0(ptr, len) {
|
|
300
|
-
return decodeText(ptr >>> 0, len);
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
let cachedUint8ArrayMemory0 = null;
|
|
304
|
-
function getUint8ArrayMemory0() {
|
|
305
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
306
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
307
|
-
}
|
|
308
|
-
return cachedUint8ArrayMemory0;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
function getObject(idx) { return heap[idx]; }
|
|
312
|
-
|
|
313
|
-
function handleError(f, args) {
|
|
314
|
-
try {
|
|
315
|
-
return f.apply(this, args);
|
|
316
|
-
} catch (e) {
|
|
317
|
-
wasm.__wbindgen_export3(addHeapObject(e));
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
let heap = new Array(1024).fill(undefined);
|
|
322
|
-
heap.push(undefined, null, true, false);
|
|
323
|
-
|
|
324
|
-
let heap_next = heap.length;
|
|
325
|
-
|
|
326
|
-
function isLikeNone(x) {
|
|
327
|
-
return x === undefined || x === null;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
331
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
332
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
333
|
-
WASM_VECTOR_LEN = arg.length;
|
|
334
|
-
return ptr;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
338
|
-
if (realloc === undefined) {
|
|
339
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
340
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
341
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
342
|
-
WASM_VECTOR_LEN = buf.length;
|
|
343
|
-
return ptr;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
let len = arg.length;
|
|
347
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
348
|
-
|
|
349
|
-
const mem = getUint8ArrayMemory0();
|
|
350
|
-
|
|
351
|
-
let offset = 0;
|
|
352
|
-
|
|
353
|
-
for (; offset < len; offset++) {
|
|
354
|
-
const code = arg.charCodeAt(offset);
|
|
355
|
-
if (code > 0x7F) break;
|
|
356
|
-
mem[ptr + offset] = code;
|
|
357
|
-
}
|
|
358
|
-
if (offset !== len) {
|
|
359
|
-
if (offset !== 0) {
|
|
360
|
-
arg = arg.slice(offset);
|
|
361
|
-
}
|
|
362
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
363
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
364
|
-
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
365
|
-
|
|
366
|
-
offset += ret.written;
|
|
367
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
WASM_VECTOR_LEN = offset;
|
|
371
|
-
return ptr;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
function takeObject(idx) {
|
|
375
|
-
const ret = getObject(idx);
|
|
376
|
-
dropObject(idx);
|
|
377
|
-
return ret;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
381
|
-
cachedTextDecoder.decode();
|
|
382
|
-
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
383
|
-
let numBytesDecoded = 0;
|
|
384
|
-
function decodeText(ptr, len) {
|
|
385
|
-
numBytesDecoded += len;
|
|
386
|
-
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
387
|
-
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
388
|
-
cachedTextDecoder.decode();
|
|
389
|
-
numBytesDecoded = len;
|
|
390
|
-
}
|
|
391
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
const cachedTextEncoder = new TextEncoder();
|
|
395
|
-
|
|
396
|
-
if (!('encodeInto' in cachedTextEncoder)) {
|
|
397
|
-
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
398
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
399
|
-
view.set(buf);
|
|
400
|
-
return {
|
|
401
|
-
read: arg.length,
|
|
402
|
-
written: buf.length
|
|
403
|
-
};
|
|
404
|
-
};
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
let WASM_VECTOR_LEN = 0;
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
let wasm;
|
|
411
|
-
export function __wbg_set_wasm(val) {
|
|
412
|
-
wasm = val;
|
|
413
|
-
}
|
|
Binary file
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const __mdreamTakePanicMessage: (a: number) => void;
|
|
5
|
-
export const __wbg_markdownstream_free: (a: number, b: number) => void;
|
|
6
|
-
export const htmlToMarkdown: (a: number, b: number, c: number, d: number) => void;
|
|
7
|
-
export const htmlToMarkdownBytes: (a: number, b: number, c: number, d: number) => void;
|
|
8
|
-
export const htmlToMarkdownResult: (a: number, b: number, c: number) => number;
|
|
9
|
-
export const install_panic_hook: () => void;
|
|
10
|
-
export const markdownstream_finish: (a: number, b: number) => void;
|
|
11
|
-
export const markdownstream_new: (a: number) => number;
|
|
12
|
-
export const markdownstream_processChunk: (a: number, b: number, c: number, d: number) => void;
|
|
13
|
-
export const markdownstream_processChunkBytes: (a: number, b: number, c: number, d: number) => void;
|
|
14
|
-
export const markdownstream_takeData: (a: number) => number;
|
|
15
|
-
export const __wbindgen_export: (a: number, b: number) => number;
|
|
16
|
-
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
17
|
-
export const __wbindgen_export3: (a: number) => void;
|
|
18
|
-
export const __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
19
|
-
export const __wbindgen_export4: (a: number, b: number, c: number) => void;
|
|
20
|
-
export const __wbindgen_start: () => void;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "mdream-edge",
|
|
3
|
-
"type": "module",
|
|
4
|
-
"description": "WebAssembly edge runtime bindings for mdream HTML-to-Markdown converter",
|
|
5
|
-
"version": "2.0.0-beta.1",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"files": [
|
|
8
|
-
"mdream_edge_bg.wasm",
|
|
9
|
-
"mdream_edge.js",
|
|
10
|
-
"mdream_edge_bg.js",
|
|
11
|
-
"mdream_edge.d.ts"
|
|
12
|
-
],
|
|
13
|
-
"main": "mdream_edge.js",
|
|
14
|
-
"types": "mdream_edge.d.ts",
|
|
15
|
-
"sideEffects": [
|
|
16
|
-
"./mdream_edge.js",
|
|
17
|
-
"./snippets/*"
|
|
18
|
-
]
|
|
19
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) Pooya Parsa <pooya@pi0.io> - Daniel Roe <daniel@roe.dev>
|
|
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.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
Copyright Joyent, Inc. and other Node contributors.
|
|
26
|
-
|
|
27
|
-
Permission is hereby granted, free of charge, to any person obtaining a
|
|
28
|
-
copy of this software and associated documentation files (the
|
|
29
|
-
"Software"), to deal in the Software without restriction, including
|
|
30
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
31
|
-
distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
32
|
-
persons to whom the Software is furnished to do so, subject to the
|
|
33
|
-
following conditions:
|
|
34
|
-
|
|
35
|
-
The above copyright notice and this permission notice shall be included
|
|
36
|
-
in all copies or substantial portions of the Software.
|
|
37
|
-
|
|
38
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
39
|
-
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
40
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
41
|
-
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
42
|
-
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
43
|
-
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
44
|
-
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
Bundled zeptomatch (https://github.com/fabiospampinato/zeptomatch)
|
|
49
|
-
|
|
50
|
-
The MIT License (MIT)
|
|
51
|
-
|
|
52
|
-
Copyright (c) 2023-present Fabio Spampinato
|
|
53
|
-
|
|
54
|
-
Permission is hereby granted, free of charge, to any person obtaining a
|
|
55
|
-
copy of this software and associated documentation files (the "Software"),
|
|
56
|
-
to deal in the Software without restriction, including without limitation
|
|
57
|
-
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
58
|
-
and/or sell copies of the Software, and to permit persons to whom the
|
|
59
|
-
Software is furnished to do so, subject to the following conditions:
|
|
60
|
-
|
|
61
|
-
The above copyright notice and this permission notice shall be included in
|
|
62
|
-
all copies or substantial portions of the Software.
|
|
63
|
-
|
|
64
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
65
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
66
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
67
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
68
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
69
|
-
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
70
|
-
DEALINGS IN THE SOFTWARE.
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# 🛣️ pathe
|
|
2
|
-
|
|
3
|
-
> Universal filesystem path utils
|
|
4
|
-
|
|
5
|
-
[![version][npm-v-src]][npm-v-href]
|
|
6
|
-
[![downloads][npm-d-src]][npm-d-href]
|
|
7
|
-
[![size][size-src]][size-href]
|
|
8
|
-
|
|
9
|
-
## ❓ Why
|
|
10
|
-
|
|
11
|
-
For [historical reasons](https://docs.microsoft.com/en-us/archive/blogs/larryosterman/why-is-the-dos-path-character), windows followed MS-DOS and used backslash for separating paths rather than slash used for macOS, Linux, and other Posix operating systems. Nowadays, [Windows](https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN) supports both Slash and Backslash for paths. [Node.js's built-in `path` module](https://nodejs.org/api/path.html) in the default operation of the path module varies based on the operating system on which a Node.js application is running. Specifically, when running on a Windows operating system, the path module will assume that Windows-style paths are being used. **This makes inconsistent code behavior between Windows and POSIX.**
|
|
12
|
-
|
|
13
|
-
Compared to popular [upath](https://github.com/anodynos/upath), pathe provides **identical exports** of Node.js with normalization on **all operations** and is written in modern **ESM/TypeScript** and has **no dependency on Node.js**!
|
|
14
|
-
|
|
15
|
-
This package is a drop-in replacement of the Node.js's [path module](https://nodejs.org/api/path.html) module and ensures paths are normalized with slash `/` and work in environments including Node.js.
|
|
16
|
-
|
|
17
|
-
## 💿 Usage
|
|
18
|
-
|
|
19
|
-
Install using npm or yarn:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
# npm
|
|
23
|
-
npm i pathe
|
|
24
|
-
|
|
25
|
-
# yarn
|
|
26
|
-
yarn add pathe
|
|
27
|
-
|
|
28
|
-
# pnpm
|
|
29
|
-
pnpm i pathe
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Import:
|
|
33
|
-
|
|
34
|
-
```js
|
|
35
|
-
// ESM / Typescript
|
|
36
|
-
import { resolve, matchesGlob } from "pathe";
|
|
37
|
-
|
|
38
|
-
// CommonJS
|
|
39
|
-
const { resolve, matchesGlob } = require("pathe");
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Read more about path utils from [Node.js documentation](https://nodejs.org/api/path.html) and rest assured behavior is consistently like POSIX regardless of your input paths format and running platform (the only exception is `delimiter` constant export, it will be set to `;` on windows platform).
|
|
43
|
-
|
|
44
|
-
### Extra utilities
|
|
45
|
-
|
|
46
|
-
Pathe exports some extra utilities that do not exist in standard Node.js [path module](https://nodejs.org/api/path.html).
|
|
47
|
-
In order to use them, you can import from `pathe/utils` subpath:
|
|
48
|
-
|
|
49
|
-
```js
|
|
50
|
-
import {
|
|
51
|
-
filename,
|
|
52
|
-
normalizeAliases,
|
|
53
|
-
resolveAlias,
|
|
54
|
-
reverseResolveAlias,
|
|
55
|
-
} from "pathe/utils";
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## License
|
|
59
|
-
|
|
60
|
-
Made with 💛 Published under the [MIT](./LICENSE) license.
|
|
61
|
-
|
|
62
|
-
Some code was used from the Node.js project. Glob supported is powered by [zeptomatch](https://github.com/fabiospampinato/zeptomatch).
|
|
63
|
-
|
|
64
|
-
<!-- Refs -->
|
|
65
|
-
|
|
66
|
-
[npm-v-src]: https://img.shields.io/npm/v/pathe?style=flat-square
|
|
67
|
-
[npm-v-href]: https://npmjs.com/package/pathe
|
|
68
|
-
[npm-d-src]: https://img.shields.io/npm/dm/pathe?style=flat-square
|
|
69
|
-
[npm-d-href]: https://npmjs.com/package/pathe
|
|
70
|
-
[github-actions-src]: https://img.shields.io/github/workflow/status/unjs/pathe/ci/main?style=flat-square
|
|
71
|
-
[github-actions-href]: https://github.com/unjs/pathe/actions?query=workflow%3Aci
|
|
72
|
-
[size-src]: https://packagephobia.now.sh/badge?p=pathe
|
|
73
|
-
[size-href]: https://packagephobia.now.sh/result?p=pathe
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const _path = require('./shared/pathe.BSlhyZSM.cjs');
|
|
6
|
-
|
|
7
|
-
const delimiter = /* @__PURE__ */ (() => globalThis.process?.platform === "win32" ? ";" : ":")();
|
|
8
|
-
const _platforms = { posix: void 0, win32: void 0 };
|
|
9
|
-
const mix = (del = delimiter) => {
|
|
10
|
-
return new Proxy(_path._path, {
|
|
11
|
-
get(_, prop) {
|
|
12
|
-
if (prop === "delimiter") return del;
|
|
13
|
-
if (prop === "posix") return posix;
|
|
14
|
-
if (prop === "win32") return win32;
|
|
15
|
-
return _platforms[prop] || _path._path[prop];
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
const posix = /* @__PURE__ */ mix(":");
|
|
20
|
-
const win32 = /* @__PURE__ */ mix(";");
|
|
21
|
-
|
|
22
|
-
exports.basename = _path.basename;
|
|
23
|
-
exports.dirname = _path.dirname;
|
|
24
|
-
exports.extname = _path.extname;
|
|
25
|
-
exports.format = _path.format;
|
|
26
|
-
exports.isAbsolute = _path.isAbsolute;
|
|
27
|
-
exports.join = _path.join;
|
|
28
|
-
exports.matchesGlob = _path.matchesGlob;
|
|
29
|
-
exports.normalize = _path.normalize;
|
|
30
|
-
exports.normalizeString = _path.normalizeString;
|
|
31
|
-
exports.parse = _path.parse;
|
|
32
|
-
exports.relative = _path.relative;
|
|
33
|
-
exports.resolve = _path.resolve;
|
|
34
|
-
exports.sep = _path.sep;
|
|
35
|
-
exports.toNamespacedPath = _path.toNamespacedPath;
|
|
36
|
-
exports.default = posix;
|
|
37
|
-
exports.delimiter = delimiter;
|
|
38
|
-
exports.posix = posix;
|
|
39
|
-
exports.win32 = win32;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import * as path from 'node:path';
|
|
2
|
-
import path__default from 'node:path';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Constant for path separator.
|
|
6
|
-
*
|
|
7
|
-
* Always equals to `"/"`.
|
|
8
|
-
*/
|
|
9
|
-
declare const sep = "/";
|
|
10
|
-
declare const normalize: typeof path__default.normalize;
|
|
11
|
-
declare const join: typeof path__default.join;
|
|
12
|
-
declare const resolve: typeof path__default.resolve;
|
|
13
|
-
/**
|
|
14
|
-
* Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.
|
|
15
|
-
*
|
|
16
|
-
* @param path - The path to normalise.
|
|
17
|
-
* @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.
|
|
18
|
-
* @returns the normalised path string.
|
|
19
|
-
*/
|
|
20
|
-
declare function normalizeString(path: string, allowAboveRoot: boolean): string;
|
|
21
|
-
declare const isAbsolute: typeof path__default.isAbsolute;
|
|
22
|
-
declare const toNamespacedPath: typeof path__default.toNamespacedPath;
|
|
23
|
-
declare const extname: typeof path__default.extname;
|
|
24
|
-
declare const relative: typeof path__default.relative;
|
|
25
|
-
declare const dirname: typeof path__default.dirname;
|
|
26
|
-
declare const format: typeof path__default.format;
|
|
27
|
-
declare const basename: typeof path__default.basename;
|
|
28
|
-
declare const parse: typeof path__default.parse;
|
|
29
|
-
/**
|
|
30
|
-
* The `path.matchesGlob()` method determines if `path` matches the `pattern`.
|
|
31
|
-
* @param path The path to glob-match against.
|
|
32
|
-
* @param pattern The glob to check the path against.
|
|
33
|
-
*/
|
|
34
|
-
declare const matchesGlob: (path: string, pattern: string | string[]) => boolean;
|
|
35
|
-
|
|
36
|
-
type NodePath = typeof path;
|
|
37
|
-
/**
|
|
38
|
-
* The platform-specific file delimiter.
|
|
39
|
-
*
|
|
40
|
-
* Equals to `";"` in windows and `":"` in all other platforms.
|
|
41
|
-
*/
|
|
42
|
-
declare const delimiter: ";" | ":";
|
|
43
|
-
declare const posix: NodePath["posix"];
|
|
44
|
-
declare const win32: NodePath["win32"];
|
|
45
|
-
declare const _default: NodePath;
|
|
46
|
-
|
|
47
|
-
export { basename, _default as default, delimiter, dirname, extname, format, isAbsolute, join, matchesGlob, normalize, normalizeString, parse, posix, relative, resolve, sep, toNamespacedPath, win32 };
|