mirror of
https://github.com/DeBrosOfficial/orama.git
synced 2026-06-16 22:54:12 +00:00
#348 - APNs silent-drop guard Apple's APNs silently returns HTTP 200 for pushes with no visible content (no title, no body, no badge, no sound, no content-available=1) and then drops them — which looked to the WASM caller like a successful delivery. Now rejected up-front with the new push.ErrEmptyContent sentinel, and the APNs provider returns the structured push.PushError shape (HTTPStatus, Reason, Unregistered, Wrapped) so the dispatcher can branch on Unregistered to remove dead tokens automatically. Legacy ErrDeviceUnregistered sentinel is preserved for errors.Is compatibility (wrapped inside PushError). Always logs APNs HTTP response (status, reason, apns_id, token prefix) so future silent-drop classes show up in operator logs. content-available is also now correctly mapped from snake_case Data["content_available"] (any truthy variant) into Apple's canonical "content-available": 1 inside the aps dictionary. #321 - mid-session JWT refresh on persistent WS Long-lived persistent WS connections used to have to close+reconnect when the JWT rolled — losing per-instance state, message queues, and subscriptions. The handler now accepts an "auth.refresh" control frame: client sends the new token, the gateway re-verifies it via the new JWTVerifier interface, updates the per-instance invCtx in-place (persistent.Instance.UpdateInvCtx), and acks. No close, no state loss. JWTVerifier is optional — handlers set it via SetJWTVerifier at gateway init. When unwired the handler nack's with a "not supported on this gateway" response and clients fall back to the old close+reconnect path, so older deploys don't break. Other: - push/dispatcher.go: SendToUserDetailed returns per-device PushError shape so callers can act on Unregistered / HTTPStatus / Reason. - serverless/hostfunctions/push.go: WASM host functions for the new detailed-error shape. - serverless/persistent/instance.go: UpdateInvCtx mid-session. Tests: - ws_persistent_control_test.go: auth.refresh ack/nack paths. - apns_test.go: empty-content rejection, PushError shape on 410 + generic non-200, content-available mapping. - dispatcher_detailed_test.go: SendToUserDetailed result shape. - instance_update_invctx_test.go: invCtx update is per-instance, not cross-tenant. VERSION bumped to 0.122.27.
83 lines
1.8 KiB
JSON
83 lines
1.8 KiB
JSON
{
|
|
"name": "@debros/orama",
|
|
"version": "0.122.27",
|
|
"description": "TypeScript SDK for Orama Network - Database, PubSub, Cache, Storage, Vault, and more",
|
|
"type": "module",
|
|
"main": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"license": "MIT",
|
|
"author": "DeBrosOfficial",
|
|
"keywords": [
|
|
"debros",
|
|
"network",
|
|
"sdk",
|
|
"typescript",
|
|
"database",
|
|
"rqlite",
|
|
"pubsub",
|
|
"websocket",
|
|
"cache",
|
|
"olric",
|
|
"ipfs",
|
|
"storage",
|
|
"wasm",
|
|
"serverless",
|
|
"distributed",
|
|
"gateway",
|
|
"vault",
|
|
"secrets",
|
|
"shamir",
|
|
"encryption",
|
|
"guardian"
|
|
],
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/DeBrosOfficial/network",
|
|
"directory": "sdk"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/DeBrosOfficial/network/issues"
|
|
},
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
}
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"src"
|
|
],
|
|
"scripts": {
|
|
"build": "tsup",
|
|
"dev": "tsup --watch",
|
|
"typecheck": "tsc --noEmit",
|
|
"lint": "eslint src tests",
|
|
"test": "vitest",
|
|
"test:e2e": "vitest run tests/e2e",
|
|
"release:npm": "npm publish --access public --registry=https://registry.npmjs.org/",
|
|
"release:gh": "npm publish --registry=https://npm.pkg.github.com"
|
|
},
|
|
"dependencies": {
|
|
"@noble/ciphers": "^0.5.3",
|
|
"@noble/hashes": "^1.4.0",
|
|
"isomorphic-ws": "^5.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^20.0.0",
|
|
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
"@typescript-eslint/parser": "^6.0.0",
|
|
"@vitest/coverage-v8": "^1.0.0",
|
|
"dotenv": "^17.2.3",
|
|
"eslint": "^8.0.0",
|
|
"tsup": "^8.0.0",
|
|
"typedoc": "^0.25.0",
|
|
"typescript": "^5.3.0",
|
|
"vitest": "^1.0.0"
|
|
},
|
|
"publishConfig": {
|
|
"registry": "https://registry.npmjs.org/",
|
|
"access": "public"
|
|
}
|
|
}
|