@byline/core 0.10.2 → 0.10.4

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 (281) hide show
  1. package/dist/@types/admin-types.d.ts +0 -1
  2. package/dist/@types/admin-types.js +0 -1
  3. package/dist/@types/collection-types.d.ts +0 -1
  4. package/dist/@types/collection-types.js +0 -1
  5. package/dist/@types/db-types.d.ts +0 -1
  6. package/dist/@types/db-types.js +0 -1
  7. package/dist/@types/field-data-types.d.ts +0 -1
  8. package/dist/@types/field-data-types.js +0 -1
  9. package/dist/@types/field-types.d.ts +0 -1
  10. package/dist/@types/field-types.js +0 -1
  11. package/dist/@types/index.d.ts +0 -1
  12. package/dist/@types/index.js +0 -1
  13. package/dist/@types/populate-types.d.ts +0 -1
  14. package/dist/@types/populate-types.js +0 -1
  15. package/dist/@types/query-predicate.d.ts +0 -1
  16. package/dist/@types/query-predicate.js +0 -1
  17. package/dist/@types/site-config.d.ts +0 -1
  18. package/dist/@types/site-config.js +0 -1
  19. package/dist/@types/storage-types.d.ts +0 -1
  20. package/dist/@types/storage-types.js +0 -1
  21. package/dist/@types/store-types.d.ts +0 -1
  22. package/dist/@types/store-types.js +0 -1
  23. package/dist/@types/type-utils.d.ts +0 -1
  24. package/dist/@types/type-utils.js +0 -1
  25. package/dist/auth/apply-before-read.d.ts +0 -1
  26. package/dist/auth/apply-before-read.js +0 -1
  27. package/dist/auth/apply-before-read.test.node.d.ts +0 -1
  28. package/dist/auth/apply-before-read.test.node.js +0 -1
  29. package/dist/auth/assert-actor-can-perform.d.ts +0 -1
  30. package/dist/auth/assert-actor-can-perform.js +0 -1
  31. package/dist/auth/assert-actor-can-perform.test.node.d.ts +0 -1
  32. package/dist/auth/assert-actor-can-perform.test.node.js +0 -1
  33. package/dist/auth/index.d.ts +0 -1
  34. package/dist/auth/index.js +0 -1
  35. package/dist/auth/register-collection-abilities.d.ts +0 -1
  36. package/dist/auth/register-collection-abilities.js +0 -1
  37. package/dist/auth/register-collection-abilities.test.node.d.ts +0 -1
  38. package/dist/auth/register-collection-abilities.test.node.js +0 -1
  39. package/dist/config/config.d.ts +0 -1
  40. package/dist/config/config.js +0 -1
  41. package/dist/config/routes.d.ts +0 -1
  42. package/dist/config/routes.js +0 -1
  43. package/dist/config/validate-admin-configs.d.ts +0 -1
  44. package/dist/config/validate-admin-configs.js +0 -1
  45. package/dist/config/validate-admin-configs.test.node.d.ts +0 -1
  46. package/dist/config/validate-admin-configs.test.node.js +0 -1
  47. package/dist/config/validate-collections.d.ts +0 -1
  48. package/dist/config/validate-collections.js +0 -1
  49. package/dist/config/validate-collections.test.node.d.ts +0 -1
  50. package/dist/config/validate-collections.test.node.js +0 -1
  51. package/dist/core.d.ts +4 -3
  52. package/dist/core.js +8 -4
  53. package/dist/defaults/default-values.d.ts +0 -1
  54. package/dist/defaults/default-values.js +0 -1
  55. package/dist/index.d.ts +0 -1
  56. package/dist/index.js +0 -1
  57. package/dist/lib/errors.d.ts +0 -1
  58. package/dist/lib/errors.js +0 -1
  59. package/dist/lib/logger.d.ts +0 -1
  60. package/dist/lib/logger.js +0 -1
  61. package/dist/lib/registry.d.ts +0 -1
  62. package/dist/lib/registry.js +0 -1
  63. package/dist/logger/index.d.ts +0 -1
  64. package/dist/logger/index.js +0 -1
  65. package/dist/patches/apply-patches.d.ts +0 -1
  66. package/dist/patches/apply-patches.js +0 -1
  67. package/dist/patches/index.d.ts +0 -1
  68. package/dist/patches/index.js +0 -1
  69. package/dist/patches/patch-types.d.ts +0 -1
  70. package/dist/patches/patch-types.js +0 -1
  71. package/dist/patches/patch.test.node.d.ts +0 -1
  72. package/dist/patches/patch.test.node.js +0 -1
  73. package/dist/query/parse-where.d.ts +0 -1
  74. package/dist/query/parse-where.js +0 -1
  75. package/dist/query/parse-where.test.node.d.ts +0 -1
  76. package/dist/query/parse-where.test.node.js +0 -1
  77. package/dist/schemas/zod/builder.d.ts +0 -1
  78. package/dist/schemas/zod/builder.js +0 -1
  79. package/dist/schemas/zod/cache.d.ts +0 -1
  80. package/dist/schemas/zod/cache.js +0 -1
  81. package/dist/schemas/zod/index.d.ts +0 -1
  82. package/dist/schemas/zod/index.js +0 -1
  83. package/dist/schemas/zod/types.d.ts +0 -1
  84. package/dist/schemas/zod/types.js +0 -1
  85. package/dist/services/collection-bootstrap.d.ts +0 -1
  86. package/dist/services/collection-bootstrap.js +0 -1
  87. package/dist/services/collection-bootstrap.test.node.d.ts +0 -1
  88. package/dist/services/collection-bootstrap.test.node.js +0 -1
  89. package/dist/services/document-lifecycle.d.ts +0 -1
  90. package/dist/services/document-lifecycle.js +0 -1
  91. package/dist/services/document-lifecycle.test.node.d.ts +0 -1
  92. package/dist/services/document-lifecycle.test.node.js +0 -1
  93. package/dist/services/document-read.d.ts +0 -1
  94. package/dist/services/document-read.js +0 -1
  95. package/dist/services/field-upload.d.ts +0 -1
  96. package/dist/services/field-upload.js +0 -1
  97. package/dist/services/field-upload.test.node.d.ts +0 -1
  98. package/dist/services/field-upload.test.node.js +0 -1
  99. package/dist/services/index.d.ts +0 -1
  100. package/dist/services/index.js +0 -1
  101. package/dist/services/populate.d.ts +0 -1
  102. package/dist/services/populate.js +0 -1
  103. package/dist/services/populate.test.node.d.ts +0 -1
  104. package/dist/services/populate.test.node.js +0 -1
  105. package/dist/services/relation-projection.d.ts +0 -1
  106. package/dist/services/relation-projection.js +0 -1
  107. package/dist/services/richtext-populate.d.ts +0 -1
  108. package/dist/services/richtext-populate.js +0 -1
  109. package/dist/services/richtext-populate.test.node.d.ts +0 -1
  110. package/dist/services/richtext-populate.test.node.js +0 -1
  111. package/dist/storage/collection-fingerprint.d.ts +0 -1
  112. package/dist/storage/collection-fingerprint.js +0 -1
  113. package/dist/storage/collection-fingerprint.test.node.d.ts +0 -1
  114. package/dist/storage/collection-fingerprint.test.node.js +0 -1
  115. package/dist/storage/field-store-map.d.ts +0 -1
  116. package/dist/storage/field-store-map.js +0 -1
  117. package/dist/storage/field-store-map.test.node.d.ts +0 -1
  118. package/dist/storage/field-store-map.test.node.js +0 -1
  119. package/dist/storage/index.d.ts +0 -1
  120. package/dist/storage/index.js +0 -1
  121. package/dist/utils/normalise-dates.d.ts +0 -1
  122. package/dist/utils/normalise-dates.js +0 -1
  123. package/dist/utils/slugify.d.ts +0 -1
  124. package/dist/utils/slugify.js +0 -1
  125. package/dist/utils/slugify.test.node.d.ts +0 -1
  126. package/dist/utils/slugify.test.node.js +0 -1
  127. package/dist/utils/storage-utils.d.ts +0 -1
  128. package/dist/utils/storage-utils.js +0 -1
  129. package/dist/utils/utils.general.d.ts +0 -1
  130. package/dist/utils/utils.general.js +0 -1
  131. package/dist/validation/index.d.ts +0 -1
  132. package/dist/validation/index.js +0 -1
  133. package/dist/validation/shared.d.ts +0 -1
  134. package/dist/validation/shared.js +0 -1
  135. package/dist/workflow/index.d.ts +0 -1
  136. package/dist/workflow/index.js +0 -1
  137. package/dist/workflow/workflow.d.ts +0 -1
  138. package/dist/workflow/workflow.js +0 -1
  139. package/dist/workflow/workflow.test.node.d.ts +0 -1
  140. package/dist/workflow/workflow.test.node.js +0 -1
  141. package/package.json +2 -2
  142. package/dist/@types/admin-types.d.ts.map +0 -1
  143. package/dist/@types/admin-types.js.map +0 -1
  144. package/dist/@types/collection-types.d.ts.map +0 -1
  145. package/dist/@types/collection-types.js.map +0 -1
  146. package/dist/@types/db-types.d.ts.map +0 -1
  147. package/dist/@types/db-types.js.map +0 -1
  148. package/dist/@types/field-data-types.d.ts.map +0 -1
  149. package/dist/@types/field-data-types.js.map +0 -1
  150. package/dist/@types/field-types.d.ts.map +0 -1
  151. package/dist/@types/field-types.js.map +0 -1
  152. package/dist/@types/index.d.ts.map +0 -1
  153. package/dist/@types/index.js.map +0 -1
  154. package/dist/@types/populate-types.d.ts.map +0 -1
  155. package/dist/@types/populate-types.js.map +0 -1
  156. package/dist/@types/query-predicate.d.ts.map +0 -1
  157. package/dist/@types/query-predicate.js.map +0 -1
  158. package/dist/@types/site-config.d.ts.map +0 -1
  159. package/dist/@types/site-config.js.map +0 -1
  160. package/dist/@types/storage-types.d.ts.map +0 -1
  161. package/dist/@types/storage-types.js.map +0 -1
  162. package/dist/@types/store-types.d.ts.map +0 -1
  163. package/dist/@types/store-types.js.map +0 -1
  164. package/dist/@types/type-utils.d.ts.map +0 -1
  165. package/dist/@types/type-utils.js.map +0 -1
  166. package/dist/auth/apply-before-read.d.ts.map +0 -1
  167. package/dist/auth/apply-before-read.js.map +0 -1
  168. package/dist/auth/apply-before-read.test.node.d.ts.map +0 -1
  169. package/dist/auth/apply-before-read.test.node.js.map +0 -1
  170. package/dist/auth/assert-actor-can-perform.d.ts.map +0 -1
  171. package/dist/auth/assert-actor-can-perform.js.map +0 -1
  172. package/dist/auth/assert-actor-can-perform.test.node.d.ts.map +0 -1
  173. package/dist/auth/assert-actor-can-perform.test.node.js.map +0 -1
  174. package/dist/auth/index.d.ts.map +0 -1
  175. package/dist/auth/index.js.map +0 -1
  176. package/dist/auth/register-collection-abilities.d.ts.map +0 -1
  177. package/dist/auth/register-collection-abilities.js.map +0 -1
  178. package/dist/auth/register-collection-abilities.test.node.d.ts.map +0 -1
  179. package/dist/auth/register-collection-abilities.test.node.js.map +0 -1
  180. package/dist/config/config.d.ts.map +0 -1
  181. package/dist/config/config.js.map +0 -1
  182. package/dist/config/routes.d.ts.map +0 -1
  183. package/dist/config/routes.js.map +0 -1
  184. package/dist/config/validate-admin-configs.d.ts.map +0 -1
  185. package/dist/config/validate-admin-configs.js.map +0 -1
  186. package/dist/config/validate-admin-configs.test.node.d.ts.map +0 -1
  187. package/dist/config/validate-admin-configs.test.node.js.map +0 -1
  188. package/dist/config/validate-collections.d.ts.map +0 -1
  189. package/dist/config/validate-collections.js.map +0 -1
  190. package/dist/config/validate-collections.test.node.d.ts.map +0 -1
  191. package/dist/config/validate-collections.test.node.js.map +0 -1
  192. package/dist/core.d.ts.map +0 -1
  193. package/dist/core.js.map +0 -1
  194. package/dist/defaults/default-values.d.ts.map +0 -1
  195. package/dist/defaults/default-values.js.map +0 -1
  196. package/dist/index.d.ts.map +0 -1
  197. package/dist/index.js.map +0 -1
  198. package/dist/lib/errors.d.ts.map +0 -1
  199. package/dist/lib/errors.js.map +0 -1
  200. package/dist/lib/logger.d.ts.map +0 -1
  201. package/dist/lib/logger.js.map +0 -1
  202. package/dist/lib/registry.d.ts.map +0 -1
  203. package/dist/lib/registry.js.map +0 -1
  204. package/dist/logger/index.d.ts.map +0 -1
  205. package/dist/logger/index.js.map +0 -1
  206. package/dist/patches/apply-patches.d.ts.map +0 -1
  207. package/dist/patches/apply-patches.js.map +0 -1
  208. package/dist/patches/index.d.ts.map +0 -1
  209. package/dist/patches/index.js.map +0 -1
  210. package/dist/patches/patch-types.d.ts.map +0 -1
  211. package/dist/patches/patch-types.js.map +0 -1
  212. package/dist/patches/patch.test.node.d.ts.map +0 -1
  213. package/dist/patches/patch.test.node.js.map +0 -1
  214. package/dist/query/parse-where.d.ts.map +0 -1
  215. package/dist/query/parse-where.js.map +0 -1
  216. package/dist/query/parse-where.test.node.d.ts.map +0 -1
  217. package/dist/query/parse-where.test.node.js.map +0 -1
  218. package/dist/schemas/zod/builder.d.ts.map +0 -1
  219. package/dist/schemas/zod/builder.js.map +0 -1
  220. package/dist/schemas/zod/cache.d.ts.map +0 -1
  221. package/dist/schemas/zod/cache.js.map +0 -1
  222. package/dist/schemas/zod/index.d.ts.map +0 -1
  223. package/dist/schemas/zod/index.js.map +0 -1
  224. package/dist/schemas/zod/types.d.ts.map +0 -1
  225. package/dist/schemas/zod/types.js.map +0 -1
  226. package/dist/services/collection-bootstrap.d.ts.map +0 -1
  227. package/dist/services/collection-bootstrap.js.map +0 -1
  228. package/dist/services/collection-bootstrap.test.node.d.ts.map +0 -1
  229. package/dist/services/collection-bootstrap.test.node.js.map +0 -1
  230. package/dist/services/document-lifecycle.d.ts.map +0 -1
  231. package/dist/services/document-lifecycle.js.map +0 -1
  232. package/dist/services/document-lifecycle.test.node.d.ts.map +0 -1
  233. package/dist/services/document-lifecycle.test.node.js.map +0 -1
  234. package/dist/services/document-read.d.ts.map +0 -1
  235. package/dist/services/document-read.js.map +0 -1
  236. package/dist/services/field-upload.d.ts.map +0 -1
  237. package/dist/services/field-upload.js.map +0 -1
  238. package/dist/services/field-upload.test.node.d.ts.map +0 -1
  239. package/dist/services/field-upload.test.node.js.map +0 -1
  240. package/dist/services/index.d.ts.map +0 -1
  241. package/dist/services/index.js.map +0 -1
  242. package/dist/services/populate.d.ts.map +0 -1
  243. package/dist/services/populate.js.map +0 -1
  244. package/dist/services/populate.test.node.d.ts.map +0 -1
  245. package/dist/services/populate.test.node.js.map +0 -1
  246. package/dist/services/relation-projection.d.ts.map +0 -1
  247. package/dist/services/relation-projection.js.map +0 -1
  248. package/dist/services/richtext-populate.d.ts.map +0 -1
  249. package/dist/services/richtext-populate.js.map +0 -1
  250. package/dist/services/richtext-populate.test.node.d.ts.map +0 -1
  251. package/dist/services/richtext-populate.test.node.js.map +0 -1
  252. package/dist/storage/collection-fingerprint.d.ts.map +0 -1
  253. package/dist/storage/collection-fingerprint.js.map +0 -1
  254. package/dist/storage/collection-fingerprint.test.node.d.ts.map +0 -1
  255. package/dist/storage/collection-fingerprint.test.node.js.map +0 -1
  256. package/dist/storage/field-store-map.d.ts.map +0 -1
  257. package/dist/storage/field-store-map.js.map +0 -1
  258. package/dist/storage/field-store-map.test.node.d.ts.map +0 -1
  259. package/dist/storage/field-store-map.test.node.js.map +0 -1
  260. package/dist/storage/index.d.ts.map +0 -1
  261. package/dist/storage/index.js.map +0 -1
  262. package/dist/utils/normalise-dates.d.ts.map +0 -1
  263. package/dist/utils/normalise-dates.js.map +0 -1
  264. package/dist/utils/slugify.d.ts.map +0 -1
  265. package/dist/utils/slugify.js.map +0 -1
  266. package/dist/utils/slugify.test.node.d.ts.map +0 -1
  267. package/dist/utils/slugify.test.node.js.map +0 -1
  268. package/dist/utils/storage-utils.d.ts.map +0 -1
  269. package/dist/utils/storage-utils.js.map +0 -1
  270. package/dist/utils/utils.general.d.ts.map +0 -1
  271. package/dist/utils/utils.general.js.map +0 -1
  272. package/dist/validation/index.d.ts.map +0 -1
  273. package/dist/validation/index.js.map +0 -1
  274. package/dist/validation/shared.d.ts.map +0 -1
  275. package/dist/validation/shared.js.map +0 -1
  276. package/dist/workflow/index.d.ts.map +0 -1
  277. package/dist/workflow/index.js.map +0 -1
  278. package/dist/workflow/workflow.d.ts.map +0 -1
  279. package/dist/workflow/workflow.js.map +0 -1
  280. package/dist/workflow/workflow.test.node.d.ts.map +0 -1
  281. package/dist/workflow/workflow.test.node.js.map +0 -1
