@blinkk/root-cms 2.5.8 → 2.5.9

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,6 +1,6 @@
1
1
  import {
2
2
  getServerVersion
3
- } from "./chunk-4YTAYZTP.js";
3
+ } from "./chunk-SW3UAKP5.js";
4
4
  import {
5
5
  getCollectionSchema,
6
6
  getProjectSchemas
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "@blinkk/root-cms",
4
- version: "2.5.8",
4
+ version: "2.5.9",
5
5
  author: "s@blinkk.com",
6
6
  license: "MIT",
7
7
  engines: {
@@ -169,7 +169,7 @@ var package_default = {
169
169
  yjs: "13.6.27"
170
170
  },
171
171
  peerDependencies: {
172
- "@blinkk/root": "2.5.8",
172
+ "@blinkk/root": "2.5.9",
173
173
  "firebase-admin": ">=11",
174
174
  "firebase-functions": ">=4",
175
175
  preact: ">=10",
@@ -54,11 +54,18 @@ interface CMSCheck {
54
54
  run: (ctx: CheckContext) => Promise<CheckResult>;
55
55
  }
56
56
 
57
+ interface TranslationsCheckOptions {
58
+ /**
59
+ * Optional list of collection IDs to restrict this check to. When set, the
60
+ * check is only shown and runnable for documents in these collections.
61
+ */
62
+ collections?: string[];
63
+ }
57
64
  /**
58
65
  * A first-party CMS check that verifies all translatable strings in a document
59
66
  * have translations for each of the document's enabled locales.
60
67
  */
61
- declare function translationsCheck(): CMSCheck;
68
+ declare function translationsCheck(options?: TranslationsCheckOptions): CMSCheck;
62
69
 
63
70
  /**
64
71
  * Built-in sidebar tools that can be toggled on/off in the CMS UI.
@@ -1097,4 +1104,4 @@ declare class BatchResponse {
1097
1104
  private getTranslationsMap;
1098
1105
  }
1099
1106
 
1100
- export { type CMSPluginOptions as $, type Action as A, type BatchRequestOptions as B, BatchRequest as C, type DocMode as D, BatchResponse as E, type Locale as F, type GetDocOptions as G, type HttpMethod as H, type SourceString as I, type TranslatedString as J, type TranslationsDocMode as K, type LoadTranslationsOptions as L, type TranslationsLocaleDocHashMap as M, type TranslationsLocaleDocEntry as N, type MultiLocaleTranslationsMap as O, type SingleLocaleTranslationsMap as P, TranslationsManager as Q, RootCMSClient as R, type SetDocOptions as S, type TranslationsMap as T, type UserRole as U, buildTranslationsDbPath as V, buildTranslationsLocaleDocDbPath as W, type CMSBuiltInSidebarTool as X, type CMSUser as Y, type CMSAIConfig as Z, type CMSSidebarTool as _, type LocaleTranslations as a, type CMSPlugin as a0, cmsPlugin as a1, type CMSCheck as a2, type CheckResult as a3, type CheckContext as a4, type CheckStatus as a5, translationsCheck as a6, type Doc as b, type DataSource as c, type DataSourceData as d, type DataSourceMode as e, type SaveDraftOptions as f, type UpdateDraftOptions as g, type ListDocsOptions as h, type GetCountOptions as i, type Translation as j, type Release as k, type ListActionsOptions as l, isRichTextData as m, getCmsPlugin as n, marshalData as o, normalizeData as p, type ArrayObject as q, marshalArray as r, unmarshalArray as s, toArrayObject as t, unmarshalData as u, translationsForLocale as v, parseDocId as w, type BatchRequestQuery as x, type BatchRequestQueryOptions as y, type TranslationsDoc as z };
1107
+ export { type CMSPluginOptions as $, type Action as A, type BatchRequestOptions as B, BatchRequest as C, type DocMode as D, BatchResponse as E, type Locale as F, type GetDocOptions as G, type HttpMethod as H, type SourceString as I, type TranslatedString as J, type TranslationsDocMode as K, type LoadTranslationsOptions as L, type TranslationsLocaleDocHashMap as M, type TranslationsLocaleDocEntry as N, type MultiLocaleTranslationsMap as O, type SingleLocaleTranslationsMap as P, TranslationsManager as Q, RootCMSClient as R, type SetDocOptions as S, type TranslationsMap as T, type UserRole as U, buildTranslationsDbPath as V, buildTranslationsLocaleDocDbPath as W, type CMSBuiltInSidebarTool as X, type CMSUser as Y, type CMSAIConfig as Z, type CMSSidebarTool as _, type LocaleTranslations as a, type CMSPlugin as a0, cmsPlugin as a1, type CMSCheck as a2, type CheckResult as a3, type CheckContext as a4, type CheckStatus as a5, translationsCheck as a6, type TranslationsCheckOptions as a7, type Doc as b, type DataSource as c, type DataSourceData as d, type DataSourceMode as e, type SaveDraftOptions as f, type UpdateDraftOptions as g, type ListDocsOptions as h, type GetCountOptions as i, type Translation as j, type Release as k, type ListActionsOptions as l, isRichTextData as m, getCmsPlugin as n, marshalData as o, normalizeData as p, type ArrayObject as q, marshalArray as r, unmarshalArray as s, toArrayObject as t, unmarshalData as u, translationsForLocale as v, parseDocId as w, type BatchRequestQuery as x, type BatchRequestQueryOptions as y, type TranslationsDoc as z };
package/dist/client.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import '@blinkk/root';
2
2
  import 'firebase-admin/app';
3
3
  import 'firebase-admin/firestore';
4
- export { A as Action, q as ArrayObject, C as BatchRequest, B as BatchRequestOptions, x as BatchRequestQuery, y as BatchRequestQueryOptions, E as BatchResponse, c as DataSource, d as DataSourceData, e as DataSourceMode, b as Doc, D as DocMode, i as GetCountOptions, G as GetDocOptions, H as HttpMethod, l as ListActionsOptions, h as ListDocsOptions, L as LoadTranslationsOptions, a as LocaleTranslations, k as Release, R as RootCMSClient, f as SaveDraftOptions, S as SetDocOptions, j as Translation, z as TranslationsDoc, T as TranslationsMap, g as UpdateDraftOptions, U as UserRole, n as getCmsPlugin, m as isRichTextData, r as marshalArray, o as marshalData, p as normalizeData, w as parseDocId, t as toArrayObject, v as translationsForLocale, s as unmarshalArray, u as unmarshalData } from './client-B3U47cNR.js';
4
+ export { A as Action, q as ArrayObject, C as BatchRequest, B as BatchRequestOptions, x as BatchRequestQuery, y as BatchRequestQueryOptions, E as BatchResponse, c as DataSource, d as DataSourceData, e as DataSourceMode, b as Doc, D as DocMode, i as GetCountOptions, G as GetDocOptions, H as HttpMethod, l as ListActionsOptions, h as ListDocsOptions, L as LoadTranslationsOptions, a as LocaleTranslations, k as Release, R as RootCMSClient, f as SaveDraftOptions, S as SetDocOptions, j as Translation, z as TranslationsDoc, T as TranslationsMap, g as UpdateDraftOptions, U as UserRole, n as getCmsPlugin, m as isRichTextData, r as marshalArray, o as marshalData, p as normalizeData, w as parseDocId, t as toArrayObject, v as translationsForLocale, s as unmarshalArray, u as unmarshalData } from './client-BUnrUs3a.js';
5
5
  import './schema-Bht24XmU.js';
package/dist/core.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RootCMSClient, D as DocMode, L as LoadTranslationsOptions, T as TranslationsMap, a as LocaleTranslations } from './client-B3U47cNR.js';
2
- export { A as Action, q as ArrayObject, C as BatchRequest, B as BatchRequestOptions, x as BatchRequestQuery, y as BatchRequestQueryOptions, E as BatchResponse, c as DataSource, d as DataSourceData, e as DataSourceMode, b as Doc, i as GetCountOptions, G as GetDocOptions, H as HttpMethod, l as ListActionsOptions, h as ListDocsOptions, F as Locale, O as MultiLocaleTranslationsMap, k as Release, f as SaveDraftOptions, S as SetDocOptions, P as SingleLocaleTranslationsMap, I as SourceString, J as TranslatedString, j as Translation, z as TranslationsDoc, K as TranslationsDocMode, N as TranslationsLocaleDocEntry, M as TranslationsLocaleDocHashMap, Q as TranslationsManager, g as UpdateDraftOptions, U as UserRole, V as buildTranslationsDbPath, W as buildTranslationsLocaleDocDbPath, n as getCmsPlugin, m as isRichTextData, r as marshalArray, o as marshalData, p as normalizeData, w as parseDocId, t as toArrayObject, v as translationsForLocale, s as unmarshalArray, u as unmarshalData } from './client-B3U47cNR.js';
1
+ import { R as RootCMSClient, D as DocMode, L as LoadTranslationsOptions, T as TranslationsMap, a as LocaleTranslations } from './client-BUnrUs3a.js';
2
+ export { A as Action, q as ArrayObject, C as BatchRequest, B as BatchRequestOptions, x as BatchRequestQuery, y as BatchRequestQueryOptions, E as BatchResponse, c as DataSource, d as DataSourceData, e as DataSourceMode, b as Doc, i as GetCountOptions, G as GetDocOptions, H as HttpMethod, l as ListActionsOptions, h as ListDocsOptions, F as Locale, O as MultiLocaleTranslationsMap, k as Release, f as SaveDraftOptions, S as SetDocOptions, P as SingleLocaleTranslationsMap, I as SourceString, J as TranslatedString, j as Translation, z as TranslationsDoc, K as TranslationsDocMode, N as TranslationsLocaleDocEntry, M as TranslationsLocaleDocHashMap, Q as TranslationsManager, g as UpdateDraftOptions, U as UserRole, V as buildTranslationsDbPath, W as buildTranslationsLocaleDocDbPath, n as getCmsPlugin, m as isRichTextData, r as marshalArray, o as marshalData, p as normalizeData, w as parseDocId, t as toArrayObject, v as translationsForLocale, s as unmarshalArray, u as unmarshalData } from './client-BUnrUs3a.js';
3
3
  import { Request, RootConfig, Response, RouteParams, GetStaticProps, GetStaticPaths } from '@blinkk/root';
4
4
  import { Query } from 'firebase-admin/firestore';
5
5
  export { s as schema } from './schema-Bht24XmU.js';
package/dist/plugin.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import '@blinkk/root';
2
2
  import 'firebase-admin/app';
3
3
  import 'firebase-admin/firestore';
4
- export { Z as CMSAIConfig, X as CMSBuiltInSidebarTool, a2 as CMSCheck, a0 as CMSPlugin, $ as CMSPluginOptions, _ as CMSSidebarTool, Y as CMSUser, a4 as CheckContext, a3 as CheckResult, a5 as CheckStatus, a1 as cmsPlugin, a6 as translationsCheck } from './client-B3U47cNR.js';
4
+ export { Z as CMSAIConfig, X as CMSBuiltInSidebarTool, a2 as CMSCheck, a0 as CMSPlugin, $ as CMSPluginOptions, _ as CMSSidebarTool, Y as CMSUser, a4 as CheckContext, a3 as CheckResult, a5 as CheckStatus, a7 as TranslationsCheckOptions, a1 as cmsPlugin, a6 as translationsCheck } from './client-BUnrUs3a.js';
5
5
  import './schema-Bht24XmU.js';
package/dist/plugin.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-T5UK2H24.js";
5
5
  import {
6
6
  getServerVersion
7
- } from "./chunk-4YTAYZTP.js";
7
+ } from "./chunk-SW3UAKP5.js";
8
8
  import {
9
9
  runCronJobs
10
10
  } from "./chunk-AFL5KJ4E.js";
@@ -701,11 +701,12 @@ function extractRichTextNodeText(node) {
701
701
  }
702
702
  return "";
703
703
  }
704
- function translationsCheck() {
704
+ function translationsCheck(options) {
705
705
  return {
706
706
  id: "root-cms/translations",
707
707
  label: "Missing Translations",
708
708
  description: "Checks that all translatable strings have translations for each enabled locale.",
709
+ collections: options?.collections,
709
710
  run: async (ctx) => {
710
711
  const { cmsClient, collectionId, slug, collectionSchema } = ctx;
711
712
  const rawDoc = await cmsClient.getRawDoc(collectionId, slug, {