@blinkk/root-cms 2.0.10 → 2.1.2-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,13 @@
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";
4
+ import { fileURLToPath } from "url";
5
5
  import { render as renderToString } from "preact-render-to-string";
6
6
 
7
7
  // package.json
8
8
  var package_default = {
9
9
  name: "@blinkk/root-cms",
10
- version: "2.0.10",
10
+ version: "2.1.2-alpha.0",
11
11
  author: "s@blinkk.com",
12
12
  license: "MIT",
13
13
  engines: {
@@ -71,9 +71,10 @@ var package_default = {
71
71
  "test:watch": "pnpm build && firebase emulators:exec 'vitest'"
72
72
  },
73
73
  dependencies: {
74
- "@genkit-ai/ai": "1.15.5",
75
- "@genkit-ai/core": "1.15.5",
76
- "@genkit-ai/vertexai": "1.15.5",
74
+ "@genkit-ai/ai": "1.18.0",
75
+ "@genkit-ai/core": "1.18.0",
76
+ "@genkit-ai/vertexai": "1.18.0",
77
+ "@google-cloud/firestore": "7.11.3",
77
78
  "@hello-pangea/dnd": "18.0.1",
78
79
  "body-parser": "1.20.2",
79
80
  commander: "11.0.0",
@@ -82,11 +83,12 @@ var package_default = {
82
83
  diff: "8.0.2",
83
84
  "dts-dom": "3.7.0",
84
85
  "fnv-plus": "1.3.1",
85
- genkit: "1.15.5",
86
+ genkit: "1.18.0",
86
87
  jsonwebtoken: "9.0.2",
87
88
  kleur: "4.1.5",
88
89
  sirv: "2.0.3",
89
- "tiny-glob": "0.2.9"
90
+ "tiny-glob": "0.2.9",
91
+ zod: "3.23.8"
90
92
  },
91
93
  "//": "NOTE(stevenle): due to compat issues with mantine and preact, mantine is pinned to v4.2.12",
92
94
  devDependencies: {
@@ -101,9 +103,9 @@ var package_default = {
101
103
  "@editorjs/table": "2.4.4",
102
104
  "@editorjs/underline": "1.2.1",
103
105
  "@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",
106
+ "@firebase/app-compat": "0.5.2",
107
+ "@firebase/app-types": "0.9.3",
108
+ "@firebase/rules-unit-testing": "5.0.0",
107
109
  "@lexical/code": "0.33.1",
108
110
  "@lexical/html": "0.33.1",
109
111
  "@lexical/link": "0.33.1",
@@ -127,13 +129,13 @@ var package_default = {
127
129
  "@types/gapi.client.sheets-v4": "0.0.4",
128
130
  "@types/google.accounts": "0.0.14",
129
131
  "@types/jsonwebtoken": "9.0.1",
130
- "@types/node": "18.11.8",
132
+ "@types/node": "24.3.1",
131
133
  concurrently: "7.6.0",
132
134
  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",
135
+ firebase: "12.2.1",
136
+ "firebase-admin": "13.5.0",
137
+ "firebase-functions": "6.4.0",
138
+ "firebase-tools": "14.15.2",
137
139
  "highlight.js": "11.6.0",
138
140
  "json-diff-kit": "1.0.29",
139
141
  lexical: "0.33.1",
@@ -141,20 +143,20 @@ var package_default = {
141
143
  "mdast-util-from-markdown": "2.0.1",
142
144
  "mdast-util-gfm": "3.0.0",
143
145
  "micromark-extension-gfm": "3.0.0",
144
- preact: "10.19.3",
145
- "preact-render-to-string": "6.3.1",
146
+ preact: "10.27.1",
147
+ "preact-render-to-string": "6.6.1",
146
148
  "preact-router": "4.1.2",
147
149
  react: "npm:@preact/compat@^17.1.2",
148
150
  "react-dom": "npm:@preact/compat@^17.1.2",
149
151
  "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",
152
+ tsup: "8.5.0",
153
+ typescript: "5.9.2",
154
+ vite: "7.1.4",
155
+ vitest: "3.2.4",
154
156
  yjs: "13.6.27"
155
157
  },
156
158
  peerDependencies: {
157
- "@blinkk/root": "2.0.10",
159
+ "@blinkk/root": "2.1.2-alpha.0",
158
160
  "firebase-admin": ">=11",
159
161
  "firebase-functions": ">=4",
160
162
  preact: ">=10",
@@ -168,16 +170,18 @@ var package_default = {
168
170
  };
169
171
 
170
172
  // core/project.ts
171
- var IGNORED_SCHEMA_FOLDERS = ["/appengine/", "/functions/", "/gae/"];
172
- var SCHEMA_MODULES = import.meta.glob("/**/*.schema.ts", {
173
- eager: true
174
- });
175
- function getProjectSchemas() {
173
+ var SCHEMA_MODULES = import.meta.glob(
174
+ [
175
+ "/**/*.schema.ts",
176
+ "!/appengine/**/*.schema.ts",
177
+ "!/functions/**/*.schema.ts",
178
+ "!/gae/**/*.schema.ts"
179
+ ],
180
+ { eager: true }
181
+ );
182
+ async function getProjectSchemas() {
176
183
  const schemas = {};
177
184
  for (const fileId in SCHEMA_MODULES) {
178
- if (IGNORED_SCHEMA_FOLDERS.some((prefix) => fileId.startsWith(prefix))) {
179
- continue;
180
- }
181
185
  const schemaModule = SCHEMA_MODULES[fileId];
182
186
  if (schemaModule.default) {
183
187
  schemas[fileId] = schemaModule.default;
@@ -185,6 +189,62 @@ function getProjectSchemas() {
185
189
  }
186
190
  return schemas;
187
191
  }
192
+ async function getCollectionSchema(collectionId) {
193
+ if (!testValidCollectionId(collectionId)) {
194
+ throw new Error(`invalid collection id: ${collectionId}`);
195
+ }
196
+ const fileId = `/collections/${collectionId}.schema.ts`;
197
+ const module = SCHEMA_MODULES[fileId];
198
+ if (!module.default) {
199
+ console.warn(`collection schema not exported in: ${fileId}`);
200
+ return null;
201
+ }
202
+ const collection = module.default;
203
+ collection.id = collectionId;
204
+ return convertOneOfTypes(collection);
205
+ }
206
+ function testValidCollectionId(id) {
207
+ return /^[A-Za-z0-9_-]+$/.test(id);
208
+ }
209
+ function convertOneOfTypes(collection) {
210
+ const clone = structuredClone(collection);
211
+ const types = clone.types || {};
212
+ function handleOneOfField(field) {
213
+ const names = [];
214
+ (field.types || []).forEach((sub) => {
215
+ if (typeof sub === "string") {
216
+ names.push(sub);
217
+ return;
218
+ }
219
+ if (sub.name) {
220
+ names.push(sub.name);
221
+ if (!types[sub.name]) {
222
+ types[sub.name] = sub;
223
+ if (sub.fields) {
224
+ walk(sub);
225
+ }
226
+ }
227
+ }
228
+ });
229
+ field.types = names;
230
+ }
231
+ function handleField(field) {
232
+ if (field.type === "oneof") {
233
+ handleOneOfField(field);
234
+ } else if (field.type === "object") {
235
+ walk(field);
236
+ } else if (field.type === "array" && field.of) {
237
+ handleField(field.of);
238
+ }
239
+ }
240
+ function walk(schema) {
241
+ const fields = schema?.fields || [];
242
+ fields.forEach(handleField);
243
+ }
244
+ walk(clone);
245
+ clone.types = types;
246
+ return clone;
247
+ }
188
248
 
189
249
  // core/app.tsx
190
250
  import { jsx, jsxs } from "preact/jsx-runtime";
@@ -259,9 +319,11 @@ function App(props) {
259
319
  }
260
320
  async function renderApp(req, res, options) {
261
321
  const collections = {};
262
- Object.entries(getCollections()).forEach(([collectionId, collection]) => {
263
- collections[collectionId] = serializeCollection(collection);
264
- });
322
+ Object.entries(await getCollections()).forEach(
323
+ ([collectionId, collection]) => {
324
+ collections[collectionId] = serializeCollection(collection);
325
+ }
326
+ );
265
327
  const rootConfig = options.rootConfig || {};
266
328
  const cmsConfig = options.cmsConfig || {};
267
329
  let gci = cmsConfig.gci;
@@ -324,7 +386,8 @@ function serializeCollection(collection) {
324
386
  preview: collection.preview,
325
387
  slugRegex: collection.slugRegex,
326
388
  autolock: collection.autolock,
327
- autolockReason: collection.autolockReason
389
+ autolockReason: collection.autolockReason,
390
+ sortOptions: collection.sortOptions
328
391
  };
329
392
  }
330
393
  function SignIn(props) {
@@ -407,18 +470,21 @@ ${mainHtml}`;
407
470
  res.status(403);
408
471
  res.send(html);
409
472
  }
410
- function getCollections() {
473
+ async function getCollections() {
411
474
  const collections = {};
412
- const schemas = getProjectSchemas();
475
+ const schemas = await getProjectSchemas();
413
476
  Object.entries(schemas).forEach(([fileId, schema]) => {
414
477
  if (fileId.startsWith("/collections/")) {
415
- const collectionId = parseCollectionId(fileId);
416
- collections[collectionId] = { ...schema, id: collectionId };
478
+ const collectionId = toCollectionId(fileId);
479
+ collections[collectionId] = { id: collectionId, ...schema };
417
480
  }
418
481
  });
419
482
  return collections;
420
483
  }
421
- function parseCollectionId(fileId) {
484
+ async function getCollection(collectionId) {
485
+ return getCollectionSchema(collectionId);
486
+ }
487
+ function toCollectionId(fileId) {
422
488
  return path.basename(fileId).split(".")[0];
423
489
  }
424
490
  function generateNonce() {
@@ -461,6 +527,7 @@ function cachebust(req, url) {
461
527
  return `${url}?c=${value}`;
462
528
  }
463
529
  export {
530
+ getCollection,
464
531
  getCollections,
465
532
  renderApp,
466
533
  renderSignIn
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));
@@ -17,7 +17,7 @@ async function generateTypes() {
17
17
  rootConfig,
18
18
  modulePath
19
19
  );
20
- const schemas = project.getProjectSchemas();
20
+ const schemas = await project.getProjectSchemas();
21
21
  const outputPath = path.resolve(rootDir, "root-cms.d.ts");
22
22
  await generateSchemaDts(outputPath, schemas);
23
23
  console.log("saved root-cms.d.ts!");
@@ -231,12 +231,19 @@ function fieldType(field, options) {
231
231
  if (field.types && Array.isArray(field.types)) {
232
232
  const unionTypes = [];
233
233
  field.types.forEach((schema) => {
234
- if (!schema.name) {
234
+ let typeName;
235
+ if (typeof schema === "string") {
236
+ typeName = schema;
235
237
  return;
238
+ } else {
239
+ typeName = schema.name;
236
240
  }
237
- const cleanName = alphanumeric(schema.name);
241
+ if (!typeName) {
242
+ return;
243
+ }
244
+ const cleanName = alphanumeric(typeName);
238
245
  const oneOfTypeId = `${cleanName}Fields`;
239
- if (!options.oneOfTypes[oneOfTypeId]) {
246
+ if (typeof schema === "object" && !options.oneOfTypes[oneOfTypeId]) {
240
247
  const oneOfTypeInterface = dom.create.interface(
241
248
  oneOfTypeId,
242
249
  dom.DeclarationFlags.Export
@@ -252,7 +259,7 @@ function fieldType(field, options) {
252
259
  }
253
260
  const oneOfOption = dom.create.namedTypeReference("RootCMSOneOfOption");
254
261
  oneOfOption.typeArguments = [
255
- dom.type.stringLiteral(schema.name),
262
+ dom.type.stringLiteral(typeName),
256
263
  dom.create.namedTypeReference(oneOfTypeId)
257
264
  ];
258
265
  unionTypes.push(oneOfOption);
@@ -267,6 +274,10 @@ function fieldType(field, options) {
267
274
  const referenceType = dom.create.namedTypeReference("RootCMSReference");
268
275
  return referenceType;
269
276
  }
277
+ if (field.type === "references") {
278
+ const referenceType = dom.create.namedTypeReference("RootCMSReference");
279
+ return dom.type.array(referenceType);
280
+ }
270
281
  if (field.type === "richtext") {
271
282
  const richtextType = dom.create.namedTypeReference("RootCMSRichText");
272
283
  return richtextType;
@@ -293,7 +304,7 @@ function alphanumeric(input) {
293
304
  import { loadRootConfig as loadRootConfig2 } from "@blinkk/root/node";
294
305
 
295
306
  // core/client.ts
296
- import crypto from "node:crypto";
307
+ import crypto from "crypto";
297
308
  import {
298
309
  FieldValue as FieldValue2,
299
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,10 +1,9 @@
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-KpQGOA1Z.js';
5
+ export { s as schema } from './schema-FB6Ck9sN.js';
6
6
  import 'firebase-admin/app';
7
- import 'preact';
8
7
 
9
8
  /** @deprecated Use client.ts instead. */
10
9
 
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
@@ -1700,51 +1700,55 @@ __export(schema_exports, {
1700
1700
  object: () => object,
1701
1701
  oneOf: () => oneOf,
1702
1702
  reference: () => reference,
1703
+ references: () => references,
1703
1704
  richtext: () => richtext,
1704
1705
  select: () => select,
1705
1706
  string: () => string
1706
1707
  });
1707
1708
  function string(field) {
1708
- return { ...field, type: "string" };
1709
+ return { type: "string", ...field };
1709
1710
  }
1710
1711
  function number(field) {
1711
- return { ...field, type: "number" };
1712
+ return { type: "number", ...field };
1712
1713
  }
1713
1714
  function date(field) {
1714
- return { ...field, type: "date" };
1715
+ return { type: "date", ...field };
1715
1716
  }
1716
1717
  function datetime(field) {
1717
- return { ...field, type: "datetime" };
1718
+ return { type: "datetime", ...field };
1718
1719
  }
1719
1720
  function boolean(field) {
1720
- return { ...field, type: "boolean" };
1721
+ return { type: "boolean", ...field };
1721
1722
  }
1722
1723
  function select(field) {
1723
- return { ...field, type: "select" };
1724
+ return { type: "select", ...field };
1724
1725
  }
1725
1726
  function multiselect(field) {
1726
- return { ...field, type: "multiselect" };
1727
+ return { type: "multiselect", ...field };
1727
1728
  }
1728
1729
  function image(field) {
1729
- return { ...field, type: "image" };
1730
+ return { type: "image", ...field };
1730
1731
  }
1731
1732
  function file(field) {
1732
- return { ...field, type: "file" };
1733
+ return { type: "file", ...field };
1733
1734
  }
1734
1735
  function object(field) {
1735
- return { ...field, type: "object" };
1736
+ return { type: "object", ...field };
1736
1737
  }
1737
1738
  function array(field) {
1738
- return { ...field, type: "array" };
1739
+ return { type: "array", ...field };
1739
1740
  }
1740
1741
  function oneOf(field) {
1741
- return { ...field, type: "oneof" };
1742
+ return { type: "oneof", ...field };
1742
1743
  }
1743
1744
  function richtext(field) {
1744
- return { ...field, type: "richtext" };
1745
+ return { type: "richtext", ...field };
1745
1746
  }
1746
1747
  function reference(field) {
1747
- return { ...field, type: "reference" };
1748
+ return { type: "reference", ...field };
1749
+ }
1750
+ function references(field) {
1751
+ return { ...field, type: "references" };
1748
1752
  }
1749
1753
  function defineSchema(schema) {
1750
1754
  return schema;
@@ -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';