@blinkk/root-cms 3.0.1-alpha.0 → 3.0.1-alpha.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/dist/app.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  getServerVersion
3
- } from "./chunk-N4Z3O53K.js";
3
+ } from "./chunk-BBOESYH7.js";
4
4
  import {
5
5
  getCollectionSchema,
6
6
  getProjectSchemas
7
- } from "./chunk-MSJGHSR6.js";
7
+ } from "./chunk-R4LKO3EZ.js";
8
8
  import "./chunk-MLKGABMK.js";
9
9
 
10
10
  // core/app.tsx
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "@blinkk/root-cms",
4
- version: "3.0.1-alpha.0",
4
+ version: "3.0.1-alpha.1",
5
5
  author: "s@blinkk.com",
6
6
  license: "MIT",
7
7
  engines: {
@@ -85,10 +85,12 @@ var package_default = {
85
85
  "date-fns-tz": "3.2.0",
86
86
  diff: "8.0.2",
87
87
  "dts-dom": "3.7.0",
88
+ "@mantine/spotlight": "4.2.12",
88
89
  "fnv-plus": "1.3.1",
89
90
  genkit: "1.26.0",
90
91
  jsonwebtoken: "9.0.2",
91
92
  kleur: "4.1.5",
93
+ minisearch: "7.2.0",
92
94
  sirv: "2.0.3",
93
95
  "tiny-glob": "0.2.9"
94
96
  },
@@ -122,7 +124,6 @@ var package_default = {
122
124
  "@mantine/hooks": "4.2.12",
123
125
  "@mantine/modals": "4.2.12",
124
126
  "@mantine/notifications": "4.2.12",
125
- "@mantine/spotlight": "4.2.12",
126
127
  "@preact/compat": "18.3.1",
127
128
  "@tabler/icons-preact": "3.35.0",
128
129
  "@testing-library/preact": "3.2.4",
@@ -166,7 +167,7 @@ var package_default = {
166
167
  yjs: "13.6.27"
167
168
  },
168
169
  peerDependencies: {
169
- "@blinkk/root": "3.0.1-alpha.0",
170
+ "@blinkk/root": "3.0.1-alpha.1",
170
171
  "firebase-admin": ">=11",
171
172
  "firebase-functions": ">=4"
172
173
  },
@@ -1,13 +1,11 @@
1
1
  // core/project.ts
2
- var SCHEMA_MODULES = import.meta.glob(
3
- [
4
- "/**/*.schema.ts",
5
- "!/appengine/**/*.schema.ts",
6
- "!/functions/**/*.schema.ts",
7
- "!/gae/**/*.schema.ts"
8
- ],
9
- { eager: true }
10
- );
2
+ var _SCHEMA_MODULES = {};
3
+ try {
4
+ const mod = await import("virtual:root/schemas");
5
+ _SCHEMA_MODULES = mod.SCHEMA_MODULES || {};
6
+ } catch {
7
+ }
8
+ var SCHEMA_MODULES = _SCHEMA_MODULES;
11
9
  function getProjectSchemas() {
12
10
  const schemas = {};
13
11
  for (const fileId in SCHEMA_MODULES) {
@@ -1866,6 +1866,27 @@ ${errorMessages}`);
1866
1866
  console.error(err);
1867
1867
  }
1868
1868
  }
1869
+ const notifications = cmsPluginConfig.notifications;
1870
+ if (notifications && notifications.length > 0) {
1871
+ const ctx = {
1872
+ rootConfig: this.rootConfig,
1873
+ cmsClient: this,
1874
+ user: data.by ? { email: data.by } : void 0
1875
+ };
1876
+ for (const service of notifications) {
1877
+ if (!service.onAction) {
1878
+ continue;
1879
+ }
1880
+ try {
1881
+ await service.onAction(ctx, data);
1882
+ } catch (err) {
1883
+ console.error(
1884
+ `notification service "${service.id}" onAction failed:`,
1885
+ err
1886
+ );
1887
+ }
1888
+ }
1889
+ }
1869
1890
  }
1870
1891
  /**
1871
1892
  * Creates a batch request that is capable of fetching one or more docs,