@frigear-nu/push 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/module.d.mts +151 -0
  2. package/dist/module.json +9 -0
  3. package/dist/module.mjs +159 -0
  4. package/dist/runtime/access.d.ts +1 -0
  5. package/dist/runtime/access.js +16 -0
  6. package/dist/runtime/app/composables/usePushDevice.d.ts +24 -0
  7. package/dist/runtime/app/composables/usePushDevice.js +70 -0
  8. package/dist/runtime/app/pages/devices.d.vue.ts +3 -0
  9. package/dist/runtime/app/pages/devices.vue +104 -0
  10. package/dist/runtime/app/pages/devices.vue.d.ts +3 -0
  11. package/dist/runtime/app/plugins/push.client.d.ts +2 -0
  12. package/dist/runtime/app/plugins/push.client.js +16 -0
  13. package/dist/runtime/app/tabs/Devices.d.vue.ts +8 -0
  14. package/dist/runtime/app/tabs/Devices.vue +138 -0
  15. package/dist/runtime/app/tabs/Devices.vue.d.ts +8 -0
  16. package/dist/runtime/app/utils/device.d.ts +58 -0
  17. package/dist/runtime/app/utils/device.js +114 -0
  18. package/dist/runtime/app/utils/native.d.ts +75 -0
  19. package/dist/runtime/app/utils/native.js +61 -0
  20. package/dist/runtime/i18n/lang/da.json +71 -0
  21. package/dist/runtime/i18n/lang/en.json +71 -0
  22. package/dist/runtime/menus.d.ts +2 -0
  23. package/dist/runtime/menus.js +17 -0
  24. package/dist/runtime/providers/apns.d.ts +45 -0
  25. package/dist/runtime/providers/apns.js +75 -0
  26. package/dist/runtime/providers/config.d.ts +44 -0
  27. package/dist/runtime/providers/config.js +59 -0
  28. package/dist/runtime/providers/deliver.d.ts +35 -0
  29. package/dist/runtime/providers/deliver.js +52 -0
  30. package/dist/runtime/providers/fcm.d.ts +73 -0
  31. package/dist/runtime/providers/fcm.js +100 -0
  32. package/dist/runtime/providers/http2.d.ts +13 -0
  33. package/dist/runtime/providers/http2.js +74 -0
  34. package/dist/runtime/providers/types.d.ts +71 -0
  35. package/dist/runtime/providers/types.js +16 -0
  36. package/dist/runtime/server/db/schema.postgresql.d.ts +211 -0
  37. package/dist/runtime/server/db/schema.postgresql.js +26 -0
  38. package/dist/runtime/server/db/schema.sqlite.d.ts +225 -0
  39. package/dist/runtime/server/db/schema.sqlite.js +26 -0
  40. package/dist/runtime/server/notify-driver.d.ts +6 -0
  41. package/dist/runtime/server/notify-driver.js +10 -0
  42. package/dist/runtime/server/plugins/config-check.d.ts +2 -0
  43. package/dist/runtime/server/plugins/config-check.js +7 -0
  44. package/dist/runtime/server/policies.d.ts +1 -0
  45. package/dist/runtime/server/policies.js +1 -0
  46. package/dist/runtime/server/routes/admin/test.post.d.ts +2 -0
  47. package/dist/runtime/server/routes/admin/test.post.js +17 -0
  48. package/dist/runtime/server/routes/admin/user-devices.get.d.ts +2 -0
  49. package/dist/runtime/server/routes/admin/user-devices.get.js +4 -0
  50. package/dist/runtime/server/routes/me/device.delete.d.ts +2 -0
  51. package/dist/runtime/server/routes/me/device.delete.js +10 -0
  52. package/dist/runtime/server/routes/me/devices.get.d.ts +2 -0
  53. package/dist/runtime/server/routes/me/devices.get.js +4 -0
  54. package/dist/runtime/server/routes/me/devices.post.d.ts +2 -0
  55. package/dist/runtime/server/routes/me/devices.post.js +27 -0
  56. package/dist/runtime/server/routes/me/unregister.post.d.ts +2 -0
  57. package/dist/runtime/server/routes/me/unregister.post.js +9 -0
  58. package/dist/runtime/server/utils/push-devices.d.ts +32 -0
  59. package/dist/runtime/server/utils/push-devices.js +90 -0
  60. package/dist/runtime/server/utils/push-send.d.ts +32 -0
  61. package/dist/runtime/server/utils/push-send.js +79 -0
  62. package/dist/runtime/utils/api.d.ts +16 -0
  63. package/dist/runtime/utils/api.js +18 -0
  64. package/dist/runtime/utils/index.d.ts +4 -0
  65. package/dist/runtime/utils/index.js +2 -0
  66. package/dist/runtime/utils/provider.d.ts +7 -0
  67. package/dist/runtime/utils/provider.js +4 -0
  68. package/dist/types.d.mts +5 -0
  69. package/package.json +122 -3
  70. package/README.md +0 -3
