diff --git a/demo/index.ts b/demo/index.ts new file mode 100644 index 0000000..06bcd2f --- /dev/null +++ b/demo/index.ts @@ -0,0 +1,13 @@ +import { createKeepAlive } from "@kevisual/cnb/keep"; + +const config = { + "wss": "wss://cnb-d98-1jgeskb82-001.cnb.space:443/stable-3c0b449c6e6e37b44a8a7938c0d8a3049926a64c?reconnectionToken=aac306fc-b934-4035-8276-3dd429b7c4c0&reconnection=false&skipWebSocketFrames=false", + "cookie": "orange:workspace:cookie-session:cnb-d98-1jgeskb82-001=15aa8d88-e1f4-47f8-b6bf-761f94b021d0", + "url": "https://cnb-d98-1jgeskb82-001.cnb.space/?folder=/workspace" +} + +createKeepAlive({ + wsUrl: config.wss, + cookie: config.cookie, + debug: true, +}); \ No newline at end of file diff --git a/demo/package.json b/demo/package.json new file mode 100644 index 0000000..2552471 --- /dev/null +++ b/demo/package.json @@ -0,0 +1,17 @@ +{ + "name": "demo", + "version": "0.0.1", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "abearxiong (https://www.xiongxiao.me)", + "license": "MIT", + "packageManager": "pnpm@10.28.2", + "type": "module", + "dependencies": { + "@kevisual/cnb": "^0.0.13" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d238a62..5a9b6ae 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -64,6 +64,12 @@ importers: specifier: ^17.2.3 version: 17.2.3 + demo: + dependencies: + '@kevisual/cnb': + specifier: ^0.0.13 + version: 0.0.13(dotenv@17.2.3)(typescript@5.9.3) + packages: '@babel/code-frame@7.28.6': @@ -80,6 +86,9 @@ packages: '@kevisual/ai@0.0.24': resolution: {integrity: sha512-7jvZk1/L//VIClK7usuNgN4ZA9Etgbooka1Sj5quE/0UywR+NNnwqXVZ89Y1fBhI1TkhauDsdJBAtcQ7r/vbVw==} + '@kevisual/cnb@0.0.13': + resolution: {integrity: sha512-n98lwnlVHz8YqceR/fcorYUaBzcvwwqehyOAGVrqCVwVLsltYmYuHUhzVy1bK3NJ6zwhVdoDrkq7+bv3ZqDT3g==} + '@kevisual/context@0.0.4': resolution: {integrity: sha512-HJeLeZQLU+7tCluSfOyvkgKLs0HjCZrdJlZgEgKRSa8XTwZfMAUt6J7qZTbrZAHBlPtX68EPu/PI8JMCeu3WAQ==} @@ -572,6 +581,39 @@ snapshots: '@kevisual/permission': 0.0.3 '@kevisual/query': 0.0.38 + '@kevisual/cnb@0.0.13(dotenv@17.2.3)(typescript@5.9.3)': + dependencies: + '@kevisual/query': 0.0.38 + '@kevisual/router': 0.0.64(typescript@5.9.3) + '@kevisual/use-config': 1.0.28(dotenv@17.2.3) + es-toolkit: 1.44.0 + nanoid: 5.1.6 + unstorage: 1.17.4 + ws: '@kevisual/ws@8.19.0' + zod: 4.3.6 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/functions' + - '@vercel/kv' + - aws4fetch + - db0 + - dotenv + - idb-keyval + - ioredis + - typescript + - uploadthing + '@kevisual/context@0.0.4': {} '@kevisual/dts@0.0.3(typescript@5.9.3)':