@conloca/content-api 0.1.14 → 0.1.16

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.
Files changed (183) hide show
  1. package/dist/asset-manifest.d.ts +23 -0
  2. package/dist/asset-manifest.d.ts.map +1 -0
  3. package/dist/asset-manifest.js +73 -0
  4. package/dist/asset-operations.d.ts +159 -0
  5. package/dist/asset-operations.d.ts.map +1 -0
  6. package/dist/asset-operations.js +736 -0
  7. package/dist/asset-types.d.ts +56 -0
  8. package/dist/asset-types.d.ts.map +1 -0
  9. package/dist/asset-types.js +7 -0
  10. package/dist/base-content-index.d.ts +57 -0
  11. package/dist/base-content-index.d.ts.map +1 -0
  12. package/dist/base-content-index.js +179 -0
  13. package/dist/block-index.d.ts +9 -0
  14. package/dist/block-index.d.ts.map +1 -0
  15. package/dist/block-index.js +11 -0
  16. package/dist/blocks.d.ts +16 -0
  17. package/dist/blocks.d.ts.map +1 -0
  18. package/dist/blocks.js +103 -0
  19. package/dist/cf-access.d.ts +31 -0
  20. package/dist/cf-access.d.ts.map +1 -0
  21. package/dist/cf-access.js +66 -0
  22. package/dist/component-registry.d.ts +50 -0
  23. package/dist/component-registry.d.ts.map +1 -0
  24. package/dist/component-registry.js +120 -0
  25. package/dist/component-registry.types-C0ctF9nh.d.mts +71 -0
  26. package/dist/component-registry.types-C0ctF9nh.d.mts.map +1 -0
  27. package/dist/component-registry.types.d.ts +11 -0
  28. package/dist/component-registry.types.d.ts.map +1 -0
  29. package/dist/component-registry.types.js +1 -0
  30. package/dist/content-api.interface.d.ts +64 -0
  31. package/dist/content-api.interface.d.ts.map +1 -0
  32. package/dist/content-api.interface.js +1 -0
  33. package/dist/content-filters.d.ts +31 -0
  34. package/dist/content-filters.d.ts.map +1 -0
  35. package/dist/content-filters.js +246 -0
  36. package/dist/content-index-D092_vk1.mjs +629 -0
  37. package/dist/content-index-D092_vk1.mjs.map +1 -0
  38. package/dist/content-index-D6IVMmAB.d.mts +127 -0
  39. package/dist/content-index-D6IVMmAB.d.mts.map +1 -0
  40. package/dist/content-index.d.ts +126 -0
  41. package/dist/content-index.d.ts.map +1 -0
  42. package/dist/content-index.js +418 -0
  43. package/dist/content-operations-DIbsxG5A.d.mts +354 -0
  44. package/dist/content-operations-DIbsxG5A.d.mts.map +1 -0
  45. package/dist/content-operations.d.ts +93 -0
  46. package/dist/content-operations.d.ts.map +1 -0
  47. package/dist/content-operations.js +275 -0
  48. package/dist/content-reader.d.ts +10 -0
  49. package/dist/content-reader.d.ts.map +1 -0
  50. package/dist/content-reader.js +13 -0
  51. package/dist/content-utils-fWNHTrPy.mjs +280 -0
  52. package/dist/content-utils-fWNHTrPy.mjs.map +1 -0
  53. package/dist/content-utils.d.ts +132 -0
  54. package/dist/content-utils.d.ts.map +1 -0
  55. package/dist/content-utils.js +352 -0
  56. package/dist/content-watcher.d.ts +43 -0
  57. package/dist/content-watcher.d.ts.map +1 -0
  58. package/dist/content-watcher.js +83 -0
  59. package/dist/data-DquNIEnQ.mjs +62 -0
  60. package/dist/data-DquNIEnQ.mjs.map +1 -0
  61. package/dist/data-index.d.ts +8 -0
  62. package/dist/data-index.d.ts.map +1 -0
  63. package/dist/data-index.js +7 -0
  64. package/dist/data.d.ts +43 -0
  65. package/dist/data.d.ts.map +1 -0
  66. package/dist/data.js +103 -0
  67. package/dist/etag-utils.d.ts +77 -0
  68. package/dist/etag-utils.d.ts.map +1 -0
  69. package/dist/etag-utils.js +160 -0
  70. package/dist/filesystem-content-api-B1KIQJfk.mjs +2 -0
  71. package/dist/filesystem-content-api-C0HIhqZi.mjs +1620 -0
  72. package/dist/filesystem-content-api-C0HIhqZi.mjs.map +1 -0
  73. package/dist/filesystem-content-api-DCdNi-co.d.mts +134 -0
  74. package/dist/filesystem-content-api-DCdNi-co.d.mts.map +1 -0
  75. package/dist/filesystem-content-api.d.ts +135 -0
  76. package/dist/filesystem-content-api.d.ts.map +1 -0
  77. package/dist/filesystem-content-api.js +2181 -0
  78. package/dist/git-operations.d.ts +49 -0
  79. package/dist/git-operations.d.ts.map +1 -0
  80. package/dist/git-operations.js +252 -0
  81. package/dist/header-parser.d.ts +37 -0
  82. package/dist/header-parser.d.ts.map +1 -0
  83. package/dist/header-parser.js +286 -0
  84. package/dist/in-memory-content-api.d.ts +35 -0
  85. package/dist/in-memory-content-api.d.ts.map +1 -0
  86. package/dist/in-memory-content-api.js +591 -0
  87. package/dist/index-DxVTFK66.d.mts +105 -0
  88. package/dist/index-DxVTFK66.d.mts.map +1 -0
  89. package/dist/index.d.mts +6 -4
  90. package/dist/index.d.mts.map +1 -1
  91. package/dist/index.d.ts +19 -0
  92. package/dist/index.d.ts.map +1 -0
  93. package/dist/index.js +16 -0
  94. package/dist/index.mjs +37 -5
  95. package/dist/index.mjs.map +1 -1
  96. package/dist/indexing.d.mts +152 -0
  97. package/dist/indexing.d.mts.map +1 -0
  98. package/dist/indexing.d.ts +5 -0
  99. package/dist/indexing.d.ts.map +1 -0
  100. package/dist/indexing.js +7 -0
  101. package/dist/indexing.mjs +255 -0
  102. package/dist/indexing.mjs.map +1 -0
  103. package/dist/json-whitespace-view.d.ts +32 -0
  104. package/dist/json-whitespace-view.d.ts.map +1 -0
  105. package/dist/json-whitespace-view.js +152 -0
  106. package/dist/middleware.d.ts +20 -0
  107. package/dist/middleware.d.ts.map +1 -0
  108. package/dist/middleware.js +1031 -0
  109. package/dist/node.d.mts +28 -126
  110. package/dist/node.d.mts.map +1 -1
  111. package/dist/node.d.ts +25 -0
  112. package/dist/node.d.ts.map +1 -0
  113. package/dist/node.js +24 -0
  114. package/dist/node.mjs +199 -2890
  115. package/dist/node.mjs.map +1 -1
  116. package/dist/reader.d.mts +15 -0
  117. package/dist/reader.d.mts.map +1 -0
  118. package/dist/reader.d.ts +15 -0
  119. package/dist/reader.d.ts.map +1 -0
  120. package/dist/reader.js +13 -0
  121. package/dist/reader.mjs +22 -0
  122. package/dist/reader.mjs.map +1 -0
  123. package/dist/schemas/index.d.mts +2 -90
  124. package/dist/schemas/index.d.ts +102 -0
  125. package/dist/schemas/index.d.ts.map +1 -0
  126. package/dist/schemas/index.js +87 -0
  127. package/dist/schemas/index.mjs +2 -70
  128. package/dist/schemas-CFRD0FIQ.mjs +84 -0
  129. package/dist/schemas-CFRD0FIQ.mjs.map +1 -0
  130. package/dist/{types-BUG0Cfkg.mjs → site-8oaj1Q60.mjs} +20 -222
  131. package/dist/site-8oaj1Q60.mjs.map +1 -0
  132. package/dist/site-index-B_254bCc.d.mts +136 -0
  133. package/dist/site-index-B_254bCc.d.mts.map +1 -0
  134. package/dist/site-index.d.ts +60 -0
  135. package/dist/site-index.d.ts.map +1 -0
  136. package/dist/site-index.js +287 -0
  137. package/dist/site.d.ts +21 -0
  138. package/dist/site.d.ts.map +1 -0
  139. package/dist/site.js +168 -0
  140. package/dist/types-DOdldbfD.mjs +34 -0
  141. package/dist/types-DOdldbfD.mjs.map +1 -0
  142. package/dist/types-DjfhS272.d.mts +456 -0
  143. package/dist/types-DjfhS272.d.mts.map +1 -0
  144. package/dist/types.d.ts +453 -0
  145. package/dist/types.d.ts.map +1 -0
  146. package/dist/types.js +36 -0
  147. package/dist/url-safe-base64.d.ts +12 -0
  148. package/dist/url-safe-base64.d.ts.map +1 -0
  149. package/dist/url-safe-base64.js +40 -0
  150. package/dist/url-validation.d.ts +14 -0
  151. package/dist/url-validation.d.ts.map +1 -0
  152. package/dist/url-validation.js +81 -0
  153. package/dist/utils/atomic-write.d.ts +6 -0
  154. package/dist/utils/atomic-write.d.ts.map +1 -0
  155. package/dist/utils/atomic-write.js +20 -0
  156. package/dist/utils.d.ts +46 -0
  157. package/dist/utils.d.ts.map +1 -0
  158. package/dist/utils.js +70 -0
  159. package/dist/vite-plugin.d.ts +12 -0
  160. package/dist/vite-plugin.d.ts.map +1 -0
  161. package/dist/vite-plugin.js +29 -0
  162. package/dist/vxjson-qHrgLGip.mjs +555 -0
  163. package/dist/vxjson-qHrgLGip.mjs.map +1 -0
  164. package/dist/vxjson-serialize-geF6qvpn.mjs +34 -0
  165. package/dist/vxjson-serialize-geF6qvpn.mjs.map +1 -0
  166. package/dist/vxjson-serialize.d.mts +17 -0
  167. package/dist/vxjson-serialize.d.mts.map +1 -0
  168. package/dist/vxjson-serialize.d.ts +14 -0
  169. package/dist/vxjson-serialize.d.ts.map +1 -0
  170. package/dist/vxjson-serialize.js +50 -0
  171. package/dist/vxjson-serialize.mjs +2 -0
  172. package/dist/vxjson.d.ts +112 -0
  173. package/dist/vxjson.d.ts.map +1 -0
  174. package/dist/vxjson.js +391 -0
  175. package/dist/xxhash.d.ts +10 -0
  176. package/dist/xxhash.d.ts.map +1 -0
  177. package/dist/xxhash.js +31 -0
  178. package/package.json +88 -17
  179. package/dist/content-operations-BZLfJWqT.d.mts +0 -916
  180. package/dist/content-operations-BZLfJWqT.d.mts.map +0 -1
  181. package/dist/schemas/index.d.mts.map +0 -1
  182. package/dist/schemas/index.mjs.map +0 -1
  183. package/dist/types-BUG0Cfkg.mjs.map +0 -1
