Repository navigation
Releases
Releases · portablejs/portable
@portable/websockets@0.1.0
Minor Changes
79aba4e- Initial release.WebSockets.connectopens a WebSocket that reconnects, with a readable and a writable stream that stay the same across reconnects, andfromSocketwraps an existing socket in the same two streams. Where the runtime hasSymbol.asyncDispose, both work withawait using, which closes the socket at the end of the scope. Replaces reconnecting-websocket, partysocket, and websocket-ts.
Patch Changes
@portable/webhooks@0.1.0
Minor Changes
f790a12- Initial release.Webhooks.verifyandWebhooks.signcheck and create webhook signatures with thestandard(Standard Webhooks and Svix),stripe,github, andslackschemes, or a scheme you write for another HMAC-SHA256 sender. HMAC-SHA256 uses WebCrypto, and thehmacoption takes another implementation. Replaces standardwebhooks, svix'sWebhook, Stripe'sconstructEvent, @octokit/webhooks-methods and @slack/bolt's request verification.
Patch Changes
@portable/web-push@0.1.0
Minor Changes
692c201- Initial release.WebPush.send,toRequest,encrypt, andgenerateVapidKeyssend Web Push messages with aes128gcm encryption (RFC 8291) and VAPID (RFC 8292) on WebCrypto andfetch, andmaxPayloadBytesis the largest payload that fits. Replaces web-push.
Patch Changes
@portable/web-crypto@0.1.0
Minor Changes
0a1b9a3- Initial release. These helpers wrapcrypto.subtleand take and returnUint8Array:WebCrypto.digest,hmac, andhkdf;importSeed, which imports a 32-byte Ed25519 or X25519 private key with its public key;publicKeyOf;importPem, which imports a PKCS #8, SubjectPublicKeyInfo, or PKCS #1 RSA key from PEM text; andderToRawEcdsaandrawToDerEcdsa, which convert ECDSA signatures between DER and rawr || s. Replaces ecdsa-sig-formatter and hand-written WebCrypto wrappers.
Patch Changes
@portable/timers@0.1.0
Minor Changes
c04a3b9- Initial release.Timers.sleep,retry, andpolltake anAbortSignaland leave no timers behind.retryandpollshare onedelayoption: a fixed wait, exponential backoff with full jitter, or a function that can return a server'sRetry-After.backoffturns adelayinto a function that returns each wait.debounceandthrottlematch lodash's timing, and each call returns a promise of the result of the invocation it was merged into. TheInstanttype, which other@portable/*packages accept fornowand other times, is aDate, aTemporal.Instant, or aTemporal.ZonedDateTime. Replaces delay, p-retry, async-retry, p-wait-for, lodash.debounce, lodash.throttle, throttle-debounce, and p-debounce.
Patch Changes
- Updated dependencies [
f637257]:- @portable/errors@0.1.0
@portable/streams@0.1.0
Minor Changes
a09a240- Initial release.Streams.toBytes,toBlob,toText,toJson, andtoArraycollect a stream with amaxByteslimit;concatandmergecombine streams;teesplits one into any number of branches;limitBytes,map,filter,tap,batch, andtransformtransform a stream; andfromIterableandtoAsyncIterableconvert between streams and iterables.abortablemakes a hand-writtenTransformercancellable with anAbortSignal.@portable/streams/nodehastoWebandtoWebObjects, which convert a NodeReadableto aReadableStreamin Node, Bun, and Deno. Replaces get-stream, concat-stream, bl, stream-to-array, merge2, merge-stream, through2, raw-body's limit handling, andReadable.toWebfromnode:stream.
Patch Changes
@portable/sse@0.1.0
Minor Changes
eb9c96b- Initial release.Sse.DecoderStreamanddecoderead atext/event-streambody into events by the WHATWG rules;EncoderStreamandencodewrite events and comments; andconnectopens a stream withfetchand reconnects withLast-Event-ID, up toattemptsfailures in a row. Replaces eventsource-parser, the eventsource polyfill, @microsoft/fetch-event-source, and the event writers in better-sse and hono'sstreamSSE.
Patch Changes
@portable/spf@0.1.0
Minor Changes
529fd0b- Initial release.Spf.checkevaluates SPF (RFC 7208) for a client IP, MAIL FROM address, and HELO name through anyDns.Resolver, and enforces the RFC's DNS lookup limits. Replaces mailauth's SPF module.
Patch Changes
@portable/sockets@0.1.0
Minor Changes
- #27
b2d6cb3- Initial release. TheSockets.ConnectandSockets.Sockettypes follow the WinterTC Sockets API, whichconnectfromcloudflare:socketsfits.@portable/sockets/nodehasconnectandcreate, which open TCP and TLS connections withnode:netandnode:tlsin Node, Bun, and Deno, andstartTls()verifies the server certificate and sends SNI. Replaces @arrowood.dev/socket.
Patch Changes
@portable/smtp@0.1.0
Minor Changes
425cfb9- Initial release.Smtp.connectandSmtp.sendsend mail over SMTP or LMTP, with STARTTLS, AUTH, PIPELINING, and per-recipient results. They open the socket with aconnectfunction of typeSockets.Connect, such asconnectfromcloudflare:socketsor@portable/sockets/node.client.close()ends the session, and where the runtime hasSymbol.asyncDispose,await using client = await Smtp.connect(options)closes it at the end of the scope. Replaces nodemailer's SMTP transport and smtp-connection.