@blinkk/root-cms 2.4.9 → 2.5.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 +17 -3
- package/dist/ai-OZY3JXDH.js +19 -0
- package/dist/altText-RDKJNVGH.js +7 -0
- package/dist/app.js +9 -269
- package/dist/chunk-KTUENARU.js +193 -0
- package/dist/chunk-MLKGABMK.js +9 -0
- package/dist/chunk-NUUABQRN.js +1944 -0
- package/dist/chunk-RIJF2AHU.js +136 -0
- package/dist/chunk-RNDSZKAW.js +171 -0
- package/dist/chunk-RYF3UTHQ.js +302 -0
- package/dist/chunk-T5UK2H24.js +419 -0
- package/dist/cli.js +54 -362
- package/dist/{client-pSzji9ZN.d.ts → client-ROwBDNeR.d.ts} +39 -2
- package/dist/client.d.ts +2 -1
- package/dist/client.js +15 -1509
- package/dist/core.d.ts +3 -3
- package/dist/core.js +33 -1519
- package/dist/edit-XX3LAGK6.js +7 -0
- package/dist/functions.js +8 -1632
- package/dist/generate-types-TQBCE2SG.js +9 -0
- package/dist/plugin.d.ts +2 -1
- package/dist/plugin.js +138 -2519
- package/dist/project.d.ts +1 -1
- package/dist/project.js +6 -76
- package/dist/richtext.js +2 -0
- package/dist/{schema-Bux4PrV2.d.ts → schema-BKfPP_s9.d.ts} +78 -2
- package/dist/ui/ui.css +1 -1
- package/dist/ui/ui.js +234 -154
- package/dist/ui/ui.js.LEGAL.txt +126 -102
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Firestore must be setup as `Native Mode` and not `Datastore Mode`
|
|
4
4
|
|
|
5
5
|
Firestore read/writes will need to be locked down by adding the following to the security rules (in Firebase's Firestore UI):
|
|
6
|
+
|
|
6
7
|
```
|
|
7
8
|
rules_version = '2';
|
|
8
9
|
service cloud.firestore {
|
|
@@ -19,11 +20,16 @@ service cloud.firestore {
|
|
|
19
20
|
|
|
20
21
|
match /{collection}/{document=**} {
|
|
21
22
|
allow write:
|
|
22
|
-
if isSignedIn() &&
|
|
23
|
+
if isSignedIn() && userCanPublish();
|
|
23
24
|
allow read:
|
|
24
25
|
if isSignedIn() && userCanRead();
|
|
25
26
|
}
|
|
26
27
|
|
|
28
|
+
match /Collections/{collectionId}/Drafts/{document=**} {
|
|
29
|
+
allow write:
|
|
30
|
+
if isSignedIn() && userCanEdit();
|
|
31
|
+
}
|
|
32
|
+
|
|
27
33
|
function isSignedIn() {
|
|
28
34
|
return request.auth != null;
|
|
29
35
|
}
|
|
@@ -36,16 +42,23 @@ service cloud.firestore {
|
|
|
36
42
|
let roles = getRoles();
|
|
37
43
|
let email = request.auth.token.email;
|
|
38
44
|
let domain = '*@' + email.split('@')[1];
|
|
39
|
-
return (roles[email] in ['ADMIN', 'EDITOR', 'VIEWER']) || (roles[domain] in ['ADMIN', 'EDITOR', 'VIEWER']);
|
|
45
|
+
return (roles[email] in ['ADMIN', 'EDITOR', 'CONTRIBUTOR', 'VIEWER']) || (roles[domain] in ['ADMIN', 'EDITOR', 'CONTRIBUTOR', 'VIEWER']);
|
|
40
46
|
}
|
|
41
47
|
|
|
42
|
-
function
|
|
48
|
+
function userCanPublish() {
|
|
43
49
|
let roles = getRoles();
|
|
44
50
|
let email = request.auth.token.email;
|
|
45
51
|
let domain = '*@' + email.split('@')[1];
|
|
46
52
|
return (roles[email] in ['ADMIN', 'EDITOR']) || (roles[domain] in ['ADMIN', 'EDITOR']);
|
|
47
53
|
}
|
|
48
54
|
|
|
55
|
+
function userCanEdit() {
|
|
56
|
+
let roles = getRoles();
|
|
57
|
+
let email = request.auth.token.email;
|
|
58
|
+
let domain = '*@' + email.split('@')[1];
|
|
59
|
+
return (roles[email] in ['ADMIN', 'EDITOR', 'CONTRIBUTOR']) || (roles[domain] in ['ADMIN', 'EDITOR', 'CONTRIBUTOR']);
|
|
60
|
+
}
|
|
61
|
+
|
|
49
62
|
function userIsAdmin() {
|
|
50
63
|
let roles = getRoles();
|
|
51
64
|
let email = request.auth.token.email;
|
|
@@ -60,6 +73,7 @@ service cloud.firestore {
|
|
|
60
73
|
In Firestore, add a document at `Projects/<yourprojectid>` with a value of `{roles: {"youremail@yourdomain.tld": "ADMIN"}}`.
|
|
61
74
|
|
|
62
75
|
Using Firestore Studio:
|
|
76
|
+
|
|
63
77
|
- Under `Give the collection an ID`, set `Collection ID` to `Projects`
|
|
64
78
|
- Under `Add its first document` set `Document ID` to your project ID
|
|
65
79
|
- For the first record set `Field name` to `roles` with a `Field type` of `map`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Chat,
|
|
3
|
+
ChatClient,
|
|
4
|
+
extractJsonFromResponse,
|
|
5
|
+
generateImage,
|
|
6
|
+
generatePublishMessage,
|
|
7
|
+
summarizeDiff,
|
|
8
|
+
translateString
|
|
9
|
+
} from "./chunk-T5UK2H24.js";
|
|
10
|
+
import "./chunk-MLKGABMK.js";
|
|
11
|
+
export {
|
|
12
|
+
Chat,
|
|
13
|
+
ChatClient,
|
|
14
|
+
extractJsonFromResponse,
|
|
15
|
+
generateImage,
|
|
16
|
+
generatePublishMessage,
|
|
17
|
+
summarizeDiff,
|
|
18
|
+
translateString
|
|
19
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./chunk-MLKGABMK.js";
|
|
2
|
+
|
|
3
|
+
// shared/ai/prompts/altText.txt
|
|
4
|
+
var altText_default = "Create a descriptive and concise alt text for the attached image.\n\n- The alt text should be a brief but comprehensive description of the image, including key subjects, the setting, and any relevant details or actions.\n- The alt text should not exceed 125 characters.\n- Only provide one generation, and include only that data in the response. No surrounding text, clarifications, etc. Just the alt text.\n";
|
|
5
|
+
export {
|
|
6
|
+
altText_default as default
|
|
7
|
+
};
|
package/dist/app.js
CHANGED
|
@@ -1,276 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getServerVersion
|
|
3
|
+
} from "./chunk-KTUENARU.js";
|
|
4
|
+
import {
|
|
5
|
+
getCollectionSchema,
|
|
6
|
+
getProjectSchemas
|
|
7
|
+
} from "./chunk-RNDSZKAW.js";
|
|
8
|
+
import "./chunk-MLKGABMK.js";
|
|
9
|
+
|
|
1
10
|
// core/app.tsx
|
|
2
11
|
import crypto from "crypto";
|
|
3
12
|
import path from "path";
|
|
4
13
|
import { render as renderToString } from "preact-render-to-string";
|
|
5
|
-
|
|
6
|
-
// core/project.ts
|
|
7
|
-
var SCHEMA_MODULES = import.meta.glob(
|
|
8
|
-
[
|
|
9
|
-
"/**/*.schema.ts",
|
|
10
|
-
"!/appengine/**/*.schema.ts",
|
|
11
|
-
"!/functions/**/*.schema.ts",
|
|
12
|
-
"!/gae/**/*.schema.ts"
|
|
13
|
-
],
|
|
14
|
-
{ eager: true }
|
|
15
|
-
);
|
|
16
|
-
async function getProjectSchemas() {
|
|
17
|
-
const schemas = {};
|
|
18
|
-
for (const fileId in SCHEMA_MODULES) {
|
|
19
|
-
const schemaModule = SCHEMA_MODULES[fileId];
|
|
20
|
-
if (schemaModule.default) {
|
|
21
|
-
schemas[fileId] = schemaModule.default;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return schemas;
|
|
25
|
-
}
|
|
26
|
-
async function getCollectionSchema(collectionId) {
|
|
27
|
-
if (!testValidCollectionId(collectionId)) {
|
|
28
|
-
throw new Error(`invalid collection id: ${collectionId}`);
|
|
29
|
-
}
|
|
30
|
-
const fileId = `/collections/${collectionId}.schema.ts`;
|
|
31
|
-
const module = SCHEMA_MODULES[fileId];
|
|
32
|
-
if (!module.default) {
|
|
33
|
-
console.warn(`collection schema not exported in: ${fileId}`);
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
const collection = module.default;
|
|
37
|
-
collection.id = collectionId;
|
|
38
|
-
return convertOneOfTypes(collection);
|
|
39
|
-
}
|
|
40
|
-
function testValidCollectionId(id) {
|
|
41
|
-
return /^[A-Za-z0-9_-]+$/.test(id);
|
|
42
|
-
}
|
|
43
|
-
function convertOneOfTypes(collection) {
|
|
44
|
-
const clone = structuredClone(collection);
|
|
45
|
-
const types = clone.types || {};
|
|
46
|
-
function handleOneOfField(field) {
|
|
47
|
-
const names = [];
|
|
48
|
-
(field.types || []).forEach((sub) => {
|
|
49
|
-
if (typeof sub === "string") {
|
|
50
|
-
names.push(sub);
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
if (sub.name) {
|
|
54
|
-
names.push(sub.name);
|
|
55
|
-
if (!types[sub.name]) {
|
|
56
|
-
types[sub.name] = sub;
|
|
57
|
-
if (sub.fields) {
|
|
58
|
-
walk(sub);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
field.types = names;
|
|
64
|
-
}
|
|
65
|
-
function handleField(field) {
|
|
66
|
-
if (field.type === "oneof") {
|
|
67
|
-
handleOneOfField(field);
|
|
68
|
-
} else if (field.type === "object") {
|
|
69
|
-
walk(field);
|
|
70
|
-
} else if (field.type === "array" && field.of) {
|
|
71
|
-
handleField(field.of);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
function walk(schema) {
|
|
75
|
-
const fields = schema?.fields || [];
|
|
76
|
-
fields.forEach(handleField);
|
|
77
|
-
}
|
|
78
|
-
walk(clone);
|
|
79
|
-
clone.types = types;
|
|
80
|
-
return clone;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// package.json
|
|
84
|
-
var package_default = {
|
|
85
|
-
name: "@blinkk/root-cms",
|
|
86
|
-
version: "2.4.9",
|
|
87
|
-
author: "s@blinkk.com",
|
|
88
|
-
license: "MIT",
|
|
89
|
-
engines: {
|
|
90
|
-
node: ">=16.0.0"
|
|
91
|
-
},
|
|
92
|
-
repository: {
|
|
93
|
-
type: "git",
|
|
94
|
-
url: "git+https://github.com/blinkk/rootjs.git",
|
|
95
|
-
directory: "packages/root-cms"
|
|
96
|
-
},
|
|
97
|
-
files: [
|
|
98
|
-
"dist/**/*"
|
|
99
|
-
],
|
|
100
|
-
bin: {
|
|
101
|
-
"root-cms": "./bin/root-cms.js"
|
|
102
|
-
},
|
|
103
|
-
type: "module",
|
|
104
|
-
module: "./dist/index.js",
|
|
105
|
-
types: "./dist/index.d.ts",
|
|
106
|
-
exports: {
|
|
107
|
-
".": {
|
|
108
|
-
types: "./dist/core.d.ts",
|
|
109
|
-
import: "./dist/core.js"
|
|
110
|
-
},
|
|
111
|
-
"./client": {
|
|
112
|
-
types: "./dist/client.d.ts",
|
|
113
|
-
import: "./dist/client.js"
|
|
114
|
-
},
|
|
115
|
-
"./core": {
|
|
116
|
-
types: "./dist/core.d.ts",
|
|
117
|
-
import: "./dist/core.js"
|
|
118
|
-
},
|
|
119
|
-
"./functions": {
|
|
120
|
-
types: "./dist/functions.d.ts",
|
|
121
|
-
import: "./dist/functions.js"
|
|
122
|
-
},
|
|
123
|
-
"./plugin": {
|
|
124
|
-
types: "./dist/plugin.d.ts",
|
|
125
|
-
import: "./dist/plugin.js"
|
|
126
|
-
},
|
|
127
|
-
"./project": {
|
|
128
|
-
types: "./dist/project.d.ts",
|
|
129
|
-
import: "./dist/project.js"
|
|
130
|
-
},
|
|
131
|
-
"./richtext": {
|
|
132
|
-
types: "./dist/richtext.d.ts",
|
|
133
|
-
import: "./dist/richtext.js"
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
scripts: {
|
|
137
|
-
build: 'rm -rf dist && concurrently -n "core,signin,ui" npm:build:core npm:build:signin npm:build:ui',
|
|
138
|
-
"build:core": "tsup-node --config=./core/tsup.config.ts",
|
|
139
|
-
"//": "NOTE: esbuild is used here because tsup doesn't currently support aliases.",
|
|
140
|
-
"build:ui": "esbuild ui/ui.tsx --bundle --minify --alias:react=@preact/compat --alias:react-dom=@preact/compat --tsconfig=ui/tsconfig.json --outdir=dist/ui --legal-comments=external",
|
|
141
|
-
"build:signin": "esbuild signin/signin.tsx --bundle --minify --tsconfig=signin/tsconfig.json --outdir=dist/ui --legal-comments=external",
|
|
142
|
-
dev: 'rm -rf dist && concurrently -k -n "core,ui" npm:dev:core npm:dev:signin npm:dev:ui',
|
|
143
|
-
"dev:core": "pnpm build:core --watch",
|
|
144
|
-
"dev:signin": "pnpm build:signin --watch",
|
|
145
|
-
"dev:ui": "pnpm build:ui --watch",
|
|
146
|
-
test: "pnpm build && firebase emulators:exec 'vitest run --exclude=**/*.visual.test.tsx'",
|
|
147
|
-
"test:visual": "vitest run --config=vitest.config.visual.ts",
|
|
148
|
-
"test:watch": "pnpm build && firebase emulators:exec 'vitest'"
|
|
149
|
-
},
|
|
150
|
-
dependencies: {
|
|
151
|
-
"@ag-grid-community/client-side-row-model": "32.3.9",
|
|
152
|
-
"@ag-grid-community/core": "32.3.9",
|
|
153
|
-
"@ag-grid-community/react": "32.3.9",
|
|
154
|
-
"@ag-grid-community/styles": "32.3.9",
|
|
155
|
-
"@genkit-ai/ai": "1.26.0",
|
|
156
|
-
"@genkit-ai/core": "1.26.0",
|
|
157
|
-
"@genkit-ai/google-genai": "1.26.0",
|
|
158
|
-
"@google-cloud/firestore": "7.11.3",
|
|
159
|
-
"@hello-pangea/dnd": "18.0.1",
|
|
160
|
-
"@types/cli-progress": "3.11.6",
|
|
161
|
-
"body-parser": "1.20.2",
|
|
162
|
-
"cli-progress": "3.12.0",
|
|
163
|
-
commander: "11.0.0",
|
|
164
|
-
"csv-parse": "5.5.2",
|
|
165
|
-
"csv-stringify": "6.4.4",
|
|
166
|
-
"date-fns": "4.1.0",
|
|
167
|
-
"date-fns-tz": "3.2.0",
|
|
168
|
-
diff: "8.0.2",
|
|
169
|
-
"dts-dom": "3.7.0",
|
|
170
|
-
"fnv-plus": "1.3.1",
|
|
171
|
-
genkit: "1.26.0",
|
|
172
|
-
jsonwebtoken: "9.0.2",
|
|
173
|
-
kleur: "4.1.5",
|
|
174
|
-
sirv: "2.0.3",
|
|
175
|
-
"tiny-glob": "0.2.9",
|
|
176
|
-
zod: "3.23.8"
|
|
177
|
-
},
|
|
178
|
-
"//": "NOTE(stevenle): due to compat issues with mantine and preact, mantine is pinned to v4.2.12",
|
|
179
|
-
devDependencies: {
|
|
180
|
-
"@babel/core": "7.17.9",
|
|
181
|
-
"@blinkk/root": "workspace:*",
|
|
182
|
-
"@editorjs/editorjs": "2.30.8",
|
|
183
|
-
"@editorjs/header": "2.8.8",
|
|
184
|
-
"@editorjs/image": "2.10.2",
|
|
185
|
-
"@editorjs/list": "2.0.6",
|
|
186
|
-
"@editorjs/nested-list": "1.4.3",
|
|
187
|
-
"@editorjs/raw": "2.5.1",
|
|
188
|
-
"@editorjs/table": "2.4.4",
|
|
189
|
-
"@editorjs/underline": "1.2.1",
|
|
190
|
-
"@emotion/react": "11.10.5",
|
|
191
|
-
"@firebase/app-compat": "0.5.2",
|
|
192
|
-
"@firebase/app-types": "0.9.3",
|
|
193
|
-
"@firebase/rules-unit-testing": "5.0.0",
|
|
194
|
-
"@lexical/code": "0.33.1",
|
|
195
|
-
"@lexical/html": "0.33.1",
|
|
196
|
-
"@lexical/link": "0.33.1",
|
|
197
|
-
"@lexical/list": "0.33.1",
|
|
198
|
-
"@lexical/markdown": "0.33.1",
|
|
199
|
-
"@lexical/react": "0.33.1",
|
|
200
|
-
"@lexical/rich-text": "0.33.1",
|
|
201
|
-
"@lexical/selection": "0.33.1",
|
|
202
|
-
"@lexical/table": "0.33.1",
|
|
203
|
-
"@lexical/utils": "0.33.1",
|
|
204
|
-
"@mantine/core": "4.2.12",
|
|
205
|
-
"@mantine/hooks": "4.2.12",
|
|
206
|
-
"@mantine/modals": "4.2.12",
|
|
207
|
-
"@mantine/notifications": "4.2.12",
|
|
208
|
-
"@mantine/spotlight": "4.2.12",
|
|
209
|
-
"@preact/compat": "18.3.1",
|
|
210
|
-
"@tabler/icons-preact": "3.35.0",
|
|
211
|
-
"@testing-library/preact": "3.2.4",
|
|
212
|
-
"@testing-library/user-event": "14.6.1",
|
|
213
|
-
"@types/body-parser": "1.19.3",
|
|
214
|
-
"@types/fnv-plus": "1.3.2",
|
|
215
|
-
"@types/gapi": "0.0.47",
|
|
216
|
-
"@types/gapi.client.drive-v3": "0.0.4",
|
|
217
|
-
"@types/gapi.client.sheets-v4": "0.0.4",
|
|
218
|
-
"@types/google.accounts": "0.0.14",
|
|
219
|
-
"@types/jsonwebtoken": "9.0.1",
|
|
220
|
-
"@types/node": "24.3.1",
|
|
221
|
-
"@vitest/browser": "4.0.10",
|
|
222
|
-
"@vitest/browser-playwright": "4.0.10",
|
|
223
|
-
concurrently: "7.6.0",
|
|
224
|
-
esbuild: "0.25.9",
|
|
225
|
-
firebase: "12.2.1",
|
|
226
|
-
"firebase-admin": "13.5.0",
|
|
227
|
-
"firebase-functions": "6.4.0",
|
|
228
|
-
"firebase-tools": "14.15.2",
|
|
229
|
-
"highlight.js": "11.6.0",
|
|
230
|
-
jsdom: "27.2.0",
|
|
231
|
-
"json-diff-kit": "1.0.29",
|
|
232
|
-
lexical: "0.33.1",
|
|
233
|
-
marked: "9.1.1",
|
|
234
|
-
"mdast-util-from-markdown": "2.0.1",
|
|
235
|
-
"mdast-util-gfm": "3.0.0",
|
|
236
|
-
"micromark-extension-gfm": "3.0.0",
|
|
237
|
-
playwright: "1.56.1",
|
|
238
|
-
preact: "10.27.1",
|
|
239
|
-
"preact-render-to-string": "6.6.1",
|
|
240
|
-
"preact-router": "4.1.2",
|
|
241
|
-
react: "npm:@preact/compat@18.3.1",
|
|
242
|
-
"react-dom": "npm:@preact/compat@18.3.1",
|
|
243
|
-
"react-json-view-compare": "2.0.2",
|
|
244
|
-
tsup: "8.5.0",
|
|
245
|
-
typescript: "5.9.2",
|
|
246
|
-
vite: "7.1.4",
|
|
247
|
-
vitest: "4.0.10",
|
|
248
|
-
yjs: "13.6.27"
|
|
249
|
-
},
|
|
250
|
-
peerDependencies: {
|
|
251
|
-
"@blinkk/root": "2.4.9",
|
|
252
|
-
"firebase-admin": ">=11",
|
|
253
|
-
"firebase-functions": ">=4",
|
|
254
|
-
preact: ">=10",
|
|
255
|
-
"preact-render-to-string": ">=5"
|
|
256
|
-
},
|
|
257
|
-
peerDependenciesMeta: {
|
|
258
|
-
"firebase-functions": {
|
|
259
|
-
optional: true
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
// core/server-version.ts
|
|
265
|
-
var SERVER_STARTUP_TS = String(Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3));
|
|
266
|
-
function getServerVersion() {
|
|
267
|
-
if (process.env.NODE_ENV === "development") {
|
|
268
|
-
return SERVER_STARTUP_TS;
|
|
269
|
-
}
|
|
270
|
-
return package_default?.version || "root-3.0.0";
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
// core/app.tsx
|
|
274
14
|
import { jsx, jsxs } from "preact/jsx-runtime";
|
|
275
15
|
var DEFAULT_FAVICON_URL = "https://lh3.googleusercontent.com/ijK50TfQlV_yJw3i-CMlnD6osH4PboZBILZrJcWhoNMEmoyCD5e1bAxXbaOPe5w4gG_Scf37EXrmZ6p8sP2lue5fLZ419m5JyLMs=e385-w256";
|
|
276
16
|
function App(props) {
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
// package.json
|
|
2
|
+
var package_default = {
|
|
3
|
+
name: "@blinkk/root-cms",
|
|
4
|
+
version: "2.5.1",
|
|
5
|
+
author: "s@blinkk.com",
|
|
6
|
+
license: "MIT",
|
|
7
|
+
engines: {
|
|
8
|
+
node: ">=16.0.0"
|
|
9
|
+
},
|
|
10
|
+
repository: {
|
|
11
|
+
type: "git",
|
|
12
|
+
url: "git+https://github.com/blinkk/rootjs.git",
|
|
13
|
+
directory: "packages/root-cms"
|
|
14
|
+
},
|
|
15
|
+
files: [
|
|
16
|
+
"dist/**/*"
|
|
17
|
+
],
|
|
18
|
+
bin: {
|
|
19
|
+
"root-cms": "./bin/root-cms.js"
|
|
20
|
+
},
|
|
21
|
+
type: "module",
|
|
22
|
+
module: "./dist/index.js",
|
|
23
|
+
types: "./dist/index.d.ts",
|
|
24
|
+
exports: {
|
|
25
|
+
".": {
|
|
26
|
+
types: "./dist/core.d.ts",
|
|
27
|
+
import: "./dist/core.js"
|
|
28
|
+
},
|
|
29
|
+
"./client": {
|
|
30
|
+
types: "./dist/client.d.ts",
|
|
31
|
+
import: "./dist/client.js"
|
|
32
|
+
},
|
|
33
|
+
"./core": {
|
|
34
|
+
types: "./dist/core.d.ts",
|
|
35
|
+
import: "./dist/core.js"
|
|
36
|
+
},
|
|
37
|
+
"./functions": {
|
|
38
|
+
types: "./dist/functions.d.ts",
|
|
39
|
+
import: "./dist/functions.js"
|
|
40
|
+
},
|
|
41
|
+
"./plugin": {
|
|
42
|
+
types: "./dist/plugin.d.ts",
|
|
43
|
+
import: "./dist/plugin.js"
|
|
44
|
+
},
|
|
45
|
+
"./project": {
|
|
46
|
+
types: "./dist/project.d.ts",
|
|
47
|
+
import: "./dist/project.js"
|
|
48
|
+
},
|
|
49
|
+
"./richtext": {
|
|
50
|
+
types: "./dist/richtext.d.ts",
|
|
51
|
+
import: "./dist/richtext.js"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
scripts: {
|
|
55
|
+
build: 'rm -rf dist && concurrently -n "core,signin,ui" npm:build:core npm:build:signin npm:build:ui',
|
|
56
|
+
"build:core": "tsup-node --config=./core/tsup.config.ts",
|
|
57
|
+
"//": "NOTE: esbuild is used here because tsup doesn't currently support aliases.",
|
|
58
|
+
"build:ui": "esbuild ui/ui.tsx --bundle --minify --alias:react=@preact/compat --alias:react-dom=@preact/compat --tsconfig=ui/tsconfig.json --outdir=dist/ui --legal-comments=external",
|
|
59
|
+
"build:signin": "esbuild signin/signin.tsx --bundle --minify --tsconfig=signin/tsconfig.json --outdir=dist/ui --legal-comments=external",
|
|
60
|
+
dev: 'rm -rf dist && concurrently -k -n "core,ui" npm:dev:core npm:dev:signin npm:dev:ui',
|
|
61
|
+
"dev:core": "pnpm build:core --watch",
|
|
62
|
+
"dev:signin": "pnpm build:signin --watch",
|
|
63
|
+
"dev:ui": "pnpm build:ui --watch",
|
|
64
|
+
test: "pnpm build && firebase emulators:exec 'vitest run --exclude=**/*.visual.test.tsx'",
|
|
65
|
+
"test:visual": "vitest run --config=vitest.config.visual.ts",
|
|
66
|
+
"test:watch": "pnpm build && firebase emulators:exec 'vitest'"
|
|
67
|
+
},
|
|
68
|
+
dependencies: {
|
|
69
|
+
"@ag-grid-community/client-side-row-model": "32.3.9",
|
|
70
|
+
"@ag-grid-community/core": "32.3.9",
|
|
71
|
+
"@ag-grid-community/react": "32.3.9",
|
|
72
|
+
"@ag-grid-community/styles": "32.3.9",
|
|
73
|
+
"@genkit-ai/ai": "1.26.0",
|
|
74
|
+
"@genkit-ai/core": "1.26.0",
|
|
75
|
+
"@genkit-ai/google-genai": "1.26.0",
|
|
76
|
+
"@google-cloud/firestore": "7.11.3",
|
|
77
|
+
"@hello-pangea/dnd": "18.0.1",
|
|
78
|
+
"@types/cli-progress": "3.11.6",
|
|
79
|
+
"body-parser": "1.20.2",
|
|
80
|
+
"cli-progress": "3.12.0",
|
|
81
|
+
commander: "11.0.0",
|
|
82
|
+
"csv-parse": "5.5.2",
|
|
83
|
+
"csv-stringify": "6.4.4",
|
|
84
|
+
"date-fns": "4.1.0",
|
|
85
|
+
"date-fns-tz": "3.2.0",
|
|
86
|
+
diff: "8.0.2",
|
|
87
|
+
"dts-dom": "3.7.0",
|
|
88
|
+
"fnv-plus": "1.3.1",
|
|
89
|
+
genkit: "1.26.0",
|
|
90
|
+
jsonwebtoken: "9.0.2",
|
|
91
|
+
kleur: "4.1.5",
|
|
92
|
+
"react-easy-crop": "5.5.6",
|
|
93
|
+
sirv: "2.0.3",
|
|
94
|
+
"tiny-glob": "0.2.9"
|
|
95
|
+
},
|
|
96
|
+
"//": "NOTE(stevenle): due to compat issues with mantine and preact, mantine is pinned to v4.2.12",
|
|
97
|
+
devDependencies: {
|
|
98
|
+
"@babel/core": "7.17.9",
|
|
99
|
+
"@blinkk/root": "workspace:*",
|
|
100
|
+
"@editorjs/editorjs": "2.30.8",
|
|
101
|
+
"@editorjs/header": "2.8.8",
|
|
102
|
+
"@editorjs/image": "2.10.2",
|
|
103
|
+
"@editorjs/list": "2.0.6",
|
|
104
|
+
"@editorjs/nested-list": "1.4.3",
|
|
105
|
+
"@editorjs/raw": "2.5.1",
|
|
106
|
+
"@editorjs/table": "2.4.4",
|
|
107
|
+
"@editorjs/underline": "1.2.1",
|
|
108
|
+
"@emotion/react": "11.10.5",
|
|
109
|
+
"@firebase/app-compat": "0.5.2",
|
|
110
|
+
"@firebase/app-types": "0.9.3",
|
|
111
|
+
"@firebase/rules-unit-testing": "5.0.0",
|
|
112
|
+
"@lexical/code": "0.33.1",
|
|
113
|
+
"@lexical/html": "0.33.1",
|
|
114
|
+
"@lexical/link": "0.33.1",
|
|
115
|
+
"@lexical/list": "0.33.1",
|
|
116
|
+
"@lexical/markdown": "0.33.1",
|
|
117
|
+
"@lexical/react": "0.33.1",
|
|
118
|
+
"@lexical/rich-text": "0.33.1",
|
|
119
|
+
"@lexical/selection": "0.33.1",
|
|
120
|
+
"@lexical/table": "0.33.1",
|
|
121
|
+
"@lexical/utils": "0.33.1",
|
|
122
|
+
"@mantine/core": "4.2.12",
|
|
123
|
+
"@mantine/hooks": "4.2.12",
|
|
124
|
+
"@mantine/modals": "4.2.12",
|
|
125
|
+
"@mantine/notifications": "4.2.12",
|
|
126
|
+
"@mantine/spotlight": "4.2.12",
|
|
127
|
+
"@preact/compat": "18.3.1",
|
|
128
|
+
"@tabler/icons-preact": "3.35.0",
|
|
129
|
+
"@testing-library/preact": "3.2.4",
|
|
130
|
+
"@testing-library/user-event": "14.6.1",
|
|
131
|
+
"@types/body-parser": "1.19.3",
|
|
132
|
+
"@types/fnv-plus": "1.3.2",
|
|
133
|
+
"@types/gapi": "0.0.47",
|
|
134
|
+
"@types/gapi.client.drive-v3": "0.0.4",
|
|
135
|
+
"@types/gapi.client.sheets-v4": "0.0.4",
|
|
136
|
+
"@types/google.accounts": "0.0.14",
|
|
137
|
+
"@types/jsonwebtoken": "9.0.1",
|
|
138
|
+
"@types/node": "24.3.1",
|
|
139
|
+
"@vitest/browser": "4.0.10",
|
|
140
|
+
"@vitest/browser-playwright": "4.0.10",
|
|
141
|
+
concurrently: "7.6.0",
|
|
142
|
+
esbuild: "0.25.9",
|
|
143
|
+
firebase: "12.2.1",
|
|
144
|
+
"firebase-admin": "13.5.0",
|
|
145
|
+
"firebase-functions": "6.4.0",
|
|
146
|
+
"firebase-tools": "14.15.2",
|
|
147
|
+
"highlight.js": "11.6.0",
|
|
148
|
+
jsdom: "27.2.0",
|
|
149
|
+
"json-diff-kit": "1.0.29",
|
|
150
|
+
lexical: "0.33.1",
|
|
151
|
+
marked: "9.1.1",
|
|
152
|
+
"mdast-util-from-markdown": "2.0.1",
|
|
153
|
+
"mdast-util-gfm": "3.0.0",
|
|
154
|
+
"micromark-extension-gfm": "3.0.0",
|
|
155
|
+
playwright: "1.56.1",
|
|
156
|
+
preact: "10.27.1",
|
|
157
|
+
"preact-render-to-string": "6.6.1",
|
|
158
|
+
"preact-router": "4.1.2",
|
|
159
|
+
react: "npm:@preact/compat@18.3.1",
|
|
160
|
+
"react-dom": "npm:@preact/compat@18.3.1",
|
|
161
|
+
"react-json-view-compare": "2.0.2",
|
|
162
|
+
tsup: "8.5.0",
|
|
163
|
+
typescript: "5.9.2",
|
|
164
|
+
vite: "7.1.4",
|
|
165
|
+
vitest: "4.0.10",
|
|
166
|
+
yjs: "13.6.27"
|
|
167
|
+
},
|
|
168
|
+
peerDependencies: {
|
|
169
|
+
"@blinkk/root": "2.5.1",
|
|
170
|
+
"firebase-admin": ">=11",
|
|
171
|
+
"firebase-functions": ">=4",
|
|
172
|
+
preact: ">=10",
|
|
173
|
+
"preact-render-to-string": ">=5"
|
|
174
|
+
},
|
|
175
|
+
peerDependenciesMeta: {
|
|
176
|
+
"firebase-functions": {
|
|
177
|
+
optional: true
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
// core/server-version.ts
|
|
183
|
+
var SERVER_STARTUP_TS = String(Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3));
|
|
184
|
+
function getServerVersion() {
|
|
185
|
+
if (process.env.NODE_ENV === "development") {
|
|
186
|
+
return SERVER_STARTUP_TS;
|
|
187
|
+
}
|
|
188
|
+
return package_default?.version || "root-3.0.0";
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export {
|
|
192
|
+
getServerVersion
|
|
193
|
+
};
|