180 lines
7.2 KiB
JSON
180 lines
7.2 KiB
JSON
{
|
|
"name": "@suaveplan/api-plugin-notifications",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"sideEffects": false,
|
|
"description": "Notifications plugin for @suaveplan/api. Ships SurrealDB-backed NotificationRepository + DeviceTokenRepository, /notifications and /push Hono OpenAPI route groups, an APN service with injectable transport (no hardcoded network library), an event-bus integration via ctx.eventBus, 18 NOTIFICATIONS_PLUGIN_* error codes, and 6 OTel counters. Server-tier — runs in Bun and Node.",
|
|
"license": "MIT",
|
|
"author": "Suaveplan Team",
|
|
"main": "./dist/index.js",
|
|
"module": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"exports": {
|
|
"./package.json": "./package.json",
|
|
".": {
|
|
"import": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
},
|
|
"require": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
}
|
|
},
|
|
"./plugin/plugin": {
|
|
"import": {
|
|
"types": "./dist/plugin/plugin.d.ts",
|
|
"default": "./dist/plugin/plugin.js"
|
|
}
|
|
},
|
|
"./schemas/options": {
|
|
"import": {
|
|
"types": "./dist/schemas/options.d.ts",
|
|
"default": "./dist/schemas/options.js"
|
|
}
|
|
},
|
|
"./schemas/notification-schemas": {
|
|
"import": {
|
|
"types": "./dist/schemas/notification-schemas.d.ts",
|
|
"default": "./dist/schemas/notification-schemas.js"
|
|
}
|
|
},
|
|
"./schemas/push-schemas": {
|
|
"import": {
|
|
"types": "./dist/schemas/push-schemas.d.ts",
|
|
"default": "./dist/schemas/push-schemas.js"
|
|
}
|
|
},
|
|
"./error-codes/error-codes": {
|
|
"import": {
|
|
"types": "./dist/error-codes/error-codes.d.ts",
|
|
"default": "./dist/error-codes/error-codes.js"
|
|
}
|
|
},
|
|
"./otel/instruments": {
|
|
"import": {
|
|
"types": "./dist/otel/instruments.d.ts",
|
|
"default": "./dist/otel/instruments.js"
|
|
}
|
|
},
|
|
"./repositories/notification-repository/notification-repository": {
|
|
"import": {
|
|
"types": "./dist/repositories/notification-repository/notification-repository.d.ts",
|
|
"default": "./dist/repositories/notification-repository/notification-repository.js"
|
|
}
|
|
},
|
|
"./repositories/device-token-repository/device-token-repository": {
|
|
"import": {
|
|
"types": "./dist/repositories/device-token-repository/device-token-repository.d.ts",
|
|
"default": "./dist/repositories/device-token-repository/device-token-repository.js"
|
|
}
|
|
},
|
|
"./routes/notifications-routes/notifications-routes": {
|
|
"import": {
|
|
"types": "./dist/routes/notifications-routes/notifications-routes.d.ts",
|
|
"default": "./dist/routes/notifications-routes/notifications-routes.js"
|
|
}
|
|
},
|
|
"./routes/push-routes/push-routes": {
|
|
"import": {
|
|
"types": "./dist/routes/push-routes/push-routes.d.ts",
|
|
"default": "./dist/routes/push-routes/push-routes.js"
|
|
}
|
|
},
|
|
"./services/apn-service/apn-service": {
|
|
"import": {
|
|
"types": "./dist/services/apn-service/apn-service.d.ts",
|
|
"default": "./dist/services/apn-service/apn-service.js"
|
|
}
|
|
},
|
|
"./transport/apn-transport/apn-transport": {
|
|
"import": {
|
|
"types": "./dist/transport/apn-transport/apn-transport.d.ts",
|
|
"default": "./dist/transport/apn-transport/apn-transport.js"
|
|
}
|
|
},
|
|
"./types/types": {
|
|
"import": {
|
|
"types": "./dist/types/types.d.ts",
|
|
"default": "./dist/types/types.js"
|
|
}
|
|
},
|
|
"./dispatcher/notification-dispatcher/notification-dispatcher": {
|
|
"import": {
|
|
"types": "./dist/dispatcher/notification-dispatcher/notification-dispatcher.d.ts",
|
|
"default": "./dist/dispatcher/notification-dispatcher/notification-dispatcher.js"
|
|
}
|
|
},
|
|
"./dispatcher/idempotency-adapter/idempotency-adapter": {
|
|
"import": {
|
|
"types": "./dist/dispatcher/idempotency-adapter/idempotency-adapter.d.ts",
|
|
"default": "./dist/dispatcher/idempotency-adapter/idempotency-adapter.js"
|
|
}
|
|
},
|
|
"./channels/apn-channel/apn-channel": {
|
|
"import": {
|
|
"types": "./dist/channels/apn-channel/apn-channel.d.ts",
|
|
"default": "./dist/channels/apn-channel/apn-channel.js"
|
|
}
|
|
},
|
|
"./channels/email-channel/email-channel": {
|
|
"import": {
|
|
"types": "./dist/channels/email-channel/email-channel.d.ts",
|
|
"default": "./dist/channels/email-channel/email-channel.js"
|
|
}
|
|
},
|
|
"./schemas/dispatch-schemas": {
|
|
"import": {
|
|
"types": "./dist/schemas/dispatch-schemas.d.ts",
|
|
"default": "./dist/schemas/dispatch-schemas.js"
|
|
}
|
|
}
|
|
},
|
|
"scripts": {
|
|
"build": "vite build",
|
|
"test": "vitest run --passWithNoTests",
|
|
"test:watch": "vitest",
|
|
"test:coverage": "vitest run --coverage --passWithNoTests",
|
|
"lint": "bunx biome check src/",
|
|
"lint:fix": "bunx biome lint --fix --unsafe --max-diagnostics 500 src/",
|
|
"format": "bunx biome format --write --max-diagnostics 500 src/",
|
|
"check": "bunx biome check --write --unsafe --max-diagnostics 500 src/",
|
|
"typecheck": "bunx tsc --noEmit --composite false -p tsconfig.lib.json",
|
|
"docs:check": "bun run ../../../../scripts/docs-check.ts ."
|
|
},
|
|
"dependencies": {
|
|
"@hono/zod-openapi": "catalog:server",
|
|
"@opentelemetry/api": "catalog:observability",
|
|
"@suaveplan/api": "workspace:^",
|
|
"@suaveplan/api-plugin": "workspace:^",
|
|
"@suaveplan/api-plugin-database": "workspace:^",
|
|
"@suaveplan/delivery-tracking": "workspace:^",
|
|
"@suaveplan/emailer": "workspace:^",
|
|
"@suaveplan/error": "workspace:^",
|
|
"@suaveplan/events": "workspace:^",
|
|
"@suaveplan/notification-channel": "workspace:^",
|
|
"@suaveplan/surrealdb": "workspace:^",
|
|
"@suaveplan/types": "workspace:^",
|
|
"hono": "catalog:",
|
|
"tslib": "catalog:build",
|
|
"zod": "catalog:forms"
|
|
},
|
|
"devDependencies": {
|
|
"@opentelemetry/sdk-metrics": "1.30.0",
|
|
"@suaveplan/testing": "workspace:^",
|
|
"@suaveplan/testing-integration": "workspace:^",
|
|
"@suaveplan/testing-integration-surrealdb": "workspace:^",
|
|
"@types/node": "catalog:",
|
|
"@vitest/coverage-istanbul": "catalog:testing",
|
|
"typescript": "catalog:",
|
|
"vite": "catalog:build",
|
|
"vite-plugin-dts": "catalog:build",
|
|
"vitest": "catalog:testing"
|
|
},
|
|
"publishConfig": {
|
|
"registry": "https://npmjs.fq.io/",
|
|
"access": "public"
|
|
},
|
|
"files": ["dist", "src", "surql", "README.md"]
|
|
}
|