@socketsecurity/lib 6.0.5 → 6.0.7
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 +43 -0
- package/dist/ai/discover.d.mts +2 -2
- package/dist/ai/discover.js +6 -4
- package/dist/ai/spawn.js +10 -6
- package/dist/ai/types.d.mts +18 -6
- package/dist/ai/worktree.d.mts +6 -6
- package/dist/ai/worktree.js +12 -7
- package/dist/ansi/strip.d.ts +1 -1
- package/dist/ansi/strip.js +0 -2
- package/dist/archives/_internal.js +7 -9
- package/dist/archives/extract.js +1 -1
- package/dist/archives/tar.js +6 -6
- package/dist/archives/zip.js +4 -6
- package/dist/argv/flag-predicates.d.ts +12 -12
- package/dist/argv/flag-predicates.js +17 -17
- package/dist/argv/flag-types.d.ts +18 -18
- package/dist/argv/flag-types.js +4 -4
- package/dist/argv/parse.d.ts +1 -1
- package/dist/arrays/_internal.js +11 -12
- package/dist/arrays/chunk.js +0 -1
- package/dist/arrays/join.d.ts +37 -3
- package/dist/arrays/join.js +43 -7
- package/dist/arrays/unique.js +0 -1
- package/dist/bin/_internal.d.ts +1 -1
- package/dist/bin/_internal.js +1 -1
- package/dist/bin/acorn-bindgen.cjs +769 -0
- package/dist/bin/acorn.wasm +0 -0
- package/dist/bin/exec.js +2 -3
- package/dist/bin/find.js +13 -13
- package/dist/bin/prim.cjs +39244 -0
- package/dist/bin/resolve.js +12 -13
- package/dist/bin/which.js +8 -8
- package/dist/cache/ttl/store.js +5 -5
- package/dist/checks/primordials-defaults.d.ts +3 -3
- package/dist/checks/primordials-defaults.js +3 -3
- package/dist/checks/primordials.js +4 -3
- package/dist/{bin → cli}/check-primordials.d.ts +11 -11
- package/dist/{bin → cli}/check-primordials.js +56 -52
- package/dist/{bin → cli}/check.js +6 -5
- package/dist/{bin → cli}/socket-lib.d.ts +1 -1
- package/dist/{bin → cli}/socket-lib.js +4 -4
- package/dist/colors/socket-palette.js +7 -9
- package/dist/compression/_internal.d.ts +12 -12
- package/dist/compression/_internal.js +20 -19
- package/dist/compression/brotli.d.ts +25 -25
- package/dist/compression/brotli.js +37 -44
- package/dist/compression/gzip.d.ts +23 -23
- package/dist/compression/gzip.js +44 -52
- package/dist/constants/agents.d.ts +3 -1
- package/dist/constants/agents.js +15 -11
- package/dist/constants/licenses.js +3 -3
- package/dist/constants/node.d.ts +23 -0
- package/dist/constants/node.js +47 -15
- package/dist/constants/packages.js +22 -28
- package/dist/constants/platform.d.ts +30 -3
- package/dist/constants/platform.js +72 -12
- package/dist/constants/runtime.d.ts +22 -0
- package/dist/constants/runtime.js +32 -0
- package/dist/constants/socket.js +1 -1
- package/dist/cover/code.js +8 -8
- package/dist/cover/formatters.js +5 -5
- package/dist/crypto/hash.d.ts +26 -1
- package/dist/crypto/hash.js +43 -12
- package/dist/debug/_internal.js +4 -6
- package/dist/debug/caller-info.js +2 -3
- package/dist/debug/namespace.d.ts +7 -0
- package/dist/debug/namespace.js +21 -12
- package/dist/debug/output.js +21 -24
- package/dist/debug/types.d.ts +4 -4
- package/dist/dlx/arborist.js +6 -6
- package/dist/dlx/binary-cache.js +14 -14
- package/dist/dlx/binary-download.d.ts +1 -1
- package/dist/dlx/binary-download.js +14 -13
- package/dist/dlx/binary-resolution.js +16 -14
- package/dist/dlx/binary-types.d.ts +5 -5
- package/dist/dlx/binary.js +5 -5
- package/dist/dlx/cache.js +1 -1
- package/dist/dlx/detect.d.ts +34 -25
- package/dist/dlx/detect.js +86 -77
- package/dist/dlx/dir.js +2 -2
- package/dist/dlx/firewall.d.ts +1 -1
- package/dist/dlx/lockfile.d.ts +19 -18
- package/dist/dlx/lockfile.js +16 -16
- package/dist/dlx/manifest.d.ts +6 -6
- package/dist/dlx/manifest.js +5 -5
- package/dist/dlx/package.d.ts +10 -10
- package/dist/dlx/package.js +16 -16
- package/dist/dlx/packages.js +4 -4
- package/dist/dlx/paths.js +7 -7
- package/dist/dlx/spec.js +1 -1
- package/dist/dlx/types.d.ts +28 -27
- package/dist/eco/cargo/parse-lockfile.d.ts +1 -1
- package/dist/eco/cargo/parse-lockfile.js +2 -2
- package/dist/eco/manifest/analyze-lockfile.js +2 -2
- package/dist/eco/manifest/detect-format.js +4 -4
- package/dist/eco/manifest/find-packages.js +2 -2
- package/dist/eco/manifest/get-package-versions.js +2 -2
- package/dist/eco/manifest/get-package.js +2 -2
- package/dist/eco/manifest/parse-lockfile.js +2 -2
- package/dist/eco/manifest/parse-manifest.js +2 -2
- package/dist/eco/manifest/parse.js +2 -2
- package/dist/eco/npm/npm/exec.js +2 -2
- package/dist/eco/npm/npm/flags.js +7 -12
- package/dist/eco/npm/npm/parse-lockfile.d.ts +14 -14
- package/dist/eco/npm/npm/parse-lockfile.js +3 -3
- package/dist/eco/npm/parse-package-json.js +3 -3
- package/dist/eco/npm/pnpm/exec.d.ts +1 -1
- package/dist/eco/npm/pnpm/exec.js +5 -5
- package/dist/eco/npm/pnpm/flags.js +0 -3
- package/dist/eco/npm/pnpm/parse-lockfile.d.ts +1 -1
- package/dist/eco/npm/pnpm/parse-lockfile.js +4 -4
- package/dist/eco/npm/script.js +9 -6
- package/dist/eco/npm/yarnpkg/yarn/exec.js +3 -3
- package/dist/eco/npm/yarnpkg/yarn/parse-lockfile.d.ts +2 -2
- package/dist/eco/npm/yarnpkg/yarn/parse-lockfile.js +8 -8
- package/dist/effects/pulse-frames.d.ts +3 -1
- package/dist/effects/shimmer-keyframes.d.ts +1 -1
- package/dist/effects/shimmer-terminal.d.ts +1 -1
- package/dist/env/boolean.js +0 -1
- package/dist/env/ci.js +0 -1
- package/dist/env/debug.js +0 -1
- package/dist/env/github-status.d.ts +51 -0
- package/dist/env/github-status.js +90 -0
- package/dist/env/github.js +0 -8
- package/dist/env/home.js +0 -1
- package/dist/env/locale.js +0 -3
- package/dist/env/node-auth-token.js +0 -1
- package/dist/env/node-env.js +0 -1
- package/dist/env/node-version-managers.d.ts +53 -0
- package/dist/env/node-version-managers.js +90 -0
- package/dist/env/npm.js +0 -5
- package/dist/env/number.js +0 -1
- package/dist/env/package-manager.js +3 -6
- package/dist/env/path.js +0 -1
- package/dist/env/pre-commit.js +1 -2
- package/dist/env/rewire.d.ts +7 -6
- package/dist/env/rewire.js +15 -16
- package/dist/env/shell.js +0 -1
- package/dist/env/socket-cli.js +5 -18
- package/dist/env/socket-mcp.d.ts +114 -0
- package/dist/env/socket-mcp.js +146 -0
- package/dist/env/socket.d.ts +1 -109
- package/dist/env/socket.js +12 -166
- package/dist/env/string.js +0 -1
- package/dist/env/temp-dir.js +0 -3
- package/dist/env/term.js +0 -1
- package/dist/env/test.js +3 -6
- package/dist/env/windows.js +0 -4
- package/dist/env/xdg.js +0 -3
- package/dist/events/exit/_internal.d.ts +11 -9
- package/dist/events/exit/_internal.js +31 -35
- package/dist/events/exit/handler.js +3 -4
- package/dist/events/exit/intercept.js +4 -6
- package/dist/events/exit/lifecycle.js +16 -18
- package/dist/events/exit/signals.js +1 -2
- package/dist/events/exit/types.d.ts +6 -5
- package/dist/external/@npmcli/package-json.js +2 -2
- package/dist/external/@sinclair/typebox/value.js +5 -1
- package/dist/external/@sinclair/typebox.js +5 -1
- package/dist/external/@socketregistry/packageurl-js.js +27 -0
- package/dist/external/npm-pack.js +2 -2
- package/dist/external-tools/bazel/read-bazel-version-file.js +1 -1
- package/dist/external-tools/bazel/resolve.js +2 -1
- package/dist/external-tools/bazel/types.d.ts +1 -1
- package/dist/external-tools/cdxgen/from-vfs.js +1 -1
- package/dist/external-tools/cdxgen/resolve.js +2 -1
- package/dist/external-tools/cdxgen/types.d.ts +1 -1
- package/dist/external-tools/from-download.d.ts +1 -1
- package/dist/external-tools/from-download.js +1 -1
- package/dist/external-tools/from-pip-venv.d.ts +73 -0
- package/dist/external-tools/from-pip-venv.js +98 -0
- package/dist/external-tools/janus/asset-names.js +1 -1
- package/dist/external-tools/janus/from-download.js +3 -5
- package/dist/external-tools/janus/from-vfs.js +1 -1
- package/dist/external-tools/janus/resolve.js +2 -1
- package/dist/external-tools/janus/types.d.ts +1 -1
- package/dist/external-tools/jre/detect-platform-arch.d.ts +10 -6
- package/dist/external-tools/jre/detect-platform-arch.js +29 -14
- package/dist/external-tools/jre/from-download.js +2 -1
- package/dist/external-tools/jre/from-vfs.js +1 -1
- package/dist/external-tools/jre/resolve.js +2 -1
- package/dist/external-tools/jre/types.d.ts +1 -1
- package/dist/external-tools/manifest.d.ts +7 -7
- package/dist/external-tools/manifest.js +18 -16
- package/dist/external-tools/opengrep/from-vfs.js +1 -1
- package/dist/external-tools/opengrep/resolve.js +2 -1
- package/dist/external-tools/opengrep/types.d.ts +1 -1
- package/dist/external-tools/python/asset-names.d.ts +76 -0
- package/dist/external-tools/python/asset-names.js +104 -0
- package/dist/external-tools/python/dlx.d.ts +80 -0
- package/dist/external-tools/python/dlx.js +87 -0
- package/dist/external-tools/python/from-download.d.ts +53 -0
- package/dist/external-tools/python/from-download.js +68 -0
- package/dist/external-tools/python/from-path.d.ts +7 -0
- package/dist/external-tools/python/from-path.js +23 -0
- package/dist/external-tools/python/pin.d.ts +121 -0
- package/dist/external-tools/python/pin.js +173 -0
- package/dist/external-tools/python/pip-install.d.ts +75 -0
- package/dist/external-tools/python/pip-install.js +139 -0
- package/dist/external-tools/python/resolve.d.ts +42 -0
- package/dist/external-tools/python/resolve.js +58 -0
- package/dist/external-tools/python/types.d.ts +49 -0
- package/dist/external-tools/sbt/from-vfs.js +1 -1
- package/dist/external-tools/sbt/resolve.js +2 -1
- package/dist/external-tools/sbt/types.d.ts +1 -1
- package/dist/external-tools/skillspector/from-dlx.d.ts +24 -0
- package/dist/external-tools/skillspector/from-dlx.js +41 -0
- package/dist/external-tools/skillspector/from-path.d.ts +8 -0
- package/dist/external-tools/skillspector/from-path.js +30 -0
- package/dist/external-tools/skillspector/from-vfs.d.ts +8 -0
- package/dist/external-tools/skillspector/from-vfs.js +27 -0
- package/dist/external-tools/skillspector/resolve.d.ts +34 -0
- package/dist/external-tools/skillspector/resolve.js +53 -0
- package/dist/external-tools/skillspector/types.d.ts +24 -0
- package/dist/external-tools/skillspector/types.js +2 -0
- package/dist/external-tools/synp/from-download.js +2 -2
- package/dist/external-tools/synp/from-vfs.js +1 -1
- package/dist/external-tools/synp/resolve.js +2 -1
- package/dist/external-tools/trivy/from-vfs.js +1 -1
- package/dist/external-tools/trivy/resolve.js +2 -1
- package/dist/external-tools/trivy/types.d.ts +1 -1
- package/dist/external-tools/trufflehog/from-vfs.js +1 -1
- package/dist/external-tools/trufflehog/resolve.js +2 -1
- package/dist/external-tools/trufflehog/types.d.ts +1 -1
- package/dist/fs/_internal.d.ts +1 -1
- package/dist/fs/_internal.js +7 -7
- package/dist/fs/access.js +5 -9
- package/dist/fs/{path-cache.js → allowed-dirs-cache.js} +1 -1
- package/dist/fs/encoding.js +5 -7
- package/dist/fs/{find-up.js → find.js} +11 -13
- package/dist/fs/inspect.js +7 -13
- package/dist/fs/read-dir.js +7 -10
- package/dist/fs/read-file.js +8 -14
- package/dist/fs/read-json-cache.d.ts +6 -4
- package/dist/fs/read-json-cache.js +9 -6
- package/dist/fs/read-json.js +4 -6
- package/dist/fs/resolve-module.js +1 -1
- package/dist/fs/safe.d.ts +1 -1
- package/dist/fs/safe.js +12 -13
- package/dist/fs/unique.js +4 -5
- package/dist/fs/validate.js +1 -2
- package/dist/fs/write-json.js +4 -5
- package/dist/git/_internal.js +12 -11
- package/dist/git/changed.js +4 -4
- package/dist/git/repo.js +3 -3
- package/dist/git/staged.js +4 -4
- package/dist/git/unstaged.js +4 -4
- package/dist/github/ghsa.js +2 -2
- package/dist/github/refs-cache.d.ts +1 -1
- package/dist/github/refs-cache.js +5 -5
- package/dist/github/refs-rest.js +5 -5
- package/dist/github/{fetch.js → request.js} +13 -2
- package/dist/github/token.js +1 -1
- package/dist/github/types.d.ts +1 -1
- package/dist/globs/_internal.js +7 -9
- package/dist/globs/match.js +6 -7
- package/dist/globs/matcher.d.ts +3 -3
- package/dist/globs/matcher.js +12 -14
- package/dist/globs/stream.js +1 -2
- package/dist/globs/types.d.ts +24 -24
- package/dist/http-request/_internal.d.ts +1 -1
- package/dist/http-request/browser.js +21 -13
- package/dist/http-request/checksum-file.d.ts +55 -0
- package/dist/http-request/checksum-file.js +95 -0
- package/dist/http-request/download-types.d.ts +15 -23
- package/dist/http-request/download.js +4 -4
- package/dist/http-request/headers.d.ts +32 -3
- package/dist/http-request/headers.js +41 -13
- package/dist/http-request/request-attempt.js +38 -33
- package/dist/http-request/request-types.d.ts +7 -2
- package/dist/http-request/request.js +33 -16
- package/dist/http-request/response-reader.d.ts +12 -1
- package/dist/http-request/response-reader.js +22 -2
- package/dist/http-request/user-agent.js +3 -4
- package/dist/integrity.d.ts +86 -18
- package/dist/integrity.js +119 -30
- package/dist/ipc/directory.js +2 -2
- package/dist/ipc/paths.js +1 -1
- package/dist/ipc/write.js +1 -1
- package/dist/ipc-cli/get.js +12 -12
- package/dist/json/edit.js +13 -14
- package/dist/json/format.js +2 -2
- package/dist/json/parse.d.ts +1 -1
- package/dist/json/parse.js +3 -7
- package/dist/logger/_internal.d.ts +4 -4
- package/dist/logger/_internal.js +3 -3
- package/dist/logger/colors.js +4 -3
- package/dist/logger/console-methods.d.ts +132 -0
- package/dist/logger/console-methods.js +169 -0
- package/dist/logger/console.d.ts +12 -0
- package/dist/logger/console.js +42 -11
- package/dist/logger/indentation-methods.d.ts +81 -0
- package/dist/logger/indentation-methods.js +121 -0
- package/dist/logger/node.d.ts +16 -338
- package/dist/logger/node.js +75 -608
- package/dist/logger/options.d.ts +39 -0
- package/dist/logger/options.js +47 -0
- package/dist/logger/semantic-methods.d.ts +63 -0
- package/dist/logger/semantic-methods.js +108 -0
- package/dist/logger/stream-methods.d.ts +63 -0
- package/dist/logger/stream-methods.js +101 -0
- package/dist/logger/stream.d.ts +37 -0
- package/dist/logger/stream.js +42 -0
- package/dist/logger/symbols-builder.js +9 -9
- package/dist/logger/symbols.d.ts +2 -25
- package/dist/logger/symbols.js +53 -74
- package/dist/logger/types.d.ts +1 -1
- package/dist/memo/types.d.ts +6 -6
- package/dist/native-messaging/host.d.ts +20 -0
- package/dist/native-messaging/host.js +120 -0
- package/dist/native-messaging/index.d.ts +5 -0
- package/dist/native-messaging/index.js +22 -0
- package/dist/native-messaging/install.d.ts +60 -0
- package/dist/native-messaging/install.js +141 -0
- package/dist/native-messaging/rate-limit.d.ts +62 -0
- package/dist/native-messaging/rate-limit.js +115 -0
- package/dist/native-messaging/run.d.ts +10 -0
- package/dist/native-messaging/run.js +17 -0
- package/dist/node/async-hooks.js +4 -3
- package/dist/node/child-process.js +4 -3
- package/dist/node/crypto.js +4 -3
- package/dist/node/events.js +4 -3
- package/dist/node/fs-promises.js +4 -3
- package/dist/node/fs.js +4 -3
- package/dist/node/http.js +4 -3
- package/dist/node/https.js +4 -3
- package/dist/node/module.js +10 -6
- package/dist/node/os.js +4 -3
- package/dist/node/path.js +4 -3
- package/dist/node/timers-promises.js +4 -3
- package/dist/node/url.js +4 -3
- package/dist/node/util.js +4 -3
- package/dist/objects/getters.js +5 -7
- package/dist/objects/inspect.js +1 -4
- package/dist/objects/mutate.js +2 -3
- package/dist/objects/predicates.js +0 -4
- package/dist/objects/sort.js +3 -7
- package/dist/packages/edit-class.js +15 -16
- package/dist/packages/edit.js +12 -14
- package/dist/packages/exports.js +11 -17
- package/dist/packages/fetch.d.ts +16 -0
- package/dist/packages/fetch.js +81 -0
- package/dist/packages/find.d.ts +55 -0
- package/dist/packages/find.js +65 -0
- package/dist/packages/isolation.js +14 -14
- package/dist/packages/licenses.js +16 -16
- package/dist/packages/manifest.js +12 -15
- package/dist/packages/metadata-extensions.d.ts +14 -0
- package/dist/packages/metadata-extensions.js +43 -0
- package/dist/packages/normalize.js +5 -9
- package/dist/packages/provenance.d.ts +6 -0
- package/dist/packages/provenance.js +25 -18
- package/dist/packages/read.d.ts +29 -0
- package/dist/packages/read.js +66 -0
- package/dist/packages/specs.d.ts +48 -1
- package/dist/packages/specs.js +74 -11
- package/dist/packages/tarball.d.ts +24 -0
- package/dist/packages/tarball.js +79 -0
- package/dist/packages/types.d.ts +21 -20
- package/dist/packages/validation.js +0 -3
- package/dist/paths/_internal.d.ts +2 -1
- package/dist/paths/_internal.js +7 -19
- package/dist/paths/conversion.js +5 -9
- package/dist/paths/filenames.d.ts +0 -1
- package/dist/paths/filenames.js +0 -2
- package/dist/paths/normalize.js +6 -5
- package/dist/paths/packages.js +4 -7
- package/dist/paths/predicates.js +9 -16
- package/dist/paths/resolve.js +11 -14
- package/dist/paths/rewire.js +3 -3
- package/dist/paths/socket.js +16 -16
- package/dist/paths/walk.d.ts +1 -1
- package/dist/paths/walk.js +4 -4
- package/dist/perf/report.js +2 -2
- package/dist/perf/types.d.ts +1 -1
- package/dist/pkg-ext/data.js +1 -1
- package/dist/primordials/array.js +9 -9
- package/dist/primordials/date.js +2 -2
- package/dist/primordials/error.js +3 -3
- package/dist/primordials/headers.d.ts +10 -0
- package/dist/primordials/headers.js +23 -0
- package/dist/primordials/intl.d.ts +13 -0
- package/dist/primordials/intl.js +26 -0
- package/dist/primordials/math.js +33 -33
- package/dist/primordials/number.js +9 -9
- package/dist/primordials/object.js +5 -5
- package/dist/primordials/string.d.ts +2 -2
- package/dist/primordials/string.js +6 -6
- package/dist/primordials/symbol.js +3 -3
- package/dist/primordials/uncurry.js +9 -9
- package/dist/process/abort.js +3 -3
- package/dist/process/lock-manager.js +8 -8
- package/dist/process/spawn/_internal.js +6 -8
- package/dist/process/spawn/child.js +14 -14
- package/dist/process/spawn/errors.js +2 -4
- package/dist/process/spawn/kill-tree.d.ts +53 -0
- package/dist/process/spawn/kill-tree.js +85 -0
- package/dist/process/spawn/stdio.js +0 -1
- package/dist/process/spawn/types.d.ts +5 -5
- package/dist/process/transient.js +2 -2
- package/dist/promises/_internal.d.ts +2 -1
- package/dist/promises/_internal.js +2 -6
- package/dist/promises/iterate.js +12 -16
- package/dist/promises/options.js +3 -6
- package/dist/promises/retry.js +4 -5
- package/dist/promises/timers.d.ts +30 -0
- package/dist/promises/timers.js +48 -0
- package/dist/releases/github-archives.d.ts +6 -6
- package/dist/releases/github-archives.js +2 -2
- package/dist/releases/github-asset-url.d.ts +1 -1
- package/dist/releases/github-asset-url.js +5 -5
- package/dist/releases/github-downloads.d.ts +1 -1
- package/dist/releases/github-downloads.js +3 -3
- package/dist/releases/github-listing.d.ts +11 -2
- package/dist/releases/github-listing.js +20 -7
- package/dist/releases/github-retry-config.js +1 -1
- package/dist/releases/github-types.d.ts +6 -6
- package/dist/releases/socket-btm-binary-naming.d.ts +107 -0
- package/dist/releases/socket-btm-binary-naming.js +155 -0
- package/dist/releases/socket-btm.d.ts +8 -115
- package/dist/releases/socket-btm.js +16 -159
- package/dist/schema/types.d.ts +1 -1
- package/dist/sea/detect.js +6 -6
- package/dist/secrets/_internal.d.ts +2 -2
- package/dist/secrets/_internal.js +5 -4
- package/dist/secrets/compare.d.ts +45 -0
- package/dist/secrets/compare.js +61 -0
- package/dist/secrets/keychain.js +9 -6
- package/dist/secrets/linux.js +25 -23
- package/dist/secrets/macos.d.ts +1 -1
- package/dist/secrets/macos.js +18 -16
- package/dist/secrets/rc.d.ts +2 -2
- package/dist/secrets/rc.js +15 -10
- package/dist/secrets/socket-api-token.d.ts +4 -4
- package/dist/secrets/socket-api-token.js +18 -9
- package/dist/secrets/windows.js +21 -17
- package/dist/shadow/skip.js +2 -2
- package/dist/shell/parse.d.ts +108 -1
- package/dist/shell/parse.js +168 -2
- package/dist/smol/detect.js +9 -10
- package/dist/smol/http.js +6 -7
- package/dist/smol/https.js +6 -7
- package/dist/smol/manifest.d.ts +1 -1
- package/dist/smol/manifest.js +6 -7
- package/dist/smol/path.d.ts +1 -1
- package/dist/smol/path.js +7 -8
- package/dist/smol/primordial.d.ts +4 -0
- package/dist/smol/primordial.js +6 -7
- package/dist/smol/purl.d.ts +1 -1
- package/dist/smol/purl.js +7 -8
- package/dist/smol/versions.js +6 -7
- package/dist/smol/vfs.js +6 -7
- package/dist/sorts/_internal.js +6 -8
- package/dist/sorts/natural.js +10 -12
- package/dist/sorts/semver.js +1 -2
- package/dist/sorts/strings.js +0 -1
- package/dist/sorts/types.d.ts +1 -1
- package/dist/spinner/create-spinner-class.d.ts +38 -0
- package/dist/spinner/create-spinner-class.js +302 -0
- package/dist/spinner/default.js +8 -9
- package/dist/spinner/spinner-internals.d.ts +36 -0
- package/dist/spinner/spinner-internals.js +101 -0
- package/dist/spinner/spinner-shimmer-methods.d.ts +54 -0
- package/dist/spinner/spinner-shimmer-methods.js +143 -0
- package/dist/spinner/spinner-status-methods.d.ts +40 -0
- package/dist/spinner/spinner-status-methods.js +133 -0
- package/dist/spinner/spinner.d.ts +4 -5
- package/dist/spinner/spinner.js +18 -705
- package/dist/spinner/types.d.ts +3 -1
- package/dist/spinner/with.d.ts +10 -0
- package/dist/spinner/with.js +16 -2
- package/dist/stdio/divider.js +1 -1
- package/dist/stdio/footer.js +3 -3
- package/dist/stdio/header.js +4 -4
- package/dist/stdio/progress.js +5 -5
- package/dist/stdio/prompts.d.ts +5 -3
- package/dist/stdio/prompts.js +6 -7
- package/dist/stdio/stdout.js +3 -3
- package/dist/streams/parallel.js +3 -5
- package/dist/streams/transform.js +2 -3
- package/dist/strings/format.js +2 -6
- package/dist/strings/predicates.js +0 -2
- package/dist/strings/search.js +1 -2
- package/dist/strings/transform.js +0 -3
- package/dist/strings/width.js +9 -10
- package/dist/tables/bordered.js +4 -3
- package/dist/tables/padding.js +1 -1
- package/dist/tables/simple.js +8 -5
- package/dist/temporal/instant.js +4 -2
- package/dist/temporal/slots.js +7 -6
- package/dist/temporal/system.js +9 -9
- package/dist/themes/context.d.ts +3 -2
- package/dist/themes/context.js +4 -5
- package/dist/themes/themes.js +15 -15
- package/dist/themes/types.d.ts +3 -3
- package/dist/url/parse.js +0 -2
- package/dist/url/predicates.js +1 -2
- package/dist/url/search-params.js +3 -9
- package/dist/url/types.d.ts +5 -5
- package/dist/versions/_internal.js +3 -3
- package/dist/words/article.js +0 -1
- package/dist/words/capitalize.js +0 -1
- package/dist/words/pluralize.d.ts +24 -2
- package/dist/words/pluralize.js +47 -2
- package/dist/words/types.d.ts +25 -2
- package/package.json +289 -108
- package/dist/external-tools/uv/asset-names.d.ts +0 -36
- package/dist/external-tools/uv/asset-names.js +0 -70
- package/dist/external-tools/uv/from-download.d.ts +0 -17
- package/dist/external-tools/uv/from-download.js +0 -47
- package/dist/external-tools/uv/from-path.d.ts +0 -5
- package/dist/external-tools/uv/from-path.js +0 -22
- package/dist/external-tools/uv/from-vfs.d.ts +0 -7
- package/dist/external-tools/uv/from-vfs.js +0 -26
- package/dist/external-tools/uv/resolve.d.ts +0 -25
- package/dist/external-tools/uv/resolve.js +0 -52
- package/dist/external-tools/uv/types.d.ts +0 -24
- package/dist/http-request/checksums.d.ts +0 -69
- package/dist/http-request/checksums.js +0 -108
- package/dist/http-request/http-request.d.ts +0 -12
- package/dist/http-request/http-request.js +0 -11
- package/dist/packages/operations.d.ts +0 -113
- package/dist/packages/operations.js +0 -304
- package/dist/ssri/convert.d.ts +0 -48
- package/dist/ssri/convert.js +0 -69
- package/dist/ssri/parse.d.ts +0 -27
- package/dist/ssri/parse.js +0 -41
- package/dist/ssri/validate.d.ts +0 -41
- package/dist/ssri/validate.js +0 -56
- /package/dist/{bin → cli}/check.d.ts +0 -0
- /package/dist/external-tools/{uv → python}/types.js +0 -0
- /package/dist/fs/{path-cache.d.ts → allowed-dirs-cache.d.ts} +0 -0
- /package/dist/fs/{find-up.d.ts → find.d.ts} +0 -0
- /package/dist/github/{fetch.d.ts → request.d.ts} +0 -0
|
@@ -0,0 +1,769 @@
|
|
|
1
|
+
|
|
2
|
+
let imports = {};
|
|
3
|
+
imports['__wbindgen_placeholder__'] = module.exports;
|
|
4
|
+
|
|
5
|
+
let heap = new Array(128).fill(undefined);
|
|
6
|
+
|
|
7
|
+
heap.push(undefined, null, true, false);
|
|
8
|
+
|
|
9
|
+
function getObject(idx) { return heap[idx]; }
|
|
10
|
+
|
|
11
|
+
let heap_next = heap.length;
|
|
12
|
+
|
|
13
|
+
function addHeapObject(obj) {
|
|
14
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
15
|
+
const idx = heap_next;
|
|
16
|
+
heap_next = heap[idx];
|
|
17
|
+
|
|
18
|
+
heap[idx] = obj;
|
|
19
|
+
return idx;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function handleError(f, args) {
|
|
23
|
+
try {
|
|
24
|
+
return f.apply(this, args);
|
|
25
|
+
} catch (e) {
|
|
26
|
+
wasm.__wbindgen_export_0(addHeapObject(e));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
let cachedUint8ArrayMemory0 = null;
|
|
31
|
+
|
|
32
|
+
function getUint8ArrayMemory0() {
|
|
33
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
34
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
35
|
+
}
|
|
36
|
+
return cachedUint8ArrayMemory0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
40
|
+
|
|
41
|
+
cachedTextDecoder.decode();
|
|
42
|
+
|
|
43
|
+
function decodeText(ptr, len) {
|
|
44
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function getStringFromWasm0(ptr, len) {
|
|
48
|
+
ptr = ptr >>> 0;
|
|
49
|
+
return decodeText(ptr, len);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function isLikeNone(x) {
|
|
53
|
+
return x === undefined || x === null;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function debugString(val) {
|
|
57
|
+
// primitive types
|
|
58
|
+
const type = typeof val;
|
|
59
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
60
|
+
return `${val}`;
|
|
61
|
+
}
|
|
62
|
+
if (type == 'string') {
|
|
63
|
+
return `"${val}"`;
|
|
64
|
+
}
|
|
65
|
+
if (type == 'symbol') {
|
|
66
|
+
const description = val.description;
|
|
67
|
+
if (description == null) {
|
|
68
|
+
return 'Symbol';
|
|
69
|
+
} else {
|
|
70
|
+
return `Symbol(${description})`;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (type == 'function') {
|
|
74
|
+
const name = val.name;
|
|
75
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
76
|
+
return `Function(${name})`;
|
|
77
|
+
} else {
|
|
78
|
+
return 'Function';
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
// objects
|
|
82
|
+
if (Array.isArray(val)) {
|
|
83
|
+
const length = val.length;
|
|
84
|
+
let debug = '[';
|
|
85
|
+
if (length > 0) {
|
|
86
|
+
debug += debugString(val[0]);
|
|
87
|
+
}
|
|
88
|
+
for(let i = 1; i < length; i++) {
|
|
89
|
+
debug += ', ' + debugString(val[i]);
|
|
90
|
+
}
|
|
91
|
+
debug += ']';
|
|
92
|
+
return debug;
|
|
93
|
+
}
|
|
94
|
+
// Test for built-in
|
|
95
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
96
|
+
let className;
|
|
97
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
98
|
+
className = builtInMatches[1];
|
|
99
|
+
} else {
|
|
100
|
+
// Failed to match the standard '[object ClassName]'
|
|
101
|
+
return toString.call(val);
|
|
102
|
+
}
|
|
103
|
+
if (className == 'Object') {
|
|
104
|
+
// we're a user defined class or Object
|
|
105
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
106
|
+
// easier than looping through ownProperties of `val`.
|
|
107
|
+
try {
|
|
108
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
109
|
+
} catch (_) {
|
|
110
|
+
return 'Object';
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
// errors
|
|
114
|
+
if (val instanceof Error) {
|
|
115
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
116
|
+
}
|
|
117
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
118
|
+
return className;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
let WASM_VECTOR_LEN = 0;
|
|
122
|
+
|
|
123
|
+
const cachedTextEncoder = new TextEncoder();
|
|
124
|
+
|
|
125
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
126
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
127
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
128
|
+
view.set(buf);
|
|
129
|
+
return {
|
|
130
|
+
read: arg.length,
|
|
131
|
+
written: buf.length
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
137
|
+
|
|
138
|
+
if (realloc === undefined) {
|
|
139
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
140
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
141
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
142
|
+
WASM_VECTOR_LEN = buf.length;
|
|
143
|
+
return ptr;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
let len = arg.length;
|
|
147
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
148
|
+
|
|
149
|
+
const mem = getUint8ArrayMemory0();
|
|
150
|
+
|
|
151
|
+
let offset = 0;
|
|
152
|
+
|
|
153
|
+
for (; offset < len; offset++) {
|
|
154
|
+
const code = arg.charCodeAt(offset);
|
|
155
|
+
if (code > 0x7F) break;
|
|
156
|
+
mem[ptr + offset] = code;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (offset !== len) {
|
|
160
|
+
if (offset !== 0) {
|
|
161
|
+
arg = arg.slice(offset);
|
|
162
|
+
}
|
|
163
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
164
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
165
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
166
|
+
|
|
167
|
+
offset += ret.written;
|
|
168
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
WASM_VECTOR_LEN = offset;
|
|
172
|
+
return ptr;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
let cachedDataViewMemory0 = null;
|
|
176
|
+
|
|
177
|
+
function getDataViewMemory0() {
|
|
178
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
179
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
180
|
+
}
|
|
181
|
+
return cachedDataViewMemory0;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function dropObject(idx) {
|
|
185
|
+
if (idx < 132) return;
|
|
186
|
+
heap[idx] = heap_next;
|
|
187
|
+
heap_next = idx;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function takeObject(idx) {
|
|
191
|
+
const ret = getObject(idx);
|
|
192
|
+
dropObject(idx);
|
|
193
|
+
return ret;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Parse `source`, compile `selector`, run the matcher, return a
|
|
197
|
+
* JSON-encoded result string. Meant to be called from JavaScript as:
|
|
198
|
+
*
|
|
199
|
+
* const result = JSON.parse(aqs_match(source, selector))
|
|
200
|
+
* @param {string} source
|
|
201
|
+
* @param {string} selector
|
|
202
|
+
* @returns {string}
|
|
203
|
+
*/
|
|
204
|
+
exports.aqs_match = function(source, selector) {
|
|
205
|
+
let deferred3_0;
|
|
206
|
+
let deferred3_1;
|
|
207
|
+
try {
|
|
208
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
209
|
+
const ptr0 = passStringToWasm0(source, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
210
|
+
const len0 = WASM_VECTOR_LEN;
|
|
211
|
+
const ptr1 = passStringToWasm0(selector, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
212
|
+
const len1 = WASM_VECTOR_LEN;
|
|
213
|
+
wasm.aqs_match(retptr, ptr0, len0, ptr1, len1);
|
|
214
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
215
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
216
|
+
deferred3_0 = r0;
|
|
217
|
+
deferred3_1 = r1;
|
|
218
|
+
return getStringFromWasm0(r0, r1);
|
|
219
|
+
} finally {
|
|
220
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
221
|
+
wasm.__wbindgen_export_3(deferred3_0, deferred3_1, 1);
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Standalone parse function (matches Acorn API)
|
|
227
|
+
* @param {string} code
|
|
228
|
+
* @param {any} options
|
|
229
|
+
* @returns {any}
|
|
230
|
+
*/
|
|
231
|
+
exports.parse = function(code, options) {
|
|
232
|
+
try {
|
|
233
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
234
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
235
|
+
const len0 = WASM_VECTOR_LEN;
|
|
236
|
+
wasm.parse(retptr, ptr0, len0, addHeapObject(options));
|
|
237
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
238
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
239
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
240
|
+
if (r2) {
|
|
241
|
+
throw takeObject(r1);
|
|
242
|
+
}
|
|
243
|
+
return takeObject(r0);
|
|
244
|
+
} finally {
|
|
245
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Check if code has syntax errors (returns true if valid)
|
|
251
|
+
* @param {string} code
|
|
252
|
+
* @returns {boolean}
|
|
253
|
+
*/
|
|
254
|
+
exports.is_valid = function(code) {
|
|
255
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
256
|
+
const len0 = WASM_VECTOR_LEN;
|
|
257
|
+
const ret = wasm.is_valid(ptr0, len0);
|
|
258
|
+
return ret !== 0;
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Get version information
|
|
263
|
+
* @returns {string}
|
|
264
|
+
*/
|
|
265
|
+
exports.version = function() {
|
|
266
|
+
let deferred1_0;
|
|
267
|
+
let deferred1_1;
|
|
268
|
+
try {
|
|
269
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
270
|
+
wasm.version(retptr);
|
|
271
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
272
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
273
|
+
deferred1_0 = r0;
|
|
274
|
+
deferred1_1 = r1;
|
|
275
|
+
return getStringFromWasm0(r0, r1);
|
|
276
|
+
} finally {
|
|
277
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
278
|
+
wasm.__wbindgen_export_3(deferred1_0, deferred1_1, 1);
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Find innermost node containing position
|
|
284
|
+
* @param {string} code
|
|
285
|
+
* @param {number} pos
|
|
286
|
+
* @param {string | null | undefined} node_type
|
|
287
|
+
* @param {any} options_js
|
|
288
|
+
* @returns {any}
|
|
289
|
+
*/
|
|
290
|
+
exports.findNodeAround = function(code, pos, node_type, options_js) {
|
|
291
|
+
try {
|
|
292
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
293
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
294
|
+
const len0 = WASM_VECTOR_LEN;
|
|
295
|
+
var ptr1 = isLikeNone(node_type) ? 0 : passStringToWasm0(node_type, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
296
|
+
var len1 = WASM_VECTOR_LEN;
|
|
297
|
+
wasm.findNodeAround(retptr, ptr0, len0, pos, ptr1, len1, addHeapObject(options_js));
|
|
298
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
299
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
300
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
301
|
+
if (r2) {
|
|
302
|
+
throw takeObject(r1);
|
|
303
|
+
}
|
|
304
|
+
return takeObject(r0);
|
|
305
|
+
} finally {
|
|
306
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Find first node starting at or after position
|
|
312
|
+
* @param {string} code
|
|
313
|
+
* @param {number} pos
|
|
314
|
+
* @param {string | null | undefined} node_type
|
|
315
|
+
* @param {any} options_js
|
|
316
|
+
* @returns {any}
|
|
317
|
+
*/
|
|
318
|
+
exports.findNodeAfter = function(code, pos, node_type, options_js) {
|
|
319
|
+
try {
|
|
320
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
321
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
322
|
+
const len0 = WASM_VECTOR_LEN;
|
|
323
|
+
var ptr1 = isLikeNone(node_type) ? 0 : passStringToWasm0(node_type, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
324
|
+
var len1 = WASM_VECTOR_LEN;
|
|
325
|
+
wasm.findNodeAfter(retptr, ptr0, len0, pos, ptr1, len1, addHeapObject(options_js));
|
|
326
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
327
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
328
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
329
|
+
if (r2) {
|
|
330
|
+
throw takeObject(r1);
|
|
331
|
+
}
|
|
332
|
+
return takeObject(r0);
|
|
333
|
+
} finally {
|
|
334
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Find outermost node ending before position
|
|
340
|
+
* @param {string} code
|
|
341
|
+
* @param {number} pos
|
|
342
|
+
* @param {string | null | undefined} node_type
|
|
343
|
+
* @param {any} options_js
|
|
344
|
+
* @returns {any}
|
|
345
|
+
*/
|
|
346
|
+
exports.findNodeBefore = function(code, pos, node_type, options_js) {
|
|
347
|
+
try {
|
|
348
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
349
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
350
|
+
const len0 = WASM_VECTOR_LEN;
|
|
351
|
+
var ptr1 = isLikeNone(node_type) ? 0 : passStringToWasm0(node_type, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
352
|
+
var len1 = WASM_VECTOR_LEN;
|
|
353
|
+
wasm.findNodeBefore(retptr, ptr0, len0, pos, ptr1, len1, addHeapObject(options_js));
|
|
354
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
355
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
356
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
357
|
+
if (r2) {
|
|
358
|
+
throw takeObject(r1);
|
|
359
|
+
}
|
|
360
|
+
return takeObject(r0);
|
|
361
|
+
} finally {
|
|
362
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
363
|
+
}
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Simple walk - parse code and call visitor for each node type
|
|
368
|
+
* @param {string} code
|
|
369
|
+
* @param {any} visitors_obj
|
|
370
|
+
* @param {any} options_js
|
|
371
|
+
*/
|
|
372
|
+
exports.simple = function(code, visitors_obj, options_js) {
|
|
373
|
+
try {
|
|
374
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
375
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
376
|
+
const len0 = WASM_VECTOR_LEN;
|
|
377
|
+
wasm.simple(retptr, ptr0, len0, addHeapObject(visitors_obj), addHeapObject(options_js));
|
|
378
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
379
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
380
|
+
if (r1) {
|
|
381
|
+
throw takeObject(r0);
|
|
382
|
+
}
|
|
383
|
+
} finally {
|
|
384
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
385
|
+
}
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Walk with ancestors
|
|
390
|
+
* @param {string} code
|
|
391
|
+
* @param {any} visitors_obj
|
|
392
|
+
* @param {any} options_js
|
|
393
|
+
*/
|
|
394
|
+
exports.walk = function(code, visitors_obj, options_js) {
|
|
395
|
+
try {
|
|
396
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
397
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
398
|
+
const len0 = WASM_VECTOR_LEN;
|
|
399
|
+
wasm.walk(retptr, ptr0, len0, addHeapObject(visitors_obj), addHeapObject(options_js));
|
|
400
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
401
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
402
|
+
if (r1) {
|
|
403
|
+
throw takeObject(r0);
|
|
404
|
+
}
|
|
405
|
+
} finally {
|
|
406
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
407
|
+
}
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Full walk with enter/exit
|
|
412
|
+
* @param {string} code
|
|
413
|
+
* @param {any} visitors_obj
|
|
414
|
+
* @param {any} options_js
|
|
415
|
+
*/
|
|
416
|
+
exports.full = function(code, visitors_obj, options_js) {
|
|
417
|
+
try {
|
|
418
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
419
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
420
|
+
const len0 = WASM_VECTOR_LEN;
|
|
421
|
+
wasm.full(retptr, ptr0, len0, addHeapObject(visitors_obj), addHeapObject(options_js));
|
|
422
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
423
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
424
|
+
if (r1) {
|
|
425
|
+
throw takeObject(r0);
|
|
426
|
+
}
|
|
427
|
+
} finally {
|
|
428
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Recursive walk — visitor controls child traversal via c(child, state)
|
|
434
|
+
* @param {string} code
|
|
435
|
+
* @param {any} state
|
|
436
|
+
* @param {any} funcs
|
|
437
|
+
* @param {any} options_js
|
|
438
|
+
*/
|
|
439
|
+
exports.recursive = function(code, state, funcs, options_js) {
|
|
440
|
+
try {
|
|
441
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
442
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
443
|
+
const len0 = WASM_VECTOR_LEN;
|
|
444
|
+
wasm.recursive(retptr, ptr0, len0, addHeapObject(state), addHeapObject(funcs), addHeapObject(options_js));
|
|
445
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
446
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
447
|
+
if (r1) {
|
|
448
|
+
throw takeObject(r0);
|
|
449
|
+
}
|
|
450
|
+
} finally {
|
|
451
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
452
|
+
}
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Find all nodes matching a type string
|
|
457
|
+
* @param {string} code
|
|
458
|
+
* @param {string} node_type
|
|
459
|
+
* @param {any} options_js
|
|
460
|
+
* @returns {any}
|
|
461
|
+
*/
|
|
462
|
+
exports.findAll = function(code, node_type, options_js) {
|
|
463
|
+
try {
|
|
464
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
465
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
466
|
+
const len0 = WASM_VECTOR_LEN;
|
|
467
|
+
const ptr1 = passStringToWasm0(node_type, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
468
|
+
const len1 = WASM_VECTOR_LEN;
|
|
469
|
+
wasm.findAll(retptr, ptr0, len0, ptr1, len1, addHeapObject(options_js));
|
|
470
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
471
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
472
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
473
|
+
if (r2) {
|
|
474
|
+
throw takeObject(r1);
|
|
475
|
+
}
|
|
476
|
+
return takeObject(r0);
|
|
477
|
+
} finally {
|
|
478
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
479
|
+
}
|
|
480
|
+
};
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Count nodes by type
|
|
484
|
+
* @param {string} code
|
|
485
|
+
* @param {any} options_js
|
|
486
|
+
* @returns {any}
|
|
487
|
+
*/
|
|
488
|
+
exports.countNodes = function(code, options_js) {
|
|
489
|
+
try {
|
|
490
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
491
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
492
|
+
const len0 = WASM_VECTOR_LEN;
|
|
493
|
+
wasm.countNodes(retptr, ptr0, len0, addHeapObject(options_js));
|
|
494
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
495
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
496
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
497
|
+
if (r2) {
|
|
498
|
+
throw takeObject(r1);
|
|
499
|
+
}
|
|
500
|
+
return takeObject(r0);
|
|
501
|
+
} finally {
|
|
502
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
503
|
+
}
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Walk all nodes, calling callback with (node, ancestors) for every node
|
|
508
|
+
* @param {string} code
|
|
509
|
+
* @param {any} callback
|
|
510
|
+
* @param {any} options_js
|
|
511
|
+
*/
|
|
512
|
+
exports.fullAncestor = function(code, callback, options_js) {
|
|
513
|
+
try {
|
|
514
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
515
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
516
|
+
const len0 = WASM_VECTOR_LEN;
|
|
517
|
+
wasm.fullAncestor(retptr, ptr0, len0, addHeapObject(callback), addHeapObject(options_js));
|
|
518
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
519
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
520
|
+
if (r1) {
|
|
521
|
+
throw takeObject(r0);
|
|
522
|
+
}
|
|
523
|
+
} finally {
|
|
524
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
525
|
+
}
|
|
526
|
+
};
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* Find innermost node at exact start/end position
|
|
530
|
+
* @param {string} code
|
|
531
|
+
* @param {number | null | undefined} start
|
|
532
|
+
* @param {number | null | undefined} end
|
|
533
|
+
* @param {string | null | undefined} node_type
|
|
534
|
+
* @param {any} options_js
|
|
535
|
+
* @returns {any}
|
|
536
|
+
*/
|
|
537
|
+
exports.findNodeAt = function(code, start, end, node_type, options_js) {
|
|
538
|
+
try {
|
|
539
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
540
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
541
|
+
const len0 = WASM_VECTOR_LEN;
|
|
542
|
+
var ptr1 = isLikeNone(node_type) ? 0 : passStringToWasm0(node_type, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
543
|
+
var len1 = WASM_VECTOR_LEN;
|
|
544
|
+
wasm.findNodeAt(retptr, ptr0, len0, isLikeNone(start) ? 0x100000001 : (start) >>> 0, isLikeNone(end) ? 0x100000001 : (end) >>> 0, ptr1, len1, addHeapObject(options_js));
|
|
545
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
546
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
547
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
548
|
+
if (r2) {
|
|
549
|
+
throw takeObject(r1);
|
|
550
|
+
}
|
|
551
|
+
return takeObject(r0);
|
|
552
|
+
} finally {
|
|
553
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
554
|
+
}
|
|
555
|
+
};
|
|
556
|
+
|
|
557
|
+
const WasmParserFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
558
|
+
? { register: () => {}, unregister: () => {} }
|
|
559
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmparser_free(ptr >>> 0, 1));
|
|
560
|
+
|
|
561
|
+
class WasmParser {
|
|
562
|
+
|
|
563
|
+
__destroy_into_raw() {
|
|
564
|
+
const ptr = this.__wbg_ptr;
|
|
565
|
+
this.__wbg_ptr = 0;
|
|
566
|
+
WasmParserFinalization.unregister(this);
|
|
567
|
+
return ptr;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
free() {
|
|
571
|
+
const ptr = this.__destroy_into_raw();
|
|
572
|
+
wasm.__wbg_wasmparser_free(ptr, 0);
|
|
573
|
+
}
|
|
574
|
+
constructor() {
|
|
575
|
+
const ret = wasm.wasmparser_new();
|
|
576
|
+
this.__wbg_ptr = ret >>> 0;
|
|
577
|
+
WasmParserFinalization.register(this, this.__wbg_ptr, this);
|
|
578
|
+
return this;
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* Parse JavaScript code and return AST as JsValue (WASM) or JSON string (native).
|
|
582
|
+
*
|
|
583
|
+
* The WASM path goes:
|
|
584
|
+
* options_js (JS object)
|
|
585
|
+
* → options_from_jsvalue (Reflect-based reads, no serde_json)
|
|
586
|
+
* → parser → JSON string
|
|
587
|
+
* → JSON::parse (one cheap JS-side parse)
|
|
588
|
+
* → JsValue handed back to JS as the AST root
|
|
589
|
+
* @param {string} code
|
|
590
|
+
* @param {any} options_js
|
|
591
|
+
* @returns {any}
|
|
592
|
+
*/
|
|
593
|
+
parse(code, options_js) {
|
|
594
|
+
try {
|
|
595
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
596
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
597
|
+
const len0 = WASM_VECTOR_LEN;
|
|
598
|
+
wasm.wasmparser_parse(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(options_js));
|
|
599
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
600
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
601
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
602
|
+
if (r2) {
|
|
603
|
+
throw takeObject(r1);
|
|
604
|
+
}
|
|
605
|
+
return takeObject(r0);
|
|
606
|
+
} finally {
|
|
607
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
if (Symbol.dispose) WasmParser.prototype[Symbol.dispose] = WasmParser.prototype.free;
|
|
612
|
+
|
|
613
|
+
exports.WasmParser = WasmParser;
|
|
614
|
+
|
|
615
|
+
exports.__wbg_call_641db1bb5db5a579 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
616
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
617
|
+
return addHeapObject(ret);
|
|
618
|
+
}, arguments) };
|
|
619
|
+
|
|
620
|
+
exports.__wbg_call_a5400b25a865cfd8 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
621
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
622
|
+
return addHeapObject(ret);
|
|
623
|
+
}, arguments) };
|
|
624
|
+
|
|
625
|
+
exports.__wbg_get_0da715ceaecea5c8 = function(arg0, arg1) {
|
|
626
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
627
|
+
return addHeapObject(ret);
|
|
628
|
+
};
|
|
629
|
+
|
|
630
|
+
exports.__wbg_get_458e874b43b18b25 = function() { return handleError(function (arg0, arg1) {
|
|
631
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
632
|
+
return addHeapObject(ret);
|
|
633
|
+
}, arguments) };
|
|
634
|
+
|
|
635
|
+
exports.__wbg_isArray_030cce220591fb41 = function(arg0) {
|
|
636
|
+
const ret = Array.isArray(getObject(arg0));
|
|
637
|
+
return ret;
|
|
638
|
+
};
|
|
639
|
+
|
|
640
|
+
exports.__wbg_keys_ef52390b2ae0e714 = function(arg0) {
|
|
641
|
+
const ret = Object.keys(getObject(arg0));
|
|
642
|
+
return addHeapObject(ret);
|
|
643
|
+
};
|
|
644
|
+
|
|
645
|
+
exports.__wbg_length_186546c51cd61acd = function(arg0) {
|
|
646
|
+
const ret = getObject(arg0).length;
|
|
647
|
+
return ret;
|
|
648
|
+
};
|
|
649
|
+
|
|
650
|
+
exports.__wbg_new_19c25a3f2fa63a02 = function() {
|
|
651
|
+
const ret = new Object();
|
|
652
|
+
return addHeapObject(ret);
|
|
653
|
+
};
|
|
654
|
+
|
|
655
|
+
exports.__wbg_new_1f3a344cf3123716 = function() {
|
|
656
|
+
const ret = new Array();
|
|
657
|
+
return addHeapObject(ret);
|
|
658
|
+
};
|
|
659
|
+
|
|
660
|
+
exports.__wbg_new_da9dc54c5db29dfa = function(arg0, arg1) {
|
|
661
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
662
|
+
return addHeapObject(ret);
|
|
663
|
+
};
|
|
664
|
+
|
|
665
|
+
exports.__wbg_parse_442f5ba02e5eaf8b = function() { return handleError(function (arg0, arg1) {
|
|
666
|
+
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
667
|
+
return addHeapObject(ret);
|
|
668
|
+
}, arguments) };
|
|
669
|
+
|
|
670
|
+
exports.__wbg_pop_5aaf63e29ea83074 = function(arg0) {
|
|
671
|
+
const ret = getObject(arg0).pop();
|
|
672
|
+
return addHeapObject(ret);
|
|
673
|
+
};
|
|
674
|
+
|
|
675
|
+
exports.__wbg_push_330b2eb93e4e1212 = function(arg0, arg1) {
|
|
676
|
+
const ret = getObject(arg0).push(getObject(arg1));
|
|
677
|
+
return ret;
|
|
678
|
+
};
|
|
679
|
+
|
|
680
|
+
exports.__wbg_set_453345bcda80b89a = function() { return handleError(function (arg0, arg1, arg2) {
|
|
681
|
+
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
682
|
+
return ret;
|
|
683
|
+
}, arguments) };
|
|
684
|
+
|
|
685
|
+
exports.__wbg_setname_832b43d4602cb930 = function(arg0, arg1, arg2) {
|
|
686
|
+
getObject(arg0).name = getStringFromWasm0(arg1, arg2);
|
|
687
|
+
};
|
|
688
|
+
|
|
689
|
+
exports.__wbg_wbindgenbooleanget_3fe6f642c7d97746 = function(arg0) {
|
|
690
|
+
const v = getObject(arg0);
|
|
691
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
692
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
693
|
+
};
|
|
694
|
+
|
|
695
|
+
exports.__wbg_wbindgendebugstring_99ef257a3ddda34d = function(arg0, arg1) {
|
|
696
|
+
const ret = debugString(getObject(arg1));
|
|
697
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
698
|
+
const len1 = WASM_VECTOR_LEN;
|
|
699
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
700
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
701
|
+
};
|
|
702
|
+
|
|
703
|
+
exports.__wbg_wbindgenisfunction_8cee7dce3725ae74 = function(arg0) {
|
|
704
|
+
const ret = typeof(getObject(arg0)) === 'function';
|
|
705
|
+
return ret;
|
|
706
|
+
};
|
|
707
|
+
|
|
708
|
+
exports.__wbg_wbindgenisnull_f3037694abe4d97a = function(arg0) {
|
|
709
|
+
const ret = getObject(arg0) === null;
|
|
710
|
+
return ret;
|
|
711
|
+
};
|
|
712
|
+
|
|
713
|
+
exports.__wbg_wbindgenisobject_307a53c6bd97fbf8 = function(arg0) {
|
|
714
|
+
const val = getObject(arg0);
|
|
715
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
716
|
+
return ret;
|
|
717
|
+
};
|
|
718
|
+
|
|
719
|
+
exports.__wbg_wbindgenisundefined_c4b71d073b92f3c5 = function(arg0) {
|
|
720
|
+
const ret = getObject(arg0) === undefined;
|
|
721
|
+
return ret;
|
|
722
|
+
};
|
|
723
|
+
|
|
724
|
+
exports.__wbg_wbindgennumberget_f74b4c7525ac05cb = function(arg0, arg1) {
|
|
725
|
+
const obj = getObject(arg1);
|
|
726
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
727
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
728
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
729
|
+
};
|
|
730
|
+
|
|
731
|
+
exports.__wbg_wbindgenstringget_0f16a6ddddef376f = function(arg0, arg1) {
|
|
732
|
+
const obj = getObject(arg1);
|
|
733
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
734
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
735
|
+
var len1 = WASM_VECTOR_LEN;
|
|
736
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
737
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
738
|
+
};
|
|
739
|
+
|
|
740
|
+
exports.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
|
|
741
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
742
|
+
};
|
|
743
|
+
|
|
744
|
+
exports.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
745
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
746
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
747
|
+
return addHeapObject(ret);
|
|
748
|
+
};
|
|
749
|
+
|
|
750
|
+
exports.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
751
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
752
|
+
const ret = arg0;
|
|
753
|
+
return addHeapObject(ret);
|
|
754
|
+
};
|
|
755
|
+
|
|
756
|
+
exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
757
|
+
const ret = getObject(arg0);
|
|
758
|
+
return addHeapObject(ret);
|
|
759
|
+
};
|
|
760
|
+
|
|
761
|
+
exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
762
|
+
takeObject(arg0);
|
|
763
|
+
};
|
|
764
|
+
|
|
765
|
+
const wasmPath = `${__dirname}/./acorn.wasm`;
|
|
766
|
+
const wasmBytes = require('fs').readFileSync(wasmPath);
|
|
767
|
+
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
768
|
+
const wasm = exports.__wasm = new WebAssembly.Instance(wasmModule, imports).exports;
|
|
769
|
+
|