package/dist/node.d.mts CHANGED
@@ -1,8 +1,9 @@
1
- import { $ as DataContext, B as ContentData, C as mapSiteNames, Ct as AssetUsage, D as serializeMdxWithFrontmatter, E as resolvePublishDate, Et as ManifestEntryData, F as APIError, G as ContentMeta, H as ContentIdentity, I as BatchOperationResult, J as CreateBlockInput, K as ContentProp, L as BatchResult, M as ContentAPI, N as Site, O as ComponentEntry, P as Data, Q as DataCollectionEntry, R as BlockFilters, S as mapLocales, St as AssetManifestData, T as parseDate, Tt as FolderTreeNode, U as ContentListResult, V as ContentEntry, W as ContentManifest, X as CreatePageInput, Y as CreateContentInput, Z as CreateResult, _ as isContentPublished, _t as UpdateLocaleInput, a as analyzeUpdateScope, at as GlobalFilters, b as isValidPathname, bt as WriteResult, c as shouldUpdateModifiedTimestamp, ct as LocaleUpdateData, d as validateCreateContent, dt as LocalizedManifest, et as DeleteLocaleInput, f as extractBlockName, ft as MDXFrontmatter, g as getMetadataSize, gt as SitesConfig, h as getCurrentISODate, ht as SiteFilters, i as ValidationResult, it as FindOptions, j as Blocks, k as ComponentEntryWithId, l as updatePublishDates, lt as LocaleVersion, m as generateContentId, mt as PageReference, n as UPDATE_SCOPE, nt as ErrorCode, o as buildLocaleVersion, ot as LocaleFileData, p as formatFileSize, pt as MoveResult, q as ContentType, r as UpdateScope, rt as ErrorCodes, s as buildPathnameHistory, st as LocalePathData, t as CreateValidationResult, tt as DeleteResult, u as validateAndPrepareMetadata, ut as LocalizedEntry, v as isMetadataTooLarge, vt as UpdateResult, w as normalizePathname, wt as FolderListing, x as localesOf, xt as AssetEntry, y as isValidBlockName, yt as VXJSONFile, z as ContentAPIOptions } from "./content-operations-BZLfJWqT.mjs";
1
+ import { a as AssetManifestData, c as FolderTreeNode, i as AssetEntry, l as ManifestEntryData, n as ComponentEntryWithId, o as AssetUsage, s as FolderListing, t as ComponentEntry } from "./component-registry.types-C0ctF9nh.mjs";
2
+ import { A as LocalizedEntry, B as VXJSONFile, C as ErrorCodes, D as LocalePathData, E as LocaleFileData, F as PageReference, I as SiteFilters, L as SitesConfig, M as MDXCompileResponse, N as MDXFrontmatter, O as LocaleUpdateData, P as MoveResult, R as UpdateLocaleInput, S as ErrorCode, T as GlobalFilters, V as WriteResult, _ as CreateResult, a as ContentAPIOptions, b as DeleteLocaleInput, c as ContentIdentity, d as ContentMeta, f as ContentProp, g as CreatePageInput, h as CreateContentInput, i as BlockFilters, j as LocalizedManifest, k as LocaleVersion, l as ContentListResult, m as CreateBlockInput, n as BatchOperationResult, o as ContentData, p as ContentType, r as BatchResult, s as ContentEntry, t as APIError, u as ContentManifest, v as DataCollectionEntry, w as FindOptions, x as DeleteResult, y as DataContext, z as UpdateResult } from "./types-DjfhS272.mjs";
3
+ import { A as serializeMdxWithFrontmatter, C as localesOf, D as normalizePathname, E as normalizeAndValidatePathname, M as ContentAPI, N as Site, O as parseDate, P as Data, S as isValidPathname, T as mapSiteNames, _ as getCurrentISODate, a as analyzeUpdateScope, b as isMetadataTooLarge, c as shouldUpdateModifiedTimestamp, d as validateCreateContent, f as PathnameValidationReason, g as generateContentId, h as formatFileSize, i as ValidationResult, j as Blocks, k as resolvePublishDate, l as updatePublishDates, m as extractBlockName, n as UPDATE_SCOPE, o as buildLocaleVersion, p as PathnameValidationResult, r as UpdateScope, s as buildPathnameHistory, t as CreateValidationResult, u as validateAndPrepareMetadata, v as getMetadataSize, w as mapLocales, x as isValidBlockName, y as isContentPublished } from "./content-operations-DIbsxG5A.mjs";
4
+ import { n as readSitesConfig, t as FileSystemContentAPI } from "./filesystem-content-api-DCdNi-co.mjs";
2
5
  import { Hono } from "hono";
