@hazem3500/komo 0.9.22 → 0.9.24
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 -0
- package/dist/chunk-AVMLHTCA.js +1 -0
- package/dist/index.js +1 -1
- package/dist/node.mjs +1 -1
- package/dist/public-env.d.ts +25 -0
- package/dist/react.js +1 -1
- package/dist/server.d.ts +8 -0
- package/dist/server.js +2791 -0
- package/dist/setup.js +1 -1
- package/package.json +15 -7
- package/server/public-env.ts +28 -0
- package/server/secrets.d.ts +8 -21
- package/server/setup-client.txt +26 -26
- package/dist/chunk-K5RKBM4Z.js +0 -1
package/dist/setup.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o,c as n}from"./chunk-
|
|
1
|
+
import{a as o,c as n}from"./chunk-AVMLHTCA.js";import"./chunk-ILX63XAJ.js";import"./chunk-DH22G2S5.js";import"./chunk-53M6AOAX.js";import"./chunk-WGISPOJV.js";import"./chunk-PLSWBSSX.js";function r(r){return(s={})=>n(o({...r,...s}))}export{r as defineKomo};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hazem3500/komo",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.24",
|
|
4
4
|
"description": "Point, area, and threaded comments for website branches.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
"server/project-sites.ts",
|
|
31
31
|
"server/iap.ts",
|
|
32
32
|
"server/tokens.ts",
|
|
33
|
-
"server/account-page.ts"
|
|
33
|
+
"server/account-page.ts",
|
|
34
|
+
"server/public-env.ts"
|
|
34
35
|
],
|
|
35
36
|
"main": "./dist/index.js",
|
|
36
37
|
"types": "./dist/index.d.ts",
|
|
@@ -43,7 +44,11 @@
|
|
|
43
44
|
"types": "./dist/setup.d.ts",
|
|
44
45
|
"import": "./dist/setup.js"
|
|
45
46
|
},
|
|
46
|
-
"./server":
|
|
47
|
+
"./server": {
|
|
48
|
+
"types": "./dist/server.d.ts",
|
|
49
|
+
"workerd": "./server/index.ts",
|
|
50
|
+
"import": "./dist/server.js"
|
|
51
|
+
},
|
|
47
52
|
"./react": {
|
|
48
53
|
"types": "./dist/react.d.ts",
|
|
49
54
|
"import": "./dist/react.js"
|
|
@@ -66,14 +71,15 @@
|
|
|
66
71
|
},
|
|
67
72
|
"./node": {
|
|
68
73
|
"import": "./dist/node.mjs"
|
|
69
|
-
}
|
|
74
|
+
},
|
|
75
|
+
"./package.json": "./package.json"
|
|
70
76
|
},
|
|
71
77
|
"sideEffects": [
|
|
72
78
|
"./dist/chunk-*.js",
|
|
73
79
|
"./dist/picker-*.js"
|
|
74
80
|
],
|
|
75
81
|
"scripts": {
|
|
76
|
-
"build": "node scripts/build.mjs && pnpm run build:setup && pnpm run build:node",
|
|
82
|
+
"build": "node scripts/build.mjs && pnpm run build:setup && pnpm run build:node && pnpm run build:server",
|
|
77
83
|
"prepack": "pnpm run build",
|
|
78
84
|
"typecheck": "wrangler types --config server/wrangler.jsonc server/worker-configuration.d.ts && tsc -p tsconfig.json --noEmit && tsc -p server/tsconfig.json",
|
|
79
85
|
"test": "pnpm run build:setup && vitest run --config vitest.config.ts",
|
|
@@ -86,7 +92,8 @@
|
|
|
86
92
|
"bench": "node scripts/bench.mjs",
|
|
87
93
|
"demo:react-props": "node examples/react-props/build.mjs",
|
|
88
94
|
"test:package": "pnpm run build && node scripts/check-package.mjs",
|
|
89
|
-
"build:node": "esbuild server/node.ts --bundle --platform=node --format=esm --packages=external --loader:.txt=text --outfile=dist/node.mjs && mkdir -p dist/postgres && cp server/postgres/*.sql dist/postgres/"
|
|
95
|
+
"build:node": "esbuild server/node.ts --bundle --platform=node --format=esm --packages=external --loader:.txt=text --outfile=dist/node.mjs && mkdir -p dist/postgres && cp server/postgres/*.sql dist/postgres/",
|
|
96
|
+
"build:server": "node scripts/build-server.mjs"
|
|
90
97
|
},
|
|
91
98
|
"repository": {
|
|
92
99
|
"type": "git",
|
|
@@ -117,7 +124,8 @@
|
|
|
117
124
|
},
|
|
118
125
|
"dependencies": {
|
|
119
126
|
"emoji-regex": "^10.6.0",
|
|
120
|
-
"pg": "^8.23.0"
|
|
127
|
+
"pg": "^8.23.0",
|
|
128
|
+
"@cloudflare/workers-types": "^5.20261019.1"
|
|
121
129
|
},
|
|
122
130
|
"bin": {
|
|
123
131
|
"komo": "cli/index.mjs"
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { D1Database, RateLimit } from "@cloudflare/workers-types";
|
|
2
|
+
|
|
3
|
+
export interface ServerEnv {
|
|
4
|
+
DB: D1Database;
|
|
5
|
+
PROJECTS: string;
|
|
6
|
+
GOOGLE_CLIENT_ID: string;
|
|
7
|
+
GITHUB_CLIENT_ID: string;
|
|
8
|
+
GITHUB_CLIENT_SECRET: string;
|
|
9
|
+
GOOGLE_CLIENT_SECRET: string;
|
|
10
|
+
KOMO_WEBHOOK_KEYS?: string;
|
|
11
|
+
KOMO_WEBHOOK_SEND?: (
|
|
12
|
+
url: string,
|
|
13
|
+
body: string,
|
|
14
|
+
headers: Record<string, string>
|
|
15
|
+
) => Promise<void>;
|
|
16
|
+
/** Optional server secret mixed into access token hashes. Changing it revokes every token. */
|
|
17
|
+
KOMO_TOKEN_PEPPER?: string;
|
|
18
|
+
KOMO_HOSTED?: string;
|
|
19
|
+
KOMO_PAUSED?: string;
|
|
20
|
+
/** Enables Google Cloud IAP sign-in: the IAP backend service audience. */
|
|
21
|
+
KOMO_IAP_AUDIENCE?: string;
|
|
22
|
+
/** Path prefix for IAP sign-in handlers, e.g. "/backoffice". */
|
|
23
|
+
KOMO_AUTH_PREFIX?: string;
|
|
24
|
+
/** Path the app is served under behind a proxy that strips it, e.g. "/komo". */
|
|
25
|
+
KOMO_PUBLIC_PATH?: string;
|
|
26
|
+
EDGE_LIMIT?: RateLimit;
|
|
27
|
+
KOMO_VERSION?: { id: string };
|
|
28
|
+
}
|
package/server/secrets.d.ts
CHANGED
|
@@ -1,24 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/** Optional server secret mixed into access token hashes. Changing it revokes every token. */
|
|
10
|
-
KOMO_TOKEN_PEPPER?: string;
|
|
11
|
-
KOMO_HOSTED?: string;
|
|
12
|
-
KOMO_PAUSED?: string;
|
|
13
|
-
/** Enables Google Cloud IAP sign-in: the IAP backend service audience. */
|
|
14
|
-
KOMO_IAP_AUDIENCE?: string;
|
|
15
|
-
/** Path prefix for IAP sign-in handlers, e.g. "/backoffice". */
|
|
16
|
-
KOMO_AUTH_PREFIX?: string;
|
|
17
|
-
/** Path the app is served under behind a proxy that strips it, e.g. "/komo". */
|
|
18
|
-
KOMO_PUBLIC_PATH?: string;
|
|
19
|
-
EDGE_LIMIT?: RateLimit;
|
|
20
|
-
KOMO_VERSION?: { id: string };
|
|
21
|
-
}
|
|
1
|
+
type ServerBindings = import("./public-env.js").ServerEnv;
|
|
2
|
+
|
|
3
|
+
// Wrangler supplies these deployment-specific bindings.
|
|
4
|
+
interface Env
|
|
5
|
+
extends Omit<
|
|
6
|
+
ServerBindings,
|
|
7
|
+
"DB" | "PROJECTS" | "GOOGLE_CLIENT_ID" | "GITHUB_CLIENT_ID" | "GITHUB_CLIENT_SECRET"
|
|
8
|
+
> {}
|
|
22
9
|
|
|
23
10
|
declare module "*.txt" {
|
|
24
11
|
const content: string;
|