@@ -0,0 +1,90 @@
1
+ import { db, schema } from "@nuxthub/db";
2
+ import { and, desc, eq, isNull, or } from "drizzle-orm";
3
+ import { apiError, isoDate } from "@frigear-nu/module-kit/server";
4
+ import { sha256Hex } from "@frigear-nu/module-kit/crypto";
5
+ import { isPushProvider, resolveDeviceProvider, resolveIosProvider } from "../../providers/config.js";
6
+ import { newId } from "@frigear-nu/module-kit/id";
7
+ export function toPushDeviceDto(row) {
8
+ return {
9
+ id: row.id,
10
+ userId: row.userId,
11
+ platform: row.platform,
12
+ provider: isPushProvider(row.provider) ? row.provider : null,
13
+ appId: row.appId,
14
+ locale: row.locale,
15
+ lastSeenAt: isoDate(row.lastSeenAt),
16
+ createdAt: isoDate(row.createdAt),
17
+ revokedAt: isoDate(row.revokedAt)
18
+ };
19
+ }
20
+ const newDeviceId = () => newId("psd");
21
+ function iosProviderOf(config) {
22
+ try {
23
+ return resolveIosProvider(config);
24
+ } catch {
25
+ return "apns";
26
+ }
27
+ }
28
+ export const hashPushInstallationSecret = (secret) => sha256Hex(secret);
29
+ export async function registerPushDevice(event, userId, input) {
30
+ const now = /* @__PURE__ */ new Date();
31
+ const provider = resolveDeviceProvider(input, iosProviderOf(useRuntimeConfig().push)) ?? "fcm";
32
+ const secretHash = input.secret ? await hashPushInstallationSecret(input.secret) : null;
33
+ const table = schema.pushDevices;
34
+ const owned = secretHash ? or(eq(table.userId, userId), eq(table.secretHash, secretHash)) : eq(table.userId, userId);
35
+ const [row] = await db.insert(table).values({
36
+ id: newDeviceId(),
37
+ userId,
38
+ platform: input.platform,
39
+ token: input.token,
40
+ provider,
41
+ appId: input.appId ?? null,
42
+ locale: input.locale ?? null,
43
+ secretHash,
44
+ failures: 0,
45
+ lastSeenAt: now,
46
+ createdAt: now
47
+ }).onConflictDoUpdate({
48
+ target: table.token,
49
+ set: {
50
+ userId,
51
+ platform: input.platform,
52
+ provider,
53
+ appId: input.appId ?? null,
54
+ locale: input.locale ?? null,
55
+ lastSeenAt: now,
56
+ revokedAt: null,
57
+ failures: 0,
58
+ // Without a secret the row keeps the one it is bound to.
59
+ ...secretHash ? { secretHash } : {}
60
+ },
61
+ setWhere: owned
62
+ }).returning();
63
+ if (!row) throw apiError(409, "device_owned", "This device is registered to another account.");
64
+ if (input.replaces && input.replaces !== input.token && input.secret) {
65
+ await removePushDeviceByToken(userId, input.replaces, input.secret);
66
+ }
67
+ const device = toPushDeviceDto(row);
68
+ await useNitroApp().hooks.callHook("push:device:registered", { event, device });
69
+ return device;
70
+ }
71
+ export async function listPushDevices(userId) {
72
+ const rows = await db.select().from(schema.pushDevices).where(and(eq(schema.pushDevices.userId, userId), isNull(schema.pushDevices.revokedAt))).orderBy(desc(schema.pushDevices.createdAt), desc(schema.pushDevices.lastSeenAt));
73
+ return rows.map(toPushDeviceDto);
74
+ }
75
+ export async function listAllPushDevices(userId) {
76
+ const rows = await db.select().from(schema.pushDevices).where(eq(schema.pushDevices.userId, userId)).orderBy(desc(schema.pushDevices.createdAt), desc(schema.pushDevices.lastSeenAt));
77
+ return rows.map(toPushDeviceDto);
78
+ }
79
+ export async function findOwnPushDevice(userId, id) {
80
+ const [row] = await db.select().from(schema.pushDevices).where(and(eq(schema.pushDevices.id, id), eq(schema.pushDevices.userId, userId))).limit(1);
81
+ return row;
82
+ }
83
+ export async function removePushDevice(userId, id) {
84
+ await db.delete(schema.pushDevices).where(and(eq(schema.pushDevices.id, id), eq(schema.pushDevices.userId, userId)));
85
+ }
86
+ export async function removePushDeviceByToken(userId, token, secret) {
87
+ const table = schema.pushDevices;
88
+ const secretHash = await hashPushInstallationSecret(secret);
89
+ await db.delete(table).where(and(eq(table.token, token), eq(table.userId, userId), or(isNull(table.secretHash), eq(table.secretHash, secretHash))));
90
+ }
@@ -0,0 +1,32 @@
1
+ import type { H3Event } from 'h3';
2
+ import type { PushMessage, SendPushResult } from '../../../types.js';
3
+ import type { Http2Transport } from '../../providers/types.js';
4
+ /**
5
+ * Replaces the transport APNs requests go through (`node:http2` by default). For a relay on a runtime without an HTTP/2
6
+ * client (Cloudflare Workers: call it from a Nitro plugin), and for tests. `undefined` restores the default.
7
+ */
8
+ export declare function setPushHttp2Transport(transport: Http2Transport | undefined): void;
9
+ /**
10
+ * Sends a push notification to every active device of `message.userIds`: FCM for Android, and for iOS FCM or APNs (over
11
+ * HTTP/2), whichever issued the device's token (`push.ios` for a device that did not say). A device whose token the
12
+ * provider reports as dead is revoked. Nothing here throws for a single device: failures are counted (and logged) and
13
+ * the result tells how many devices were reached. Invalid settings (`push.delivery`, `push.ios`, the FCM service
14
+ * account) do not throw either: they are logged once and every device counts as failed.
15
+ *
16
+ * `title` and `body` can be one text per locale: each device gets the text for the locale it registered with.
17
+ *
18
+ * With the `log` delivery (the default until credentials are configured, see `push.settings.delivery`) the push is only
19
+ * written to the server log (title and user id, never the body) and counted as sent.
20
+ *
21
+ * Feature code sends push through notify's `dispatchPushNotification`: this module is notify's push driver
22
+ * (`runtime/server/notify-driver.ts`), which calls this. `sendPush` stays for push's own routes.
23
+ */
24
+ export declare function sendPush(_event: H3Event | undefined, message: PushMessage): Promise<SendPushResult>;
25
+ /** Consecutive refused pushes after which a device is revoked (`push_devices.failures`). */
26
+ export declare const PUSH_DEVICE_FAILURE_LIMIT = 3;
27
+ /**
28
+ * Keeps the consecutive-failure counter of each device: a device the provider accepted starts again at 0, one it refused
29
+ * (`failedIds` of the delivery) counts one up and is revoked when it reaches {@link PUSH_DEVICE_FAILURE_LIMIT}. Returns how
30
+ * many devices were revoked now. Registering the device again clears both.
31
+ */
32
+ export declare function countPushDeviceOutcomes(sentIds: readonly string[], failedIds: readonly string[]): Promise<number>;
@@ -0,0 +1,79 @@
1
+ import { db, schema } from "@nuxthub/db";
2
+ import { and, gt, gte, inArray, isNull, sql } from "drizzle-orm";
3
+ import { chunkParams } from "@frigear-nu/module-kit/server";
4
+ import { createProviderSenders, resolveIosProvider, resolvePushDelivery } from "../../providers/config.js";
5
+ import { deliverToDevices } from "../../providers/deliver.js";
6
+ import { readTranslated } from "@frigear-nu/notify/utils";
7
+ const pushConfig = () => useRuntimeConfig().push;
8
+ let senders;
9
+ let http2Transport;
10
+ function providerSenders(config) {
11
+ const key = JSON.stringify([config.fcm, config.apns, config.timeoutMs]);
12
+ if (senders?.key !== key) senders = { key, value: createProviderSenders(config, { http2: http2Transport }) };
13
+ return senders.value;
14
+ }
15
+ export function setPushHttp2Transport(transport) {
16
+ http2Transport = transport;
17
+ senders = void 0;
18
+ }
19
+ let warnedLogDriver = false;
20
+ let warnedConfig;
21
+ function reportConfigError(error) {
22
+ const message = (error instanceof Error ? error.message : String(error)).replace(/^\[@frigear-nu\/push\] /, "");
23
+ if (warnedConfig === message) return;
24
+ warnedConfig = message;
25
+ console.error(`[@frigear-nu/push] Pushes cannot be sent until the push settings are fixed: ${message}`);
26
+ }
27
+ export async function sendPush(_event, message) {
28
+ const userIds = [...new Set(message.userIds)];
29
+ if (!userIds.length) return { sent: 0, failed: 0, revoked: 0 };
30
+ const devices = (await Promise.all(chunkParams(userIds).map((ids) => db.select().from(schema.pushDevices).where(and(inArray(schema.pushDevices.userId, ids), isNull(schema.pushDevices.revokedAt)))))).flat();
31
+ if (!devices.length) return { sent: 0, failed: 0, revoked: 0 };
32
+ const text = (value, locale) => readTranslated(value, locale ?? "en");
33
+ const config = pushConfig();
34
+ let delivery;
35
+ let route;
36
+ try {
37
+ delivery = resolvePushDelivery(config);
38
+ if (delivery === "providers") route = { senders: providerSenders(config), ios: resolveIosProvider(config) };
39
+ } catch (error) {
40
+ reportConfigError(error);
41
+ return { sent: 0, failed: devices.length, revoked: 0 };
42
+ }
43
+ if (delivery === "log") {
44
+ if (!warnedLogDriver && process.env.NODE_ENV === "production") {
45
+ warnedLogDriver = true;
46
+ console.warn("[@frigear-nu/push] The log delivery is active in production: pushes are only logged, not sent. Set the FCM / APNs credentials (NUXT_PUSH_*) or `push.settings.delivery`.");
47
+ }
48
+ for (const device of devices) {
49
+ console.info(`[@frigear-nu/push] (log delivery) push "${text(message.title, device.locale)}" to user ${device.userId}, ${device.platform} device ${device.id}`);
50
+ }
51
+ return { sent: devices.length, failed: 0, revoked: 0 };
52
+ }
53
+ const { revokedIds, sentIds, failedIds, problems, ...result } = await deliverToDevices(devices, (device) => ({
54
+ title: text(message.title, device.locale ?? null),
55
+ body: text(message.body, device.locale ?? null),
56
+ url: message.url,
57
+ data: message.data
58
+ }), route.senders, { ios: route.ios });
59
+ for (const ids of chunkParams(revokedIds)) {
60
+ await db.update(schema.pushDevices).set({ revokedAt: /* @__PURE__ */ new Date() }).where(inArray(schema.pushDevices.id, ids));
61
+ }
62
+ const worn = await countPushDeviceOutcomes(sentIds, failedIds);
63
+ for (const problem of problems) console.warn(`[@frigear-nu/push] Delivery failed for ${problem}`);
64
+ return { ...result, failed: result.failed - worn, revoked: result.revoked + worn };
65
+ }
66
+ export const PUSH_DEVICE_FAILURE_LIMIT = 3;
67
+ export async function countPushDeviceOutcomes(sentIds, failedIds) {
68
+ const table = schema.pushDevices;
69
+ for (const ids of chunkParams([...sentIds])) {
70
+ await db.update(table).set({ failures: 0 }).where(and(inArray(table.id, ids), gt(table.failures, 0)));
71
+ }
72
+ let revoked = 0;
73
+ for (const ids of chunkParams([...failedIds])) {
74
+ await db.update(table).set({ failures: sql`${table.failures} + 1` }).where(inArray(table.id, ids));
75
+ const rows = await db.update(table).set({ revokedAt: /* @__PURE__ */ new Date() }).where(and(inArray(table.id, ids), gte(table.failures, PUSH_DEVICE_FAILURE_LIMIT), isNull(table.revokedAt))).returning({ id: table.id });
76
+ revoked += rows.length;
77
+ }
78
+ return revoked;
79
+ }
@@ -0,0 +1,16 @@
1
+ export declare const pushApi: {
2
+ readonly me: {
3
+ /** `GET` the caller's devices (active ones, newest first) and `POST` to register one (201). Needs `push:devices`. */
4
+ readonly devices: "/api/push/me/devices";
5
+ /** `DELETE` one of the caller's devices (204). */
6
+ readonly device: (id: string) => string;
7
+ /** `POST { token }` to unregister by token (204), so an app that only knows its token can sign out cleanly. */
8
+ readonly unregister: "/api/push/me/devices/unregister";
9
+ };
10
+ readonly admin: {
11
+ /** `GET` one user's devices (staff, `push:manage`); mounted on the users admin. */
12
+ readonly userDevices: (userId: number | string) => string;
13
+ /** `POST { userId }` sends a test push (staff, `push:send`). */
14
+ readonly test: "/api/admin/push/test";
15
+ };
16
+ };
@@ -0,0 +1,18 @@
1
+ const enc = encodeURIComponent;
2
+ const BASE = "/api/push";
3
+ export const pushApi = {
4
+ me: {
5
+ /** `GET` the caller's devices (active ones, newest first) and `POST` to register one (201). Needs `push:devices`. */
6
+ devices: `${BASE}/me/devices`,
7
+ /** `DELETE` one of the caller's devices (204). */
8
+ device: (id) => `${BASE}/me/devices/${enc(id)}`,
9
+ /** `POST { token }` to unregister by token (204), so an app that only knows its token can sign out cleanly. */
10
+ unregister: `${BASE}/me/devices/unregister`
11
+ },
12
+ admin: {
13
+ /** `GET` one user's devices (staff, `push:manage`); mounted on the users admin. */
14
+ userDevices: (userId) => `/api/admin/users/${enc(String(userId))}/push-devices`,
15
+ /** `POST { userId }` sends a test push (staff, `push:send`). */
16
+ test: "/api/admin/push/test"
17
+ }
18
+ };
@@ -0,0 +1,4 @@
1
+ export * from './api.js';
2
+ export * from './provider.js';
3
+ export type { Http2Request, Http2Response, Http2Transport } from '../providers/types.js';
4
+ export type { ModuleOptions, PushDeviceDto, PushDeviceRegisteredContext, PushMessage, PushPlatform, PushProvider, RegisterDeviceInput, SendPushResult, Translated, } from '../../types.js';
@@ -0,0 +1,2 @@
1
+ export * from "./api.js";
2
+ export * from "./provider.js";
@@ -0,0 +1,7 @@
1
+ import type { PushDeviceDto, PushProvider } from '../../types.js';
2
+ /**
3
+ * Who a device's pushes go to, as far as the device tells: the provider it registered with, else FCM on Android (its
4
+ * only provider). `null` for an iOS device registered before providers were stored (the server's `push.ios` decides)
5
+ * and for the web.
6
+ */
7
+ export declare function pushDeviceProvider(device: Pick<PushDeviceDto, 'platform' | 'provider'>): PushProvider | null;
@@ -0,0 +1,4 @@
1
+ export function pushDeviceProvider(device) {
2
+ if (device.provider) return device.provider;
3
+ return device.platform === "android" ? "fcm" : null;
4
+ }
@@ -0,0 +1,5 @@
1
+ export { type Translated } from '@frigear-nu/notify/types'
2
+
3
+ export { default } from './module.mjs'
4
+
5
+ export { type ModuleOptions, type PushDeviceDto, type PushDeviceRegisteredContext, type PushMessage, type PushPlatform, type PushProvider, type PushPublicConfig, type PushRuntimeConfig, type RegisterDeviceInput, type SendPushResult } from './module.mjs'
package/package.json CHANGED
@@ -1,6 +1,125 @@
1
1
  {
2
2
  "name": "@frigear-nu/push",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "description": "Push notifications for the frigear ecosystem: device registration, FCM and APNs delivery (iOS through FCM too), as the push driver of @frigear-nu/notify. Runs in server and client mode.",
5
+ "homepage": "https://docs.frigear.dev/modules/communication/push",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/Frigear-nu/frigear-nu.git",
9
+ "directory": "packages/push"
10
+ },
11
+ "license": "MIT",
12
+ "type": "module",
13
+ "main": "./dist/module.mjs",
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/types.d.mts",
17
+ "import": "./dist/module.mjs",
18
+ "default": "./dist/module.mjs"
19
+ },
20
+ "./utils": {
21
+ "types": "./dist/runtime/utils/index.d.ts",
22
+ "import": "./dist/runtime/utils/index.js",
23
+ "default": "./dist/runtime/utils/index.js"
24
+ },
25
+ "./api": {
26
+ "types": "./dist/runtime/utils/api.d.ts",
27
+ "import": "./dist/runtime/utils/api.js",
28
+ "default": "./dist/runtime/utils/api.js"
29
+ }
30
+ },
31
+ "files": [
32
+ "dist"
33
+ ],
34
+ "workspaces": [
35
+ "playground"
36
+ ],
37
+ "dependencies": {
38
+ "@frigear-nu/auth": "^0.6.4",
39
+ "@frigear-nu/module-kit": "^1.3.7",
40
+ "@frigear-nu/notify": "^0.2.6",
41
+ "@frigear-nu/ui": "^0.2.7",
42
+ "@frigear-nu/users": "^3.1.2",
43
+ "@libsql/client": "^0.18.0",
44
+ "@nuxt/kit": "^4.6.4",
45
+ "drizzle-kit": "^0.31.11",
46
+ "drizzle-orm": "^0.45.4",
47
+ "h3": "^1.15.11",
48
+ "jose": "^6.2.17",
49
+ "zod": "^4.6.7"
50
+ },
51
+ "peerDependencies": {
52
+ "@capacitor-firebase/messaging": ">=8.0.0",
53
+ "@capacitor/push-notifications": ">=8.0.0",
54
+ "@frigear-nu/admin": ">=0.0.0",
55
+ "@frigear-nu/menu": "^0.4.0",
56
+ "@frigear-nu/mobile": "^0.6.2",
57
+ "@frigear-nu/widget": "^0.4.0",
58
+ "@nuxt/ui": "^4.12.0",
59
+ "@nuxthub/core": "^0.10.12"
60
+ },
61
+ "peerDependenciesMeta": {
62
+ "@capacitor-firebase/messaging": {
63
+ "optional": true
64
+ },
65
+ "@capacitor/push-notifications": {
66
+ "optional": true
67
+ },
68
+ "@frigear-nu/admin": {
69
+ "optional": true
70
+ },
71
+ "@frigear-nu/menu": {
72
+ "optional": true
73
+ },
74
+ "@frigear-nu/mobile": {
75
+ "optional": true
76
+ },
77
+ "@frigear-nu/widget": {
78
+ "optional": true
79
+ },
80
+ "@nuxt/ui": {
81
+ "optional": true
82
+ },
83
+ "@nuxthub/core": {
84
+ "optional": true
85
+ }
86
+ },
87
+ "devDependencies": {
88
+ "@frigear-nu/admin": "^0.5.0",
89
+ "@frigear-nu/menu": "^0.4.0",
90
+ "@frigear-nu/widget": "^0.4.0",
91
+ "@nuxt/devtools": "^4.2.0",
92
+ "@nuxt/eslint-config": "^1.17.0",
93
+ "@nuxt/module-builder": "^1.0.4",
94
+ "@nuxt/schema": "^4.6.4",
95
+ "@nuxt/test-utils": "^4.4.0",
96
+ "@nuxt/ui": "^4.12.0",
97
+ "@nuxthub/core": "^0.10.12",
98
+ "@types/node": "^26.6.6",
99
+ "eslint": "^10.15.0",
100
+ "nuxt": "^4.6.4",
101
+ "typescript": "^6.0.3",
102
+ "unstorage": "^1.17.5",
103
+ "vitest": "^5.1.0",
104
+ "vue-tsc": "^3.3.14"
105
+ },
106
+ "scripts": {
107
+ "dev:stub": "nuxt-module-build build --stub && nuxt prepare",
108
+ "build": "nuxt-module-build build",
109
+ "dev": "npm run dev:prepare && nuxt dev playground",
110
+ "dev:build": "nuxt build playground",
111
+ "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playground",
112
+ "lint": "eslint .",
113
+ "lint:fix": "eslint . --fix",
114
+ "test": "vitest run",
115
+ "test:watch": "vitest watch",
116
+ "test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
117
+ },
118
+ "typesVersions": {
119
+ "*": {
120
+ ".": [
121
+ "./dist/types.d.mts"
122
+ ]
123
+ }
124
+ }
6
125
  }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.