@@ -272,4 +272,3 @@ export interface CollectionAdminConfig<T = any> {
272
272
  * Sets `slug` from the schema's `path`.
273
273
  */
274
274
  export declare function defineAdmin<T = any>(schema: CollectionDefinition, config: Omit<CollectionAdminConfig<T>, 'slug'>): CollectionAdminConfig<T>;
275
- //# sourceMappingURL=admin-types.d.ts.map
@@ -15,4 +15,3 @@ export function defineAdmin(schema, config) {
15
15
  ...config,
16
16
  };
17
17
  }
18
- //# sourceMappingURL=admin-types.js.map
@@ -813,4 +813,3 @@ export type SerializableCollectionDefinition = Omit<CollectionDefinition, 'hooks
813
813
  * ```
814
814
  */
815
815
  export declare function toSerializableCollection(def: CollectionDefinition): SerializableCollectionDefinition;
816
- //# sourceMappingURL=collection-types.d.ts.map
@@ -214,4 +214,3 @@ export function toSerializableCollection(def) {
214
214
  fields: fields.map(serializeField),
215
215
  };
216
216
  }
217
- //# sourceMappingURL=collection-types.js.map
@@ -460,4 +460,3 @@ export interface IDocumentQueries {
460
460
  total: number;
461
461
  }>;
462
462
  }
463
- //# sourceMappingURL=db-types.d.ts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=db-types.js.map
@@ -144,4 +144,3 @@ export interface RelatedDocumentValue {
144
144
  cascadeDelete?: boolean;
145
145
  }
146
146
  export {};
147
- //# sourceMappingURL=field-data-types.d.ts.map
@@ -35,4 +35,3 @@ export function createPendingStoredFileValue(file, previewUrl, dimensions) {
35
35
  thumbnailGenerated: false,
36
36
  };
37
37
  }
38
- //# sourceMappingURL=field-data-types.js.map
@@ -576,4 +576,3 @@ export interface RichTextPopulateContext {
576
576
  */
577
577
  export type RichTextPopulateFn = (ctx: RichTextPopulateContext) => Promise<void>;
578
578
  export {};
579
- //# sourceMappingURL=field-types.d.ts.map
@@ -29,4 +29,3 @@ export function isGroupField(field) {
29
29
  export function isValueField(field) {
30
30
  return !isStructureField(field);
31
31
  }
32
- //# sourceMappingURL=field-types.js.map
@@ -15,4 +15,3 @@ export * from './query-predicate.js';
15
15
  export * from './site-config.js';
16
16
  export * from './storage-types.js';
17
17
  export * from './store-types.js';
18
- //# sourceMappingURL=index.d.ts.map
@@ -15,4 +15,3 @@ export * from './query-predicate.js';
15
15
  export * from './site-config.js';
16
16
  export * from './storage-types.js';
17
17
  export * from './store-types.js';
18
- //# sourceMappingURL=index.js.map
@@ -51,4 +51,3 @@ export type PopulateMap = Record<string, PopulateFieldSpec>;
51
51
  * projection selectors.
52
52
  */
53
53
  export type PopulateSpec = true | '*' | PopulateMap;
54
- //# sourceMappingURL=populate-types.d.ts.map
@@ -6,4 +6,3 @@
6
6
  * Copyright (c) Infonomic Company Limited
7
7
  */
8
8
  export {};
9
- //# sourceMappingURL=populate-types.js.map
@@ -71,4 +71,3 @@ export type SortDirection = 'asc' | 'desc';
71
71
  * (`createdAt`, `updatedAt`, `path`) compile to a direct `ORDER BY`.
72
72
  */
73
73
  export type SortSpec = Record<string, SortDirection>;
74
- //# sourceMappingURL=query-predicate.d.ts.map
@@ -6,4 +6,3 @@
6
6
  * Copyright (c) Infonomic Company Limited
7
7
  */
8
8
  export {};
9
- //# sourceMappingURL=query-predicate.js.map
@@ -209,4 +209,3 @@ export interface ServerConfig<TAdminStore = unknown> extends BaseConfig {
209
209
  };
210
210
  };
211
211
  }
212
- //# sourceMappingURL=site-config.d.ts.map
@@ -6,4 +6,3 @@
6
6
  * Copyright (c) Infonomic Company Limited
7
7
  */
8
8
  export {};
9
- //# sourceMappingURL=site-config.js.map
@@ -83,4 +83,3 @@ export interface IStorageProvider {
83
83
  */
84
84
  getUrl(storagePath: string): string;
85
85
  }
86
- //# sourceMappingURL=storage-types.d.ts.map
@@ -6,4 +6,3 @@
6
6
  * Copyright (c) Infonomic Company Limited
7
7
  */
8
8
  export {};
9
- //# sourceMappingURL=storage-types.js.map
@@ -131,4 +131,3 @@ export interface UnionRowValue {
131
131
  value_decimal: string | null;
132
132
  value_float: number | null;
133
133
  }
134
- //# sourceMappingURL=store-types.d.ts.map
@@ -21,4 +21,3 @@ export function isNumericStore(fieldValue) {
21
21
  export function isDateTimeStore(fieldValue) {
22
22
  return ['datetime', 'date', 'time'].includes(fieldValue.field_type);
23
23
  }
24
- //# sourceMappingURL=store-types.js.map
@@ -14,4 +14,3 @@ export type DeepMutable<T> = T extends ReadonlyArray<infer U> ? Array<DeepMutabl
14
14
  -readonly [K in keyof T]: DeepMutable<T[K]>;
15
15
  } : T;
16
16
  export type ValueUnion<T extends Record<string, any>> = T[keyof T];
17
- //# sourceMappingURL=type-utils.d.ts.map
@@ -6,4 +6,3 @@
6
6
  * Copyright (c) Infonomic Company Limited
7
7
  */
8
8
  export {};
9
- //# sourceMappingURL=type-utils.js.map
@@ -33,4 +33,3 @@ export declare function applyBeforeRead(params: {
33
33
  requestContext: RequestContext;
34
34
  readContext: ReadContext;
35
35
  }): Promise<QueryPredicate | null>;
36
- //# sourceMappingURL=apply-before-read.d.ts.map
@@ -65,4 +65,3 @@ function normalizeBeforeReadHook(slot) {
65
65
  return [];
66
66
  return Array.isArray(slot) ? slot : [slot];
67
67
  }
68
- //# sourceMappingURL=apply-before-read.js.map
@@ -6,4 +6,3 @@
6
6
  * Copyright (c) Infonomic Company Limited
7
7
  */
8
8
  export {};
9
- //# sourceMappingURL=apply-before-read.test.node.d.ts.map
@@ -141,4 +141,3 @@ describe('applyBeforeRead', () => {
141
141
  expect(result).toEqual({ tenantId: 't-1' });
142
142
  });
143
143
  });
144
- //# sourceMappingURL=apply-before-read.test.node.js.map
@@ -36,4 +36,3 @@ import { type CollectionAbilityVerb } from './register-collection-abilities.js';
36
36
  * See docs/analysis/AUTHN-AUTHZ-ANALYSIS.md §8.
37
37
  */
38
38
  export declare function assertActorCanPerform(context: RequestContext | undefined, collectionPath: string, verb: CollectionAbilityVerb): void;
39
- //# sourceMappingURL=assert-actor-can-perform.d.ts.map
@@ -61,4 +61,3 @@ export function assertActorCanPerform(context, collectionPath, verb) {
61
61
  }
62
62
  actor.assertAbility(collectionAbilityKey(collectionPath, verb));
63
63
  }
64
- //# sourceMappingURL=assert-actor-can-perform.js.map
@@ -6,4 +6,3 @@
6
6
  * Copyright (c) Infonomic Company Limited
7
7
  */
8
8
  export {};
9
- //# sourceMappingURL=assert-actor-can-perform.test.node.d.ts.map
@@ -116,4 +116,3 @@ describe('assertActorCanPerform', () => {
116
116
  });
117
117
  });
118
118
  });
119
- //# sourceMappingURL=assert-actor-can-perform.test.node.js.map
@@ -8,4 +8,3 @@
8
8
  export { applyBeforeRead } from './apply-before-read.js';
9
9
  export { assertActorCanPerform } from './assert-actor-can-perform.js';
10
10
  export { COLLECTION_ABILITY_VERBS, type CollectionAbilityVerb, collectionAbilityKey, registerCollectionAbilities, } from './register-collection-abilities.js';
11
- //# sourceMappingURL=index.d.ts.map
@@ -8,4 +8,3 @@
8
8
  export { applyBeforeRead } from './apply-before-read.js';
9
9
  export { assertActorCanPerform } from './assert-actor-can-perform.js';
10
10
  export { COLLECTION_ABILITY_VERBS, collectionAbilityKey, registerCollectionAbilities, } from './register-collection-abilities.js';
11
- //# sourceMappingURL=index.js.map
@@ -37,4 +37,3 @@ export declare const COLLECTION_ABILITY_VERBS: readonly ["read", "create", "upda
37
37
  export type CollectionAbilityVerb = (typeof COLLECTION_ABILITY_VERBS)[number];
38
38
  /** Compute the full ability key for a collection path and verb. */
39
39
  export declare function collectionAbilityKey(path: string, verb: CollectionAbilityVerb): string;
40
- //# sourceMappingURL=register-collection-abilities.d.ts.map
@@ -84,4 +84,3 @@ export const COLLECTION_ABILITY_VERBS = [
84
84
  export function collectionAbilityKey(path, verb) {
85
85
  return `collections.${path}.${verb}`;
86
86
  }
87
- //# sourceMappingURL=register-collection-abilities.js.map
@@ -6,4 +6,3 @@
6
6
  * Copyright (c) Infonomic Company Limited
7
7
  */
8
8
  export {};
9
- //# sourceMappingURL=register-collection-abilities.test.node.d.ts.map
@@ -121,4 +121,3 @@ describe('COLLECTION_ABILITY_VERBS / collectionAbilityKey', () => {
121
121
  }
122
122
  });
123
123
  });
124
- //# sourceMappingURL=register-collection-abilities.test.node.js.map
@@ -7,4 +7,3 @@ export declare function getClientConfig(): ClientConfig;
7
7
  export declare function getServerConfig(): ServerConfig;
8
8
  export declare function defineBylineCore(core: unknown): void;
9
9
  export declare function getBylineCoreUnsafe(): unknown;
10
- //# sourceMappingURL=config.d.ts.map
@@ -105,4 +105,3 @@ export function getBylineCoreUnsafe() {
105
105
  }
106
106
  return core;
107
107
  }
108
- //# sourceMappingURL=config.js.map
@@ -13,4 +13,3 @@ import type { RoutesConfig } from '../@types/site-config.js';
13
13
  * need null checks at every call site.
14
14
  */
15
15
  export declare function resolveRoutes(routes?: Partial<RoutesConfig>): RoutesConfig;
16
- //# sourceMappingURL=routes.d.ts.map
@@ -23,4 +23,3 @@ export function resolveRoutes(routes) {
23
23
  api: routes?.api ?? DEFAULT_ROUTES.api,
24
24
  };
25
25
  }
26
- //# sourceMappingURL=routes.js.map
@@ -30,4 +30,3 @@ import type { CollectionAdminConfig, CollectionDefinition } from '../@types/inde
30
30
  * necessarily wired up.
31
31
  */
32
32
  export declare function validateAdminConfigs(admins: readonly CollectionAdminConfig[] | undefined, collections: readonly CollectionDefinition[]): void;
33
- //# sourceMappingURL=validate-admin-configs.d.ts.map
@@ -247,4 +247,3 @@ function validateOne(admin, collectionsByPath) {
247
247
  }
248
248
  }
249
249
  }
250
- //# sourceMappingURL=validate-admin-configs.js.map
@@ -6,4 +6,3 @@
6
6
  * Copyright (c) Infonomic Company Limited
7
7
  */
8
8
  export {};
9
- //# sourceMappingURL=validate-admin-configs.test.node.d.ts.map
@@ -221,4 +221,3 @@ describe('validateAdminConfigs', () => {
221
221
  expect(() => validateAdminConfigs([admin], [collection])).toThrow(/collides with a schema field/);
222
222
  });
223
223
  });
224
- //# sourceMappingURL=validate-admin-configs.test.node.js.map
@@ -30,4 +30,3 @@ export declare const RESERVED_FIELD_NAMES: ReadonlySet<string>;
30
30
  * necessarily wired up.
31
31
  */
32
32
  export declare function validateCollections(collections: readonly CollectionDefinition[]): void;
33
- //# sourceMappingURL=validate-collections.d.ts.map
@@ -67,4 +67,3 @@ export function validateCollections(collections) {
67
67
  }
68
68
  }
69
69
  }
70
- //# sourceMappingURL=validate-collections.js.map
@@ -6,4 +6,3 @@
6
6
  * Copyright (c) Infonomic Company Limited
7
7
  */
8
8
  export {};
9
- //# sourceMappingURL=validate-collections.test.node.d.ts.map
@@ -146,4 +146,3 @@ describe('validateCollections', () => {
146
146
  expect(() => validateCollections([collection])).toThrow(/no top-level field with that name/);
147
147
  });
148
148
  });
149
- //# sourceMappingURL=validate-collections.test.node.js.map
package/dist/core.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * Copyright (c) Infonomic Company Limited
7
7
  */
8
8
  import { type AbilityDescriptor, AbilityRegistry, type SessionProvider } from '@byline/auth';
9
- import { type Logger as PinoLogger } from 'pino';
9
+ import type { Logger as PinoLogger } from 'pino';
10
10
  import { type BylineLogger } from './lib/logger.js';
11
11
  import { type CollectionRecord } from './services/collection-bootstrap.js';
12
12
  import type { CollectionDefinition, IDbAdapter, IStorageProvider, ServerConfig } from './@types/index.js';
@@ -73,7 +73,9 @@ export interface BylineCore<TAdminStore = unknown> {
73
73
  * backward compatibility with `getServerConfig()`.
74
74
  *
75
75
  * @param config - Server configuration (collections, db, storage, i18n).
76
- * @param pinoLogger - Optional raw Pino instance. Defaults to `pino({ level: 'info' })`.
76
+ * @param pinoLogger - Optional raw Pino instance. When omitted a default
77
+ * `pino({ level: 'info' })` is constructed via dynamic import so the
78
+ * pino runtime stays out of the client bundle (see import comment above).
77
79
  */
78
80
  export declare const initBylineCore: <TAdminStore = unknown>(config: ServerConfig<TAdminStore>, pinoLogger?: PinoLogger) => Promise<BylineCore<TAdminStore>>;
79
81
  /**
@@ -86,4 +88,3 @@ export declare const initBylineCore: <TAdminStore = unknown>(config: ServerConfi
86
88
  * touch `adminStore` can omit it.
87
89
  */
88
90
  export declare function getBylineCore<TAdminStore = unknown>(): BylineCore<TAdminStore>;
89
- //# sourceMappingURL=core.d.ts.map
package/dist/core.js CHANGED
@@ -6,7 +6,6 @@
6
6
  * Copyright (c) Infonomic Company Limited
7
7
  */
8
8
  import { AbilityRegistry } from '@byline/auth';
9
- import { pino } from 'pino';
10
9
  import { registerCollectionAbilities } from './auth/register-collection-abilities.js';
11
10
  import { defineBylineCore, defineServerConfig, getBylineCoreUnsafe } from './config/config.js';
12
11
  import { createBylineLogger, defineLogger } from './lib/logger.js';
@@ -21,9 +20,15 @@ import { validateRichTextFieldFlags } from './services/richtext-populate.js';
21
20
  * backward compatibility with `getServerConfig()`.
22
21
  *
23
22
  * @param config - Server configuration (collections, db, storage, i18n).
24
- * @param pinoLogger - Optional raw Pino instance. Defaults to `pino({ level: 'info' })`.
23
+ * @param pinoLogger - Optional raw Pino instance. When omitted a default
24
+ * `pino({ level: 'info' })` is constructed via dynamic import so the
25
+ * pino runtime stays out of the client bundle (see import comment above).
25
26
  */
26
- export const initBylineCore = async (config, pinoLogger = pino({ level: 'info' })) => {
27
+ export const initBylineCore = async (config, pinoLogger) => {
28
+ if (!pinoLogger) {
29
+ const { pino } = await import('pino');
30
+ pinoLogger = pino({ level: 'info' });
31
+ }
27
32
  const registry = new Registry()
28
33
  .addValue('config', config)
29
34
  .addValue('collections', config.collections)
@@ -96,4 +101,3 @@ export const initBylineCore = async (config, pinoLogger = pino({ level: 'info' }
96
101
  export function getBylineCore() {
97
102
  return getBylineCoreUnsafe();
98
103
  }
99
- //# sourceMappingURL=core.js.map
@@ -10,4 +10,3 @@ export declare function resolveFieldDefaultValue(field: {
10
10
  * (either via `defaultValue` or via nested structure fields that have child defaults).
11
11
  */
12
12
  export declare function buildInitialDataFromFields(fields: FieldSet, ctx?: Partial<DefaultValueContext>): Promise<Record<string, any>>;
13
- //# sourceMappingURL=default-values.d.ts.map
@@ -57,4 +57,3 @@ export async function buildInitialDataFromFields(fields, ctx) {
57
57
  }
58
58
  return out;
59
59
  }
60
- //# sourceMappingURL=default-values.js.map
package/dist/index.d.ts CHANGED
@@ -17,4 +17,3 @@ export * from './storage/index.js';
17
17
  export { formatTextValue, looksLikeISODate, type SlugifierFn, type SlugifyContext, slugify, } from './utils/slugify.js';
18
18
  export { getUploadFields, hasUploadField, isUploadField } from './utils/storage-utils.js';
19
19
  export * from './workflow/index.js';
20
- //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -33,4 +33,3 @@ export * from './storage/index.js';
33
33
  export { formatTextValue, looksLikeISODate, slugify, } from './utils/slugify.js';
34
34
  export { getUploadFields, hasUploadField, isUploadField } from './utils/storage-utils.js';
35
35
  export * from './workflow/index.js';
36
- //# sourceMappingURL=index.js.map
@@ -95,4 +95,3 @@ export declare const ERR_PATCH_FAILED: (opts: BylineErrorOptions, errorConstruct
95
95
  export declare const ERR_DATABASE: (opts: BylineErrorOptions, errorConstructor?: any) => BylineError;
96
96
  export declare const ERR_STORAGE: (opts: BylineErrorOptions, errorConstructor?: any) => BylineError;
97
97
  export declare const ERR_READ_BUDGET_EXCEEDED: (opts: BylineErrorOptions, errorConstructor?: any) => BylineError;
98
- //# sourceMappingURL=errors.d.ts.map
@@ -131,4 +131,3 @@ export const ERR_PATCH_FAILED = createErrorType(ErrorCodes.PATCH_FAILED);
131
131
  export const ERR_DATABASE = createErrorType(ErrorCodes.DATABASE);
132
132
  export const ERR_STORAGE = createErrorType(ErrorCodes.STORAGE);
133
133
  export const ERR_READ_BUDGET_EXCEEDED = createErrorType(ErrorCodes.READ_BUDGET_EXCEEDED);
134
- //# sourceMappingURL=errors.js.map
@@ -59,4 +59,3 @@ export declare const createBylineLogger: (deps: {
59
59
  export declare function defineLogger(logger: BylineLogger): void;
60
60
  export declare function getLogger(): BylineLogger;
61
61
  export {};
62
- //# sourceMappingURL=logger.d.ts.map
@@ -117,4 +117,3 @@ export function getLogger() {
117
117
  }
118
118
  return logger;
119
119
  }
120
- //# sourceMappingURL=logger.js.map
@@ -62,4 +62,3 @@ export declare class AsyncRegistry<TRequires extends Record<Token, unknown> = {}
62
62
  }
63
63
  export type RegisteredServices<TRegistry extends Registry<any, any> | AsyncRegistry<any, any>> = TRegistry extends Registry<any, infer TProvided> ? TProvided : TRegistry extends AsyncRegistry<any, infer TProvided> ? Normalize<TProvided> : never;
64
64
  export {};
65
- //# sourceMappingURL=registry.d.ts.map
@@ -130,4 +130,3 @@ export class AsyncRegistry {
130
130
  return result;
131
131
  }
132
132
  }
133
- //# sourceMappingURL=registry.js.map
@@ -1,3 +1,2 @@
1
1
  export { createBylineLogger, defineLogger, getLogContext, getLogger, withLogContext, } from '../lib/logger.js';
2
2
  export type { BylineLogger, LogContext, LogData, LogLevel, LogLevelWithSilent, } from '../lib/logger.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,2 @@
1
1
  // packages/core/src/logger/index.ts
2
2
  export { createBylineLogger, defineLogger, getLogContext, getLogger, withLogContext, } from '../lib/logger.js';
3
- //# sourceMappingURL=index.js.map
@@ -18,4 +18,3 @@ export declare function parsePatchPath(path: PatchPath): PathSegment[];
18
18
  export declare function resolveFieldForPath(definition: CollectionDefinition | null | undefined, path: PatchPath): Field | null;
19
19
  export declare function applyPatches(definition: CollectionDefinition, doc: Record<string, any>, patches: DocumentPatch[]): ApplyPatchesResult;
20
20
  export {};
21
- //# sourceMappingURL=apply-patches.d.ts.map
@@ -354,4 +354,3 @@ export function applyPatches(definition, doc, patches) {
354
354
  });
355
355
  return { doc: working, errors, warnings };
356
356
  }
357
- //# sourceMappingURL=apply-patches.js.map
@@ -1,3 +1,2 @@
1
1
  export * from './apply-patches.js';
2
2
  export * from './patch-types.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,3 @@
1
1
  // packages/byline/src/patches/index.ts
2
2
  export * from './apply-patches.js';
3
3
  export * from './patch-types.js';
4
- //# sourceMappingURL=index.js.map
@@ -79,4 +79,3 @@ export interface ApplyPatchesResult {
79
79
  export interface PatchContext {
80
80
  definition: CollectionDefinition;
81
81
  }
82
- //# sourceMappingURL=patch-types.d.ts.map
@@ -1,3 +1,2 @@
1
1
  // Patch model shared between dashboard, core and adapters
2
2
  export {};
3
- //# sourceMappingURL=patch-types.js.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=patch.test.node.d.ts.map
@@ -190,4 +190,3 @@ describe('applyPatches', () => {
190
190
  expect(updated.content[0]?.constrainedWidth).toBe(true);
191
191
  });
192
192
  });
193
- //# sourceMappingURL=patch.test.node.js.map
@@ -97,4 +97,3 @@ export declare function mergePredicates(hookPredicate: QueryPredicate | null | u
97
97
  export declare function parseSort(sort: SortSpec | undefined, definition: CollectionDefinition): ParsedSort;
98
98
  /** Exported for testing. */
99
99
  export { DOCUMENT_LEVEL_KEYS, DOCUMENT_SORT_COLUMNS };
100
- //# sourceMappingURL=parse-where.d.ts.map
@@ -349,4 +349,3 @@ function normaliseToOperator(raw) {
349
349
  }
350
350
  /** Exported for testing. */
351
351
  export { DOCUMENT_LEVEL_KEYS, DOCUMENT_SORT_COLUMNS };
352
- //# sourceMappingURL=parse-where.js.map
@@ -6,4 +6,3 @@
6
6
  * Copyright (c) Infonomic Company Limited
7
7
  */
8
8
  export {};
9
- //# sourceMappingURL=parse-where.test.node.d.ts.map
@@ -578,4 +578,3 @@ describe('mergePredicates', () => {
578
578
  expect(parsed.filters[1]).toMatchObject({ kind: 'field', fieldName: 'title' });
579
579
  });
580
580
  });
581
- //# sourceMappingURL=parse-where.test.node.js.map
@@ -463,4 +463,3 @@ export declare const createTypedCollectionSchemasForPath: (path: string) => {
463
463
  [x: string]: z.ZodOptional<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>;
464
464
  }, z.core.$strip>;
465
465
  };
466
- //# sourceMappingURL=builder.d.ts.map
@@ -273,4 +273,3 @@ export const createCollectionSchemas = (collection) => {
273
273
  // Aliases for consistency
274
274
  export const createTypedCollectionSchemas = createCollectionSchemas;
275
275
  export const createTypedCollectionSchemasForPath = createCollectionSchemasForPath;
276
- //# sourceMappingURL=builder.js.map
@@ -11,4 +11,3 @@ export declare const getCacheStats: () => {
11
11
  keys: string[];
12
12
  };
13
13
  export {};
14
- //# sourceMappingURL=cache.d.ts.map
@@ -37,4 +37,3 @@ export const getCacheStats = () => ({
37
37
  size: schemaCache.size,
38
38
  keys: Array.from(schemaCache.keys()),
39
39
  });
40
- //# sourceMappingURL=cache.js.map
@@ -1,4 +1,3 @@
1
1
  export * from './builder.js';
2
2
  export * from './cache.js';
3
3
  export * from './types.js';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,3 @@
1
1
  export * from './builder.js';
2
2
  export * from './cache.js';
3
3
  export * from './types.js';
4
- //# sourceMappingURL=index.js.map
@@ -10,4 +10,3 @@ export type CollectionSchemaTypes<T extends ReturnType<typeof getCollectionSchem
10
10
  UpdateType: z.infer<T['update']>;
11
11
  };
12
12
  export type AnyCollectionSchemaTypes = CollectionSchemaTypes<ReturnType<typeof getCollectionSchemasForPath>>;
13
- //# sourceMappingURL=types.d.ts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=types.js.map
@@ -43,4 +43,3 @@ export interface EnsureCollectionsInput {
43
43
  * `(collectionId, collectionVersion)` without another DB round-trip.
44
44
  */
45
45
  export declare function ensureCollections({ definitions, db, logger, }: EnsureCollectionsInput): Promise<Map<string, CollectionRecord>>;
46
- //# sourceMappingURL=collection-bootstrap.d.ts.map
@@ -105,4 +105,3 @@ async function reconcileCollection(definition, db, logger) {
105
105
  record: { collectionId, version: nextVersion, schemaHash: fingerprint },
106
106
  };
107
107
  }
108
- //# sourceMappingURL=collection-bootstrap.js.map
@@ -6,4 +6,3 @@
6
6
  * Copyright (c) Infonomic Company Limited
7
7
  */
8
8
  export {};
9
- //# sourceMappingURL=collection-bootstrap.test.node.d.ts.map
@@ -205,4 +205,3 @@ describe('ensureCollections', () => {
205
205
  expect(update).not.toHaveBeenCalled();
206
206
  });
207
207
  });
208
- //# sourceMappingURL=collection-bootstrap.test.node.js.map
@@ -242,4 +242,3 @@ export declare function unpublishDocument(ctx: DocumentLifecycleContext, params:
242
242
  export declare function deleteDocument(ctx: DocumentLifecycleContext, params: {
243
243
  documentId: string;
244
244
  }): Promise<DeleteDocumentResult>;
245
- //# sourceMappingURL=document-lifecycle.d.ts.map
@@ -478,4 +478,3 @@ export async function deleteDocument(ctx, params) {
478
478
  return { deletedVersionCount };
479
479
  });
480
480
  }
481
- //# sourceMappingURL=document-lifecycle.js.map
@@ -6,4 +6,3 @@
6
6
  * Copyright (c) Infonomic Company Limited
7
7
  */
8
8
  export {};
9
- //# sourceMappingURL=document-lifecycle.test.node.d.ts.map