@byline/core 3.0.0 → 3.0.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.
@@ -729,7 +729,7 @@ export interface CollectionDefinition {
729
729
  * collection has at least one `localized` field, so the validator rejects
730
730
  * `advertiseLocales: true` on a collection with none.
731
731
  *
732
- * See `docs/AVAILABLE-LOCALES.md`.
732
+ * See `docs/I18N.md`.
733
733
  */
734
734
  advertiseLocales?: boolean;
735
735
  /**
@@ -864,8 +864,8 @@ export type BlocksUnion<Bs extends readonly Block[]> = Bs[number] extends infer
864
864
  * on hand-authored fields without waiting for them to be placed inside a
865
865
  * `fields: [...]` array. Replaces the `as const satisfies Field` pattern.
866
866
  *
867
- * For factories that *generate* a field shape from input (e.g. mapped-type
868
- * driven fields like `availableLanguagesField`), a custom return type is
867
+ * For factories that *generate* a field shape from input (e.g. a helper whose
868
+ * return type is a mapped type over its options), a custom return type is
869
869
  * still the right tool — `defineField` is for identity / passthrough cases.
870
870
  *
871
871
  * The companion data-shape extractor `FieldData<F>` lives in
@@ -182,8 +182,8 @@ export function defineBlock(definition) {
182
182
  * on hand-authored fields without waiting for them to be placed inside a
183
183
  * `fields: [...]` array. Replaces the `as const satisfies Field` pattern.
184
184
  *
185
- * For factories that *generate* a field shape from input (e.g. mapped-type
186
- * driven fields like `availableLanguagesField`), a custom return type is
185
+ * For factories that *generate* a field shape from input (e.g. a helper whose
186
+ * return type is a mapped type over its options), a custom return type is
187
187
  * still the right tool — `defineField` is for identity / passthrough cases.
188
188
  *
189
189
  * The companion data-shape extractor `FieldData<F>` lives in
@@ -39,7 +39,7 @@ export type ReadMode = 'any' | 'published';
39
39
  * safe default for internal/direct reads); `@byline/client` defaults it to
40
40
  * `'fallback'` for application reads. Availability follows path-coverage against
41
41
  * the default content locale; a document with no localized content is available
42
- * in every locale. See `docs/CONTENT-LOCALE-RESOLUTION.md`.
42
+ * in every locale. See `docs/I18N.md`.
43
43
  */
44
44
  export type MissingLocalePolicy = 'empty' | 'fallback' | 'omit';
45
45
  /**
@@ -215,7 +215,7 @@ export interface IDbAdapter {
215
215
  * boot by `initBylineCore` so in-place upgrades self-heal without a manual
216
216
  * step or a migrate-ordering constraint — a no-op (zero rows) once every
217
217
  * document is stamped. Optional so adapters that don't model `source_locale`
218
- * need not implement it. See docs/DEFAULT-LOCALE-SWITCHING.md.
218
+ * need not implement it. See docs/I18N.md.
219
219
  */
220
220
  backfillSourceLocales?: () => Promise<{
221
221
  rowsUpdated: number;
@@ -315,7 +315,7 @@ export interface IDocumentCommands {
315
315
  * editorial advertised-locale set. `undefined` leaves the existing set
316
316
  * untouched (sticky across versions, like `path`); `[]` clears it. The
317
317
  * locale values are the advertised content locales themselves, not the
318
- * write locale. See `docs/AVAILABLE-LOCALES.md`.
318
+ * write locale. See `docs/I18N.md`.
319
319
  */
320
320
  availableLocales?: string[];
321
321
  locale?: string;
@@ -63,7 +63,7 @@ export interface BaseConfig {
63
63
  * its path locale, and the completeness ledger — so changing this value
64
64
  * is safe for existing data: they keep reading against the locale they
65
65
  * were authored in. New documents created after the change anchor to the
66
- * new value. See docs/DEFAULT-LOCALE-SWITCHING.md.
66
+ * new value. See docs/I18N.md.
67
67
  *
68
68
  * (Switching this on a live system still needs the one-time
69
69
  * `backfillSourceLocales()` maintenance step to have stamped any rows
package/dist/core.js CHANGED
@@ -96,7 +96,7 @@ export const initBylineCore = async (config, pinoLogger) => {
96
96
  // and is a no-op (zero rows) once every document is stamped. Self-heals
97
97
  // in-place upgrades without a manual maintenance step. The write path stamps
98
98
  // new documents directly, so steady-state boots touch nothing. See
99
- // docs/DEFAULT-LOCALE-SWITCHING.md.
99
+ // docs/I18N.md.
100
100
  if (typeof composed.db.backfillSourceLocales === 'function') {
101
101
  const { rowsUpdated } = await composed.db.backfillSourceLocales();
102
102
  if (rowsUpdated > 0) {
@@ -197,7 +197,7 @@ export const createBaseSchema = (collection) => {
197
197
  id: z.uuid(),
198
198
  versionId: z.uuid().optional(),
199
199
  path: z.string().optional(),
200
- // The document's content source-locale anchor (see docs/DEFAULT-LOCALE-SWITCHING.md).
200
+ // The document's content source-locale anchor (see docs/I18N.md).
201
201
  // Carried through list/get responses so the admin can badge it; Zod would
202
202
  // otherwise strip it as an undeclared key.
203
203
  sourceLocale: z.string().optional(),
@@ -185,7 +185,7 @@ export declare function createDocument(ctx: DocumentLifecycleContext, params: {
185
185
  * sidebar widget). Document-grain and sticky like `path`: passed straight
186
186
  * to the storage primitive, which replaces the document's rows wholesale.
187
187
  * `undefined` writes nothing (a new document starts with an empty set —
188
- * the safe opt-in default); `[]` clears it. See docs/AVAILABLE-LOCALES.md.
188
+ * the safe opt-in default); `[]` clears it. See docs/I18N.md.
189
189
  */
190
190
  availableLocales?: string[];
191
191
  }): Promise<CreateDocumentResult>;
@@ -217,7 +217,7 @@ export declare function updateDocument(ctx: DocumentLifecycleContext, params: {
217
217
  * The editorial advertised-locale set. `undefined` leaves the existing
218
218
  * set untouched (sticky — document-grain, like `path`); an explicit array
219
219
  * (empty included) replaces it wholesale. Driven by the admin
220
- * available-locales sidebar widget. See docs/AVAILABLE-LOCALES.md.
220
+ * available-locales sidebar widget. See docs/I18N.md.
221
221
  */
222
222
  availableLocales?: string[];
223
223
  }): Promise<UpdateDocumentResult>;
@@ -252,7 +252,7 @@ export declare function updateDocumentWithPatches(ctx: DocumentLifecycleContext,
252
252
  * The editorial advertised-locale set (typically supplied alongside
253
253
  * patches when the admin available-locales widget has been edited).
254
254
  * `undefined` leaves the existing set untouched (sticky); an explicit
255
- * array replaces it wholesale. See docs/AVAILABLE-LOCALES.md.
255
+ * array replaces it wholesale. See docs/I18N.md.
256
256
  */
257
257
  availableLocales?: string[];
258
258
  }): Promise<UpdateDocumentWithPatchesResult>;
@@ -134,7 +134,7 @@ function resolvePathForUpdate(args) {
134
134
  // skip the write (existing path row stays as-is — sticky). The path row
135
135
  // lives under the document's source_locale (its anchor), not the mutable
136
136
  // global default — so this stays correct after the global default is
137
- // switched. See docs/DEFAULT-LOCALE-SWITCHING.md.
137
+ // switched. See docs/I18N.md.
138
138
  return explicitPath ?? undefined;
139
139
  }
140
140
  // Non-source-locale (translation) write: reject any path change with a warn
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@byline/core",
3
3
  "private": false,
4
4
  "license": "MPL-2.0",
5
- "version": "3.0.0",
5
+ "version": "3.0.1",
6
6
  "engines": {
7
7
  "node": ">=20.9.0"
8
8
  },
@@ -79,7 +79,7 @@
79
79
  "sharp": "^0.34.5",
80
80
  "uuid": "^14.0.0",
81
81
  "zod": "^4.4.3",
82
- "@byline/auth": "3.0.0"
82
+ "@byline/auth": "3.0.1"
83
83
  },
84
84
  "devDependencies": {
85
85
  "@biomejs/biome": "2.4.15",