@blinkk/root-cms 2.1.1 → 2.2.1-alpha.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.
package/dist/app.js CHANGED
@@ -1,13 +1,89 @@
1
1
  // core/app.tsx
2
- import crypto from "node:crypto";
3
- import path from "node:path";
4
- import { fileURLToPath } from "node:url";
2
+ import crypto from "crypto";
3
+ import path from "path";
5
4
  import { render as renderToString } from "preact-render-to-string";
6
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
+
7
83
  // package.json
8
84
  var package_default = {
9
85
  name: "@blinkk/root-cms",
10
- version: "2.1.1",
86
+ version: "3.0.0",
11
87
  author: "s@blinkk.com",
12
88
  license: "MIT",
13
89
  engines: {
@@ -61,8 +137,8 @@ var package_default = {
61
137
  build: 'rm -rf dist && concurrently -n "core,signin,ui" npm:build:core npm:build:signin npm:build:ui',
62
138
  "build:core": "tsup-node --config=./core/tsup.config.ts",
63
139
  "//": "NOTE: esbuild is used here because tsup doesn't currently support aliases.",
64
- "build:ui": "esbuild ui/ui.tsx --bundle --minify --alias:react=@preact/compat --alias:react-dom=@preact/compat --tsconfig=ui/tsconfig.json --outdir=dist/ui",
65
- "build:signin": "esbuild signin/signin.tsx --bundle --minify --tsconfig=signin/tsconfig.json --outdir=dist/ui",
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",
66
142
  dev: 'rm -rf dist && concurrently -k -n "core,ui" npm:dev:core npm:dev:signin npm:dev:ui',
67
143
  "dev:core": "pnpm build:core --watch",
68
144
  "dev:signin": "pnpm build:signin --watch",
@@ -71,9 +147,10 @@ var package_default = {
71
147
  "test:watch": "pnpm build && firebase emulators:exec 'vitest'"
72
148
  },
73
149
  dependencies: {
74
- "@genkit-ai/ai": "1.15.5",
75
- "@genkit-ai/core": "1.15.5",
76
- "@genkit-ai/vertexai": "1.15.5",
150
+ "@genkit-ai/ai": "1.18.0",
151
+ "@genkit-ai/core": "1.18.0",
152
+ "@genkit-ai/vertexai": "1.18.0",
153
+ "@google-cloud/firestore": "7.11.3",
77
154
  "@hello-pangea/dnd": "18.0.1",
78
155
  "body-parser": "1.20.2",
79
156
  commander: "11.0.0",
@@ -82,11 +159,12 @@ var package_default = {
82
159
  diff: "8.0.2",
83
160
  "dts-dom": "3.7.0",
84
161
  "fnv-plus": "1.3.1",
85
- genkit: "1.15.5",
162
+ genkit: "1.18.0",
86
163
  jsonwebtoken: "9.0.2",
87
164
  kleur: "4.1.5",
88
165
  sirv: "2.0.3",
89
- "tiny-glob": "0.2.9"
166
+ "tiny-glob": "0.2.9",
167
+ zod: "3.23.8"
90
168
  },
91
169
  "//": "NOTE(stevenle): due to compat issues with mantine and preact, mantine is pinned to v4.2.12",
92
170
  devDependencies: {
@@ -101,9 +179,9 @@ var package_default = {
101
179
  "@editorjs/table": "2.4.4",
102
180
  "@editorjs/underline": "1.2.1",
103
181
  "@emotion/react": "11.10.5",
104
- "@firebase/app-compat": "0.2.19",
105
- "@firebase/app-types": "0.9.0",
106
- "@firebase/rules-unit-testing": "3.0.1",
182
+ "@firebase/app-compat": "0.5.2",
183
+ "@firebase/app-types": "0.9.3",
184
+ "@firebase/rules-unit-testing": "5.0.0",
107
185
  "@lexical/code": "0.33.1",
108
186
  "@lexical/html": "0.33.1",
109
187
  "@lexical/link": "0.33.1",
@@ -127,13 +205,13 @@ var package_default = {
127
205
  "@types/gapi.client.sheets-v4": "0.0.4",
128
206
  "@types/google.accounts": "0.0.14",
129
207
  "@types/jsonwebtoken": "9.0.1",
130
- "@types/node": "18.11.8",
208
+ "@types/node": "24.3.1",
131
209
  concurrently: "7.6.0",
132
- esbuild: "0.19.9",
133
- firebase: "10.5.2",
134
- "firebase-admin": "11.11.1",
135
- "firebase-functions": "4.8.0",
136
- "firebase-tools": "12.9.1",
210
+ esbuild: "0.25.9",
211
+ firebase: "12.2.1",
212
+ "firebase-admin": "13.5.0",
213
+ "firebase-functions": "6.4.0",
214
+ "firebase-tools": "14.15.2",
137
215
  "highlight.js": "11.6.0",
138
216
  "json-diff-kit": "1.0.29",
139
217
  lexical: "0.33.1",
@@ -141,16 +219,16 @@ var package_default = {
141
219
  "mdast-util-from-markdown": "2.0.1",
142
220
  "mdast-util-gfm": "3.0.0",
143
221
  "micromark-extension-gfm": "3.0.0",
144
- preact: "10.19.3",
145
- "preact-render-to-string": "6.3.1",
222
+ preact: "10.27.1",
223
+ "preact-render-to-string": "6.6.1",
146
224
  "preact-router": "4.1.2",
147
225
  react: "npm:@preact/compat@^17.1.2",
148
226
  "react-dom": "npm:@preact/compat@^17.1.2",
149
227
  "react-json-view-compare": "2.0.2",
150
- tsup: "8.0.1",
151
- typescript: "5.2.2",
152
- vite: "5.0.8",
153
- vitest: "0.34.6",
228
+ tsup: "8.5.0",
229
+ typescript: "5.9.2",
230
+ vite: "7.1.4",
231
+ vitest: "3.2.4",
154
232
  yjs: "13.6.27"
155
233
  },
156
234
  peerDependencies: {
@@ -167,86 +245,17 @@ var package_default = {
167
245
  }
168
246
  };
169
247
 
170
- // core/project.ts
171
- var SCHEMA_MODULES = import.meta.glob(
172
- [
173
- "/**/*.schema.ts",
174
- "!/appengine/**/*.schema.ts",
175
- "!/functions/**/*.schema.ts",
176
- "!/gae/**/*.schema.ts"
177
- ],
178
- { eager: true }
179
- );
180
- async function getProjectSchemas() {
181
- const schemas = {};
182
- for (const fileId in SCHEMA_MODULES) {
183
- const schemaModule = SCHEMA_MODULES[fileId];
184
- if (schemaModule.default) {
185
- schemas[fileId] = schemaModule.default;
186
- }
248
+ // core/server-version.ts
249
+ var SERVER_STARTUP_TS = String(Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3));
250
+ function getServerVersion() {
251
+ if (process.env.NODE_ENV === "development") {
252
+ return SERVER_STARTUP_TS;
187
253
  }
188
- return schemas;
189
- }
190
- async function getCollectionSchema(collectionId) {
191
- if (!testValidCollectionId(collectionId)) {
192
- throw new Error(`invalid collection id: ${collectionId}`);
193
- }
194
- const fileId = `/collections/${collectionId}.schema.ts`;
195
- const module = SCHEMA_MODULES[fileId];
196
- if (!module.default) {
197
- console.warn(`collection schema not exported in: ${fileId}`);
198
- return null;
199
- }
200
- const collection = module.default;
201
- collection.id = collectionId;
202
- return convertOneOfTypes(collection);
203
- }
204
- function testValidCollectionId(id) {
205
- return /^[A-Za-z0-9_-]+$/.test(id);
206
- }
207
- function convertOneOfTypes(collection) {
208
- const clone = structuredClone(collection);
209
- const types = clone.types || {};
210
- function handleOneOfField(field) {
211
- const names = [];
212
- (field.types || []).forEach((sub) => {
213
- if (typeof sub === "string") {
214
- names.push(sub);
215
- return;
216
- }
217
- if (sub.name) {
218
- names.push(sub.name);
219
- if (!types[sub.name]) {
220
- types[sub.name] = sub;
221
- if (sub.fields) {
222
- walk(sub);
223
- }
224
- }
225
- }
226
- });
227
- field.types = names;
228
- }
229
- function handleField(field) {
230
- if (field.type === "oneof") {
231
- handleOneOfField(field);
232
- } else if (field.type === "object") {
233
- walk(field);
234
- } else if (field.type === "array" && field.of) {
235
- handleField(field.of);
236
- }
237
- }
238
- function walk(schema) {
239
- const fields = schema?.fields || [];
240
- fields.forEach(handleField);
241
- }
242
- walk(clone);
243
- clone.types = types;
244
- return clone;
254
+ return package_default?.version || "root-3.0.0";
245
255
  }
246
256
 
247
257
  // core/app.tsx
248
258
  import { jsx, jsxs } from "preact/jsx-runtime";
249
- var __dirname = path.dirname(fileURLToPath(import.meta.url));
250
259
  var DEFAULT_FAVICON_URL = "https://lh3.googleusercontent.com/ijK50TfQlV_yJw3i-CMlnD6osH4PboZBILZrJcWhoNMEmoyCD5e1bAxXbaOPe5w4gG_Scf37EXrmZ6p8sP2lue5fLZ419m5JyLMs=e385-w256";
251
260
  function App(props) {
252
261
  return /* @__PURE__ */ jsxs("html", { children: [
@@ -354,21 +363,9 @@ async function renderApp(req, res, options) {
354
363
  const mainHtml = renderToString(
355
364
  /* @__PURE__ */ jsx(App, { title, ctx, favicon: cmsConfig.favicon })
356
365
  );
357
- let html = `<!doctype html>
358
- ${mainHtml}`;
359
366
  const nonce = generateNonce();
360
- if (req.viteServer) {
361
- const uiCssPath = path.join(__dirname, "ui/ui.css");
362
- const uiJsPath = path.join(__dirname, "ui/ui.js");
363
- const tpl = html.replace("{CSS_URL}", cachebust(req, `/@fs${uiCssPath}`)).replace("{JS_URL}", cachebust(req, `/@fs${uiJsPath}`)).replaceAll("{NONCE}", nonce);
364
- html = await req.viteServer.transformIndexHtml(req.originalUrl, tpl);
365
- html = html.replace(
366
- '<script type="module" src="/@vite/client"></script>',
367
- `<script type="module" src="/@vite/client" nonce="${nonce}"></script>`
368
- );
369
- } else {
370
- html = html.replace("{CSS_URL}", cachebust(req, "/cms/static/ui.css")).replace("{JS_URL}", cachebust(req, "/cms/static/ui.js")).replaceAll("{NONCE}", nonce);
371
- }
367
+ const html = `<!doctype html>
368
+ ${mainHtml}`.replace("{CSS_URL}", cachebust(req, "/cms/static/ui.css")).replace("{JS_URL}", cachebust(req, "/cms/static/ui.js")).replaceAll("{NONCE}", nonce);
372
369
  res.setHeader("Content-Type", "text/html");
373
370
  setSecurityHeaders(options, req, res, nonce);
374
371
  res.send(html);
@@ -448,21 +445,9 @@ async function renderSignIn(req, res, options) {
448
445
  const mainHtml = renderToString(
449
446
  /* @__PURE__ */ jsx(SignIn, { title: "Sign in", ctx, favicon: options.cmsConfig.favicon })
450
447
  );
451
- let html = `<!doctype html>
452
- ${mainHtml}`;
453
448
  const nonce = generateNonce();
454
- if (req.viteServer) {
455
- const cssPath = path.join(__dirname, "ui/signin.css");
456
- const jsPath = path.join(__dirname, "ui/signin.js");
457
- const tpl = html.replace("{CSS_URL}", cachebust(req, `/@fs${cssPath}`)).replace("{JS_URL}", cachebust(req, `/@fs${jsPath}`)).replaceAll("{NONCE}", nonce);
458
- html = await req.viteServer.transformIndexHtml(req.originalUrl, tpl);
459
- html = html.replace(
460
- '<script type="module" src="/@vite/client"></script>',
461
- `<script type="module" src="/@vite/client" nonce="${nonce}"></script>`
462
- );
463
- } else {
464
- html = html.replace("{CSS_URL}", cachebust(req, "/cms/static/signin.css")).replace("{JS_URL}", cachebust(req, "/cms/static/signin.js")).replaceAll("{NONCE}", nonce);
465
- }
449
+ const html = `<!doctype html>
450
+ ${mainHtml}`.replace("{CSS_URL}", cachebust(req, "/cms/static/signin.css")).replace("{JS_URL}", cachebust(req, "/cms/static/signin.js")).replaceAll("{NONCE}", nonce);
466
451
  res.setHeader("Content-Type", "text/html");
467
452
  setSecurityHeaders(options, req, res, nonce);
468
453
  res.status(403);
@@ -521,8 +506,12 @@ function getRefererOrigin(req) {
521
506
  return refererOrigin;
522
507
  }
523
508
  function cachebust(req, url) {
524
- const value = req.hostname === "localhost" ? Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3) : package_default.version;
525
- return `${url}?c=${value}`;
509
+ const cb = getServerVersion();
510
+ const host = req.get("host");
511
+ if (host?.includes("localhost")) {
512
+ return `http://${host}${url}?c=${cb}`;
513
+ }
514
+ return `${url}?c=${cb}`;
526
515
  }
527
516
  export {
528
517
  getCollection,
package/dist/cli.js CHANGED
@@ -3,9 +3,9 @@ import { Command } from "commander";
3
3
  import { bgGreen, black } from "kleur/colors";
4
4
 
5
5
  // cli/generate-types.ts
6
- import { promises as fs } from "node:fs";
7
- import path from "node:path";
8
- import { fileURLToPath } from "node:url";
6
+ import { promises as fs } from "fs";
7
+ import path from "path";
8
+ import { fileURLToPath } from "url";
9
9
  import { loadRootConfig, viteSsrLoadModule } from "@blinkk/root/node";
10
10
  import * as dom from "dts-dom";
11
11
  var __dirname = path.dirname(fileURLToPath(import.meta.url));
@@ -304,7 +304,7 @@ function alphanumeric(input) {
304
304
  import { loadRootConfig as loadRootConfig2 } from "@blinkk/root/node";
305
305
 
306
306
  // core/client.ts
307
- import crypto from "node:crypto";
307
+ import crypto from "crypto";
308
308
  import {
309
309
  FieldValue as FieldValue2,
310
310
  Timestamp as Timestamp2
@@ -1,4 +1,4 @@
1
- import { Request, Plugin, RootConfig } from '@blinkk/root';
1
+ import { Plugin, Request, RootConfig } from '@blinkk/root';
2
2
  import { App } from 'firebase-admin/app';
3
3
  import { Firestore, WriteBatch, Timestamp, Query } from 'firebase-admin/firestore';
4
4
 
@@ -522,7 +522,7 @@ declare class RootCMSClient {
522
522
  */
523
523
  dbDocRef(collectionId: string, slug: string, options: {
524
524
  mode: 'draft' | 'published';
525
- }): FirebaseFirestore.DocumentReference<FirebaseFirestore.DocumentData>;
525
+ }): FirebaseFirestore.DocumentReference<FirebaseFirestore.DocumentData, FirebaseFirestore.DocumentData>;
526
526
  /**
527
527
  * Saves draft data to a doc.
528
528
  *
@@ -638,7 +638,7 @@ declare class RootCMSClient {
638
638
  */
639
639
  dbTranslationsRef(translationsId: string, options: {
640
640
  mode: 'draft' | 'published';
641
- }): FirebaseFirestore.DocumentReference<FirebaseFirestore.DocumentData>;
641
+ }): FirebaseFirestore.DocumentReference<FirebaseFirestore.DocumentData, FirebaseFirestore.DocumentData>;
642
642
  /**
643
643
  * Returns a data source configuration object.
644
644
  */
@@ -676,7 +676,7 @@ declare class RootCMSClient {
676
676
  */
677
677
  dbDataSourceDataRef(dataSourceId: string, options: {
678
678
  mode: 'draft' | 'published';
679
- }): FirebaseFirestore.DocumentReference<FirebaseFirestore.DocumentData>;
679
+ }): FirebaseFirestore.DocumentReference<FirebaseFirestore.DocumentData, FirebaseFirestore.DocumentData>;
680
680
  /**
681
681
  * Gets the user's role from the project's ACL.
682
682
  */
package/dist/client.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import '@blinkk/root';
2
2
  import 'firebase-admin/app';
3
3
  import 'firebase-admin/firestore';
4
- export { A as Action, p as ArrayObject, z as BatchRequest, B as BatchRequestOptions, w as BatchRequestQuery, x as BatchRequestQueryOptions, C as BatchResponse, c as DataSource, d as DataSourceData, e as DataSourceMode, D as Doc, b as DocMode, h as GetCountOptions, G as GetDocOptions, H as HttpMethod, j as ListActionsOptions, g as ListDocsOptions, L as LoadTranslationsOptions, a as LocaleTranslations, R as Release, k as RootCMSClient, f as SaveDraftOptions, S as SetDocOptions, i as Translation, y as TranslationsDoc, T as TranslationsMap, U as UserRole, m as getCmsPlugin, l as isRichTextData, q as marshalArray, n as marshalData, o as normalizeData, v as parseDocId, t as toArrayObject, s as translationsForLocale, r as unmarshalArray, u as unmarshalData } from './client-Vr32ZRmC.js';
4
+ export { A as Action, p as ArrayObject, z as BatchRequest, B as BatchRequestOptions, w as BatchRequestQuery, x as BatchRequestQueryOptions, C as BatchResponse, c as DataSource, d as DataSourceData, e as DataSourceMode, D as Doc, b as DocMode, h as GetCountOptions, G as GetDocOptions, H as HttpMethod, j as ListActionsOptions, g as ListDocsOptions, L as LoadTranslationsOptions, a as LocaleTranslations, R as Release, k as RootCMSClient, f as SaveDraftOptions, S as SetDocOptions, i as Translation, y as TranslationsDoc, T as TranslationsMap, U as UserRole, m as getCmsPlugin, l as isRichTextData, q as marshalArray, n as marshalData, o as normalizeData, v as parseDocId, t as toArrayObject, s as translationsForLocale, r as unmarshalArray, u as unmarshalData } from './client-BKO9Ikqy.js';
package/dist/client.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // core/client.ts
2
- import crypto from "node:crypto";
2
+ import crypto from "crypto";
3
3
  import {
4
4
  FieldValue as FieldValue2,
5
5
  Timestamp as Timestamp2
package/dist/core.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { L as LoadTranslationsOptions, T as TranslationsMap, a as LocaleTranslations } from './client-Vr32ZRmC.js';
2
- export { A as Action, p as ArrayObject, z as BatchRequest, B as BatchRequestOptions, w as BatchRequestQuery, x as BatchRequestQueryOptions, C as BatchResponse, c as DataSource, d as DataSourceData, e as DataSourceMode, D as Doc, b as DocMode, h as GetCountOptions, G as GetDocOptions, H as HttpMethod, j as ListActionsOptions, g as ListDocsOptions, E as Locale, N as MultiLocaleTranslationsMap, R as Release, k as RootCMSClient, f as SaveDraftOptions, S as SetDocOptions, O as SingleLocaleTranslationsMap, F as SourceString, I as TranslatedString, i as Translation, y as TranslationsDoc, J as TranslationsDocMode, M as TranslationsLocaleDocEntry, K as TranslationsLocaleDocHashMap, P as TranslationsManager, U as UserRole, Q as buildTranslationsDbPath, V as buildTranslationsLocaleDocDbPath, m as getCmsPlugin, l as isRichTextData, q as marshalArray, n as marshalData, o as normalizeData, v as parseDocId, t as toArrayObject, s as translationsForLocale, r as unmarshalArray, u as unmarshalData } from './client-Vr32ZRmC.js';
1
+ import { L as LoadTranslationsOptions, T as TranslationsMap, a as LocaleTranslations } from './client-BKO9Ikqy.js';
2
+ export { A as Action, p as ArrayObject, z as BatchRequest, B as BatchRequestOptions, w as BatchRequestQuery, x as BatchRequestQueryOptions, C as BatchResponse, c as DataSource, d as DataSourceData, e as DataSourceMode, D as Doc, b as DocMode, h as GetCountOptions, G as GetDocOptions, H as HttpMethod, j as ListActionsOptions, g as ListDocsOptions, E as Locale, N as MultiLocaleTranslationsMap, R as Release, k as RootCMSClient, f as SaveDraftOptions, S as SetDocOptions, O as SingleLocaleTranslationsMap, F as SourceString, I as TranslatedString, i as Translation, y as TranslationsDoc, J as TranslationsDocMode, M as TranslationsLocaleDocEntry, K as TranslationsLocaleDocHashMap, P as TranslationsManager, U as UserRole, Q as buildTranslationsDbPath, V as buildTranslationsLocaleDocDbPath, m as getCmsPlugin, l as isRichTextData, q as marshalArray, n as marshalData, o as normalizeData, v as parseDocId, t as toArrayObject, s as translationsForLocale, r as unmarshalArray, u as unmarshalData } from './client-BKO9Ikqy.js';
3
3
  import { RootConfig } from '@blinkk/root';
4
4
  import { Query } from 'firebase-admin/firestore';
5
- export { s as schema } from './schema-UCmjggdA.js';
5
+ export { s as schema } from './schema-FB6Ck9sN.js';
6
6
  import 'firebase-admin/app';
7
7
 
8
8
  /** @deprecated Use client.ts instead. */
package/dist/core.js CHANGED
@@ -5,7 +5,7 @@ var __export = (target, all) => {
5
5
  };
6
6
 
7
7
  // core/client.ts
8
- import crypto from "node:crypto";
8
+ import crypto from "crypto";
9
9
  import {
10
10
  FieldValue as FieldValue2,
11
11
  Timestamp as Timestamp2
@@ -1,4 +1,4 @@
1
- import * as firebase_functions_v2_scheduler from 'firebase-functions/v2/scheduler';
1
+ import * as firebase_functions_scheduler from 'firebase-functions/scheduler';
2
2
  import { ScheduleOptions } from 'firebase-functions/v2/scheduler';
3
3
 
4
4
  interface CronOptions {
@@ -8,6 +8,6 @@ interface CronOptions {
8
8
  /**
9
9
  * Runs offline CMS tasks, such as publishing of scheduled docs.
10
10
  */
11
- declare function cron(options?: CronOptions): firebase_functions_v2_scheduler.ScheduleFunction;
11
+ declare function cron(options?: CronOptions): firebase_functions_scheduler.ScheduleFunction;
12
12
 
13
13
  export { type CronOptions, cron };
package/dist/functions.js CHANGED
@@ -1,10 +1,10 @@
1
1
  // core/functions.ts
2
- import path2 from "node:path";
2
+ import path2 from "path";
3
3
  import { loadBundledConfig } from "@blinkk/root/node";
4
4
  import { onSchedule } from "firebase-functions/v2/scheduler";
5
5
 
6
6
  // core/client.ts
7
- import crypto from "node:crypto";
7
+ import crypto from "crypto";
8
8
  import {
9
9
  FieldValue as FieldValue2,
10
10
  Timestamp as Timestamp2
@@ -1501,7 +1501,7 @@ var BatchResponse = class {
1501
1501
  };
1502
1502
 
1503
1503
  // core/versions.ts
1504
- import path from "node:path";
1504
+ import path from "path";
1505
1505
  import { Timestamp as Timestamp3 } from "firebase-admin/firestore";
1506
1506
  import glob from "tiny-glob";
1507
1507
  var DOCUMENT_SAVE_OFFSET = 5 * 60 * 1e3;
package/dist/plugin.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import '@blinkk/root';
2
2
  import 'firebase-admin/app';
3
3
  import 'firebase-admin/firestore';
4
- export { X as CMSAIConfig, _ as CMSPlugin, Z as CMSPluginOptions, Y as CMSSidebarTool, W as CMSUser, $ as cmsPlugin } from './client-Vr32ZRmC.js';
4
+ export { X as CMSAIConfig, _ as CMSPlugin, Z as CMSPluginOptions, Y as CMSSidebarTool, W as CMSUser, $ as cmsPlugin } from './client-BKO9Ikqy.js';