@pairdraw/cloud 0.16.0 → 0.16.1
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.
- package/README.md +2 -2
- package/dist/bin/ai-relay.mjs +1 -1
- package/dist/bin/ai-relay.mjs.map +1 -1
- package/dist/bin/server.mjs +1 -1
- package/dist/bin/server.mjs.map +1 -1
- package/dist/runtime-node.d.mts +8 -8
- package/dist/server.d.ts +5 -5
- package/package.json +14 -2
- package/src/runtime/node/ai-relay/main.ts +1 -1
- package/src/runtime/node/main.ts +1 -1
package/README.md
CHANGED
|
@@ -25,11 +25,11 @@ bun --filter @pairdraw/cloud build:standalone && bun --filter @pairdraw/cloud st
|
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
The server migrates the database before it accepts requests. The
|
|
28
|
-
[self-hosting guide](https://github.com/BadryansahBangsawan/pairdraw/blob/
|
|
28
|
+
[self-hosting guide](https://github.com/BadryansahBangsawan/pairdraw/blob/main/packages/docs/reference/self-hosting-cloud.md) covers building with the
|
|
29
29
|
portal, configuration, the editor address, operator commands, and upgrades;
|
|
30
30
|
[`deploy/README.md`](./deploy/README.md) covers local development and end-to-end tests, and
|
|
31
31
|
[`deploy/security.md`](./deploy/security.md) covers hardening. The design is described in
|
|
32
|
-
[Cloud Architecture](https://github.com/BadryansahBangsawan/pairdraw/blob/
|
|
32
|
+
[Cloud Architecture](https://github.com/BadryansahBangsawan/pairdraw/blob/main/packages/docs/development/cloud.md).
|
|
33
33
|
|
|
34
34
|
## Tests
|
|
35
35
|
|
package/dist/bin/ai-relay.mjs
CHANGED
|
@@ -10,7 +10,7 @@ if (process.argv.includes("--help") || process.argv.includes("-h")) {
|
|
|
10
10
|
environment:
|
|
11
11
|
PAIRDRAW_AI_RELAY_CONFIG the relay TOML file (required)
|
|
12
12
|
PORT, HOST where to listen (default 8788 on 0.0.0.0)
|
|
13
|
-
plus the secrets the TOML names. See https://github.com/BadryansahBangsawan/pairdraw/blob/
|
|
13
|
+
plus the secrets the TOML names. See https://github.com/BadryansahBangsawan/pairdraw/blob/main/packages/docs/reference/self-hosting-cloud.md
|
|
14
14
|
`);
|
|
15
15
|
process.exit(0);
|
|
16
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-relay.mjs","names":[],"sources":["../../src/runtime/node/ai-relay/main.ts"],"sourcesContent":["#!/usr/bin/env node\nimport dedent from 'dedent'\n\nimport { startNodeAIRelay } from './server'\n\nif (process.argv.includes('--help') || process.argv.includes('-h')) {\n console.log(dedent`\n Usage: pairdraw-ai-relay\n\n Runs the reference AI service for a self-hosted Pairdraw Cloud. Settings come from the\n environment:\n PAIRDRAW_AI_RELAY_CONFIG the relay TOML file (required)\n PORT, HOST where to listen (default 8788 on 0.0.0.0)\n plus the secrets the TOML names. See https://github.com/BadryansahBangsawan/pairdraw/blob/
|
|
1
|
+
{"version":3,"file":"ai-relay.mjs","names":[],"sources":["../../src/runtime/node/ai-relay/main.ts"],"sourcesContent":["#!/usr/bin/env node\nimport dedent from 'dedent'\n\nimport { startNodeAIRelay } from './server'\n\nif (process.argv.includes('--help') || process.argv.includes('-h')) {\n console.log(dedent`\n Usage: pairdraw-ai-relay\n\n Runs the reference AI service for a self-hosted Pairdraw Cloud. Settings come from the\n environment:\n PAIRDRAW_AI_RELAY_CONFIG the relay TOML file (required)\n PORT, HOST where to listen (default 8788 on 0.0.0.0)\n plus the secrets the TOML names. See https://github.com/BadryansahBangsawan/pairdraw/blob/main/packages/docs/reference/self-hosting-cloud.md\n `)\n process.exit(0)\n}\n\nconst relay = await startNodeAIRelay()\nconsole.log(`Pairdraw AI relay listening on ${relay.url}`)\n\nlet stopping: Promise<void> | undefined\n\nfunction shutdown() {\n stopping ??= relay.stop().then(\n () => process.exit(0),\n (error: unknown) => {\n console.error('[AI relay] Shutdown failed:', error)\n process.exit(1)\n }\n )\n}\n\nprocess.on('SIGINT', shutdown)\nprocess.on('SIGTERM', shutdown)\n"],"mappings":";;;;AAKA,IAAI,QAAQ,KAAK,SAAS,QAAQ,KAAK,QAAQ,KAAK,SAAS,IAAI,GAAG;CAClE,QAAQ,IAAI,MAAM;;;;;;;;GAQjB;CACD,QAAQ,KAAK,CAAC;AAChB;AAEA,MAAM,QAAQ,MAAM,iBAAiB;AACrC,QAAQ,IAAI,kCAAkC,MAAM,KAAK;AAEzD,IAAI;AAEJ,SAAS,WAAW;CAClB,aAAa,MAAM,KAAK,CAAC,CAAC,WAClB,QAAQ,KAAK,CAAC,IACnB,UAAmB;EAClB,QAAQ,MAAM,+BAA+B,KAAK;EAClD,QAAQ,KAAK,CAAC;CAChB,CACF;AACF;AAEA,QAAQ,GAAG,UAAU,QAAQ;AAC7B,QAAQ,GAAG,WAAW,QAAQ"}
|
package/dist/bin/server.mjs
CHANGED
|
@@ -12,7 +12,7 @@ if (process.argv.includes("--help") || process.argv.includes("-h")) {
|
|
|
12
12
|
PAIRDRAW_CLOUD_DEV_SITE_URL
|
|
13
13
|
a Vite dev server to serve them from instead (cloud:dev)
|
|
14
14
|
PORT, HOST where to listen (default 8787 on 0.0.0.0)
|
|
15
|
-
plus the secrets the TOML names. See https://github.com/BadryansahBangsawan/pairdraw/blob/
|
|
15
|
+
plus the secrets the TOML names. See https://github.com/BadryansahBangsawan/pairdraw/blob/main/packages/docs/reference/self-hosting-cloud.md
|
|
16
16
|
`);
|
|
17
17
|
process.exit(0);
|
|
18
18
|
}
|
package/dist/bin/server.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.mjs","names":[],"sources":["../../src/runtime/node/main.ts"],"sourcesContent":["#!/usr/bin/env node\nimport dedent from 'dedent'\n\nimport { startNodeCloudServer } from './server'\n\nif (process.argv.includes('--help') || process.argv.includes('-h')) {\n console.log(dedent`\n Usage: pairdraw-cloud\n\n Runs Pairdraw Cloud. Settings come from the environment:\n PAIRDRAW_CLOUD_CONFIG the deployment TOML file (required)\n PAIRDRAW_CLOUD_SITE_DIR the editor and portal build to serve\n PAIRDRAW_CLOUD_DEV_SITE_URL\n a Vite dev server to serve them from instead (cloud:dev)\n PORT, HOST where to listen (default 8787 on 0.0.0.0)\n plus the secrets the TOML names. See https://github.com/BadryansahBangsawan/pairdraw/blob/
|
|
1
|
+
{"version":3,"file":"server.mjs","names":[],"sources":["../../src/runtime/node/main.ts"],"sourcesContent":["#!/usr/bin/env node\nimport dedent from 'dedent'\n\nimport { startNodeCloudServer } from './server'\n\nif (process.argv.includes('--help') || process.argv.includes('-h')) {\n console.log(dedent`\n Usage: pairdraw-cloud\n\n Runs Pairdraw Cloud. Settings come from the environment:\n PAIRDRAW_CLOUD_CONFIG the deployment TOML file (required)\n PAIRDRAW_CLOUD_SITE_DIR the editor and portal build to serve\n PAIRDRAW_CLOUD_DEV_SITE_URL\n a Vite dev server to serve them from instead (cloud:dev)\n PORT, HOST where to listen (default 8787 on 0.0.0.0)\n plus the secrets the TOML names. See https://github.com/BadryansahBangsawan/pairdraw/blob/main/packages/docs/reference/self-hosting-cloud.md\n `)\n process.exit(0)\n}\n\nconst cloud = await startNodeCloudServer()\nconsole.log(`Pairdraw Cloud listening on ${cloud.url}`)\n\nfunction shutdown() {\n void cloud.stop().then(() => process.exit(0))\n}\n\nprocess.on('SIGINT', shutdown)\nprocess.on('SIGTERM', shutdown)\n"],"mappings":";;;;AAKA,IAAI,QAAQ,KAAK,SAAS,QAAQ,KAAK,QAAQ,KAAK,SAAS,IAAI,GAAG;CAClE,QAAQ,IAAI,MAAM;;;;;;;;;;GAUjB;CACD,QAAQ,KAAK,CAAC;AAChB;AAEA,MAAM,QAAQ,MAAM,qBAAqB;AACzC,QAAQ,IAAI,+BAA+B,MAAM,KAAK;AAEtD,SAAS,WAAW;CAClB,MAAW,KAAK,CAAC,CAAC,WAAW,QAAQ,KAAK,CAAC,CAAC;AAC9C;AAEA,QAAQ,GAAG,UAAU,QAAQ;AAC7B,QAAQ,GAAG,WAAW,QAAQ"}
|
package/dist/runtime-node.d.mts
CHANGED
|
@@ -1883,7 +1883,7 @@ declare function createCloudApp(services: CloudServices): import("hono/hono-base
|
|
|
1883
1883
|
sessions: {
|
|
1884
1884
|
id: string;
|
|
1885
1885
|
current: boolean;
|
|
1886
|
-
method: "
|
|
1886
|
+
method: "password" | "apple" | "google" | "passkey" | "two-step" | "email-link" | "desktop" | "other" | null;
|
|
1887
1887
|
ipAddress: string | null;
|
|
1888
1888
|
browser: string | null;
|
|
1889
1889
|
system: string | null;
|
|
@@ -1973,7 +1973,7 @@ declare function createCloudApp(services: CloudServices): import("hono/hono-base
|
|
|
1973
1973
|
output: {
|
|
1974
1974
|
signIns: {
|
|
1975
1975
|
id: string;
|
|
1976
|
-
method: "
|
|
1976
|
+
method: "password" | "apple" | "google" | "passkey" | "two-step" | "email-link" | "desktop" | "other";
|
|
1977
1977
|
ipAddress: string | null;
|
|
1978
1978
|
browser: string | null;
|
|
1979
1979
|
system: string | null;
|
|
@@ -2973,7 +2973,7 @@ declare function createCloudApp(services: CloudServices): import("hono/hono-base
|
|
|
2973
2973
|
sessions: {
|
|
2974
2974
|
id: string;
|
|
2975
2975
|
current: boolean;
|
|
2976
|
-
method: "
|
|
2976
|
+
method: "password" | "apple" | "google" | "passkey" | "two-step" | "email-link" | "desktop" | "other" | null;
|
|
2977
2977
|
ipAddress: string | null;
|
|
2978
2978
|
browser: string | null;
|
|
2979
2979
|
system: string | null;
|
|
@@ -2983,7 +2983,7 @@ declare function createCloudApp(services: CloudServices): import("hono/hono-base
|
|
|
2983
2983
|
}[];
|
|
2984
2984
|
signIns: {
|
|
2985
2985
|
id: string;
|
|
2986
|
-
method: "
|
|
2986
|
+
method: "password" | "apple" | "google" | "passkey" | "two-step" | "email-link" | "desktop" | "other";
|
|
2987
2987
|
ipAddress: string | null;
|
|
2988
2988
|
browser: string | null;
|
|
2989
2989
|
system: string | null;
|
|
@@ -6708,7 +6708,7 @@ declare function startNodeCloudServer(options?: NodeCloudServerOptions): Promise
|
|
|
6708
6708
|
sessions: {
|
|
6709
6709
|
id: string;
|
|
6710
6710
|
current: boolean;
|
|
6711
|
-
method: "
|
|
6711
|
+
method: "password" | "apple" | "google" | "passkey" | "two-step" | "email-link" | "desktop" | "other" | null;
|
|
6712
6712
|
ipAddress: string | null;
|
|
6713
6713
|
browser: string | null;
|
|
6714
6714
|
system: string | null;
|
|
@@ -6798,7 +6798,7 @@ declare function startNodeCloudServer(options?: NodeCloudServerOptions): Promise
|
|
|
6798
6798
|
output: {
|
|
6799
6799
|
signIns: {
|
|
6800
6800
|
id: string;
|
|
6801
|
-
method: "
|
|
6801
|
+
method: "password" | "apple" | "google" | "passkey" | "two-step" | "email-link" | "desktop" | "other";
|
|
6802
6802
|
ipAddress: string | null;
|
|
6803
6803
|
browser: string | null;
|
|
6804
6804
|
system: string | null;
|
|
@@ -7798,7 +7798,7 @@ declare function startNodeCloudServer(options?: NodeCloudServerOptions): Promise
|
|
|
7798
7798
|
sessions: {
|
|
7799
7799
|
id: string;
|
|
7800
7800
|
current: boolean;
|
|
7801
|
-
method: "
|
|
7801
|
+
method: "password" | "apple" | "google" | "passkey" | "two-step" | "email-link" | "desktop" | "other" | null;
|
|
7802
7802
|
ipAddress: string | null;
|
|
7803
7803
|
browser: string | null;
|
|
7804
7804
|
system: string | null;
|
|
@@ -7808,7 +7808,7 @@ declare function startNodeCloudServer(options?: NodeCloudServerOptions): Promise
|
|
|
7808
7808
|
}[];
|
|
7809
7809
|
signIns: {
|
|
7810
7810
|
id: string;
|
|
7811
|
-
method: "
|
|
7811
|
+
method: "password" | "apple" | "google" | "passkey" | "two-step" | "email-link" | "desktop" | "other";
|
|
7812
7812
|
ipAddress: string | null;
|
|
7813
7813
|
browser: string | null;
|
|
7814
7814
|
system: string | null;
|
package/dist/server.d.ts
CHANGED
|
@@ -719,7 +719,6 @@ declare function createAdminEmailService(database: Kysely<CloudDatabase>, email?
|
|
|
719
719
|
kind: TransactionalEmailKind;
|
|
720
720
|
id: string;
|
|
721
721
|
createdAt: Date;
|
|
722
|
-
acceptedAt: Date | null;
|
|
723
722
|
status: TransactionalEmailStatus;
|
|
724
723
|
recipientEmailNormalized: string;
|
|
725
724
|
attemptCount: number;
|
|
@@ -727,6 +726,7 @@ declare function createAdminEmailService(database: Kysely<CloudDatabase>, email?
|
|
|
727
726
|
transportMessageId: string | null;
|
|
728
727
|
lastErrorCode: string | null;
|
|
729
728
|
nextAttemptAt: Date;
|
|
729
|
+
acceptedAt: Date | null;
|
|
730
730
|
}[];
|
|
731
731
|
total: number;
|
|
732
732
|
counts: Record<"all" | "sent" | "waiting" | "failed", number>;
|
|
@@ -3942,17 +3942,17 @@ declare class DatabaseEntitlementSource implements EntitlementSource {
|
|
|
3942
3942
|
}
|
|
3943
3943
|
declare function createWorkspaceEntitlementRepository(database: Kysely<CloudDatabase>): {
|
|
3944
3944
|
get(workspaceId: string): Promise<{
|
|
3945
|
+
workspaceId: string;
|
|
3945
3946
|
values: unknown;
|
|
3946
3947
|
updatedAt: Date;
|
|
3947
|
-
workspaceId: string;
|
|
3948
3948
|
source: string;
|
|
3949
3949
|
externalVersion: number | null;
|
|
3950
3950
|
revision: number;
|
|
3951
3951
|
} | undefined>;
|
|
3952
3952
|
set(workspaceId: string, values: StaticEntitlementsInput, source: string): Promise<{
|
|
3953
|
+
workspaceId: string;
|
|
3953
3954
|
values: unknown;
|
|
3954
3955
|
updatedAt: Date;
|
|
3955
|
-
workspaceId: string;
|
|
3956
3956
|
source: string;
|
|
3957
3957
|
externalVersion: number | null;
|
|
3958
3958
|
revision: number;
|
|
@@ -8414,7 +8414,6 @@ declare function createCloudAdminRoutes(services: CloudAdminServices, trustedOri
|
|
|
8414
8414
|
kind: TransactionalEmailKind;
|
|
8415
8415
|
id: string;
|
|
8416
8416
|
createdAt: string;
|
|
8417
|
-
acceptedAt: string | null;
|
|
8418
8417
|
status: TransactionalEmailStatus;
|
|
8419
8418
|
recipientEmailNormalized: string;
|
|
8420
8419
|
attemptCount: number;
|
|
@@ -8422,6 +8421,7 @@ declare function createCloudAdminRoutes(services: CloudAdminServices, trustedOri
|
|
|
8422
8421
|
transportMessageId: string | null;
|
|
8423
8422
|
lastErrorCode: string | null;
|
|
8424
8423
|
nextAttemptAt: string;
|
|
8424
|
+
acceptedAt: string | null;
|
|
8425
8425
|
}[];
|
|
8426
8426
|
total: number;
|
|
8427
8427
|
counts: {
|
|
@@ -10776,7 +10776,6 @@ declare function createCloudApp(services: CloudServices): import("hono/hono-base
|
|
|
10776
10776
|
kind: TransactionalEmailKind;
|
|
10777
10777
|
id: string;
|
|
10778
10778
|
createdAt: string;
|
|
10779
|
-
acceptedAt: string | null;
|
|
10780
10779
|
status: TransactionalEmailStatus;
|
|
10781
10780
|
recipientEmailNormalized: string;
|
|
10782
10781
|
attemptCount: number;
|
|
@@ -10784,6 +10783,7 @@ declare function createCloudApp(services: CloudServices): import("hono/hono-base
|
|
|
10784
10783
|
transportMessageId: string | null;
|
|
10785
10784
|
lastErrorCode: string | null;
|
|
10786
10785
|
nextAttemptAt: string;
|
|
10786
|
+
acceptedAt: string | null;
|
|
10787
10787
|
}[];
|
|
10788
10788
|
total: number;
|
|
10789
10789
|
counts: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pairdraw/cloud",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"license": "Apache-2.0 AND MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@internationalized/date": "^3.12.3",
|
|
24
24
|
"@noble/hashes": "^2.4.0",
|
|
25
25
|
"@openfeature/server-sdk": "^1.23.0",
|
|
26
|
-
"@pairdraw/scene-graph": "^0.16.
|
|
26
|
+
"@pairdraw/scene-graph": "^0.16.1",
|
|
27
27
|
"@vue-email/components": "^0.0.21",
|
|
28
28
|
"@vue-email/render": "^0.0.9",
|
|
29
29
|
"better-auth": "1.7.7",
|
|
@@ -109,6 +109,18 @@
|
|
|
109
109
|
"#cloud-tests/*": "./tests/*.ts"
|
|
110
110
|
},
|
|
111
111
|
"description": "Self-hostable Pairdraw Cloud: accounts, workspaces, document revisions, sharing, collaboration, and the AI relay, for Node and Cloudflare Workers.",
|
|
112
|
+
"keywords": [
|
|
113
|
+
"pairdraw",
|
|
114
|
+
"design",
|
|
115
|
+
"collaboration",
|
|
116
|
+
"self-hosted",
|
|
117
|
+
"server"
|
|
118
|
+
],
|
|
119
|
+
"author": "Badryansah Bangsawan",
|
|
120
|
+
"homepage": "https://github.com/BadryansahBangsawan/pairdraw/tree/main/packages/cloud#readme",
|
|
121
|
+
"bugs": {
|
|
122
|
+
"url": "https://github.com/BadryansahBangsawan/pairdraw/issues"
|
|
123
|
+
},
|
|
112
124
|
"repository": {
|
|
113
125
|
"type": "git",
|
|
114
126
|
"url": "git+https://github.com/BadryansahBangsawan/pairdraw.git",
|
|
@@ -11,7 +11,7 @@ if (process.argv.includes('--help') || process.argv.includes('-h')) {
|
|
|
11
11
|
environment:
|
|
12
12
|
PAIRDRAW_AI_RELAY_CONFIG the relay TOML file (required)
|
|
13
13
|
PORT, HOST where to listen (default 8788 on 0.0.0.0)
|
|
14
|
-
plus the secrets the TOML names. See https://github.com/BadryansahBangsawan/pairdraw/blob/
|
|
14
|
+
plus the secrets the TOML names. See https://github.com/BadryansahBangsawan/pairdraw/blob/main/packages/docs/reference/self-hosting-cloud.md
|
|
15
15
|
`)
|
|
16
16
|
process.exit(0)
|
|
17
17
|
}
|
package/src/runtime/node/main.ts
CHANGED
|
@@ -13,7 +13,7 @@ if (process.argv.includes('--help') || process.argv.includes('-h')) {
|
|
|
13
13
|
PAIRDRAW_CLOUD_DEV_SITE_URL
|
|
14
14
|
a Vite dev server to serve them from instead (cloud:dev)
|
|
15
15
|
PORT, HOST where to listen (default 8787 on 0.0.0.0)
|
|
16
|
-
plus the secrets the TOML names. See https://github.com/BadryansahBangsawan/pairdraw/blob/
|
|
16
|
+
plus the secrets the TOML names. See https://github.com/BadryansahBangsawan/pairdraw/blob/main/packages/docs/reference/self-hosting-cloud.md
|
|
17
17
|
`)
|
|
18
18
|
process.exit(0)
|
|
19
19
|
}
|