@prisma/streams-local
Advanced tools
| # Contributor Covenant Code of Conduct | ||
| ## Our Pledge | ||
| In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in Prisma Streams and its community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. | ||
| ## Our Standards | ||
| Examples of behavior that contributes to creating a positive environment include: | ||
| - Using welcoming and inclusive language | ||
| - Being respectful of differing viewpoints and experiences | ||
| - Gracefully accepting constructive criticism | ||
| - Focusing on what is best for the community | ||
| - Showing empathy towards other community members | ||
| Examples of unacceptable behavior by participants include: | ||
| - The use of sexualized language or imagery and unwelcome sexual attention or advances | ||
| - Trolling, insulting or derogatory comments, and personal or political attacks | ||
| - Public or private harassment | ||
| - Publishing others' private information, such as a physical or electronic address, without explicit permission | ||
| - Other conduct which could reasonably be considered inappropriate in a professional setting | ||
| ## Our Responsibilities | ||
| Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. | ||
| Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct, or to ban temporarily or permanently any contributor for behavior they deem inappropriate, threatening, offensive, or harmful. | ||
| ## Scope | ||
| This Code of Conduct applies within project spaces and in public spaces when an individual is representing the project or its community. Examples include using an official project email address, posting via an official social media account, or acting as an appointed representative at an online or offline event. | ||
| ## Enforcement | ||
| Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project maintainers through a private channel available in the repository hosting platform. Maintainers will review and investigate complaints and will respond in a way that is appropriate to the circumstances. Maintainers are expected to respect the confidentiality of reporters as much as practical. | ||
| Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other project maintainers. | ||
| ## Attribution | ||
| This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, and follows the Prisma open-source baseline. | ||
| [homepage]: http://contributor-covenant.org |
| # Welcome to Contributing to Prisma Streams | ||
| Welcome. This repository is being prepared for public production use, and contributions that improve correctness, operator experience, and protocol clarity are useful. | ||
| This file follows the same general baseline Prisma uses in [`prisma/prisma`](https://github.com/prisma/prisma), but is scoped to this repository and its Bun + TypeScript workflow. | ||
| Please read the [Code of Conduct](./CODE_OF_CONDUCT.md) before participating. | ||
| ## Contributing Via Comments | ||
| To help maintainers triage efficiently: | ||
| - Use GitHub reactions on the main issue or comment to signal support. | ||
| - Add a comment only when you have new, actionable information: a reproduction, impact details, logs, or a concrete proposal. | ||
| - Avoid `+1`, `same here`, or `any update?` comments. They add notification noise without improving triage. | ||
| ## Prerequisites | ||
| - Bun `>=1.3.6` | ||
| - Node.js `>=22` | ||
| - Git | ||
| For Windows development, use WSL or another Unix-like environment. The scripts and examples in this repository assume a POSIX shell. | ||
| ## Setup | ||
| ```bash | ||
| git clone <your-fork-or-repo-url> | ||
| cd prisma-streams | ||
| bun install | ||
| ``` | ||
| ## Common Commands | ||
| ```bash | ||
| bun run typecheck | ||
| bun run check:result-policy | ||
| bun test | ||
| bun run test:conformance:local | ||
| bun run test:conformance | ||
| ``` | ||
| Notes: | ||
| - `bun test` is the current fast repository baseline. | ||
| - `test:conformance:local` and `test:conformance` run the upstream black-box suite against local and full server modes. | ||
| - The current upstream conformance status is tracked in [docs/CONFORMANCE.md](./docs/CONFORMANCE.md). | ||
| ## Development Expectations | ||
| - Keep changes focused. Avoid mixing refactors with unrelated cleanup. | ||
| - Add or update tests for behavior changes. | ||
| - Update documentation when public behavior, deployment guidance, or package surfaces change. | ||
| - Do not commit generated archives, local databases, `.DS_Store`, or other workstation artifacts. | ||
| - Follow the repository `better-result` policy. The current automated policy check covers `src/`; see [docs/BETTER_RESULT_ADOPTION.md](./docs/BETTER_RESULT_ADOPTION.md). | ||
| ## Pull Requests | ||
| Before opening a pull request: | ||
| - Run `bun run verify`. | ||
| - If you touched protocol behavior, run the relevant conformance suite and note the result. | ||
| - Explain the motivation, scope, and any behavior changes clearly. | ||
| - Call out follow-up work instead of silently leaving partial migrations behind. | ||
| ## Security Reports | ||
| Do not open public issues for suspected vulnerabilities. Follow [SECURITY.md](./SECURITY.md). |
| import { | ||
| parseLocalProcessOptions, | ||
| startLocalDurableStreamsServer | ||
| } from "./index-fc5e34dr.js"; | ||
| // src/local/process.ts | ||
| async function runLocalServerProcess(opts, cfg) { | ||
| const server = await startLocalDurableStreamsServer(opts); | ||
| cfg.onReady(server.exports); | ||
| let shuttingDown = false; | ||
| const shutdown = async () => { | ||
| if (shuttingDown) | ||
| return; | ||
| shuttingDown = true; | ||
| try { | ||
| await server.close(); | ||
| } finally { | ||
| process.exit(0); | ||
| } | ||
| }; | ||
| process.on("SIGTERM", () => { | ||
| shutdown(); | ||
| }); | ||
| process.on("SIGINT", () => { | ||
| shutdown(); | ||
| }); | ||
| if (cfg.closeOnDisconnect) { | ||
| process.on("disconnect", () => { | ||
| shutdown(); | ||
| }); | ||
| } | ||
| } | ||
| // src/local/daemon.ts | ||
| var opts = parseLocalProcessOptions(process.argv.slice(2), { | ||
| allowPositionalName: true, | ||
| defaultNameWhenMissing: "default", | ||
| defaultHostnameWhenMissing: "127.0.0.1", | ||
| defaultPortWhenMissing: 0 | ||
| }); | ||
| await runLocalServerProcess({ | ||
| name: opts.name, | ||
| hostname: opts.hostname, | ||
| port: opts.port | ||
| }, { | ||
| onReady: (exportsPayload) => { | ||
| if (typeof process.send === "function") { | ||
| process.send({ type: "ready", exports: exportsPayload }); | ||
| } else { | ||
| console.log(JSON.stringify(exportsPayload)); | ||
| } | ||
| }, | ||
| closeOnDisconnect: true | ||
| }); |
Sorry, the diff of this file is not supported yet
| Vendored xxhash runtime files in this directory are copied from `hash-wasm@4.12.0`: | ||
| - `dist/xxhash3.umd.min.js` | ||
| - `dist/xxhash32.umd.min.js` | ||
| - `dist/xxhash64.umd.min.js` | ||
| These files are used only for the Node runtime path in local development builds. | ||
| The upstream license is preserved in `LICENSE.hash-wasm` in this directory. |
| /*! | ||
| * hash-wasm (https://www.npmjs.com/package/hash-wasm) | ||
| * (c) Dani Biro | ||
| * @license MIT | ||
| */ | ||
| !function(A,I){"object"==typeof exports&&"undefined"!=typeof module?I(exports):"function"==typeof define&&define.amd?define(["exports"],I):I((A="undefined"!=typeof globalThis?globalThis:A||self).hashwasm=A.hashwasm||{})}(this,(function(A){"use strict";var I,g={name:"xxhash3",data:"AGFzbQEAAAABNAhgAAF/YAR/f39/AGAHf39/f39/fwBgBH9+fn4BfmAEf39/fgF+YAN/f34BfmAAAGABfwADDg0AAQIDBAUFBQYHBgAGBQQBAQICBg4CfwFBwI4FC38AQcAJCwdwCAZtZW1vcnkCAA5IYXNoX0dldEJ1ZmZlcgAACUhhc2hfSW5pdAAIC0hhc2hfVXBkYXRlAAkKSGFzaF9GaW5hbAAKDUhhc2hfR2V0U3RhdGUACw5IYXNoX0NhbGN1bGF0ZQAMClNUQVRFX1NJWkUDAQr6QQ0FAEGACgvkAwMPfgF/AX4CQCADRQ0AIAApAzAhBCAAKQM4IQUgACkDICEGIAApAyghByAAKQMQIQggACkDGCEJIAApAwAhCiAAKQMIIQsDQCAFIAFBMGopAwAiDHwgAkE4aikDACABQThqKQMAIg2FIgVCIIggBUL/////D4N+fCEFIAcgAUEgaikDACIOfCACQShqKQMAIAFBKGopAwAiD4UiB0IgiCAHQv////8Pg358IQcgCSABQRBqKQMAIhB8IAJBGGopAwAgAUEYaikDACIRhSIJQiCIIAlC/////w+DfnwhCSALIAEpAwAiEnwgAkEIaiITKQMAIAFBCGopAwAiFIUiC0IgiCALQv////8Pg358IQsgAkEwaikDACAMhSIMQiCIIAxC/////w+DfiAEfCANfCEEIAJBIGopAwAgDoUiDEIgiCAMQv////8Pg34gBnwgD3whBiACQRBqKQMAIBCFIgxCIIggDEL/////D4N+IAh8IBF8IQggAikDACAShSIMQiCIIAxC/////w+DfiAKfCAUfCEKIAFBwABqIQEgEyECIANBf2oiAw0ACyAAIAk3AxggACAKNwMAIAAgCzcDCCAAIAc3AyggACAINwMQIAAgB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Qv////8Pg4QgCEIgiCAEIAd+fCAGQiCIfIUgA3wgASkDOCACfSAAQeiLAWopAwCFIgNC/////w+DIgQgASkDMCACfCAAQeCLAWopAwCFIgVCIIgiBn4iB0L/////D4MgA0IgiCIDIAVC/////w+DIgV+fCAEIAV+IgRCIIh8IgVCIIYgBEL/////D4OEIAdCIIggAyAGfnwgBUIgiHyFfCEDCyABKQMIIAJ9QQApA4iMAYUiBEL/////D4MiBSABKQMAIAJ8QQApA4CMAYUiBkIgiCIHfiIIQv////8PgyAEQiCIIgQgBkL/////D4MiBn58IAUgBn4iBUIgiHwiBkIghiAFQv////8Pg4QgCEIgiCAEIAd+fCAGQiCIfIUgA3wgASkDGCACfSAAQfiLAWopAwCFIgNC/////w+DIgQgASkDECACfCAAQfCLAWopAwCFIgJCIIgiBX4iBkL/////D4MgA0IgiCIDIAJC/////w+DIgJ+fCAEIAJ+IgJCIIh8IgRCIIYgAkL/////D4OEIAZCIIggAyAFfnwgBEIgiHyFfCICQiWIIAKFQvnz3fGZ8pmrFn4iAkIgiCAChQv8CgQBfwV+An8BfkEAIQMgASkDeCACfUEAKQP4jAGFIgRC/////w+DIgUgASkDcCACfEEAKQPwjAGFIgZCIIgiB34iCEL/////D4MgBEIgiCIEIAZC/////w+DIgZ+fCAFIAZ+IgVCIIh8IgZCIIYgBUL/////D4OEIAhCIIggBCAHfnwgBkIgiHyFIAEpA2ggAn1BACkD6IwBhSIEQv////8PgyIFIAEpA2AgAnxBACkD4IwBhSIGQiCIIgd+IghC/////w+DIARCIIgiBCAGQv////8PgyIGfnwgBSAGfiIFQiCIfCIGQiCGIAVC/////w+DhCAIQiCIIAQgB358IAZCIIh8hSABKQNYIAJ9QQApA9iMAYUiBEL/////D4MiBSABKQNQIAJ8QQApA9CMAYUiBkIgiCIHfiIIQv////8PgyAEQiCIIgQgBkL/////D4MiBn58IAUgBn4iBUIgiHwiBkIghiAFQv////8Pg4QgCEIgiCAEIAd+fCAGQiCIfIUgASkDSCACfUEAKQPIjAGFIgRC/////w+DIgUgASkDQCACfEEAKQPAjAGFIgZCIIgiB34iCEL/////D4MgBEIgiCIEIAZC/////w+DIgZ+fCAFIAZ+IgVCIIh8IgZCIIYgBUL/////D4OEIAhCIIggBCAHfnwgBkIgiHyFIAEpAzggAn1BACkDuIwBhSIEQv////8PgyIFIAEpAzAgAnxBACkDsIwBhSIGQiCIIgd+IghC/////w+DIARCIIgiBCAGQv////8PgyIGfnwgBSAGfiIFQiCIfCIGQiCGIAVC/////w+DhCAIQiCIIAQgB358IAZCIIh8hSABKQMoIAJ9QQApA6iMAYUiBEL/////D4MiBSABKQMgIAJ8QQApA6CMAYUiBkIgiCIHfiIIQv////8PgyAEQiCIIgQgBkL/////D4MiBn58IAUgBn4iBUIgiHwiBkIghiAFQv////8Pg4QgCEIgiCAEIAd+fCAGQiCIfIUgASkDGCACfUEAKQOYjAGFIgRC/////w+DIgUgASkDECACfEEAKQOQjAGFIgZCIIgiB34iCEL/////D4MgBEIgiCIEIAZC/////w+DIgZ+fCAFIAZ+IgVCIIh8IgZCIIYgBUL/////D4OEIAhCIIggBCAHfnwgBkIgiHyFIAEpAwggAn1BACkDiIwBhSIEQv////8PgyIFIAEpAwAgAnxBACkDgIwBhSIGQiCIIgd+IghC/////w+DIARCIIgiBCAGQv////8PgyIGfnwgBSAGfiIFQiCIfCIGQiCGIAVC/////w+DhCAIQiCIIAQgB358IAZCIIh8hSAArUKHla+vmLbem55/fnx8fHx8fHx8IgRCJYggBIVC+fPd8ZnymasWfiIEQiCIIASFIQQCQCAAQZABSA0AIABBBHZBeGohCQNAIAEgA2oiCkELaikDACACfSADQYiNAWopAwCFIgVC/////w+DIgYgCkEDaikDACACfCADQYCNAWopAwCFIgdCIIgiCH4iC0L/////D4MgBUIgiCIFIAdC/////w+DIgd+fCAGIAd+IgZCIIh8IgdCIIYgBkL/////D4OEIAtCIIggBSAIfnwgB0IgiHyFIAR8IQQgA0EQaiEDIAlBf2oiCQ0ACwsgASkDfyACfSAAQf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onNwOwigFBAEKx893xCTcDuIoBQQAgADcDoI4BQQAgATYCsI4BQQBCkICAgIAQNwOYjgEL9AkBCH9BAEEAKQOQjgEgAK18NwOQjgECQAJAAkBBACgCgI4BIgEgAGoiAkGAAksNACABQYCMAWohA0GACiEEAkAgAEEITw0AIAAhAQwCCwJAAkAgAEF4aiIFQQN2QQFqQQdxIgYNAEGACiEEIAAhAQwBCyAGQQN0IQFBgAohBANAIAMgBCkDADcDACADQQhqIQMgBEEIaiEEIAZBf2oiBg0ACyAAIAFrIQELIAVBOEkNAQNAIAMgBCkDADcDACADQQhqIARBCGopAwA3AwAgA0EQaiAEQRBqKQMANwMAIANBGGogBEEYaikDADcDACADQSBqIARBIGopAwA3AwAgA0EoaiAEQShqKQMANwMAIANBMGogBEEwaikDADcDACADQThqIARBOGopAwA3AwAgA0HAAGohAyAEQcAAaiEEIAFBQGoiAUEHSw0ADAILC0GACiEEIABBgApqIQVBACgCsI4BIgNBwIoBIAMbIQYCQCABRQ0AIAFBgIwBaiEDQYAKIQQCQAJAQYACIAFrIgdBCE8NACAHIQAMAQsCQAJAQfgBIAFrIghBA3ZBAWpBB3EiAg0AQYAKIQQgByEADAELQYAKIQQgAkEDdCIAIQIDQCADIAQpAwA3AwAgA0EIaiEDIARBCGohBCACQXhqIgINAAtBgAIgASAAamshAAsgCEE4SQ0AA0AgAyAEKQMANwMAIANBCGogBEEIaikDADcDACADQRBqIARBEGopAwA3AwAgA0EYaiAEQRhqKQMANwMAIANBIGogBEEgaikDADcDACADQShqIARBKGopAwA3AwAgA0EwaiAEQTBqKQMANwMAIANBOGogBEE4aikDADcDACADQcAAaiEDIARBwABqIQQgAEFAaiIAQQdLDQALCwJAIABFDQACQAJAIABBB3EiAg0AIAAhAQwBCyAAQXhxIQEDQCADIAQtAAA6AAAgA0EBaiEDIARBAWohBCACQX9qIgINAAsLIABBCEkNAANAIAMgBCkAADcAACADQQhqIQMgBEEIaiEEIAFBeGoiAQ0ACwtBgIoBQYiOAUEAK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wAhEiACKQMAIRMgAikDECEUIAIpAyAhFSACKQMwIRYgAikDCCEXIAIpAxghGCACKQMoIRkgAiACKQM4IAdB8IsBaikDACIafCAAKQMxIAdB+IsBaikDACIbhSIcQiCIIBxC/////w+Dfnw3AzggGSAQfCARIBKFIhFCIIggEUL/////D4N+fCERIBggDXwgDiAPhSIOQiCIIA5C/////w+DfnwhDiAXIAV8IAwgBoUiDEIgiCAMQv////8Pg358IQwgGyAWIAsgGoUiC0IgiCALQv////8Pg358fCELIBIgFSAKIBCFIhBCIIggEEL/////D4N+fHwhECAPIBQgCSANhSINQiCIIA1C/////w+Dfnx8IRIgBiATIAggBYUiBUIgiCAFQv////8Pg358fCEIDAELIAdBwI0BaiEdQcAAIAdrIR4gAkHAAGohAAJAAkACQCAHQThNDQAgHiEfDAELAkACQEE4IAdrQQN2QQFqQQdxIh8NACACQcAAaiEAIB4hHwwBCyACQcAAaiEAIB9BA3QiICEfA0AgACAdKQMANwMAIABBCGohACAdQQhqIR0gH0F4aiIfDQALQcAAIAcgIGprIR8LAkAgBw0AA0AgACAdKQMANwMAIABBCGogHUEIaikDADcDACAAQRBqIB1BEGopAwA3AwAgAEEYaiAdQRhqKQMANwMAIABBIGogHUEgaikDADcDACAAQShqIB1BKGopAwA3AwAgAEEwaiAdQTBqKQMANwMAIABBOGogHUE4aikDADcDACAAQcAAaiEAIB1BwABqIR0gH0FAaiIfQQdLDQALCyAfRQ0BCyAfQX9qISECQCAfQQdxIiBFDQAgH0F4cSEfA0AgACAdLQAAOgAAIABBAWohACAdQQFqIR0gIEF/aiIgDQALCyAhQQdJDQADQCAAIB0pAAA3AAAgAEEIaiEAIB1BCGohHSAfQXhqIh8NAAsLIAJBwABqIB5qIR1BgIwBIQACQAJAAkAgB0EISQ0AAkAgB0E4akEDdkEBakEHcSIfDQAMAgsgH0EDdCEgQYCMASEAA0AgHSAAKQMANwMAIB1BCGohHSAAQQhqIQAgH0F/aiIfDQALIAcgIGshBwsgB0UNAQJAAkAgB0EHcSIgDQAgByEfDAELIAdBeHEhHwNAIB0gAC0AADoAACAdQQFqIR0gAEEBaiEAICBBf2oiIA0ACwsgB0EISQ0BCwNAIB0gACkAADcAACAdQQhqIR0gAEEIaiEAIB9BeGoiHw0ACwsgA0EAKAKcjgFqIgBBeWopAwAhCiAAKQMJIRMgACkDGSEUIAApAykhCyAAKQMBIQwgACkDESEOIAApAyEhESACKQMAIRUgAikDECEWIAIpAyAhFyACKQMIIRggAikDQCENIAIpA0ghDyACKQMYIRkgAikDUCESIAIpA1ghCCACKQMoIRogAikDYCEQIAIpA2ghCSACIAYgAikDcCIbfCAAKQMxIAIpA3giBoUiHEIgiCAcQv////8Pg358NwM4IBogEHwgESAJhSIRQiCIIBFC/////w+DfnwhESAZIBJ8IA4gCIUiDkIgiCAOQv////8Pg358IQ4gGCANfCAMIA+FIgxCIIggDEL/////D4N+fCEMIAYgCyAbhSILQiCIIAtC/////w+DfiAFfHwhCyAJIBcgFCAQhSIFQiCIIAVC/////w+Dfnx8IRAgCCAWIBMgEoUiBUIgiCAFQv////8Pg358fCESIA8gFSAKIA2FIgVCIIggBUL/////D4N+fHwhCAsgAykDQyACKQM4hSIFQv////8PgyIGIAMpAzsgC4UiC0IgiCINfiIPQv////8PgyAFQiCIIgUgC0L/////D4MiC358IAYgC34iBkIgiHwiC0IghiAGQv////8Pg4QgD0IgiCAFIA1+fCALQiCIfIUgAykDMyARhSIFQv////8PgyIGIAMpAysgEIUiC0IgiCINfiIPQv////8PgyAFQiCIIgUgC0L/////D4MiC358IAYgC34iBkIgiHwiC0IghiAGQv////8Pg4QgD0IgiCAFIA1+fCALQiCIfIUgAykDIyAOhSIFQv////8PgyIGIAMpAxsgEoUiC0IgiCINfiIPQv////8PgyAFQiCIIgUgC0L/////D4MiC358IAYgC34iBkIgiHwiC0IghiAGQv////8Pg4QgD0IgiCAFIA1+fCALQiCIfIUgAykDEyAMhSIFQv////8PgyIGIAMpAwsgCIUiC0IgiCINfiIPQv////8PgyAFQiCIIgUgC0L/////D4MiC358IAYgC34iBkIgiHwiC0IghiAGQv////8Pg4QgD0IgiCAFIA1+fCALQiCIfIUgBEKHla+vmLbem55/fnx8fHwiBEIliCAEhUL5893xmfKZqxZ+IgRCIIggBIUhBAwBCyAEpyEAAkBBACkDoI4BIgRQDQACQCAAQRBLDQAgAEGACCAEEAUhBAwCCwJAIABBgAFLDQAgAEGACCAEEAYhBAwCCyAAQYAIIAQQByEEDAELAkAgAEEQSw0AIAAgA0IAEAUhBAwBCwJAIABBgAFLDQAgACADQgAQBiEEDAELIAAgA0IAEAchBAtBACAEQjiGIARCgP4Dg0IohoQgBEKAgPwHg0IYhiAEQoCAgPgPg0IIhoSEIARCCIhCgICA+A+DIARCGIhCgID8B4OEIARCKIhCgP4DgyAEQjiIhISENwOACiABJAALBgBBgIoBCwIACwvMAQEAQYAIC8QBuP5sOSOkS758AYEs9yGtHN7UbemDkJfbckCkpLezZx/LeeZOzMDleIJa0H3M/3IhuAhGdPdDJI7gNZDmgTomTDwoUruRwwDLiNBlixtTLqNxZEiXog35TjgZ70ap3qzYqPp2P+OcND/53LvHxwtPHYpR4EvNtFkxyJ9+ydl4c2TqxayDNNPrw8WBoP/6E2PrFw3dUbfw2knTFlUmKdRonisWvlh9R6H8j/i40XrQMc5FyzqPlRYEKK/X+8q7S0B+QAIAAA==",hash:"5a2fbdbb"};function C(A,I,g,C){return new(g||(g=Promise))((function(Q,i){function B(A){try{E(C.next(A))}catch(A){i(A)}}function e(A){try{E(C.throw(A))}catch(A){i(A)}}function E(A){var I;A.done?Q(A.value):(I=A.value,I instanceof g?I:new g((function(A){A(I)}))).then(B,e)}E((C=C.apply(A,I||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;class Q{constructor(){this.mutex=Promise.resolve()}lock(){let A=()=>{};return this.mutex=this.mutex.then((()=>new Promise(A))),new Promise((I=>{A=I}))}dispatch(A){return C(this,void 0,void 0,(function*(){const I=yield this.lock();try{return yield Promise.resolve(A())}finally{I()}}))}}const i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,B=null!==(I=i.Buffer)&&void 0!==I?I:null,e=i.TextEncoder?new i.TextEncoder:null;function E(A,I){return(15&A)+(A>>6|A>>3&8)<<4|(15&I)+(I>>6|I>>3&8)}const t="a".charCodeAt(0)-10,n="0".charCodeAt(0);function D(A,I,g){let C=0;for(let Q=0;Q<g;Q++){let g=I[Q]>>>4;A[C++]=g>9?g+t:g+n,g=15&I[Q],A[C++]=g>9?g+t:g+n}return String.fromCharCode.apply(null,A)}const o=null!==B?A=>{if("string"==typeof A){const I=B.from(A,"utf8");return new Uint8Array(I.buffer,I.byteOffset,I.length)}if(B.isBuffer(A))return new Uint8Array(A.buffer,A.byteOffset,A.length);if(ArrayBuffer.isView(A))return new Uint8Array(A.buffer,A.byteOffset,A.byteLength);throw new Error("Invalid data type!")}:A=>{if("string"==typeof A)return e.encode(A);if(ArrayBuffer.isView(A))return new Uint8Array(A.buffer,A.byteOffset,A.byteLength);throw new Error("Invalid data type!")},f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w=new Uint8Array(256);for(let A=0;A<f.length;A++)w[f.charCodeAt(A)]=A;function r(A){const I=function(A){let I=Math.floor(.75*A.length);const g=A.length;return"="===A[g-1]&&(I-=1,"="===A[g-2]&&(I-=1)),I}(A),g=A.length,C=new Uint8Array(I);let Q=0;for(let I=0;I<g;I+=4){const g=w[A.charCodeAt(I)],i=w[A.charCodeAt(I+1)],B=w[A.charCodeAt(I+2)],e=w[A.charCodeAt(I+3)];C[Q]=g<<2|i>>4,Q+=1,C[Q]=(15&i)<<4|B>>2,Q+=1,C[Q]=(3&B)<<6|63&e,Q+=1}return C}const h=16384,s=new Q,a=new Map;function c(A,I){return C(this,void 0,void 0,(function*(){let g=null,Q=null,i=!1;if("undefined"==typeof WebAssembly)throw new Error("WebAssembly is not supported in this environment!");const B=()=>new DataView(g.exports.memory.buffer).getUint32(g.exports.STATE_SIZE,!0),e=s.dispatch((()=>C(this,void 0,void 0,(function*(){if(!a.has(A.name)){const I=r(A.data),g=WebAssembly.compile(I);a.set(A.name,g)}const I=yield a.get(A.name);g=yield WebAssembly.instantiate(I,{})})))),t=(A=null)=>{i=!0,g.exports.Hash_Init(A)},n=A=>{if(!i)throw new Error("update() called before init()");(A=>{let I=0;for(;I<A.length;){const C=A.subarray(I,I+h);I+=C.length,Q.set(C),g.exports.Hash_Update(C.length)}})(o(A))},f=new Uint8Array(2*I),w=(A,C=null)=>{if(!i)throw new Error("digest() called before init()");return i=!1,g.exports.Hash_Final(C),"binary"===A?Q.slice(0,I):D(f,Q,I)},c=A=>"string"==typeof A?A.length<4096:A.byteLength<h;let y=c;switch(A.name){case"argon2":case"scrypt":y=()=>!0;break;case"blake2b":case"blake2s":y=(A,I)=>I<=512&&c(A);break;case"blake3":y=(A,I)=>0===I&&c(A);break;case"xxhash64":case"xxhash3":case"xxhash128":case"crc64":y=()=>!1}return yield(()=>C(this,void 0,void 0,(function*(){g||(yield e);const A=g.exports.Hash_GetBuffer(),I=g.exports.memory.buffer;Q=new Uint8Array(I,A,h)})))(),{getMemory:()=>Q,writeMemory:(A,I=0)=>{Q.set(A,I)},getExports:()=>g.exports,setMemorySize:A=>{g.exports.Hash_SetMemorySize(A);const I=g.exports.Hash_GetBuffer(),C=g.exports.memory.buffer;Q=new Uint8Array(C,I,A)},init:t,update:n,digest:w,save:()=>{if(!i)throw new Error("save() can only be called after init() and before digest()");const I=g.exports.Hash_GetState(),C=B(),Q=g.exports.memory.buffer,e=new Uint8Array(Q,I,C),t=new Uint8Array(4+C);return function(A,I){const g=I.length>>1;for(let C=0;C<g;C++){const g=C<<1;A[C]=E(I.charCodeAt(g),I.charCodeAt(g+1))}}(t,A.hash),t.set(e,4),t},load:I=>{if(!(I instanceof Uint8Array))throw new Error("load() expects an Uint8Array generated by save()");const C=g.exports.Hash_GetState(),Q=B(),e=4+Q,t=g.exports.memory.buffer;if(I.length!==e)throw new Error(`Bad state length (expected ${e} bytes, got ${I.length})`);if(!function(A,I){if(A.length!==2*I.length)return!1;for(let g=0;g<I.length;g++){const C=g<<1;if(I[g]!==E(A.charCodeAt(C),A.charCodeAt(C+1)))return!1}return!0}(A.hash,I.subarray(0,4)))throw new Error("This state was written by an incompatible hash implementation");const n=I.subarray(4);new Uint8Array(t,C,Q).set(n),i=!0},calculate:(A,C=null,i=null)=>{if(!y(A,C))return t(C),n(A),w("hex",i);const B=o(A);return Q.set(B),g.exports.Hash_Calculate(B.length,C,i),D(f,Q,I)},hashLength:I}}))}const y=new Q;let k=null;const F=new Uint8Array(8);function M(A){return!Number.isInteger(A)||A<0||A>4294967295?new Error("Seed must be given as two valid 32-bit long unsigned integers (lo + high)."):null}function d(A,I,g){const C=new DataView(A);C.setUint32(0,I,!0),C.setUint32(4,g,!0)}A.createXXHash3=function(A=0,I=0){return M(A)?Promise.reject(M(A)):M(I)?Promise.reject(M(I)):c(g,8).then((g=>{const C=new Uint8Array(8);d(C.buffer,A,I),g.writeMemory(C),g.init();const Q={init:()=>(g.writeMemory(C),g.init(),Q),update:A=>(g.update(A),Q),digest:A=>g.digest(A),save:()=>g.save(),load:A=>(g.load(A),Q),blockSize:512,digestSize:8};return Q}))},A.xxhash3=function(A,I=0,Q=0){if(M(I))return Promise.reject(M(I));if(M(Q))return Promise.reject(M(Q));if(null===k)return function(A,I,g){return C(this,void 0,void 0,(function*(){const C=yield A.lock(),Q=yield c(I,g);return C(),Q}))}(y,g,8).then((g=>(k=g,d(F.buffer,I,Q),k.writeMemory(F),k.calculate(A))));try{d(F.buffer,I,Q),k.writeMemory(F);const g=k.calculate(A);return Promise.resolve(g)}catch(A){return Promise.reject(A)}}})); |
| /*! | ||
| * hash-wasm (https://www.npmjs.com/package/hash-wasm) | ||
| * (c) Dani Biro | ||
| * @license MIT | ||
| */ | ||
| !function(A,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((A="undefined"!=typeof globalThis?globalThis:A||self).hashwasm=A.hashwasm||{})}(this,(function(A){"use strict";var e,t={name:"xxhash32",data:"AGFzbQEAAAABEQRgAAF/YAF/AGAAAGACf38AAwcGAAEBAgADBQQBAQICBg4CfwFBsIkFC38AQYAICwdwCAZtZW1vcnkCAA5IYXNoX0dldEJ1ZmZlcgAACUhhc2hfSW5pdAABC0hhc2hfVXBkYXRlAAIKSGFzaF9GaW5hbAADDUhhc2hfR2V0U3RhdGUABA5IYXNoX0NhbGN1bGF0ZQAFClNUQVRFX1NJWkUDAQrvEQYFAEGACQtNAEEAQgA3A6iJAUEAIAA2AoiJAUEAIABBz4yijgZqNgKMiQFBACAAQfeUr694ajYChIkBQQAgAEGoiI2hAmo2AoCJAUEAQQA2AqCJAQu4CAEHfwJAIABFDQBBAEEAKQOoiQEgAK18NwOoiQECQEEAKAKgiQEiASAAakEPSw0AAkACQCAAQQNxIgINAEGACSEDIAAhBAwBCyAAQXxxIQRBgAkhAwNAQQBBACgCoIkBIgVBAWo2AqCJASAFQZCJAWogAy0AADoAACADQQFqIQMgAkF/aiICDQALCyAAQQRJDQEDQEEAQQAoAqCJASICQQFqNgKgiQEgAkGQiQFqIAMtAAA6AAAgA0EBai0AACECQQBBACgCoIkBIgVBAWo2AqCJASAFQZCJAWogAjoAACADQQJqLQAAIQJBAEEAKAKgiQEiBUEBajYCoIkBIAVBkIkBaiACOgAAIANBA2otAAAhAkEAQQAoAqCJASIFQQFqNgKgiQEgBUGQiQFqIAI6AAAgA0EEaiEDIARBfGoiBA0ADAILCyAAQfAIaiEGAkACQCABDQBBACgCjIkBIQJBACgCiIkBIQVBACgChIkBIQRBACgCgIkBIQFBgAkhAwwBC0GACSEDAkAgAUEPSw0AQYAJIQMCQAJAQQAgAWtBA3EiBA0AIAEhBQwBCyABIQIDQEEAIAJBAWoiBTYCoIkBIAJBkIkBaiADLQAAOgAAIANBAWohAyAFIQIgBEF/aiIEDQALCyABQXNqQQNJDQBBACEEA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gAHNB95Svr3hsIgFBDXYgAXNBvdzKlXxsIgFBEHYgAXMiAEEYdCAAQYD+A3FBCHRyIAFBCHZBgP4DcSABQRh2cnKtNwOACQsLCwEAQYAICwQwAAAA",hash:"4bb12485"};function n(A,e,t,n){return new(t||(t=Promise))((function(r,o){function i(A){try{s(n.next(A))}catch(A){o(A)}}function Q(A){try{s(n.throw(A))}catch(A){o(A)}}function s(A){var e;A.done?r(A.value):(e=A.value,e instanceof t?e:new t((function(A){A(e)}))).then(i,Q)}s((n=n.apply(A,e||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;class r{constructor(){this.mutex=Promise.resolve()}lock(){let A=()=>{};return this.mutex=this.mutex.then((()=>new Promise(A))),new Promise((e=>{A=e}))}dispatch(A){return n(this,void 0,void 0,(function*(){const e=yield this.lock();try{return yield Promise.resolve(A())}finally{e()}}))}}const o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,i=null!==(e=o.Buffer)&&void 0!==e?e:null,Q=o.TextEncoder?new o.TextEncoder:null;function s(A,e){return(15&A)+(A>>6|A>>3&8)<<4|(15&e)+(e>>6|e>>3&8)}const B="a".charCodeAt(0)-10,a="0".charCodeAt(0);function E(A,e,t){let n=0;for(let r=0;r<t;r++){let t=e[r]>>>4;A[n++]=t>9?t+B:t+a,t=15&e[r],A[n++]=t>9?t+B:t+a}return String.fromCharCode.apply(null,A)}const C=null!==i?A=>{if("string"==typeof A){const e=i.from(A,"utf8");return new Uint8Array(e.buffer,e.byteOffset,e.length)}if(i.isBuffer(A))return new Uint8Array(A.buffer,A.byteOffset,A.length);if(ArrayBuffer.isView(A))return new Uint8Array(A.buffer,A.byteOffset,A.byteLength);throw new Error("Invalid data type!")}:A=>{if("string"==typeof A)return Q.encode(A);if(ArrayBuffer.isView(A))return new Uint8Array(A.buffer,A.byteOffset,A.byteLength);throw new Error("Invalid data type!")},g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",I=new Uint8Array(256);for(let A=0;A<g.length;A++)I[g.charCodeAt(A)]=A;function l(A){const e=function(A){let e=Math.floor(.75*A.length);const t=A.length;return"="===A[t-1]&&(e-=1,"="===A[t-2]&&(e-=1)),e}(A),t=A.length,n=new Uint8Array(e);let r=0;for(let e=0;e<t;e+=4){const t=I[A.charCodeAt(e)],o=I[A.charCodeAt(e+1)],i=I[A.charCodeAt(e+2)],Q=I[A.charCodeAt(e+3)];n[r]=t<<2|o>>4,r+=1,n[r]=(15&o)<<4|i>>2,r+=1,n[r]=(3&i)<<6|63&Q,r+=1}return n}const h=16384,f=new r,c=new Map;function d(A,e){return n(this,void 0,void 0,(function*(){let t=null,r=null,o=!1;if("undefined"==typeof WebAssembly)throw new Error("WebAssembly is not supported in this environment!");const i=()=>new DataView(t.exports.memory.buffer).getUint32(t.exports.STATE_SIZE,!0),Q=f.dispatch((()=>n(this,void 0,void 0,(function*(){if(!c.has(A.name)){const e=l(A.data),t=WebAssembly.compile(e);c.set(A.name,t)}const e=yield c.get(A.name);t=yield WebAssembly.instantiate(e,{})})))),B=(A=null)=>{o=!0,t.exports.Hash_Init(A)},a=A=>{if(!o)throw new Error("update() called before init()");(A=>{let e=0;for(;e<A.length;){const n=A.subarray(e,e+h);e+=n.length,r.set(n),t.exports.Hash_Update(n.length)}})(C(A))},g=new Uint8Array(2*e),I=(A,n=null)=>{if(!o)throw new Error("digest() called before init()");return o=!1,t.exports.Hash_Final(n),"binary"===A?r.slice(0,e):E(g,r,e)},d=A=>"string"==typeof A?A.length<4096:A.byteLength<h;let u=d;switch(A.name){case"argon2":case"scrypt":u=()=>!0;break;case"blake2b":case"blake2s":u=(A,e)=>e<=512&&d(A);break;case"blake3":u=(A,e)=>0===e&&d(A);break;case"xxhash64":case"xxhash3":case"xxhash128":case"crc64":u=()=>!1}return yield(()=>n(this,void 0,void 0,(function*(){t||(yield Q);const A=t.exports.Hash_GetBuffer(),e=t.exports.memory.buffer;r=new Uint8Array(e,A,h)})))(),{getMemory:()=>r,writeMemory:(A,e=0)=>{r.set(A,e)},getExports:()=>t.exports,setMemorySize:A=>{t.exports.Hash_SetMemorySize(A);const e=t.exports.Hash_GetBuffer(),n=t.exports.memory.buffer;r=new Uint8Array(n,e,A)},init:B,update:a,digest:I,save:()=>{if(!o)throw new Error("save() can only be called after init() and before digest()");const e=t.exports.Hash_GetState(),n=i(),r=t.exports.memory.buffer,Q=new Uint8Array(r,e,n),B=new Uint8Array(4+n);return function(A,e){const t=e.length>>1;for(let n=0;n<t;n++){const t=n<<1;A[n]=s(e.charCodeAt(t),e.charCodeAt(t+1))}}(B,A.hash),B.set(Q,4),B},load:e=>{if(!(e instanceof Uint8Array))throw new Error("load() expects an Uint8Array generated by save()");const n=t.exports.Hash_GetState(),r=i(),Q=4+r,B=t.exports.memory.buffer;if(e.length!==Q)throw new Error(`Bad state length (expected ${Q} bytes, got ${e.length})`);if(!function(A,e){if(A.length!==2*e.length)return!1;for(let t=0;t<e.length;t++){const n=t<<1;if(e[t]!==s(A.charCodeAt(n),A.charCodeAt(n+1)))return!1}return!0}(A.hash,e.subarray(0,4)))throw new Error("This state was written by an incompatible hash implementation");const a=e.subarray(4);new Uint8Array(B,n,r).set(a),o=!0},calculate:(A,n=null,o=null)=>{if(!u(A,n))return B(n),a(A),I("hex",o);const i=C(A);return r.set(i),t.exports.Hash_Calculate(i.length,n,o),E(g,r,e)},hashLength:e}}))}const u=new r;let y=null;function w(A){return!Number.isInteger(A)||A<0||A>4294967295?new Error("Seed must be a valid 32-bit long unsigned integer."):null}A.createXXHash32=function(A=0){return w(A)?Promise.reject(w(A)):d(t,4).then((e=>{e.init(A);const t={init:()=>(e.init(A),t),update:A=>(e.update(A),t),digest:A=>e.digest(A),save:()=>e.save(),load:A=>(e.load(A),t),blockSize:16,digestSize:4};return t}))},A.xxhash32=function(A,e=0){if(w(e))return Promise.reject(w(e));if(null===y)return function(A,e,t){return n(this,void 0,void 0,(function*(){const n=yield A.lock(),r=yield d(e,t);return n(),r}))}(u,t,4).then((t=>(y=t,y.calculate(A,e))));try{const t=y.calculate(A,e);return Promise.resolve(t)}catch(A){return Promise.reject(A)}}})); |
| /*! | ||
| * hash-wasm (https://www.npmjs.com/package/hash-wasm) | ||
| * (c) Dani Biro | ||
| * @license MIT | ||
| */ | ||
| !function(A,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((A="undefined"!=typeof globalThis?globalThis:A||self).hashwasm=A.hashwasm||{})}(this,(function(A){"use strict";var e,t={name:"xxhash64",data:"AGFzbQEAAAABDANgAAF/YAAAYAF/AAMHBgABAgEAAQUEAQECAgYOAn8BQdCJBQt/AEGACAsHcAgGbWVtb3J5AgAOSGFzaF9HZXRCdWZmZXIAAAlIYXNoX0luaXQAAQtIYXNoX1VwZGF0ZQACCkhhc2hfRmluYWwAAw1IYXNoX0dldFN0YXRlAAQOSGFzaF9DYWxjdWxhdGUABQpTVEFURV9TSVpFAwEKmxEGBQBBgAkLYwEBfkEAQgA3A8iJAUEAQQApA4AJIgA3A5CJAUEAIABC+erQ0OfJoeThAHw3A5iJAUEAIABCz9bTvtLHq9lCfDcDiIkBQQAgAELW64Lu6v2J9eAAfDcDgIkBQQBBADYCwIkBC70IAwV/BH4CfwJAIABFDQBBAEEAKQPIiQEgAK18NwPIiQECQEEAKALAiQEiASAAakEfSw0AAkACQCAAQQNxIgINAEGACSEDIAAhAQwBCyAAQXxxIQFBgAkhAwNAQQBBACgCwIkBIgRBAWo2AsCJASAEQaCJAWogAy0AADoAACADQQFqIQMgAkF/aiICDQALCyAAQQRJDQEDQEEAQQAoAsCJASICQQFqNgLAiQEgAkGgiQFqIAMtAAA6AAAgA0EBai0AACECQQBBACgCwIkBIgRBAWo2AsCJASAEQaCJAWogAjoAACADQQJqLQAAIQJBAEEAKALAiQEiBEEBajYCwIkBIARBoIkBaiACOgAAIANBA2otAAAhAkEAQQAoAsCJASIEQQFqNgLAiQEgBEGgiQFqIAI6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ggAIVCz9bTvtLHq9lCfiIAQh2IIACFQvnz3fGZ9pmrFn4iAEIgiCAAhSIBQjiGIAFCgP4Dg0IohoQgAUKAgPwHg0IYhiABQoCAgPgPg0IIhoSEIABCCIhCgICA+A+DIABCGIhCgID8B4OEIABCKIhCgP4DgyAAQjiIhISENwOACQsGAEGAiQELAgALCwsBAEGACAsEUAAAAA==",hash:"177fbfa3"};function n(A,e,t,n){return new(t||(t=Promise))((function(r,i){function o(A){try{Q(n.next(A))}catch(A){i(A)}}function s(A){try{Q(n.throw(A))}catch(A){i(A)}}function Q(A){var e;A.done?r(A.value):(e=A.value,e instanceof t?e:new t((function(A){A(e)}))).then(o,s)}Q((n=n.apply(A,e||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;class r{constructor(){this.mutex=Promise.resolve()}lock(){let A=()=>{};return this.mutex=this.mutex.then((()=>new Promise(A))),new Promise((e=>{A=e}))}dispatch(A){return n(this,void 0,void 0,(function*(){const e=yield this.lock();try{return yield Promise.resolve(A())}finally{e()}}))}}const i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,o=null!==(e=i.Buffer)&&void 0!==e?e:null,s=i.TextEncoder?new i.TextEncoder:null;function Q(A,e){return(15&A)+(A>>6|A>>3&8)<<4|(15&e)+(e>>6|e>>3&8)}const f="a".charCodeAt(0)-10,a="0".charCodeAt(0);function l(A,e,t){let n=0;for(let r=0;r<t;r++){let t=e[r]>>>4;A[n++]=t>9?t+f:t+a,t=15&e[r],A[n++]=t>9?t+f:t+a}return String.fromCharCode.apply(null,A)}const C=null!==o?A=>{if("string"==typeof A){const e=o.from(A,"utf8");return new Uint8Array(e.buffer,e.byteOffset,e.length)}if(o.isBuffer(A))return new Uint8Array(A.buffer,A.byteOffset,A.length);if(ArrayBuffer.isView(A))return new Uint8Array(A.buffer,A.byteOffset,A.byteLength);throw new Error("Invalid data type!")}:A=>{if("string"==typeof A)return s.encode(A);if(ArrayBuffer.isView(A))return new Uint8Array(A.buffer,A.byteOffset,A.byteLength);throw new Error("Invalid data type!")},h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",I=new Uint8Array(256);for(let A=0;A<h.length;A++)I[h.charCodeAt(A)]=A;function g(A){const e=function(A){let e=Math.floor(.75*A.length);const t=A.length;return"="===A[t-1]&&(e-=1,"="===A[t-2]&&(e-=1)),e}(A),t=A.length,n=new Uint8Array(e);let r=0;for(let e=0;e<t;e+=4){const t=I[A.charCodeAt(e)],i=I[A.charCodeAt(e+1)],o=I[A.charCodeAt(e+2)],s=I[A.charCodeAt(e+3)];n[r]=t<<2|i>>4,r+=1,n[r]=(15&i)<<4|o>>2,r+=1,n[r]=(3&o)<<6|63&s,r+=1}return n}const B=16384,u=new r,c=new Map;function E(A,e){return n(this,void 0,void 0,(function*(){let t=null,r=null,i=!1;if("undefined"==typeof WebAssembly)throw new Error("WebAssembly is not supported in this environment!");const o=()=>new DataView(t.exports.memory.buffer).getUint32(t.exports.STATE_SIZE,!0),s=u.dispatch((()=>n(this,void 0,void 0,(function*(){if(!c.has(A.name)){const e=g(A.data),t=WebAssembly.compile(e);c.set(A.name,t)}const e=yield c.get(A.name);t=yield WebAssembly.instantiate(e,{})})))),f=(A=null)=>{i=!0,t.exports.Hash_Init(A)},a=A=>{if(!i)throw new Error("update() called before init()");(A=>{let e=0;for(;e<A.length;){const n=A.subarray(e,e+B);e+=n.length,r.set(n),t.exports.Hash_Update(n.length)}})(C(A))},h=new Uint8Array(2*e),I=(A,n=null)=>{if(!i)throw new Error("digest() called before init()");return i=!1,t.exports.Hash_Final(n),"binary"===A?r.slice(0,e):l(h,r,e)},E=A=>"string"==typeof A?A.length<4096:A.byteLength<B;let w=E;switch(A.name){case"argon2":case"scrypt":w=()=>!0;break;case"blake2b":case"blake2s":w=(A,e)=>e<=512&&E(A);break;case"blake3":w=(A,e)=>0===e&&E(A);break;case"xxhash64":case"xxhash3":case"xxhash128":case"crc64":w=()=>!1}return yield(()=>n(this,void 0,void 0,(function*(){t||(yield s);const A=t.exports.Hash_GetBuffer(),e=t.exports.memory.buffer;r=new Uint8Array(e,A,B)})))(),{getMemory:()=>r,writeMemory:(A,e=0)=>{r.set(A,e)},getExports:()=>t.exports,setMemorySize:A=>{t.exports.Hash_SetMemorySize(A);const e=t.exports.Hash_GetBuffer(),n=t.exports.memory.buffer;r=new Uint8Array(n,e,A)},init:f,update:a,digest:I,save:()=>{if(!i)throw new Error("save() can only be called after init() and before digest()");const e=t.exports.Hash_GetState(),n=o(),r=t.exports.memory.buffer,s=new Uint8Array(r,e,n),f=new Uint8Array(4+n);return function(A,e){const t=e.length>>1;for(let n=0;n<t;n++){const t=n<<1;A[n]=Q(e.charCodeAt(t),e.charCodeAt(t+1))}}(f,A.hash),f.set(s,4),f},load:e=>{if(!(e instanceof Uint8Array))throw new Error("load() expects an Uint8Array generated by save()");const n=t.exports.Hash_GetState(),r=o(),s=4+r,f=t.exports.memory.buffer;if(e.length!==s)throw new Error(`Bad state length (expected ${s} bytes, got ${e.length})`);if(!function(A,e){if(A.length!==2*e.length)return!1;for(let t=0;t<e.length;t++){const n=t<<1;if(e[t]!==Q(A.charCodeAt(n),A.charCodeAt(n+1)))return!1}return!0}(A.hash,e.subarray(0,4)))throw new Error("This state was written by an incompatible hash implementation");const a=e.subarray(4);new Uint8Array(f,n,r).set(a),i=!0},calculate:(A,n=null,i=null)=>{if(!w(A,n))return f(n),a(A),I("hex",i);const o=C(A);return r.set(o),t.exports.Hash_Calculate(o.length,n,i),l(h,r,e)},hashLength:e}}))}const w=new r;let d=null;const y=new Uint8Array(8);function b(A){return!Number.isInteger(A)||A<0||A>4294967295?new Error("Seed must be given as two valid 32-bit long unsigned integers (lo + high)."):null}function m(A,e,t){const n=new DataView(A);n.setUint32(0,e,!0),n.setUint32(4,t,!0)}A.createXXHash64=function(A=0,e=0){return b(A)?Promise.reject(b(A)):b(e)?Promise.reject(b(e)):E(t,8).then((t=>{const n=new Uint8Array(8);m(n.buffer,A,e),t.writeMemory(n),t.init();const r={init:()=>(t.writeMemory(n),t.init(),r),update:A=>(t.update(A),r),digest:A=>t.digest(A),save:()=>t.save(),load:A=>(t.load(A),r),blockSize:32,digestSize:8};return r}))},A.xxhash64=function(A,e=0,r=0){if(b(e))return Promise.reject(b(e));if(b(r))return Promise.reject(b(r));if(null===d)return function(A,e,t){return n(this,void 0,void 0,(function*(){const n=yield A.lock(),r=yield E(e,t);return n(),r}))}(w,t,8).then((t=>(d=t,m(y.buffer,e,r),d.writeMemory(y),d.calculate(A))));try{m(y.buffer,e,r),d.writeMemory(y);const t=d.calculate(A);return Promise.resolve(t)}catch(A){return Promise.reject(A)}}})); |
Sorry, the diff of this file is too big to display
| import { | ||
| startLocalDurableStreamsServer | ||
| } from "./index-fc5e34dr.js"; | ||
| export { | ||
| startLocalDurableStreamsServer | ||
| }; |
| # Prisma Streams Local Build | ||
| This directory contains the generated Node-compatible package artifacts for the | ||
| published `@prisma/streams-local` runtime. | ||
| ## What Local Streams Is | ||
| Prisma Streams local is a trusted-development Durable Streams server intended | ||
| for embedded workflows such as `prisma dev`. | ||
| It keeps all state in a single local SQLite database and supports the live query | ||
| touch system, but it does not run the full production segmenting and object | ||
| store pipeline. | ||
| ## Supported Package Surface | ||
| - `@prisma/streams-local` | ||
| - `@prisma/streams-local/internal/daemon` (internal Prisma CLI plumbing) | ||
| The full self-hosted server remains Bun-only and is not part of this Node build | ||
| surface. | ||
| ## Integrating It | ||
| 1. Start a named local server from `@prisma/streams-local`. | ||
| 2. Install your live-query schema via `/_schema` with `touch.enabled=true`. | ||
| 3. Feed normalized State Protocol change events into the server. | ||
| 4. Use `/touch/meta` and `/touch/wait` to drive live query invalidation. | ||
| Programmatic example: | ||
| ```ts | ||
| import { startLocalDurableStreamsServer } from "@prisma/streams-local"; | ||
| const server = await startLocalDurableStreamsServer({ | ||
| name: "default", | ||
| hostname: "127.0.0.1", | ||
| port: 0, | ||
| }); | ||
| console.log(server.exports.http.url); | ||
| console.log(server.exports.sqlite.path); | ||
| await server.close(); | ||
| ``` | ||
| Daemon example: | ||
| ```ts | ||
| import { fork } from "node:child_process"; | ||
| const child = fork(require.resolve("@prisma/streams-local/internal/daemon"), [ | ||
| "--name", | ||
| "default", | ||
| "--port", | ||
| "0", | ||
| ], { | ||
| stdio: "inherit", | ||
| }); | ||
| ``` | ||
| See ../README.md and ../docs/local-dev.md for the full runtime and release | ||
| documentation. |
Sorry, the diff of this file is not supported yet
| Vendored xxhash runtime files in this directory are copied from `hash-wasm@4.12.0`: | ||
| - `dist/xxhash3.umd.min.js` | ||
| - `dist/xxhash32.umd.min.js` | ||
| - `dist/xxhash64.umd.min.js` | ||
| These files are used only for the Node runtime path in local development builds. | ||
| The upstream license is preserved in `LICENSE.hash-wasm` in this directory. |
| /*! | ||
| * hash-wasm (https://www.npmjs.com/package/hash-wasm) | ||
| * (c) Dani Biro | ||
| * @license MIT | ||
| */ | ||
| !function(A,I){"object"==typeof exports&&"undefined"!=typeof module?I(exports):"function"==typeof define&&define.amd?define(["exports"],I):I((A="undefined"!=typeof globalThis?globalThis:A||self).hashwasm=A.hashwasm||{})}(this,(function(A){"use strict";var I,g={name:"xxhash3",data:"AGFzbQEAAAABNAhgAAF/YAR/f39/AGAHf39/f39/fwBgBH9+fn4BfmAEf39/fgF+YAN/f34BfmAAAGABfwADDg0AAQIDBAUFBQYHBgAGBQQBAQICBg4CfwFBwI4FC38AQcAJCwdwCAZtZW1vcnkCAA5IYXNoX0dldEJ1ZmZlcgAACUhhc2hfSW5pdAAIC0hhc2hfVXBkYXRlAAkKSGFzaF9GaW5hbAAKDUhhc2hfR2V0U3RhdGUACw5IYXNoX0NhbGN1bGF0ZQAMClNUQVRFX1NJWkUDAQr6QQ0FAEGACgvkAwMPfgF/AX4CQCADRQ0AIAApAzAhBCAAKQM4IQUgACkDICEGIAApAyghByAAKQMQIQggACkDGCEJIAApAwAhCiAAKQMIIQsDQCAFIAFBMGopAwAiDHwgAkE4aikDACABQThqKQMAIg2FIgVCIIggBUL/////D4N+fCEFIAcgAUEgaikDACIOfCACQShqKQMAIAFBKGopAwAiD4UiB0IgiCAHQv////8Pg358IQcgCSABQRBqKQMAIhB8IAJBGGopAwAgAUEYaikDACIRhSIJQiCIIAlC/////w+DfnwhCSALIAEpAwAiEnwgAkEIaiITKQMAIAFBCGopAwAiFIUiC0IgiCALQv////8Pg358IQsgAkEwaikDACAMhSIMQiCIIAxC/////w+DfiAEfCANfCEEIAJBIGopAwAgDoUiDEIgiCAMQv////8Pg34gBnwgD3whBiACQRBqKQMAIBCFIgxCIIggDEL/////D4N+IAh8IBF8IQggAikDACAShSIMQiCIIAxC/////w+DfiAKfCAUfCEKIAFBwABqIQEgEyECIANBf2oiAw0ACyAAIAk3AxggACAKNwMAIAAgCzcDCCAAIAc3AyggACAINwMQIAAgBTcDOCAAIAY3AyAgACAENwMwCwveAgIBfwF+AkAgBCACIAEoAgAiB2siAkkNACAAIAMgBSAHQQN0aiACEAEgACAFIAZqIgcpAwAgACkDACIIQi+IhSAIhUKx893xCX43AwAgACAHKQMIIAApAwgiCEIviIUgCIVCsfPd8Ql+NwMIIAAgBykDECAAKQMQIghCL4iFIAiFQrHz3fEJfjcDECAAIAcpAxggACkDGCIIQi+IhSAIhUKx893xCX43AxggACAHKQMgIAApAyAiCEIviIUgCIVCsfPd8Ql+NwMgIAAgBykDKCAAKQMoIghCL4iFIAiFQrHz3fEJfjcDKCAAIAcpAzAgACkDMCIIQi+IhSAIhUKx893xCX43AzAgACAHKQM4IAApAzgiCEIviIUgCIVCsfPd8Ql+NwM4IAAgAyACQQZ0aiAFIAQgAmsiBxABIAEgBzYCAA8LIAAgAyAFIAdBA3RqIAQQASABIAcgBGo2AgALhQEBAX8gAiABhSADpyIEQRh0IARBgP4DcUEIdHIgBEEIdkGA/gNxIARBGHZycq1CIIYgA4V9QQA1AoCMAUIghiAAQfyLAWo1AgCEhSIDQjGJIANCGImFIAOFQqW+4/TRjIfZn39+IgNCI4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DCyABKQNIIAJ9QQApA6iMAYUiBEL/////D4MiBSABKQNAIAJ8QQApA6CMAYUiBkIgiCIHfiIIQv////8PgyAEQiCIIgQgBkL/////D4MiBn58IAUgBn4iBUIgiHwiBkIghiAFQv////8Pg4QgCEIgiCAEIAd+fCAGQiCIfIUgA3wgASkDWCACfSAAQdiLAWopAwCFIgNC/////w+DIgQgASkDUCACfCAAQdCLAWopAwCFIgVCIIgiBn4iB0L/////D4MgA0IgiCIDIAVC/////w+DIgV+fCAEIAV+IgRCIIh8IgVCIIYgBEL/////D4OEIAdCIIggAyAGfnwgBUIgiHyFfCEDCyABKQMoIAJ9QQApA5iMAYUiBEL/////D4MiBSABKQMgIAJ8QQApA5CMAYUiBkIgiCIHfiIIQv////8PgyAEQiCIIgQgBkL/////D4MiBn58IAUgBn4iBUIgiHwiBkIghiAFQv////8Pg4QgCEIgiCAEIAd+fCAGQiCIfIUgA3wgASkDOCACfSAAQeiLAWopAwCFIgNC/////w+DIgQgASkDMCACfCAAQeCLAWopAwCFIgVCIIgiBn4iB0L/////D4MgA0IgiCIDIAVC/////w+DIgV+fCAEIAV+IgRCIIh8IgVCIIYgBEL/////D4OEIAdCIIggAyAGfnwgBUIgiHyFfCEDCyABKQMIIAJ9QQApA4iMAYUiBEL/////D4MiBSABKQMAIAJ8QQApA4CMAYUiBkIgiCIHfiIIQv////8PgyAEQiCIIgQgBkL/////D4MiBn58IAUgBn4iBUIgiHwiBkIghiAFQv////8Pg4QgCEIgiCAEIAd+fCAGQiCIfIUgA3wgASkDGCACfSAAQfiLAWopAwCFIgNC/////w+DIgQgASkDECACfCAAQfCLAWopAwCFIgJCIIgiBX4iBkL/////D4MgA0IgiCIDIAJC/////w+DIgJ+fCAEIAJ+IgJCIIh8IgRCIIYgAkL/////D4OEIAZCIIggAyAFfnwgBEIgiHyFfCICQiWIIAKFQvnz3fGZ8pmrFn4iAkIgiCAChQv8CgQBfwV+An8BfkEAIQMgASkDeCACfUEAKQP4jAGFIgRC/////w+DIgUgASkDcCACfEEAKQPwjAGFIgZCIIgiB34iCEL/////D4MgBEIgiCIEIAZC/////w+DIgZ+fCAFIAZ+IgVCIIh8IgZCIIYgBUL/////D4OEIAhCIIggBCAHfnwgBkIgiHyFIAEpA2ggAn1BACkD6IwBhSIEQv////8PgyIFIAEpA2AgAnxBACkD4IwBhSIGQiCIIgd+IghC/////w+DIARCIIgiBCAGQv////8PgyIGfnwgBSAGfiIFQiCIfCIGQiCGIAVC/////w+DhCAIQiCIIAQgB358IAZCIIh8hSABKQNYIAJ9QQApA9iMAYUiBEL/////D4MiBSABKQNQIAJ8QQApA9CMAYUiBkIgiCIHfiIIQv////8PgyAEQiCIIgQgBkL/////D4MiBn58IAUgBn4iBUIgiHwiBkIghiAFQv////8Pg4QgCEIgiCAEIAd+fCAGQiCIfIUgASkDSCACfUEAKQPIjAGFIgRC/////w+DIgUgASkDQCACfEEAKQPAjAGFIgZCIIgiB34iCEL/////D4MgBEIgiCIEIAZC/////w+DIgZ+fCAFIAZ+IgVCIIh8IgZCIIYgBUL/////D4OEIAhCIIggBCAHfnwgBkIgiHyFIAEpAzggAn1BACkDuIwBhSIEQv////8PgyIFIAEpAzAgAnxBACkDsIwBhSIGQiCIIgd+IghC/////w+DIARCIIgiBCAGQv////8PgyIGfnwgBSAGfiIFQiCIfCIGQiCGIAVC/////w+DhCAIQiCIIAQgB358IAZCIIh8hSABKQMoIAJ9QQApA6iMAYUiBEL/////D4MiBSABKQMgIAJ8QQApA6CMAYUiBkIgiCIHfiIIQv////8PgyAEQiCIIgQgBkL/////D4MiBn58IAUgBn4iBUIgiHwiBkIghiAFQv////8Pg4QgCEIgiCAEIAd+fCAGQiCIfIUgASkDGCACfUEAKQOYjAGFIgRC/////w+DIgUgASkDECACfEEAKQOQjAGFIgZCIIgiB34iCEL/////D4MgBEIgiCIEIAZC/////w+DIgZ+fCAFIAZ+IgVCIIh8IgZCIIYgBUL/////D4OEIAhCIIggBCAHfnwgBkIgiHyFIAEpAwggAn1BACkDiIwBhSIEQv////8PgyIFIAEpAwAgAnxBACkDgIwBhSIGQiCIIgd+IghC/////w+DIARCIIgiBCAGQv////8PgyIGfnwgBSAGfiIFQiCIfCIGQiCGIAVC/////w+DhCAIQiCIIAQgB358IAZCIIh8hSAArUKHla+vmLbem55/fnx8fHx8fHx8IgRCJYggBIVC+fPd8ZnymasWfiIEQiCIIASFIQQCQCAAQZABSA0AIABBBHZBeGohCQNAIAEgA2oiCkELaikDACACfSADQYiNAWopAwCFIgVC/////w+DIgYgCkEDaikDACACfCADQYCNAWopAwCFIgdCIIgiCH4iC0L/////D4MgBUIgiCIFIAdC/////w+DIgd+fCAGIAd+IgZCIIh8IgdCIIYgBkL/////D4OEIAtCIIggBSAIfnwgB0IgiHyFIAR8IQQgA0EQaiEDIAlBf2oiCQ0ACwsgASkDfyACfSAAQfiLAWopAwCFIgVC/////w+DIgYgASkDdyACfCAAQfCLAWopAwCFIgJCIIgiB34iCEL/////D4MgBUIgiCIFIAJC/////w+DIgJ+fCAGIAJ+IgJCIIh8IgZCIIYgAkL/////D4OEIAhCIIggBSAHfnwgBkIgiHyFIAR8IgJCJYggAoVC+fPd8ZnymasWfiICQiCIIAKFC98FAgF+AX8CQAJAQQApA4AKIgBQRQ0AQYAIIQFCACEADAELAkBBACkDoI4BIABSDQBBACEBDAELQQAhAUEAQq+v79e895Kg/gAgAH03A/iLAUEAIABCxZbr+djShYIofDcD8IsBQQBCj/Hjja2P9JhOIAB9NwPoiwFBACAAQqus+MXV79HQfHw3A+CLAUEAQtOt1LKShbW0nn8gAH03A9iLAUEAIABCl5r0jvWWvO3JAHw3A9CLAUEAQsWDgv2v/8SxayAAfTcDyIsBQQAgAELqi7OdyOb09UN8NwPAiwFBAELIv/rLnJveueQAIAB9NwO4iwFBACAAQoqjgd/Ume2sMXw3A7CLAUEAQvm57738+MKnHSAAfTcDqIsBQQAgAEKo9dv7s5ynmj98NwOgiwFBAEK4sry3lNW31lggAH03A5iLAUEAIABC8cihuqm0w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ISBQR/A34BfxV+BX8jACIAIQEgAEGAAWtBQHEiAiQAQQAoArCOASIAQcCKASAAGyEDAkACQEEAKQOQjgEiBELxAVQNACACQQApA4CKATcDACACQQApA4iKATcDCCACQQApA5CKATcDECACQQApA5iKATcDGCACQQApA6CKATcDICACQQApA6iKATcDKCACQQApA7CKASIFNwMwIAJBACkDuIoBIgY3AzgCQAJAQQAoAoCOASIHQcAASQ0AIAJBACgCiI4BNgJAIAIgAkHAAGpBACgCmI4BQYCMASAHQX9qQQZ2IANBACgCnI4BIgAQAiADIABqIgBBeWopAwAhCCAAKQMJIQkgACkDGSEKIAApAykhCyAHQcCLAWopAwAhBSAAKQMBIQwgB0HIiwFqKQMAIQYgB0HQiwFqKQMAIQ0gACkDESEOIAdB2IsBaikDACEPIAdB4IsBaikDACEQIAApAyEhESAHQeiLAWopAwAhEiACKQMAIRMgAikDECEUIAIpAyAhFSACKQMwIRYgAikDCCEXIAIpAxghGCACKQMoIRkgAiACKQM4IAdB8IsBaikDACIafCAAKQMxIAdB+IsBaikDACIbhSIcQiCIIBxC/////w+Dfnw3AzggGSAQfCARIBKFIhFCIIggEUL/////D4N+fCERIBggDXwgDiAPhSIOQiCIIA5C/////w+DfnwhDiAXIAV8IAwgBoUiDEIgiCAMQv////8Pg358IQwgGyAWIAsgGoUiC0IgiCALQv////8Pg358fCELIBIgFSAKIBCFIhBCIIggEEL/////D4N+fHwhECAPIBQgCSANhSINQiCIIA1C/////w+Dfnx8IRIgBiATIAggBYUiBUIgiCAFQv////8Pg358fCEIDAELIAdBwI0BaiEdQcAAIAdrIR4gAkHAAGohAAJAAkACQCAHQThNDQAgHiEfDAELAkACQEE4IAdrQQN2QQFqQQdxIh8NACACQcAAaiEAIB4hHwwBCyACQcAAaiEAIB9BA3QiICEfA0AgACAdKQMANwMAIABBCGohACAdQQhqIR0gH0F4aiIfDQALQcAAIAcgIGprIR8LAkAgBw0AA0AgACAdKQMANwMAIABBCGogHUEIaikDADcDACAAQRBqIB1BEG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AykDQyACKQM4hSIFQv////8PgyIGIAMpAzsgC4UiC0IgiCINfiIPQv////8PgyAFQiCIIgUgC0L/////D4MiC358IAYgC34iBkIgiHwiC0IghiAGQv////8Pg4QgD0IgiCAFIA1+fCALQiCIfIUgAykDMyARhSIFQv////8PgyIGIAMpAysgEIUiC0IgiCINfiIPQv////8PgyAFQiCIIgUgC0L/////D4MiC358IAYgC34iBkIgiHwiC0IghiAGQv////8Pg4QgD0IgiCAFIA1+fCALQiCIfIUgAykDIyAOhSIFQv////8PgyIGIAMpAxsgEoUiC0IgiCINfiIPQv////8PgyAFQiCIIgUgC0L/////D4MiC358IAYgC34iBkIgiHwiC0IghiAGQv////8Pg4QgD0IgiCAFIA1+fCALQiCIfIUgAykDEyAMhSIFQv////8PgyIGIAMpAwsgCIUiC0IgiCINfiIPQv////8PgyAFQiCIIgUgC0L/////D4MiC358IAYgC34iBkIgiHwiC0IghiAGQv////8Pg4QgD0IgiCAFIA1+fCALQiCIfIUgBEKHla+vmLbem55/fnx8fHwiBEIliCAEhUL5893xmfKZqxZ+IgRCIIggBIUhBAwBCyAEpyEAAkBBACkDoI4BIgRQDQACQCAAQRBLDQAgAEGACCAEEAUhBAwCCwJAIABBgAFLDQAgAEGACCAEEAYhBAwCCyAAQYAIIAQQByEEDAELAkAgAEEQSw0AIAAgA0IAEAUhBAwBCwJAIABBgAFLDQAgACADQgAQBiEEDAELIAAgA0IAEAchBAtBACAEQjiGIARCgP4Dg0IohoQgBEKAgPwHg0IYhiAEQoCAgPgPg0IIhoSEIARCCIhCgICA+A+DIARCGIhCgID8B4OEIARCKIhCgP4DgyAEQjiIhISENwOACiABJAALBgBBgIoBCwIACwvMAQEAQYAIC8QBuP5sOSOkS758AYEs9yGtHN7UbemDkJfbckCkpLezZx/LeeZOzMDleIJa0H3M/3IhuAhGdPdDJI7gNZDmgTomTDwoUruRwwDLiNBlixtTLqNxZEiXog35TjgZ70ap3qzYqPp2P+OcND/53LvHxwtPHYpR4EvNtFkxyJ9+ydl4c2TqxayDNNPrw8WBoP/6E2PrFw3dUbfw2knTFlUmKdRonisWvlh9R6H8j/i40XrQMc5FyzqPlRYEKK/X+8q7S0B+QAIAAA==",hash:"5a2fbdbb"};function C(A,I,g,C){return new(g||(g=Promise))((function(Q,i){function B(A){try{E(C.next(A))}catch(A){i(A)}}function e(A){try{E(C.throw(A))}catch(A){i(A)}}function E(A){var I;A.done?Q(A.value):(I=A.value,I instanceof g?I:new g((function(A){A(I)}))).then(B,e)}E((C=C.apply(A,I||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;class Q{constructor(){this.mutex=Promise.resolve()}lock(){let A=()=>{};return this.mutex=this.mutex.then((()=>new Promise(A))),new Promise((I=>{A=I}))}dispatch(A){return C(this,void 0,void 0,(function*(){const I=yield this.lock();try{return yield Promise.resolve(A())}finally{I()}}))}}const i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,B=null!==(I=i.Buffer)&&void 0!==I?I:null,e=i.TextEncoder?new i.TextEncoder:null;function E(A,I){return(15&A)+(A>>6|A>>3&8)<<4|(15&I)+(I>>6|I>>3&8)}const t="a".charCodeAt(0)-10,n="0".charCodeAt(0);function D(A,I,g){let C=0;for(let Q=0;Q<g;Q++){let g=I[Q]>>>4;A[C++]=g>9?g+t:g+n,g=15&I[Q],A[C++]=g>9?g+t:g+n}return String.fromCharCode.apply(null,A)}const o=null!==B?A=>{if("string"==typeof A){const I=B.from(A,"utf8");return new Uint8Array(I.buffer,I.byteOffset,I.length)}if(B.isBuffer(A))return new Uint8Array(A.buffer,A.byteOffset,A.length);if(ArrayBuffer.isView(A))return new Uint8Array(A.buffer,A.byteOffset,A.byteLength);throw new Error("Invalid data type!")}:A=>{if("string"==typeof A)return e.encode(A);if(ArrayBuffer.isView(A))return new Uint8Array(A.buffer,A.byteOffset,A.byteLength);throw new Error("Invalid data type!")},f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w=new Uint8Array(256);for(let A=0;A<f.length;A++)w[f.charCodeAt(A)]=A;function r(A){const I=function(A){let I=Math.floor(.75*A.length);const g=A.length;return"="===A[g-1]&&(I-=1,"="===A[g-2]&&(I-=1)),I}(A),g=A.length,C=new Uint8Array(I);let Q=0;for(let I=0;I<g;I+=4){const g=w[A.charCodeAt(I)],i=w[A.charCodeAt(I+1)],B=w[A.charCodeAt(I+2)],e=w[A.charCodeAt(I+3)];C[Q]=g<<2|i>>4,Q+=1,C[Q]=(15&i)<<4|B>>2,Q+=1,C[Q]=(3&B)<<6|63&e,Q+=1}return C}const h=16384,s=new Q,a=new Map;function c(A,I){return C(this,void 0,void 0,(function*(){let g=null,Q=null,i=!1;if("undefined"==typeof WebAssembly)throw new Error("WebAssembly is not supported in this environment!");const B=()=>new DataView(g.exports.memory.buffer).getUint32(g.exports.STATE_SIZE,!0),e=s.dispatch((()=>C(this,void 0,void 0,(function*(){if(!a.has(A.name)){const I=r(A.data),g=WebAssembly.compile(I);a.set(A.name,g)}const I=yield a.get(A.name);g=yield WebAssembly.instantiate(I,{})})))),t=(A=null)=>{i=!0,g.exports.Hash_Init(A)},n=A=>{if(!i)throw new Error("update() called before init()");(A=>{let I=0;for(;I<A.length;){const C=A.subarray(I,I+h);I+=C.length,Q.set(C),g.exports.Hash_Update(C.length)}})(o(A))},f=new Uint8Array(2*I),w=(A,C=null)=>{if(!i)throw new Error("digest() called before init()");return i=!1,g.exports.Hash_Final(C),"binary"===A?Q.slice(0,I):D(f,Q,I)},c=A=>"string"==typeof A?A.length<4096:A.byteLength<h;let y=c;switch(A.name){case"argon2":case"scrypt":y=()=>!0;break;case"blake2b":case"blake2s":y=(A,I)=>I<=512&&c(A);break;case"blake3":y=(A,I)=>0===I&&c(A);break;case"xxhash64":case"xxhash3":case"xxhash128":case"crc64":y=()=>!1}return yield(()=>C(this,void 0,void 0,(function*(){g||(yield e);const A=g.exports.Hash_GetBuffer(),I=g.exports.memory.buffer;Q=new Uint8Array(I,A,h)})))(),{getMemory:()=>Q,writeMemory:(A,I=0)=>{Q.set(A,I)},getExports:()=>g.exports,setMemorySize:A=>{g.exports.Hash_SetMemorySize(A);const I=g.exports.Hash_GetBuffer(),C=g.exports.memory.buffer;Q=new Uint8Array(C,I,A)},init:t,update:n,digest:w,save:()=>{if(!i)throw new Error("save() can only be called after init() and before digest()");const I=g.exports.Hash_GetState(),C=B(),Q=g.exports.memory.buffer,e=new Uint8Array(Q,I,C),t=new Uint8Array(4+C);return function(A,I){const g=I.length>>1;for(let C=0;C<g;C++){const g=C<<1;A[C]=E(I.charCodeAt(g),I.charCodeAt(g+1))}}(t,A.hash),t.set(e,4),t},load:I=>{if(!(I instanceof Uint8Array))throw new Error("load() expects an Uint8Array generated by save()");const C=g.exports.Hash_GetState(),Q=B(),e=4+Q,t=g.exports.memory.buffer;if(I.length!==e)throw new Error(`Bad state length (expected ${e} bytes, got ${I.length})`);if(!function(A,I){if(A.length!==2*I.length)return!1;for(let g=0;g<I.length;g++){const C=g<<1;if(I[g]!==E(A.charCodeAt(C),A.charCodeAt(C+1)))return!1}return!0}(A.hash,I.subarray(0,4)))throw new Error("This state was written by an incompatible hash implementation");const n=I.subarray(4);new Uint8Array(t,C,Q).set(n),i=!0},calculate:(A,C=null,i=null)=>{if(!y(A,C))return t(C),n(A),w("hex",i);const B=o(A);return Q.set(B),g.exports.Hash_Calculate(B.length,C,i),D(f,Q,I)},hashLength:I}}))}const y=new Q;let k=null;const F=new Uint8Array(8);function M(A){return!Number.isInteger(A)||A<0||A>4294967295?new Error("Seed must be given as two valid 32-bit long unsigned integers (lo + high)."):null}function d(A,I,g){const C=new DataView(A);C.setUint32(0,I,!0),C.setUint32(4,g,!0)}A.createXXHash3=function(A=0,I=0){return M(A)?Promise.reject(M(A)):M(I)?Promise.reject(M(I)):c(g,8).then((g=>{const C=new Uint8Array(8);d(C.buffer,A,I),g.writeMemory(C),g.init();const Q={init:()=>(g.writeMemory(C),g.init(),Q),update:A=>(g.update(A),Q),digest:A=>g.digest(A),save:()=>g.save(),load:A=>(g.load(A),Q),blockSize:512,digestSize:8};return Q}))},A.xxhash3=function(A,I=0,Q=0){if(M(I))return Promise.reject(M(I));if(M(Q))return Promise.reject(M(Q));if(null===k)return function(A,I,g){return C(this,void 0,void 0,(function*(){const C=yield A.lock(),Q=yield c(I,g);return C(),Q}))}(y,g,8).then((g=>(k=g,d(F.buffer,I,Q),k.writeMemory(F),k.calculate(A))));try{d(F.buffer,I,Q),k.writeMemory(F);const g=k.calculate(A);return Promise.resolve(g)}catch(A){return Promise.reject(A)}}})); |
| /*! | ||
| * hash-wasm (https://www.npmjs.com/package/hash-wasm) | ||
| * (c) Dani Biro | ||
| * @license MIT | ||
| */ | ||
| !function(A,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((A="undefined"!=typeof globalThis?globalThis:A||self).hashwasm=A.hashwasm||{})}(this,(function(A){"use strict";var e,t={name:"xxhash32",data:"AGFzbQEAAAABEQRgAAF/YAF/AGAAAGACf38AAwcGAAEBAgADBQQBAQICBg4CfwFBsIkFC38AQYAICwdwCAZtZW1vcnkCAA5IYXNoX0dldEJ1ZmZlcgAACUhhc2hfSW5pdAABC0hhc2hfVXBkYXRlAAIKSGFzaF9GaW5hbAADDUhhc2hfR2V0U3RhdGUABA5IYXNoX0NhbGN1bGF0ZQAFClNUQVRFX1NJWkUDAQrvEQYFAEGACQtNAEEAQgA3A6iJAUEAIAA2AoiJAUEAIABBz4yijgZqNgKMiQFBACAAQfeUr694ajYChIkBQQAgAEGoiI2hAmo2AoCJAUEAQQA2AqCJAQu4CAEHfwJAIABFDQBBAEEAKQOoiQEgAK18NwOoiQECQEEAKAKgiQEiASAAakEPSw0AAkACQCAAQQNxIgINAEGACSEDIAAhBAwBCyAAQXxxIQRBgAkhAwNAQQBBACgCoIkBIgVBAWo2AqCJASAFQZCJAWogAy0AADoAACADQQFqIQMgAkF/aiICDQALCyAAQQRJDQEDQEE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AEGQiQEhA0GUiQEhAQJAQQAoAqCJASIEQZCJAWoiBUGUiQFJDQBBkIkBIQMCQCAEQXxqIgZBBHENAEEAKAKQiQFBvdzKlXxsIABqQRF3Qa/W074CbCEAQZiJASEBQZSJASEDIAZBBEkNAQsDQCABKAIAQb3cypV8bCADKAIAQb3cypV8bCAAakERd0Gv1tO+AmxqQRF3Qa/W074CbCEAIAFBBGohAyABQQhqIgEgBU0NAAsgAUF8aiEDCwJAIAMgBUYNACAEQY+JAWohBgJAAkAgBCADa0EBcQ0AIAMhAQwBCyADQQFqIQEgAy0AAEGxz9myAWwgAGpBC3dBsfPd8XlsIQALIAYgA0YNAANAIAFBAWotAABBsc/ZsgFsIAEtAABBsc/ZsgFsIABqQQt3QbHz3fF5bGpBC3dBsfPd8XlsIQAgAUECaiIBIAVHDQALC0EAIABBD3YgAHNB95Svr3hsIgFBDXYgAXNBvdzKlXxsIgFBEHYgAXMiAEEYdCAAQYD+A3FBCHRyIAFBCHZBgP4DcSABQRh2cnKtNwOACQsLCwEAQYAICwQwAAAA",hash:"4bb12485"};function n(A,e,t,n){return new(t||(t=Promise))((function(r,o){function i(A){try{s(n.next(A))}catch(A){o(A)}}function Q(A){try{s(n.throw(A))}catch(A){o(A)}}function s(A){var e;A.done?r(A.value):(e=A.value,e instanceof t?e:new t((function(A){A(e)}))).then(i,Q)}s((n=n.apply(A,e||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;class r{constructor(){this.mutex=Promise.resolve()}lock(){let A=()=>{};return this.mutex=this.mutex.then((()=>new Promise(A))),new Promise((e=>{A=e}))}dispatch(A){return n(this,void 0,void 0,(function*(){const e=yield this.lock();try{return yield Promise.resolve(A())}finally{e()}}))}}const o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,i=null!==(e=o.Buffer)&&void 0!==e?e:null,Q=o.TextEncoder?new o.TextEncoder:null;function s(A,e){return(15&A)+(A>>6|A>>3&8)<<4|(15&e)+(e>>6|e>>3&8)}const B="a".charCodeAt(0)-10,a="0".charCodeAt(0);function E(A,e,t){let n=0;for(let r=0;r<t;r++){let t=e[r]>>>4;A[n++]=t>9?t+B:t+a,t=15&e[r],A[n++]=t>9?t+B:t+a}return String.fromCharCode.apply(null,A)}const C=null!==i?A=>{if("string"==typeof A){const e=i.from(A,"utf8");return new Uint8Array(e.buffer,e.byteOffset,e.length)}if(i.isBuffer(A))return new Uint8Array(A.buffer,A.byteOffset,A.length);if(ArrayBuffer.isView(A))return new Uint8Array(A.buffer,A.byteOffset,A.byteLength);throw new Error("Invalid data type!")}:A=>{if("string"==typeof A)return Q.encode(A);if(ArrayBuffer.isView(A))return new Uint8Array(A.buffer,A.byteOffset,A.byteLength);throw new Error("Invalid data type!")},g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",I=new Uint8Array(256);for(let A=0;A<g.length;A++)I[g.charCodeAt(A)]=A;function l(A){const e=function(A){let e=Math.floor(.75*A.length);const t=A.length;return"="===A[t-1]&&(e-=1,"="===A[t-2]&&(e-=1)),e}(A),t=A.length,n=new Uint8Array(e);let r=0;for(let e=0;e<t;e+=4){const t=I[A.charCodeAt(e)],o=I[A.charCodeAt(e+1)],i=I[A.charCodeAt(e+2)],Q=I[A.charCodeAt(e+3)];n[r]=t<<2|o>>4,r+=1,n[r]=(15&o)<<4|i>>2,r+=1,n[r]=(3&i)<<6|63&Q,r+=1}return n}const h=16384,f=new r,c=new Map;function d(A,e){return n(this,void 0,void 0,(function*(){let t=null,r=null,o=!1;if("undefined"==typeof WebAssembly)throw new Error("WebAssembly is not supported in this environment!");const i=()=>new DataView(t.exports.memory.buffer).getUint32(t.exports.STATE_SIZE,!0),Q=f.dispatch((()=>n(this,void 0,void 0,(function*(){if(!c.has(A.name)){const e=l(A.data),t=WebAssembly.compile(e);c.set(A.name,t)}const e=yield c.get(A.name);t=yield WebAssembly.instantiate(e,{})})))),B=(A=null)=>{o=!0,t.exports.Hash_Init(A)},a=A=>{if(!o)throw new Error("update() called before init()");(A=>{let e=0;for(;e<A.length;){const n=A.subarray(e,e+h);e+=n.length,r.set(n),t.exports.Hash_Update(n.length)}})(C(A))},g=new Uint8Array(2*e),I=(A,n=null)=>{if(!o)throw new Error("digest() called before init()");return o=!1,t.exports.Hash_Final(n),"binary"===A?r.slice(0,e):E(g,r,e)},d=A=>"string"==typeof A?A.length<4096:A.byteLength<h;let u=d;switch(A.name){case"argon2":case"scrypt":u=()=>!0;break;case"blake2b":case"blake2s":u=(A,e)=>e<=512&&d(A);break;case"blake3":u=(A,e)=>0===e&&d(A);break;case"xxhash64":case"xxhash3":case"xxhash128":case"crc64":u=()=>!1}return yield(()=>n(this,void 0,void 0,(function*(){t||(yield Q);const A=t.exports.Hash_GetBuffer(),e=t.exports.memory.buffer;r=new Uint8Array(e,A,h)})))(),{getMemory:()=>r,writeMemory:(A,e=0)=>{r.set(A,e)},getExports:()=>t.exports,setMemorySize:A=>{t.exports.Hash_SetMemorySize(A);const e=t.exports.Hash_GetBuffer(),n=t.exports.memory.buffer;r=new Uint8Array(n,e,A)},init:B,update:a,digest:I,save:()=>{if(!o)throw new Error("save() can only be called after init() and before digest()");const e=t.exports.Hash_GetState(),n=i(),r=t.exports.memory.buffer,Q=new Uint8Array(r,e,n),B=new Uint8Array(4+n);return function(A,e){const t=e.length>>1;for(let n=0;n<t;n++){const t=n<<1;A[n]=s(e.charCodeAt(t),e.charCodeAt(t+1))}}(B,A.hash),B.set(Q,4),B},load:e=>{if(!(e instanceof Uint8Array))throw new Error("load() expects an Uint8Array generated by save()");const n=t.exports.Hash_GetState(),r=i(),Q=4+r,B=t.exports.memory.buffer;if(e.length!==Q)throw new Error(`Bad state length (expected ${Q} bytes, got ${e.length})`);if(!function(A,e){if(A.length!==2*e.length)return!1;for(let t=0;t<e.length;t++){const n=t<<1;if(e[t]!==s(A.charCodeAt(n),A.charCodeAt(n+1)))return!1}return!0}(A.hash,e.subarray(0,4)))throw new Error("This state was written by an incompatible hash implementation");const a=e.subarray(4);new Uint8Array(B,n,r).set(a),o=!0},calculate:(A,n=null,o=null)=>{if(!u(A,n))return B(n),a(A),I("hex",o);const i=C(A);return r.set(i),t.exports.Hash_Calculate(i.length,n,o),E(g,r,e)},hashLength:e}}))}const u=new r;let y=null;function w(A){return!Number.isInteger(A)||A<0||A>4294967295?new Error("Seed must be a valid 32-bit long unsigned integer."):null}A.createXXHash32=function(A=0){return w(A)?Promise.reject(w(A)):d(t,4).then((e=>{e.init(A);const t={init:()=>(e.init(A),t),update:A=>(e.update(A),t),digest:A=>e.digest(A),save:()=>e.save(),load:A=>(e.load(A),t),blockSize:16,digestSize:4};return t}))},A.xxhash32=function(A,e=0){if(w(e))return Promise.reject(w(e));if(null===y)return function(A,e,t){return n(this,void 0,void 0,(function*(){const n=yield A.lock(),r=yield d(e,t);return n(),r}))}(u,t,4).then((t=>(y=t,y.calculate(A,e))));try{const t=y.calculate(A,e);return Promise.resolve(t)}catch(A){return Promise.reject(A)}}})); |
| /*! | ||
| * hash-wasm (https://www.npmjs.com/package/hash-wasm) | ||
| * (c) Dani Biro | ||
| * @license MIT | ||
| */ | ||
| !function(A,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((A="undefined"!=typeof globalThis?globalThis:A||self).hashwasm=A.hashwasm||{})}(this,(function(A){"use strict";var e,t={name:"xxhash64",data:"AGFzbQEAAAABDANgAAF/YAAAYAF/AAMHBgABAgEAAQUEAQECAgYOAn8BQdCJBQt/AEGACAsHcAgGbWVtb3J5AgAOSGFzaF9HZXRCdWZmZXIAAAlIYXNoX0luaXQAAQtIYXNoX1VwZGF0ZQACCkhhc2hfRmluYWwAAw1IYXNoX0dldFN0YXRlAAQOSGFzaF9DYWxjdWxhdGUABQpTVEFURV9TSVpFAwEKmxEGBQBBgAkLYwEBfkEAQgA3A8iJAUEAQQApA4AJIgA3A5CJAUEAIABC+erQ0OfJoeThAHw3A5iJAUEAIABCz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+vmLbem55/fiAAhUIbiUKHla+vmLbem55/fkLj3MqV/M7y9YV/fIVCG4lCh5Wvr5i23puef35C49zKlfzO8vWFf3whACAGQQhqIQUgBkEQaiIGIAhNDQALIAZBeGohBQsCQAJAIAVBBGoiCSAITQ0AIAUhCQwBCyAFNQIAQoeVr6+Ytt6bnn9+IACFQheJQs/W077Sx6vZQn5C+fPd8Zn2masWfCEACwJAIAkgCEYNACAHQZ+JAWohBQJAAkAgByAJa0EBcQ0AIAkhBgwBCyAJQQFqIQYgCTEAAELFz9my8eW66id+IACFQguJQoeVr6+Ytt6bnn9+IQALIAUgCUYNAANAIAZBAWoxAABCxc/ZsvHluuonfiAGMQAAQsXP2bLx5brqJ34gAIVCC4lCh5Wvr5i23puef36FQguJQoeVr6+Ytt6bnn9+IQAgBkECaiIGIAhHDQALC0EAIABCIYggAIVCz9bTvtLHq9lCfiIAQh2IIACFQvnz3fGZ9pmrFn4iAEIgiCAAhSIBQjiGIAFCgP4Dg0IohoQgAUKAgPwHg0IYhiABQoCAgPgPg0IIhoSEIABCCIhCgICA+A+DIABCGIhCgID8B4OEIABCKIhCgP4DgyAAQjiIhISENwOACQsGAEGAiQELAgALCwsBAEGACAsEUAAAAA==",hash:"177fbfa3"};function n(A,e,t,n){return new(t||(t=Promise))((function(r,i){function o(A){try{Q(n.next(A))}catch(A){i(A)}}function s(A){try{Q(n.throw(A))}catch(A){i(A)}}function Q(A){var e;A.done?r(A.value):(e=A.value,e instanceof t?e:new t((function(A){A(e)}))).then(o,s)}Q((n=n.apply(A,e||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;class r{constructor(){this.mutex=Promise.resolve()}lock(){let A=()=>{};return this.mutex=this.mutex.then((()=>new Promise(A))),new Promise((e=>{A=e}))}dispatch(A){return n(this,void 0,void 0,(function*(){const e=yield this.lock();try{return yield Promise.resolve(A())}finally{e()}}))}}const i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,o=null!==(e=i.Buffer)&&void 0!==e?e:null,s=i.TextEncoder?new i.TextEncoder:null;function Q(A,e){return(15&A)+(A>>6|A>>3&8)<<4|(15&e)+(e>>6|e>>3&8)}const f="a".charCodeAt(0)-10,a="0".charCodeAt(0);function l(A,e,t){let n=0;for(let r=0;r<t;r++){let t=e[r]>>>4;A[n++]=t>9?t+f:t+a,t=15&e[r],A[n++]=t>9?t+f:t+a}return String.fromCharCode.apply(null,A)}const C=null!==o?A=>{if("string"==typeof A){const e=o.from(A,"utf8");return new Uint8Array(e.buffer,e.byteOffset,e.length)}if(o.isBuffer(A))return new Uint8Array(A.buffer,A.byteOffset,A.length);if(ArrayBuffer.isView(A))return new Uint8Array(A.buffer,A.byteOffset,A.byteLength);throw new Error("Invalid data type!")}:A=>{if("string"==typeof A)return s.encode(A);if(ArrayBuffer.isView(A))return new Uint8Array(A.buffer,A.byteOffset,A.byteLength);throw new Error("Invalid data type!")},h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",I=new Uint8Array(256);for(let A=0;A<h.length;A++)I[h.charCodeAt(A)]=A;function g(A){const e=function(A){let e=Math.floor(.75*A.length);const t=A.length;return"="===A[t-1]&&(e-=1,"="===A[t-2]&&(e-=1)),e}(A),t=A.length,n=new Uint8Array(e);let r=0;for(let e=0;e<t;e+=4){const t=I[A.charCodeAt(e)],i=I[A.charCodeAt(e+1)],o=I[A.charCodeAt(e+2)],s=I[A.charCodeAt(e+3)];n[r]=t<<2|i>>4,r+=1,n[r]=(15&i)<<4|o>>2,r+=1,n[r]=(3&o)<<6|63&s,r+=1}return n}const B=16384,u=new r,c=new Map;function E(A,e){return n(this,void 0,void 0,(function*(){let t=null,r=null,i=!1;if("undefined"==typeof WebAssembly)throw new Error("WebAssembly is not supported in this environment!");const o=()=>new DataView(t.exports.memory.buffer).getUint32(t.exports.STATE_SIZE,!0),s=u.dispatch((()=>n(this,void 0,void 0,(function*(){if(!c.has(A.name)){const e=g(A.data),t=WebAssembly.compile(e);c.set(A.name,t)}const e=yield c.get(A.name);t=yield WebAssembly.instantiate(e,{})})))),f=(A=null)=>{i=!0,t.exports.Hash_Init(A)},a=A=>{if(!i)throw new Error("update() called before init()");(A=>{let e=0;for(;e<A.length;){const n=A.subarray(e,e+B);e+=n.length,r.set(n),t.exports.Hash_Update(n.length)}})(C(A))},h=new Uint8Array(2*e),I=(A,n=null)=>{if(!i)throw new Error("digest() called before init()");return i=!1,t.exports.Hash_Final(n),"binary"===A?r.slice(0,e):l(h,r,e)},E=A=>"string"==typeof A?A.length<4096:A.byteLength<B;let w=E;switch(A.name){case"argon2":case"scrypt":w=()=>!0;break;case"blake2b":case"blake2s":w=(A,e)=>e<=512&&E(A);break;case"blake3":w=(A,e)=>0===e&&E(A);break;case"xxhash64":case"xxhash3":case"xxhash128":case"crc64":w=()=>!1}return yield(()=>n(this,void 0,void 0,(function*(){t||(yield s);const A=t.exports.Hash_GetBuffer(),e=t.exports.memory.buffer;r=new Uint8Array(e,A,B)})))(),{getMemory:()=>r,writeMemory:(A,e=0)=>{r.set(A,e)},getExports:()=>t.exports,setMemorySize:A=>{t.exports.Hash_SetMemorySize(A);const e=t.exports.Hash_GetBuffer(),n=t.exports.memory.buffer;r=new Uint8Array(n,e,A)},init:f,update:a,digest:I,save:()=>{if(!i)throw new Error("save() can only be called after init() and before digest()");const e=t.exports.Hash_GetState(),n=o(),r=t.exports.memory.buffer,s=new Uint8Array(r,e,n),f=new Uint8Array(4+n);return function(A,e){const t=e.length>>1;for(let n=0;n<t;n++){const t=n<<1;A[n]=Q(e.charCodeAt(t),e.charCodeAt(t+1))}}(f,A.hash),f.set(s,4),f},load:e=>{if(!(e instanceof Uint8Array))throw new Error("load() expects an Uint8Array generated by save()");const n=t.exports.Hash_GetState(),r=o(),s=4+r,f=t.exports.memory.buffer;if(e.length!==s)throw new Error(`Bad state length (expected ${s} bytes, got ${e.length})`);if(!function(A,e){if(A.length!==2*e.length)return!1;for(let t=0;t<e.length;t++){const n=t<<1;if(e[t]!==Q(A.charCodeAt(n),A.charCodeAt(n+1)))return!1}return!0}(A.hash,e.subarray(0,4)))throw new Error("This state was written by an incompatible hash implementation");const a=e.subarray(4);new Uint8Array(f,n,r).set(a),i=!0},calculate:(A,n=null,i=null)=>{if(!w(A,n))return f(n),a(A),I("hex",i);const o=C(A);return r.set(o),t.exports.Hash_Calculate(o.length,n,i),l(h,r,e)},hashLength:e}}))}const w=new r;let d=null;const y=new Uint8Array(8);function b(A){return!Number.isInteger(A)||A<0||A>4294967295?new Error("Seed must be given as two valid 32-bit long unsigned integers (lo + high)."):null}function m(A,e,t){const n=new DataView(A);n.setUint32(0,e,!0),n.setUint32(4,t,!0)}A.createXXHash64=function(A=0,e=0){return b(A)?Promise.reject(b(A)):b(e)?Promise.reject(b(e)):E(t,8).then((t=>{const n=new Uint8Array(8);m(n.buffer,A,e),t.writeMemory(n),t.init();const r={init:()=>(t.writeMemory(n),t.init(),r),update:A=>(t.update(A),r),digest:A=>t.digest(A),save:()=>t.save(),load:A=>(t.load(A),r),blockSize:32,digestSize:8};return r}))},A.xxhash64=function(A,e=0,r=0){if(b(e))return Promise.reject(b(e));if(b(r))return Promise.reject(b(r));if(null===d)return function(A,e,t){return n(this,void 0,void 0,(function*(){const n=yield A.lock(),r=yield E(e,t);return n(),r}))}(w,t,8).then((t=>(d=t,m(y.buffer,e,r),d.writeMemory(y),d.calculate(A))));try{m(y.buffer,e,r),d.writeMemory(y);const t=d.calculate(A);return Promise.resolve(t)}catch(A){return Promise.reject(A)}}})); |
Sorry, the diff of this file is too big to display
| export {}; |
| export { startLocalDurableStreamsServer, type DurableStreamsLocalExports, type DurableStreamsLocalServer } from "./server"; |
| export type DurableStreamsLocalExports = { | ||
| http: { | ||
| url: string; | ||
| port: number; | ||
| }; | ||
| sqlite: { | ||
| path: string; | ||
| }; | ||
| name: string; | ||
| pid: number; | ||
| }; | ||
| export type DurableStreamsLocalServer = { | ||
| exports: DurableStreamsLocalExports; | ||
| close(): Promise<void>; | ||
| }; | ||
| export declare function startLocalDurableStreamsServer(opts?: { | ||
| name?: string; | ||
| port?: number; | ||
| hostname?: string; | ||
| }): Promise<DurableStreamsLocalServer>; |
+201
| Apache License | ||
| Version 2.0, January 2004 | ||
| http://www.apache.org/licenses/ | ||
| TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | ||
| 1. Definitions. | ||
| "License" shall mean the terms and conditions for use, reproduction, | ||
| and distribution as defined by Sections 1 through 9 of this document. | ||
| "Licensor" shall mean the copyright owner or entity authorized by | ||
| the copyright owner that is granting the License. | ||
| "Legal Entity" shall mean the union of the acting entity and all | ||
| other entities that control, are controlled by, or are under common | ||
| control with that entity. For the purposes of this definition, | ||
| "control" means (i) the power, direct or indirect, to cause the | ||
| direction or management of such entity, whether by contract or | ||
| otherwise, or (ii) ownership of fifty percent (50%) or more of the | ||
| outstanding shares, or (iii) beneficial ownership of such entity. | ||
| "You" (or "Your") shall mean an individual or Legal Entity | ||
| exercising permissions granted by this License. | ||
| "Source" form shall mean the preferred form for making modifications, | ||
| including but not limited to software source code, documentation | ||
| source, and configuration files. | ||
| "Object" form shall mean any form resulting from mechanical | ||
| transformation or translation of a Source form, including but | ||
| not limited to compiled object code, generated documentation, | ||
| and conversions to other media types. | ||
| "Work" shall mean the work of authorship, whether in Source or | ||
| Object form, made available under the License, as indicated by a | ||
| copyright notice that is included in or attached to the work | ||
| (an example is provided in the Appendix below). | ||
| "Derivative Works" shall mean any work, whether in Source or Object | ||
| form, that is based on (or derived from) the Work and for which the | ||
| editorial revisions, annotations, elaborations, or other modifications | ||
| represent, as a whole, an original work of authorship. For the purposes | ||
| of this License, Derivative Works shall not include works that remain | ||
| separable from, or merely link (or bind by name) to the interfaces of, | ||
| the Work and Derivative Works thereof. | ||
| "Contribution" shall mean any work of authorship, including | ||
| the original version of the Work and any modifications or additions | ||
| to that Work or Derivative Works thereof, that is intentionally | ||
| submitted to Licensor for inclusion in the Work by the copyright owner | ||
| or by an individual or Legal Entity authorized to submit on behalf of | ||
| the copyright owner. For the purposes of this definition, "submitted" | ||
| means any form of electronic, verbal, or written communication sent | ||
| to the Licensor or its representatives, including but not limited to | ||
| communication on electronic mailing lists, source code control systems, | ||
| and issue tracking systems that are managed by, or on behalf of, the | ||
| Licensor for the purpose of discussing and improving the Work, but | ||
| excluding communication that is conspicuously marked or otherwise | ||
| designated in writing by the copyright owner as "Not a Contribution." | ||
| "Contributor" shall mean Licensor and any individual or Legal Entity | ||
| on behalf of whom a Contribution has been received by Licensor and | ||
| subsequently incorporated within the Work. | ||
| 2. Grant of Copyright License. Subject to the terms and conditions of | ||
| this License, each Contributor hereby grants to You a perpetual, | ||
| worldwide, non-exclusive, no-charge, royalty-free, irrevocable | ||
| copyright license to reproduce, prepare Derivative Works of, | ||
| publicly display, publicly perform, sublicense, and distribute the | ||
| Work and such Derivative Works in Source or Object form. | ||
| 3. Grant of Patent License. Subject to the terms and conditions of | ||
| this License, each Contributor hereby grants to You a perpetual, | ||
| worldwide, non-exclusive, no-charge, royalty-free, irrevocable | ||
| (except as stated in this section) patent license to make, have made, | ||
| use, offer to sell, sell, import, and otherwise transfer the Work, | ||
| where such license applies only to those patent claims licensable | ||
| by such Contributor that are necessarily infringed by their | ||
| Contribution(s) alone or by combination of their Contribution(s) | ||
| with the Work to which such Contribution(s) was submitted. If You | ||
| institute patent litigation against any entity (including a | ||
| cross-claim or counterclaim in a lawsuit) alleging that the Work | ||
| or a Contribution incorporated within the Work constitutes direct | ||
| or contributory patent infringement, then any patent licenses | ||
| granted to You under this License for that Work shall terminate | ||
| as of the date such litigation is filed. | ||
| 4. Redistribution. You may reproduce and distribute copies of the | ||
| Work or Derivative Works thereof in any medium, with or without | ||
| modifications, and in Source or Object form, provided that You | ||
| meet the following conditions: | ||
| (a) You must give any other recipients of the Work or | ||
| Derivative Works a copy of this License; and | ||
| (b) You must cause any modified files to carry prominent notices | ||
| stating that You changed the files; and | ||
| (c) You must retain, in the Source form of any Derivative Works | ||
| that You distribute, all copyright, patent, trademark, and | ||
| attribution notices from the Source form of the Work, | ||
| excluding those notices that do not pertain to any part of | ||
| the Derivative Works; and | ||
| (d) If the Work includes a "NOTICE" text file as part of its | ||
| distribution, then any Derivative Works that You distribute must | ||
| include a readable copy of the attribution notices contained | ||
| within such NOTICE file, excluding those notices that do not | ||
| pertain to any part of the Derivative Works, in at least one | ||
| of the following places: within a NOTICE text file distributed | ||
| as part of the Derivative Works; within the Source form or | ||
| documentation, if provided along with the Derivative Works; or, | ||
| within a display generated by the Derivative Works, if and | ||
| wherever such third-party notices normally appear. The contents | ||
| of the NOTICE file are for informational purposes only and | ||
| do not modify the License. You may add Your own attribution | ||
| notices within Derivative Works that You distribute, alongside | ||
| or as an addendum to the NOTICE text from the Work, provided | ||
| that such additional attribution notices cannot be construed | ||
| as modifying the License. | ||
| You may add Your own copyright statement to Your modifications and | ||
| may provide additional or different license terms and conditions | ||
| for use, reproduction, or distribution of Your modifications, or | ||
| for any such Derivative Works as a whole, provided Your use, | ||
| reproduction, and distribution of the Work otherwise complies with | ||
| the conditions stated in this License. | ||
| 5. Submission of Contributions. Unless You explicitly state otherwise, | ||
| any Contribution intentionally submitted for inclusion in the Work | ||
| by You to the Licensor shall be under the terms and conditions of | ||
| this License, without any additional terms or conditions. | ||
| Notwithstanding the above, nothing herein shall supersede or modify | ||
| the terms of any separate license agreement you may have executed | ||
| with Licensor regarding such Contributions. | ||
| 6. Trademarks. This License does not grant permission to use the trade | ||
| names, trademarks, service marks, or product names of the Licensor, | ||
| except as required for reasonable and customary use in describing the | ||
| origin of the Work and reproducing the content of the NOTICE file. | ||
| 7. Disclaimer of Warranty. Unless required by applicable law or | ||
| agreed to in writing, Licensor provides the Work (and each | ||
| Contributor provides its Contributions) on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | ||
| implied, including, without limitation, any warranties or conditions | ||
| of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A | ||
| PARTICULAR PURPOSE. You are solely responsible for determining the | ||
| appropriateness of using or redistributing the Work and assume any | ||
| risks associated with Your exercise of permissions under this License. | ||
| 8. Limitation of Liability. In no event and under no legal theory, | ||
| whether in tort (including negligence), contract, or otherwise, | ||
| unless required by applicable law (such as deliberate and grossly | ||
| negligent acts) or agreed to in writing, shall any Contributor be | ||
| liable to You for damages, including any direct, indirect, special, | ||
| incidental, or consequential damages of any character arising as a | ||
| result of this License or out of the use or inability to use the | ||
| Work (including but not limited to damages for loss of goodwill, | ||
| work stoppage, computer failure or malfunction, or any and all | ||
| other commercial damages or losses), even if such Contributor | ||
| has been advised of the possibility of such damages. | ||
| 9. Accepting Warranty or Additional Liability. While redistributing | ||
| the Work or Derivative Works thereof, You may choose to offer, | ||
| and charge a fee for, acceptance of support, warranty, indemnity, | ||
| or other liability obligations and/or rights consistent with this | ||
| License. However, in accepting such obligations, You may act only | ||
| on Your own behalf and on Your sole responsibility, not on behalf of | ||
| any other Contributor, and only if You agree to indemnify, | ||
| defend, and hold each Contributor harmless for any liability | ||
| incurred by, or claims asserted against, such Contributor by reason | ||
| of your accepting any such warranty or additional liability. | ||
| END OF TERMS AND CONDITIONS | ||
| APPENDIX: How to apply the Apache License to your work. | ||
| To apply the Apache License to your work, attach the following | ||
| boilerplate notice, with the fields enclosed by brackets "[]" | ||
| replaced with your own identifying information. (Don't include | ||
| the brackets!) The text should be enclosed in the appropriate | ||
| comment syntax for the file format. We also recommend that a | ||
| file or class name and description of purpose be included on the | ||
| same "printed page" as the copyright notice for easier | ||
| identification within third-party archives. | ||
| Copyright [yyyy] [name of copyright owner] | ||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. |
+33
| # Security Policy | ||
| ## Supported Versions | ||
| Security fixes are currently provided on the active main branch only. There are no long-lived release branches yet. | ||
| ## Reporting A Vulnerability | ||
| Please do not open a public GitHub issue for security vulnerabilities. | ||
| Use GitHub's private vulnerability reporting flow for this repository if it is enabled. If that is not available, contact the maintainers privately before disclosing the issue publicly. | ||
| When reporting a vulnerability, include: | ||
| - The affected commit, branch, or version | ||
| - Your deployment mode: full server or local development server | ||
| - Reproduction steps or a minimal proof of concept | ||
| - Any relevant logs, traces, or configuration details | ||
| ## Current Security Posture | ||
| Prisma Streams does **not** currently implement built-in authentication or authorization. | ||
| That has concrete deployment consequences: | ||
| - Do not expose the server directly to the public internet. | ||
| - Run the full server behind a trusted reverse proxy, API gateway, VPN boundary, or other authenticated network perimeter. | ||
| - Terminate TLS outside the server. | ||
| - Treat the local development server as a loopback-only tool for trusted local workflows such as `npx prisma dev`. | ||
| The local development server is intentionally optimized for local integration, not hostile-network deployment. | ||
| More detail is documented in [docs/AUTH.md](./docs/AUTH.md). |
+32
-33
| { | ||
| "private": false, | ||
| "name": "@prisma/streams-local", | ||
| "version": "0.0.1", | ||
| "description": "Stub package reserved for the Prisma Streams local runtime.", | ||
| "version": "0.1.0", | ||
| "description": "Node and Bun local Prisma Streams runtime for trusted development workflows.", | ||
| "repository": { | ||
@@ -10,40 +9,40 @@ "type": "git", | ||
| }, | ||
| "author": { | ||
| "name": "Alberto Schiabel", | ||
| "email": "alberto.schiabel@gmail.com" | ||
| "bugs": { | ||
| "url": "https://github.com/prisma/streams/issues" | ||
| }, | ||
| "license": "MIT", | ||
| "homepage": "https://github.com/prisma/streams#readme", | ||
| "license": "Apache-2.0", | ||
| "type": "module", | ||
| "engines": { | ||
| "bun": ">=1.3.6", | ||
| "node": ">=22.0.0" | ||
| }, | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
| "dependencies": { | ||
| "ajv": "^8.12.0", | ||
| "better-result": "^2.7.0", | ||
| "env-paths": "^3.0.0", | ||
| "proper-lockfile": "^4.1.2" | ||
| }, | ||
| "files": [ | ||
| "build" | ||
| "README.md", | ||
| "LICENSE", | ||
| "SECURITY.md", | ||
| "CONTRIBUTING.md", | ||
| "CODE_OF_CONDUCT.md", | ||
| "dist/" | ||
| ], | ||
| "main": "./build/index.js", | ||
| "module": "./build/index.mjs", | ||
| "types": "./build/index.d.ts", | ||
| "exports": { | ||
| ".": { | ||
| "import": { | ||
| "@prisma/source": "./src/index.ts", | ||
| "types": "./build/index.d.mts", | ||
| "import": "./build/index.mjs", | ||
| "default": "./build/index.mjs" | ||
| }, | ||
| "require": { | ||
| "@prisma/source": "./src/index.ts", | ||
| "types": "./build/index.d.ts", | ||
| "import": "./build/index.js", | ||
| "default": "./build/index.js" | ||
| } | ||
| "types": "./dist/types/local/index.d.ts", | ||
| "default": "./dist/local/index.js" | ||
| }, | ||
| "./internal/daemon": { | ||
| "types": "./dist/types/local/daemon.d.ts", | ||
| "default": "./dist/local/daemon.js" | ||
| }, | ||
| "./package.json": "./package.json" | ||
| }, | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
| "scripts": { | ||
| "clean": "rimraf build .turbo", | ||
| "build": "tsdown --config-loader unrun", | ||
| "build:watch": "tsdown --config-loader unrun --watch", | ||
| "check:exports": "attw --pack .", | ||
| "typecheck": "tsc --noEmit -p tsconfig.build.json" | ||
| } | ||
| } |
+61
-3
@@ -1,5 +0,63 @@ | ||
| # @prisma/streams-local | ||
| # Prisma Streams Local Build | ||
| This package is currently a published stub. | ||
| This directory contains the generated Node-compatible package artifacts for the | ||
| published `@prisma/streams-local` runtime. | ||
| Version `0.0.1` reserves the package name and ships an empty entrypoint while the real API is being developed. | ||
| ## What Local Streams Is | ||
| Prisma Streams local is a trusted-development Durable Streams server intended | ||
| for embedded workflows such as `prisma dev`. | ||
| It keeps all state in a single local SQLite database and supports the live query | ||
| touch system, but it does not run the full production segmenting and object | ||
| store pipeline. | ||
| ## Supported Package Surface | ||
| - `@prisma/streams-local` | ||
| - `@prisma/streams-local/internal/daemon` (internal Prisma CLI plumbing) | ||
| The full self-hosted server remains Bun-only and is not part of this Node build | ||
| surface. | ||
| ## Integrating It | ||
| 1. Start a named local server from `@prisma/streams-local`. | ||
| 2. Install your live-query schema via `/_schema` with `touch.enabled=true`. | ||
| 3. Feed normalized State Protocol change events into the server. | ||
| 4. Use `/touch/meta` and `/touch/wait` to drive live query invalidation. | ||
| Programmatic example: | ||
| ```ts | ||
| import { startLocalDurableStreamsServer } from "@prisma/streams-local"; | ||
| const server = await startLocalDurableStreamsServer({ | ||
| name: "default", | ||
| hostname: "127.0.0.1", | ||
| port: 0, | ||
| }); | ||
| console.log(server.exports.http.url); | ||
| console.log(server.exports.sqlite.path); | ||
| await server.close(); | ||
| ``` | ||
| Daemon example: | ||
| ```ts | ||
| import { fork } from "node:child_process"; | ||
| const child = fork(require.resolve("@prisma/streams-local/internal/daemon"), [ | ||
| "--name", | ||
| "default", | ||
| "--port", | ||
| "0", | ||
| ], { | ||
| stdio: "inherit", | ||
| }); | ||
| ``` | ||
| See ../README.md and ../docs/local-dev.md for the full runtime and release | ||
| documentation. |
| export { }; |
| export { }; |
| export { }; |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 7 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Mixed license
LicensePackage contains multiple licenses.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
621691
42336.25%24
300%13788
Infinity%64
966.67%Yes
NaN4
Infinity%1
Infinity%7
250%25
Infinity%5
400%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added