@blinkk/root-cms 2.1.1 → 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.1.1",
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.1.1",
159
+ "@blinkk/root": "2.1.2-alpha.0",
158
160
  "firebase-admin": ">=11",
159
161
  "firebase-functions": ">=4",
160
162
  preact: ">=10",
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';
package/dist/plugin.js CHANGED
@@ -51,9 +51,9 @@ __export(generate_types_exports, {
51
51
  generateSchemaDts: () => generateSchemaDts,
52
52
  generateTypes: () => generateTypes
53
53
  });
54
- import { promises as fs3 } from "node:fs";
55
- import path4 from "node:path";
56
- import { fileURLToPath } from "node:url";
54
+ import { promises as fs3 } from "fs";
55
+ import path4 from "path";
56
+ import { fileURLToPath } from "url";
57
57
  import { loadRootConfig, viteSsrLoadModule } from "@blinkk/root/node";
58
58
  import * as dom from "dts-dom";
59
59
  async function generateTypes() {
@@ -355,9 +355,9 @@ export interface RootCMSDoc<Fields extends {}> {
355
355
  });
356
356
 
357
357
  // core/plugin.ts
358
- import { promises as fs4 } from "node:fs";
359
- import path5 from "node:path";
360
- import { fileURLToPath as fileURLToPath2 } from "node:url";
358
+ import { promises as fs4 } from "fs";
359
+ import path5 from "path";
360
+ import { fileURLToPath as fileURLToPath2 } from "url";
361
361
  import { viteSsrLoadModule as viteSsrLoadModule2 } from "@blinkk/root/node";
362
362
  import bodyParser from "body-parser";
363
363
  import {
@@ -371,14 +371,14 @@ import * as jsonwebtoken from "jsonwebtoken";
371
371
  import sirv from "sirv";
372
372
 
373
373
  // core/api.ts
374
- import { promises as fs2 } from "node:fs";
375
- import path3 from "node:path";
374
+ import { promises as fs2 } from "fs";
375
+ import path3 from "path";
376
376
  import { multipartMiddleware } from "@blinkk/root/middleware";
377
377
 
378
378
  // core/ai.ts
379
- import crypto from "node:crypto";
380
- import fs from "node:fs";
381
- import path from "node:path";
379
+ import crypto from "crypto";
380
+ import fs from "fs";
381
+ import path from "path";
382
382
  import { vertexAI } from "@genkit-ai/vertexai";
383
383
  import { Timestamp } from "firebase-admin/firestore";
384
384
  import { genkit } from "genkit";
@@ -562,7 +562,7 @@ var ChatClient = class {
562
562
  };
563
563
 
564
564
  // core/client.ts
565
- import crypto2 from "node:crypto";
565
+ import crypto2 from "crypto";
566
566
  import {
567
567
  FieldValue as FieldValue2,
568
568
  Timestamp as Timestamp3
@@ -2059,7 +2059,7 @@ var BatchResponse = class {
2059
2059
  };
2060
2060
 
2061
2061
  // core/versions.ts
2062
- import path2 from "node:path";
2062
+ import path2 from "path";
2063
2063
  import { Timestamp as Timestamp4 } from "firebase-admin/firestore";
2064
2064
  import glob from "tiny-glob";
2065
2065
  var DOCUMENT_SAVE_OFFSET = 5 * 60 * 1e3;
package/dist/project.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { S as Schema, C as Collection } from './schema-UCmjggdA.js';
1
+ import { S as Schema, C as Collection } from './schema-FB6Ck9sN.js';
2
2
 
3
3
  /**
4
4
  * Loads various files or configurations from the project.