3
- import * as hono_types0 from "hono/types";
4
6
  import { Plugin } from "vite";
5
-
6
7
  //#region src/asset-manifest.d.ts
7
8
  declare class AssetManifest {
8
9
  private manifestPath;
@@ -266,126 +267,8 @@ declare class ComponentRegistry {
266
267
  delete(id: string): Promise<void>;
267
268
  }
268
269
  //#endregion
269
- //#region src/filesystem-content-api.d.ts
270
- interface ReindexResult {
271
- filesProcessed: number;
272
- filesSkipped: number;
273
- filesDeleted?: number;
274
- errors?: number;
275
- updated: LocalizedManifest[];
276
- deleted?: Array<{
277
- id: string;
278
- locale: string;
279
- kind: 'page' | 'block' | 'data';
280
- }>;
281
- }
282
- /**
283
- * FileSystem-based Content API Implementation
284
- *
285
- * Stores content as files on disk in a git-friendly format:
286
- * - Pages: /{site}/pages/{filename}.{locale}.vxjson
287
- * - Blocks: /blocks/{collection}/{filename}.{locale}.{mdx|vxjson}
288
- *
289
- * ## Indexing
290
- *
291
- * Content is indexed at startup for performance. The index is cached per
292
- * content root path and cleared when the process restarts.
293
- *
294
- * ## Read-Repair
295
- *
296
- * Since files can be modified externally (git, editors), this implementation:
297
- *
298
- * 1. Repairs invalid VXJSON files (ensures "content" field is last)
299
- * 2. Adds missing required fields (id, created, modified)
300
- * 3. Handles files added after initial indexing
301
- * 4. Updates the index when files are repaired or discovered
302
- *
303
- * ## Performance
304
- *
305
- * - Initial indexing reads only first 4KB of each file
306
- * - Full content is loaded on demand
307
- * - ETags are calculated using streaming for efficiency
308
- */
309
- declare class FileSystemContentAPI implements ContentAPI {
310
- private contentRoot;
311
- private absoluteContentRoot;
312
- private contentIndex;
313
- readonly sitesConfig: SitesConfig;
314
- readonly blocks: Blocks;
315
- readonly data: Data;
316
- private readonly sites;
317
- get normalizedContentRoot(): string;
318
- private constructor();
319
- static create(options: ContentAPIOptions): Promise<FileSystemContentAPI>;
320
- /**
321
- * Clear all caches - useful for testing
322
- */
323
- static clearCaches(): void;
324
- private indexAllContent;
325
- private parseFileHeaderWithRepair;
326
- /**
327
- * Perform read-repair by writing back the file with missing fields
328
- * This ensures stable IDs and timestamps across restarts
329
- */
330
- private performReadRepair;
331
- private scanContentFiles;
332
- private getFilePath;
333
- /**
334
- * Parse a file path back into its components for checking against the path index
335
- * Returns null if the path doesn't match expected patterns
336
- */
337
- parseFilePath(filePath: string): {
338
- kind: 'page' | 'block' | 'data';
339
- site?: string;
340
- collection: string;
341
- pathname?: string;
342
- name?: string;
343
- locale: string;
344
- } | null;
345
- getContent(id: string): Promise<ContentEntry | null>;
346
- getLocalized(id: string, locale: string): Promise<LocalizedEntry | null>;
347
- private readLocaleFile;
348
- createContent(data: CreateContentInput): Promise<CreateResult>;
349
- updateLocalized(input: UpdateLocaleInput): Promise<UpdateResult>;
350
- deleteContent(id: string, etag: string): Promise<DeleteResult>;
351
- deleteLocalized(input: DeleteLocaleInput): Promise<DeleteResult>;
352
- getSite(siteName: string): Site | null;
353
- listAllContent(filters?: GlobalFilters): Generator<ContentManifest>;
354
- findUntranslatedContent(targetLocale: string, options?: FindOptions): Generator<ContentManifest>;
355
- /**
356
- * Reindex files that were added or changed after initial creation
357
- *
358
- * This method:
359
- * 1. Either scans for all content files or processes specific paths
360
- * 2. Uses the path index to check if files are already indexed
361
- * 3. Indexes new files or force-reindexes specified files
362
- * 4. Optionally handles file deletions
363
- *
364
- * @param paths - Optional array of specific file paths to reindex. If not provided, scans all content files.
365
- * @param options - Options for reindexing behavior
366
- * @returns Statistics about the reindexing operation
367
- */
368
- reindex(paths?: string[], options?: {
369
- handleDeletions?: boolean;
370
- }): Promise<ReindexResult>;
371
- /**
372
- * Read content directly from cache
373
- * For testing purposes - returns null if not cached
374
- */
375
- readFromCache(id: string, locale: string): Promise<ContentData | null>;
376
- getContentAsBuffer(id: string, locale: string): Promise<{
377
- buffer: Uint8Array;
378
- etag: string;
379
- contentType: 'application/json' | 'text/mdx';
380
- } | null>;
381
- batchUpdate(operations: UpdateLocaleInput[]): Promise<BatchResult>;
382
- }
383
- //#endregion
384
270
  //#region src/content-watcher.d.ts
385
- interface ContentWatcherOptions {
386
- contentRoot: string;
387
- canvasDir?: string;
388
- }
271
+ type ContentWatcherOptions = ContentAPIOptions;
389
272
  interface WebSocketSender {
390
273
  send(payload: {
391
274
  type: string;
@@ -393,6 +276,25 @@ interface WebSocketSender {
393
276
  data: any;
394
277
  }): void;
395
278
  }
279
+ interface ContentWatchEvent {
280
+ file: string;
281
+ action: 'update' | 'create' | 'delete';
282
+ inMdxRoot: boolean;
283
+ inContentRoot: boolean;
284
+ }
285
+ interface ReindexResultLike {
286
+ updated: unknown[];
287
+ deleted?: {
288
+ id: string;
289
+ locale: string;
290
+ kind: 'page' | 'block' | 'data';
291
+ }[];
292
+ }
293
+ interface ReindexableContentAPI {
294
+ reindex(paths: string[], options?: {
295
+ handleDeletions?: boolean;
296
+ }): Promise<ReindexResultLike>;
297
+ }
396
298
  /**
397
299
  * Creates a content API instance for the given options
398
300
  */
@@ -400,7 +302,7 @@ declare function createContentAPI(options: ContentWatcherOptions): Promise<FileS
400
302
  /**
401
303
  * Creates file change handlers for content watching
402
304
  */
403
- declare function createContentWatchHandlers(contentApi: FileSystemContentAPI, options: ContentWatcherOptions, ws: WebSocketSender): {
305
+ declare function createContentWatchHandlers(contentApi: ReindexableContentAPI, options: ContentWatcherOptions, ws: WebSocketSender, onReindexed?: (event: ContentWatchEvent) => void | Promise<void>): {
404
306
  onChange: (file: string) => Promise<void>;
405
307
  onAdd: (file: string) => Promise<void>;
406
308
  onUnlink: (file: string) => Promise<void>;
@@ -448,12 +350,12 @@ interface ContentAPIRouterOptions {
448
350
  /** Content root directory for asset usage tracking */
449
351
  contentRoot?: string;
450
352
  }
451
- declare function createContentAPIRouter(api: ContentAPI, options?: ContentAPIRouterOptions): Hono<hono_types0.BlankEnv, hono_types0.BlankSchema, "/">;
353
+ declare function createContentAPIRouter(api: ContentAPI, options?: ContentAPIRouterOptions): Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
452
354
  /**
453
355
  * Create middleware for backwards compatibility with existing code
454
356
  * This wraps the Hono app to work with Node.js IncomingMessage/ServerResponse
455
357
  */
456
- declare function createContentMiddleware(contentApi: ContentAPI): (req: any, res: any, next: () => void) => Promise<void>;
358
+ declare function createContentMiddleware(contentApi: ContentAPI, options?: ContentAPIRouterOptions): (req: any, res: any, next: () => void) => Promise<void>;
457
359
  //#endregion
458
360
  //#region src/vite-plugin.d.ts
459
361
  interface ConlocaContentOptions {
@@ -467,5 +369,5 @@ interface ConlocaContentOptions {
467
369
  */
468
370
  declare function conlocaContent(options: ConlocaContentOptions): Plugin;
469
371
  //#endregion
470
- export { APIError, type AssetConfig, type AssetEntry, AssetManifest, type AssetManifestData, AssetOperations, BatchOperationResult, BatchResult, BlockFilters, Blocks, type CFAccessResult, type CFAccessUser, ComponentEntry, ComponentEntryWithId, ComponentRegistry, type ConlocaContentOptions, type ContentAPI, ContentAPIOptions, ContentData, ContentEntry, ContentIdentity, ContentListResult, ContentManifest, ContentMeta, ContentProp, ContentType, type ContentWatcherOptions, CreateBlockInput, CreateContentInput, CreatePageInput, CreateResult, CreateValidationResult, DataCollectionEntry, DataContext, DeleteLocaleInput, DeleteResult, ErrorCode, ErrorCodes, FileSystemContentAPI, FindOptions, GlobalFilters, InMemoryContentAPI, LocaleFileData, LocalePathData, LocaleUpdateData, LocaleVersion, LocalizedEntry, LocalizedManifest, MDXFrontmatter, MoveResult, PageReference, Site, SiteFilters, SitesConfig, UPDATE_SCOPE, UpdateLocaleInput, UpdateResult, UpdateScope, VXJSONFile, ValidationResult, type WebSocketSender, WriteResult, analyzeUpdateScope, buildLocaleVersion, buildPathnameHistory, conlocaContent, createContentAPI, createContentAPIRouter, createContentMiddleware, createContentWatchHandlers, extractBlockName, extractCFAccessToken, formatFileSize, generateContentId, getCurrentISODate, getMetadataSize, isContentPublished, isMetadataTooLarge, isValidBlockName, isValidPathname, localesOf, mapLocales, mapSiteNames, normalizePathname, parseDate, resolvePublishDate, serializeMdxWithFrontmatter, shouldUpdateModifiedTimestamp, updatePublishDates, validateAndPrepareMetadata, validateCFAccessRequest, validateCreateContent };
372
+ export { APIError, type AssetConfig, type AssetEntry, AssetManifest, type AssetManifestData, AssetOperations, BatchOperationResult, BatchResult, BlockFilters, Blocks, type CFAccessResult, type CFAccessUser, ComponentEntry, ComponentEntryWithId, ComponentRegistry, type ConlocaContentOptions, type ContentAPI, ContentAPIOptions, ContentData, ContentEntry, ContentIdentity, ContentListResult, ContentManifest, ContentMeta, ContentProp, ContentType, type ContentWatcherOptions, CreateBlockInput, CreateContentInput, CreatePageInput, CreateResult, CreateValidationResult, DataCollectionEntry, DataContext, DeleteLocaleInput, DeleteResult, ErrorCode, ErrorCodes, FileSystemContentAPI, FindOptions, GlobalFilters, InMemoryContentAPI, LocaleFileData, LocalePathData, LocaleUpdateData, LocaleVersion, LocalizedEntry, LocalizedManifest, MDXCompileResponse, MDXFrontmatter, MoveResult, PageReference, PathnameValidationReason, PathnameValidationResult, Site, SiteFilters, SitesConfig, UPDATE_SCOPE, UpdateLocaleInput, UpdateResult, UpdateScope, VXJSONFile, ValidationResult, type WebSocketSender, WriteResult, analyzeUpdateScope, buildLocaleVersion, buildPathnameHistory, conlocaContent, createContentAPI, createContentAPIRouter, createContentMiddleware, createContentWatchHandlers, extractBlockName, extractCFAccessToken, formatFileSize, generateContentId, getCurrentISODate, getMetadataSize, isContentPublished, isMetadataTooLarge, isValidBlockName, isValidPathname, localesOf, mapLocales, mapSiteNames, normalizeAndValidatePathname, normalizePathname, parseDate, readSitesConfig, resolvePublishDate, serializeMdxWithFrontmatter, shouldUpdateModifiedTimestamp, updatePublishDates, validateAndPrepareMetadata, validateCFAccessRequest, validateCreateContent };
471
373
  //# sourceMappingURL=node.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"node.d.mts","names":[],"sources":["../src/asset-manifest.ts","../src/asset-operations.ts","../src/cf-access.ts","../src/component-registry.ts","../src/filesystem-content-api.ts","../src/content-watcher.ts","../src/in-memory-content-api.ts","../src/middleware.ts","../src/vite-plugin.ts"],"mappings":";;;;;;cAkBa,aAAA;EAAA,QACH,YAAA;EAAA,QACA,KAAA;cAEI,UAAA;EAIN,IAAA,CAAA,GAAQ,OAAA,CAAQ,iBAAA;EAShB,KAAA,CAAM,IAAA,EAAM,iBAAA,GAAoB,OAAA;;EAKhC,YAAA,CAAa,EAAA,GAAK,IAAA,EAAM,iBAAA,KAAsB,iBAAA,GAAoB,OAAA;EAgBlE,GAAA,CAAI,YAAA,UAAsB,IAAA,EAAM,iBAAA,GAAoB,OAAA;EAOpD,MAAA,CAAO,YAAA,WAAuB,OAAA;EAU9B,GAAA,CAAI,YAAA,WAAuB,OAAA,CAAQ,iBAAA;EAjCX;;;;EA0CxB,aAAA,CAAc,QAAA,WAAmB,OAAA;IAAU,YAAA;IAAsB,IAAA,EAAM,iBAAA;EAAA;AAAA;;;UClE9D,WAAA;EACf,UAAA;EACA,WAAA;EACA,eAAA;;EAEA,WAAA;AAAA;AAAA,cAkCW,eAAA;EAAA,QACH,MAAA;EAAA,QACA,QAAA;EAAA,QACA,UAAA;EAAA,QACA,QAAA;cAEI,MAAA,EAAQ,WAAA;EDrBgC;EAAA,QCgCtC,aAAA;EAAA,QAOA,SAAA;EDvB4C;;;;EAAA,QCkClD,eAAA;EDR+B;;;;;EAAA,QC4BzB,eAAA;EAAA,QAgCN,cAAA;EAAA,QAKA,Y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U1B,cAAA,CAAe,OAAA,GAAU,aAAA,GAAgB,SAAA,CAAU,eAAA;EAInD,uBAAA,CAAwB,YAAA,UAAsB,OAAA,GAAU,WAAA,GAAc,SAAA,CAAU,eAAA;EAK3E,eAAA,CAAgB,KAAA,EAAO,iBAAA,GAAoB,OAAA,CAAQ,YAAA;EAoDnD,WAAA,CAAY,UAAA,EAAY,iBAAA,KAAsB,OAAA,CAAQ,WAAA;EAmC5D,UAAA,CAAW,EAAA,UAAY,OAAA,EAAS,YAAA;EA+ChC,KAAA,CAAA;EAIM,kBAAA,CACJ,EAAA,UACA,MAAA,WACC,OAAA;IACD,MAAA,EAAQ,UAAA;IACR,IAAA;IACA,WAAA;EAAA;AAAA;;;;;;ANvpBJ;UOgBiB,uBAAA;EACf,UAAA;EACA,WAAA,GAAc,IAAA,CAAK,WAAA;EPVL;EOYd,WAAA;AAAA;AAAA,iBAGc,sBAAA,CAAuB,GAAA,EAAK,UAAA,EAAY,OAAA,GAAU,uBAAA,GAAuB,IAAA,CAAA,WAAA,CAAA,QAAA,EAAA,WAAA,CAAA,WAAA;;;;;iBAgnCzE,uBAAA,CAAwB,UAAA,EAAY,UAAA,IAIpC,GAAA,OAAU,GAAA,OAAU,IAAA,iBAAgB,OAAA;;;UCvpCnC,qBAAA;EACf,WAAA;EACA,SAAA;EACA,QAAA;AAAA;ARSF;;;;AAAA,iBQFgB,cAAA,CAAe,OAAA,EAAS,qBAAA,GAAwB,MAAA"}
1
+ {"version":3,"file":"node.d.mts","names":[],"sources":["../src/asset-manifest.ts","../src/asset-operations.ts","../src/cf-access.ts","../src/component-registry.ts","../src/content-watcher.ts","../src/in-memory-content-api.ts","../src/middleware.ts","../src/vite-plugin.ts"],"mappings":";;;;;;;cAkBa;UACH;UACA;EAEI,YAAA;EAIN,QAAQ,QAAQ;EAShB,MAAM,MAAM,oBAAoB;;EAKhC,aAAa,KAAK,MAAM,sBAAsB,oBAAoB;EAgBlE,IAAI,sBAAsB,MAAM,oBAAoB;E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d.ts ADDED
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Node.js-specific exports for @conloca/content-api
3
+ *
4
+ * These exports require Node.js runtime APIs and should not be imported in browser environments.
5
+ * Use the main package exports for browser-compatible APIs.
6
+ */
7
+ export { type AssetEntry, AssetManifest, type AssetManifestData } from './asset-manifest';
8
+ export { type AssetConfig, AssetOperations } from './asset-operations';
9
+ export { Blocks } from './blocks';
10
+ export { type CFAccessResult, type CFAccessUser, extractCFAccessToken, validateCFAccessRequest, } from './cf-access.js';
11
+ export { ComponentRegistry } from './component-registry';
12
+ export * from './component-registry.types';
13
+ export type { ContentAPI } from './content-api.interface';
14
+ export * from './content-operations';
15
+ export * from './content-utils';
16
+ export type { ContentWatcherOptions, WebSocketSender } from './content-watcher';
17
+ export { createContentAPI, createContentWatchHandlers } from './content-watcher';
18
+ export { FileSystemContentAPI, readSitesConfig } from './filesystem-content-api';
19
+ export { InMemoryContentAPI } from './in-memory-content-api';
20
+ export { createContentAPIRouter, createContentMiddleware } from './middleware';
21
+ export { Site } from './site';
22
+ export * from './types';
23
+ export type { ConlocaContentOptions } from './vite-plugin';
24
+ export { conlocaContent } from './vite-plugin';
25
+ //# sourceMappingURL=node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,UAAU,EAAE,aAAa,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1F,OAAO,EAAE,KAAK,WAAW,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,cAAc,4BAA4B,CAAC;AAC3C,YAAY,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,YAAY,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAEjF,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,cAAc,SAAS,CAAC;AACxB,YAAY,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
package/dist/node.js ADDED
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Node.js-specific exports for @conloca/content-api
3
+ *
4
+ * These exports require Node.js runtime APIs and should not be imported in browser environments.
5
+ * Use the main package exports for browser-compatible APIs.
6
+ */
7
+ export { AssetManifest } from './asset-manifest';
8
+ export { AssetOperations } from './asset-operations';
9
+ export { Blocks } from './blocks';
10
+ // CF Access authentication
11
+ export { extractCFAccessToken, validateCFAccessRequest, } from './cf-access.js';
12
+ export { ComponentRegistry } from './component-registry';
13
+ export * from './component-registry.types';
14
+ export * from './content-operations';
15
+ export * from './content-utils';
16
+ export { createContentAPI, createContentWatchHandlers } from './content-watcher';
17
+ // Node.js specific implementations (require fs, xxhash, etc.)
18
+ export { FileSystemContentAPI, readSitesConfig } from './filesystem-content-api';
19
+ export { InMemoryContentAPI } from './in-memory-content-api';
20
+ export { createContentAPIRouter, createContentMiddleware } from './middleware';
21
+ export { Site } from './site';
22
+ // Re-export types and utilities that are safe for Node.js environments
23
+ export * from './types';
24
+ export { conlocaContent } from './vite-plugin';