@ontrails/core 1.0.0-beta.2 → 1.0.0-beta.21

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 (245) hide show
  1. package/CHANGELOG.md +283 -5
  2. package/README.md +113 -33
  3. package/package.json +11 -1
  4. package/src/activation-provenance.ts +111 -0
  5. package/src/activation-source-compatibility.ts +430 -0
  6. package/src/activation-source-projection.ts +221 -0
  7. package/src/activation-source.ts +91 -0
  8. package/src/blob-ref.ts +51 -0
  9. package/src/branded.ts +1 -1
  10. package/src/compose-batch.ts +69 -0
  11. package/src/compose-schema.ts +36 -0
  12. package/src/context.ts +44 -10
  13. package/src/contour.ts +346 -0
  14. package/src/derive.ts +59 -18
  15. package/src/detours.ts +8 -0
  16. package/src/draft.ts +342 -0
  17. package/src/error-projection.ts +51 -0
  18. package/src/errors.ts +309 -48
  19. package/src/execute.ts +1577 -0
  20. package/src/fire.ts +1169 -0
  21. package/src/index.ts +477 -32
  22. package/src/internal/fork-ctx.ts +69 -0
  23. package/src/layer-projection.ts +193 -0
  24. package/src/layer.ts +43 -6
  25. package/src/observe.ts +361 -0
  26. package/src/path-security.ts +1 -1
  27. package/src/permits.ts +12 -0
  28. package/src/redaction/patterns.ts +6 -3
  29. package/src/resilience.ts +11 -11
  30. package/src/resource-config.ts +792 -0
  31. package/src/resource.ts +194 -0
  32. package/src/result.ts +36 -4
  33. package/src/run.ts +76 -0
  34. package/src/schedule-runtime.ts +689 -0
  35. package/src/schedule.ts +326 -0
  36. package/src/serialization.ts +119 -39
  37. package/src/signal-diagnostics.ts +633 -0
  38. package/src/signal-ref.ts +87 -0
  39. package/src/signal.ts +104 -0
  40. package/src/store/accessor-protocol.ts +56 -0
  41. package/src/store/index.ts +4 -0
  42. package/src/structured-examples.ts +248 -0
  43. package/src/surface-derivation.ts +91 -0
  44. package/src/surface-filter.ts +176 -0
  45. package/src/surface-versioning.ts +42 -0
  46. package/src/topo.ts +769 -57
  47. package/src/tracing.ts +345 -0
  48. package/src/trail.ts +1161 -29
  49. package/src/trails/derive-trail.ts +842 -0
  50. package/src/trails/index.ts +9 -0
  51. package/src/trails/ingest.ts +139 -0
  52. package/src/trails-db.ts +208 -0
  53. package/src/transport-error-map.ts +174 -0
  54. package/src/type-utils.ts +87 -0
  55. package/src/types.ts +254 -12
  56. package/src/validate-established-topo.ts +69 -0
  57. package/src/validate-topo.ts +442 -35
  58. package/src/validation.ts +152 -4
  59. package/src/version-marker.ts +716 -0
  60. package/src/version-resolution.ts +308 -0
  61. package/src/version-runtime.ts +120 -0
  62. package/src/webhook.ts +278 -0
  63. package/src/workspace.ts +1 -1
  64. package/src/zod-wrappers.ts +72 -0
  65. package/.turbo/turbo-build.log +0 -1
  66. package/.turbo/turbo-lint.log +0 -3
  67. package/.turbo/turbo-typecheck.log +0 -1
  68. package/dist/adapters.d.ts +0 -39
  69. package/dist/adapters.d.ts.map +0 -1
  70. package/dist/adapters.js +0 -2
  71. package/dist/adapters.js.map +0 -1
  72. package/dist/blob-ref.d.ts +0 -20
  73. package/dist/blob-ref.d.ts.map +0 -1
  74. package/dist/blob-ref.js +0 -22
  75. package/dist/blob-ref.js.map +0 -1
  76. package/dist/branded.d.ts +0 -36
  77. package/dist/branded.d.ts.map +0 -1
  78. package/dist/branded.js +0 -89
  79. package/dist/branded.js.map +0 -1
  80. package/dist/collections.d.ts +0 -31
  81. package/dist/collections.d.ts.map +0 -1
  82. package/dist/collections.js +0 -60
  83. package/dist/collections.js.map +0 -1
  84. package/dist/context.d.ts +0 -10
  85. package/dist/context.d.ts.map +0 -1
  86. package/dist/context.js +0 -15
  87. package/dist/context.js.map +0 -1
  88. package/dist/derive.d.ts +0 -33
  89. package/dist/derive.d.ts.map +0 -1
  90. package/dist/derive.js +0 -122
  91. package/dist/derive.js.map +0 -1
  92. package/dist/errors.d.ts +0 -83
  93. package/dist/errors.d.ts.map +0 -1
  94. package/dist/errors.js +0 -142
  95. package/dist/errors.js.map +0 -1
  96. package/dist/event.d.ts +0 -45
  97. package/dist/event.d.ts.map +0 -1
  98. package/dist/event.js +0 -17
  99. package/dist/event.js.map +0 -1
  100. package/dist/fetch.d.ts +0 -15
  101. package/dist/fetch.d.ts.map +0 -1
  102. package/dist/fetch.js +0 -102
  103. package/dist/fetch.js.map +0 -1
  104. package/dist/guards.d.ts +0 -17
  105. package/dist/guards.d.ts.map +0 -1
  106. package/dist/guards.js +0 -25
  107. package/dist/guards.js.map +0 -1
  108. package/dist/health.d.ts +0 -18
  109. package/dist/health.d.ts.map +0 -1
  110. package/dist/health.js +0 -5
  111. package/dist/health.js.map +0 -1
  112. package/dist/hike.d.ts +0 -36
  113. package/dist/hike.d.ts.map +0 -1
  114. package/dist/hike.js +0 -20
  115. package/dist/hike.js.map +0 -1
  116. package/dist/index.d.ts +0 -34
  117. package/dist/index.d.ts.map +0 -1
  118. package/dist/index.js +0 -38
  119. package/dist/index.js.map +0 -1
  120. package/dist/job.d.ts +0 -24
  121. package/dist/job.d.ts.map +0 -1
  122. package/dist/job.js +0 -17
  123. package/dist/job.js.map +0 -1
  124. package/dist/layer.d.ts +0 -17
  125. package/dist/layer.d.ts.map +0 -1
  126. package/dist/layer.js +0 -21
  127. package/dist/layer.js.map +0 -1
  128. package/dist/path-security.d.ts +0 -28
  129. package/dist/path-security.d.ts.map +0 -1
  130. package/dist/path-security.js +0 -63
  131. package/dist/path-security.js.map +0 -1
  132. package/dist/patterns/bulk.d.ts +0 -15
  133. package/dist/patterns/bulk.d.ts.map +0 -1
  134. package/dist/patterns/bulk.js +0 -14
  135. package/dist/patterns/bulk.js.map +0 -1
  136. package/dist/patterns/change.d.ts +0 -10
  137. package/dist/patterns/change.d.ts.map +0 -1
  138. package/dist/patterns/change.js +0 -10
  139. package/dist/patterns/change.js.map +0 -1
  140. package/dist/patterns/date-range.d.ts +0 -10
  141. package/dist/patterns/date-range.d.ts.map +0 -1
  142. package/dist/patterns/date-range.js +0 -10
  143. package/dist/patterns/date-range.js.map +0 -1
  144. package/dist/patterns/index.d.ts +0 -9
  145. package/dist/patterns/index.d.ts.map +0 -1
  146. package/dist/patterns/index.js +0 -9
  147. package/dist/patterns/index.js.map +0 -1
  148. package/dist/patterns/pagination.d.ts +0 -18
  149. package/dist/patterns/pagination.d.ts.map +0 -1
  150. package/dist/patterns/pagination.js +0 -18
  151. package/dist/patterns/pagination.js.map +0 -1
  152. package/dist/patterns/progress.d.ts +0 -11
  153. package/dist/patterns/progress.d.ts.map +0 -1
  154. package/dist/patterns/progress.js +0 -11
  155. package/dist/patterns/progress.js.map +0 -1
  156. package/dist/patterns/sorting.d.ts +0 -13
  157. package/dist/patterns/sorting.d.ts.map +0 -1
  158. package/dist/patterns/sorting.js +0 -10
  159. package/dist/patterns/sorting.js.map +0 -1
  160. package/dist/patterns/status.d.ts +0 -15
  161. package/dist/patterns/status.d.ts.map +0 -1
  162. package/dist/patterns/status.js +0 -9
  163. package/dist/patterns/status.js.map +0 -1
  164. package/dist/patterns/timestamps.d.ts +0 -10
  165. package/dist/patterns/timestamps.d.ts.map +0 -1
  166. package/dist/patterns/timestamps.js +0 -10
  167. package/dist/patterns/timestamps.js.map +0 -1
  168. package/dist/redaction/index.d.ts +0 -4
  169. package/dist/redaction/index.d.ts.map +0 -1
  170. package/dist/redaction/index.js +0 -3
  171. package/dist/redaction/index.js.map +0 -1
  172. package/dist/redaction/patterns.d.ts +0 -9
  173. package/dist/redaction/patterns.d.ts.map +0 -1
  174. package/dist/redaction/patterns.js +0 -39
  175. package/dist/redaction/patterns.js.map +0 -1
  176. package/dist/redaction/redactor.d.ts +0 -27
  177. package/dist/redaction/redactor.d.ts.map +0 -1
  178. package/dist/redaction/redactor.js +0 -89
  179. package/dist/redaction/redactor.js.map +0 -1
  180. package/dist/resilience.d.ts +0 -34
  181. package/dist/resilience.d.ts.map +0 -1
  182. package/dist/resilience.js +0 -164
  183. package/dist/resilience.js.map +0 -1
  184. package/dist/result.d.ts +0 -57
  185. package/dist/result.d.ts.map +0 -1
  186. package/dist/result.js +0 -145
  187. package/dist/result.js.map +0 -1
  188. package/dist/serialization.d.ts +0 -27
  189. package/dist/serialization.d.ts.map +0 -1
  190. package/dist/serialization.js +0 -115
  191. package/dist/serialization.js.map +0 -1
  192. package/dist/topo.d.ts +0 -18
  193. package/dist/topo.d.ts.map +0 -1
  194. package/dist/topo.js +0 -74
  195. package/dist/topo.js.map +0 -1
  196. package/dist/trail.d.ts +0 -83
  197. package/dist/trail.d.ts.map +0 -1
  198. package/dist/trail.js +0 -16
  199. package/dist/trail.js.map +0 -1
  200. package/dist/types.d.ts +0 -46
  201. package/dist/types.d.ts.map +0 -1
  202. package/dist/types.js +0 -2
  203. package/dist/types.js.map +0 -1
  204. package/dist/validate-topo.d.ts +0 -24
  205. package/dist/validate-topo.d.ts.map +0 -1
  206. package/dist/validate-topo.js +0 -108
  207. package/dist/validate-topo.js.map +0 -1
  208. package/dist/validation.d.ts +0 -27
  209. package/dist/validation.d.ts.map +0 -1
  210. package/dist/validation.js +0 -134
  211. package/dist/validation.js.map +0 -1
  212. package/dist/workspace.d.ts +0 -25
  213. package/dist/workspace.d.ts.map +0 -1
  214. package/dist/workspace.js +0 -57
  215. package/dist/workspace.js.map +0 -1
  216. package/src/__tests__/blob-ref.test.ts +0 -103
  217. package/src/__tests__/branded.test.ts +0 -148
  218. package/src/__tests__/collections.test.ts +0 -126
  219. package/src/__tests__/context.test.ts +0 -66
  220. package/src/__tests__/derive.test.ts +0 -159
  221. package/src/__tests__/errors.test.ts +0 -309
  222. package/src/__tests__/event.test.ts +0 -82
  223. package/src/__tests__/fetch.test.ts +0 -217
  224. package/src/__tests__/guards.test.ts +0 -102
  225. package/src/__tests__/hike.test.ts +0 -117
  226. package/src/__tests__/job.test.ts +0 -98
  227. package/src/__tests__/layer.test.ts +0 -224
  228. package/src/__tests__/path-security.test.ts +0 -114
  229. package/src/__tests__/patterns.test.ts +0 -273
  230. package/src/__tests__/redaction.test.ts +0 -244
  231. package/src/__tests__/resilience.test.ts +0 -246
  232. package/src/__tests__/result.test.ts +0 -155
  233. package/src/__tests__/serialization.test.ts +0 -236
  234. package/src/__tests__/topo.test.ts +0 -184
  235. package/src/__tests__/trail.test.ts +0 -179
  236. package/src/__tests__/validate-topo.test.ts +0 -201
  237. package/src/__tests__/validation.test.ts +0 -283
  238. package/src/__tests__/workspace.test.ts +0 -183
  239. package/src/adapters.ts +0 -68
  240. package/src/event.ts +0 -77
  241. package/src/health.ts +0 -23
  242. package/src/hike.ts +0 -77
  243. package/src/job.ts +0 -20
  244. package/tsconfig.json +0 -9
  245. package/tsconfig.tsbuildinfo +0 -1
package/dist/index.js DELETED
@@ -1,38 +0,0 @@
1
- // Result
2
- export { Result } from './result.js';
3
- // Errors
4
- export { TrailsError, ValidationError, AmbiguousError, AssertionError, NotFoundError, AlreadyExistsError, ConflictError, PermissionError, TimeoutError, RateLimitError, NetworkError, InternalError, AuthError, CancelledError, exitCodeMap, statusCodeMap, jsonRpcCodeMap, retryableMap, isRetryable, isTrailsError, } from './errors.js';
5
- // Context factory
6
- export { createTrailContext } from './context.js';
7
- // Trail
8
- export { trail } from './trail.js';
9
- // Hike
10
- export { hike } from './hike.js';
11
- // Event
12
- export { event } from './event.js';
13
- // Topo
14
- export { topo } from './topo.js';
15
- // Topo validation
16
- export { validateTopo } from './validate-topo.js';
17
- // Layer
18
- export { composeLayers } from './layer.js';
19
- // Derive
20
- export { deriveFields } from './derive.js';
21
- // Validation
22
- export { validateInput, validateOutput, formatZodIssues, zodToJsonSchema, } from './validation.js';
23
- // Serialization
24
- export { serializeError, deserializeError } from './serialization.js';
25
- // Resilience
26
- export { retry, withTimeout, shouldRetry, getBackoffDelay, } from './resilience.js';
27
- // Fetch — fromFetch is available as Result.fromFetch()
28
- // Branded types
29
- export { brand, unbrand, uuid, email, nonEmptyString, positiveInt, shortId, hashId, } from './branded.js';
30
- // Path Security
31
- export { securePath, isPathSafe, resolveSafePath } from './path-security.js';
32
- // Workspace
33
- export { findWorkspaceRoot, isInsideWorkspace, getRelativePath, } from './workspace.js';
34
- // Guards
35
- export { isDefined, isNonEmptyString, isPlainObject, hasProperty, assertNever, } from './guards.js';
36
- // Collections
37
- export { chunk, dedupe, groupBy, sortBy, isNonEmptyArray, } from './collections.js';
38
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,SAAS;AACT,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,SAAS;AACT,OAAO,EACL,WAAW,EACX,eAAe,EACf,cAAc,EACd,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,aAAa,EACb,SAAS,EACT,cAAc,EACd,WAAW,EACX,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,aAAa,GACd,MAAM,aAAa,CAAC;AAcrB,kBAAkB;AAClB,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,QAAQ;AACR,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAGnC,OAAO;AACP,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,QAAQ;AACR,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAGnC,OAAO;AACP,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,kBAAkB;AAClB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,QAAQ;AACR,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAgB3C,SAAS;AACT,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,aAAa;AACb,OAAO,EACL,aAAa,EACb,cAAc,EACd,eAAe,EACf,eAAe,GAChB,MAAM,iBAAiB,CAAC;AAEzB,gBAAgB;AAChB,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtE,aAAa;AACb,OAAO,EACL,KAAK,EACL,WAAW,EACX,WAAW,EACX,eAAe,GAChB,MAAM,iBAAiB,CAAC;AAGzB,uDAAuD;AAEvD,gBAAgB;AAChB,OAAO,EACL,KAAK,EACL,OAAO,EACP,IAAI,EACJ,KAAK,EACL,cAAc,EACd,WAAW,EACX,OAAO,EACP,MAAM,GACP,MAAM,cAAc,CAAC;AAStB,gBAAgB;AAChB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE7E,YAAY;AACZ,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAChB,MAAM,gBAAgB,CAAC;AAExB,SAAS;AACT,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,WAAW,GACZ,MAAM,aAAa,CAAC;AAErB,cAAc;AACd,OAAO,EACL,KAAK,EACL,MAAM,EACN,OAAO,EACP,MAAM,EACN,eAAe,GAChB,MAAM,kBAAkB,CAAC"}
package/dist/job.d.ts DELETED
@@ -1,24 +0,0 @@
1
- import { z } from 'zod';
2
- /**
3
- * Proof: job-style output schema composes from existing pattern helpers.
4
- * No dedicated `kind: "job"` needed — regular trails with status+progress output work.
5
- */
6
- export declare const jobOutputSchema: z.ZodObject<{
7
- completedAt: z.ZodOptional<z.ZodString>;
8
- error: z.ZodOptional<z.ZodString>;
9
- jobId: z.ZodString;
10
- result: z.ZodOptional<z.ZodUnknown>;
11
- startedAt: z.ZodOptional<z.ZodString>;
12
- status: z.ZodEnum<{
13
- cancelled: "cancelled";
14
- pending: "pending";
15
- running: "running";
16
- completed: "completed";
17
- failed: "failed";
18
- }>;
19
- current: z.ZodNumber;
20
- percentage: z.ZodOptional<z.ZodNumber>;
21
- total: z.ZodNumber;
22
- }, z.core.$strip>;
23
- export type JobOutput = z.infer<typeof jobOutputSchema>;
24
- //# sourceMappingURL=job.d.ts.map
package/dist/job.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"job.d.ts","sourceRoot":"","sources":["../src/job.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;iBAQ1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
package/dist/job.js DELETED
@@ -1,17 +0,0 @@
1
- import { z } from 'zod';
2
- import { progressFields } from './patterns/progress.js';
3
- import { statusFields } from './patterns/status.js';
4
- /**
5
- * Proof: job-style output schema composes from existing pattern helpers.
6
- * No dedicated `kind: "job"` needed — regular trails with status+progress output work.
7
- */
8
- export const jobOutputSchema = z.object({
9
- ...progressFields().shape,
10
- ...statusFields().shape,
11
- completedAt: z.string().optional(),
12
- error: z.string().optional(),
13
- jobId: z.string(),
14
- result: z.unknown().optional(),
15
- startedAt: z.string().optional(),
16
- });
17
- //# sourceMappingURL=job.js.map
package/dist/job.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"job.js","sourceRoot":"","sources":["../src/job.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,GAAG,cAAc,EAAE,CAAC,KAAK;IACzB,GAAG,YAAY,EAAE,CAAC,KAAK;IACvB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC9B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC"}
package/dist/layer.d.ts DELETED
@@ -1,17 +0,0 @@
1
- import type { Trail } from './trail.js';
2
- import type { Implementation } from './types.js';
3
- /** A composable middleware that wraps trail implementations */
4
- export interface Layer {
5
- readonly name: string;
6
- readonly description?: string | undefined;
7
- /** Wrap a trail's implementation, returning a new implementation */
8
- wrap<I, O>(trail: Trail<I, O>, implementation: Implementation<I, O>): Implementation<I, O>;
9
- }
10
- /**
11
- * Apply layers outermost-first: layers[0] wraps layers[1] wraps ... wraps
12
- * the base implementation.
13
- *
14
- * An empty layers array returns the implementation unchanged.
15
- */
16
- export declare const composeLayers: <I, O>(layers: readonly Layer[], trail: Trail<I, O>, implementation: Implementation<I, O>) => Implementation<I, O>;
17
- //# sourceMappingURL=layer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"layer.d.ts","sourceRoot":"","sources":["../src/layer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAMjD,+DAA+D;AAC/D,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE1C,oEAAoE;IACpE,IAAI,CAAC,CAAC,EAAE,CAAC,EACP,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAClB,cAAc,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,GACnC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACzB;AAMD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAI,CAAC,EAAE,CAAC,EAChC,QAAQ,SAAS,KAAK,EAAE,EACxB,OAAO,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAClB,gBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,KACnC,cAAc,CAAC,CAAC,EAAE,CAAC,CAUrB,CAAC"}
package/dist/layer.js DELETED
@@ -1,21 +0,0 @@
1
- // ---------------------------------------------------------------------------
2
- // Composition
3
- // ---------------------------------------------------------------------------
4
- /**
5
- * Apply layers outermost-first: layers[0] wraps layers[1] wraps ... wraps
6
- * the base implementation.
7
- *
8
- * An empty layers array returns the implementation unchanged.
9
- */
10
- export const composeLayers = (layers, trail, implementation) => {
11
- // Fold right so layers[0] is the outermost wrapper
12
- let result = implementation;
13
- for (let i = layers.length - 1; i >= 0; i -= 1) {
14
- const layer = layers[i];
15
- if (layer) {
16
- result = layer.wrap(trail, result);
17
- }
18
- }
19
- return result;
20
- };
21
- //# sourceMappingURL=layer.js.map
package/dist/layer.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"layer.js","sourceRoot":"","sources":["../src/layer.ts"],"names":[],"mappings":"AAmBA,8EAA8E;AAC9E,cAAc;AACd,8EAA8E;AAE9E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,MAAwB,EACxB,KAAkB,EAClB,cAAoC,EACd,EAAE;IACxB,mDAAmD;IACnD,IAAI,MAAM,GAAG,cAAc,CAAC;IAC5B,KAAK,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/C,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QACxB,IAAI,KAAK,EAAE,CAAC;YACV,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
@@ -1,28 +0,0 @@
1
- /**
2
- * Path security utilities for preventing path traversal attacks.
3
- *
4
- * All functions are runtime-agnostic (Node / Bun compatible).
5
- */
6
- import { PermissionError } from './errors.js';
7
- import { Result } from './result.js';
8
- /**
9
- * Resolves `userPath` relative to `basePath` and ensures it stays within
10
- * the base directory. Returns the resolved absolute path on success, or a
11
- * `PermissionError` if the path escapes.
12
- *
13
- * Uses lexical path comparison (not `realpath`). Does not follow symlinks —
14
- * if an attacker can create symlinks inside `basePath`, those could point
15
- * outside the base. Use `realpath` before calling in symlink-sensitive environments.
16
- */
17
- export declare const securePath: (basePath: string, userPath: string) => Result<string, PermissionError>;
18
- /**
19
- * Returns `true` if `userPath` (resolved against `basePath`) stays within
20
- * `basePath`.
21
- */
22
- export declare const isPathSafe: (basePath: string, userPath: string) => boolean;
23
- /**
24
- * Joins multiple path segments, resolves them against `basePath`, and
25
- * validates the result stays within the base directory.
26
- */
27
- export declare const resolveSafePath: (basePath: string, ...segments: string[]) => Result<string, PermissionError>;
28
- //# sourceMappingURL=path-security.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"path-security.d.ts","sourceRoot":"","sources":["../src/path-security.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAmBrC;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,GACrB,UAAU,MAAM,EAChB,UAAU,MAAM,KACf,MAAM,CAAC,MAAM,EAAE,eAAe,CAgBhC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,UAAU,MAAM,EAAE,UAAU,MAAM,KAAG,OAI/D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,GAC1B,UAAU,MAAM,EAChB,GAAG,UAAU,MAAM,EAAE,KACpB,MAAM,CAAC,MAAM,EAAE,eAAe,CAchC,CAAC"}
@@ -1,63 +0,0 @@
1
- /**
2
- * Path security utilities for preventing path traversal attacks.
3
- *
4
- * All functions are runtime-agnostic (Node / Bun compatible).
5
- */
6
- import { resolve, relative, normalize, isAbsolute } from 'node:path';
7
- import { PermissionError } from './errors.js';
8
- import { Result } from './result.js';
9
- // ---------------------------------------------------------------------------
10
- // Internal
11
- // ---------------------------------------------------------------------------
12
- /** Returns true when `target` is equal to or a descendant of `base`. */
13
- const isWithin = (base, target) => {
14
- const rel = relative(base, target);
15
- // Empty string means they are the same directory.
16
- // A relative path starting with ".." means it escapes.
17
- // An absolute path means a completely different tree.
18
- return rel === '' || (!rel.startsWith('..') && !isAbsolute(rel));
19
- };
20
- // ---------------------------------------------------------------------------
21
- // Public API
22
- // ---------------------------------------------------------------------------
23
- /**
24
- * Resolves `userPath` relative to `basePath` and ensures it stays within
25
- * the base directory. Returns the resolved absolute path on success, or a
26
- * `PermissionError` if the path escapes.
27
- *
28
- * Uses lexical path comparison (not `realpath`). Does not follow symlinks —
29
- * if an attacker can create symlinks inside `basePath`, those could point
30
- * outside the base. Use `realpath` before calling in symlink-sensitive environments.
31
- */
32
- export const securePath = (basePath, userPath) => {
33
- const base = resolve(basePath);
34
- const resolved = resolve(base, userPath);
35
- if (!isWithin(base, resolved)) {
36
- return Result.err(new PermissionError(`Path traversal detected: "${userPath}" escapes "${basePath}"`, {
37
- context: { basePath: base, resolved, userPath },
38
- }));
39
- }
40
- return Result.ok(resolved);
41
- };
42
- /**
43
- * Returns `true` if `userPath` (resolved against `basePath`) stays within
44
- * `basePath`.
45
- */
46
- export const isPathSafe = (basePath, userPath) => {
47
- const base = resolve(basePath);
48
- const resolved = resolve(base, userPath);
49
- return isWithin(base, resolved);
50
- };
51
- /**
52
- * Joins multiple path segments, resolves them against `basePath`, and
53
- * validates the result stays within the base directory.
54
- */
55
- export const resolveSafePath = (basePath, ...segments) => {
56
- const base = resolve(basePath);
57
- const joined = resolve(base, ...segments.map((s) => normalize(s)));
58
- if (!isWithin(base, joined)) {
59
- return Result.err(new PermissionError(`Path traversal detected: segments escape "${basePath}"`, { context: { basePath: base, resolved: joined, segments } }));
60
- }
61
- return Result.ok(joined);
62
- };
63
- //# sourceMappingURL=path-security.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"path-security.js","sourceRoot":"","sources":["../src/path-security.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAErE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,8EAA8E;AAC9E,WAAW;AACX,8EAA8E;AAE9E,wEAAwE;AACxE,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,MAAc,EAAW,EAAE;IACzD,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACnC,kDAAkD;IAClD,uDAAuD;IACvD,sDAAsD;IACtD,OAAO,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;AACnE,CAAC,CAAC;AAEF,8EAA8E;AAC9E,aAAa;AACb,8EAA8E;AAE9E;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,QAAgB,EAChB,QAAgB,EACiB,EAAE;IACnC,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC/B,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAEzC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,CAAC;QAC9B,OAAO,MAAM,CAAC,GAAG,CACf,IAAI,eAAe,CACjB,6BAA6B,QAAQ,cAAc,QAAQ,GAAG,EAC9D;YACE,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE;SAChD,CACF,CACF,CAAC;IACJ,CAAC;IAED,OAAO,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;AAC7B,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,QAAgB,EAAE,QAAgB,EAAW,EAAE;IACxE,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC/B,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACzC,OAAO,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAClC,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,QAAgB,EAChB,GAAG,QAAkB,EACY,EAAE;IACnC,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC/B,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEnE,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC;QAC5B,OAAO,MAAM,CAAC,GAAG,CACf,IAAI,eAAe,CACjB,6CAA6C,QAAQ,GAAG,EACxD,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,CAC5D,CACF,CAAC;IACJ,CAAC;IAED,OAAO,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;AAC3B,CAAC,CAAC"}
@@ -1,15 +0,0 @@
1
- /**
2
- * Bulk operation schema helpers for @ontrails/core/patterns
3
- */
4
- import { z } from 'zod';
5
- /** Bulk operation output wrapper for a given item schema. */
6
- export declare const bulkOutput: <T>(itemSchema: z.ZodType<T>) => z.ZodObject<{
7
- errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
8
- index: z.ZodNumber;
9
- message: z.ZodString;
10
- }, z.core.$strip>>>;
11
- failed: z.ZodNumber;
12
- items: z.ZodArray<z.ZodType<T, unknown, z.core.$ZodTypeInternals<T, unknown>>>;
13
- succeeded: z.ZodNumber;
14
- }, z.core.$strip>;
15
- //# sourceMappingURL=bulk.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bulk.d.ts","sourceRoot":"","sources":["../../src/patterns/bulk.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,6DAA6D;AAC7D,eAAO,MAAM,UAAU,GAAI,CAAC,EAAE,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;;;;;;;;iBAQlD,CAAC"}
@@ -1,14 +0,0 @@
1
- /**
2
- * Bulk operation schema helpers for @ontrails/core/patterns
3
- */
4
- import { z } from 'zod';
5
- /** Bulk operation output wrapper for a given item schema. */
6
- export const bulkOutput = (itemSchema) => z.object({
7
- errors: z
8
- .array(z.object({ index: z.number(), message: z.string() }))
9
- .optional(),
10
- failed: z.number(),
11
- items: z.array(itemSchema),
12
- succeeded: z.number(),
13
- });
14
- //# sourceMappingURL=bulk.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bulk.js","sourceRoot":"","sources":["../../src/patterns/bulk.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,6DAA6D;AAC7D,MAAM,CAAC,MAAM,UAAU,GAAG,CAAI,UAAwB,EAAE,EAAE,CACxD,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,CAAC;SACN,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;SAC3D,QAAQ,EAAE;IACb,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;IAC1B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Change-tracking schema helpers for @ontrails/core/patterns
3
- */
4
- import { z } from 'zod';
5
- /** Before/after change output for a given schema. */
6
- export declare const changeOutput: <T>(schema: z.ZodType<T>) => z.ZodObject<{
7
- after: z.ZodType<T, unknown, z.core.$ZodTypeInternals<T, unknown>>;
8
- before: z.ZodOptional<z.ZodType<T, unknown, z.core.$ZodTypeInternals<T, unknown>>>;
9
- }, z.core.$strip>;
10
- //# sourceMappingURL=change.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"change.d.ts","sourceRoot":"","sources":["../../src/patterns/change.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,qDAAqD;AACrD,eAAO,MAAM,YAAY,GAAI,CAAC,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;;;iBAIhD,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Change-tracking schema helpers for @ontrails/core/patterns
3
- */
4
- import { z } from 'zod';
5
- /** Before/after change output for a given schema. */
6
- export const changeOutput = (schema) => z.object({
7
- after: schema,
8
- before: schema.optional(),
9
- });
10
- //# sourceMappingURL=change.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"change.js","sourceRoot":"","sources":["../../src/patterns/change.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,qDAAqD;AACrD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAI,MAAoB,EAAE,EAAE,CACtD,CAAC,CAAC,MAAM,CAAC;IACP,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE;CAC1B,CAAC,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Date-range schema helpers for @ontrails/core/patterns
3
- */
4
- import { z } from 'zod';
5
- /** Optional since/until date-range fields. */
6
- export declare const dateRangeFields: () => z.ZodObject<{
7
- since: z.ZodOptional<z.ZodString>;
8
- until: z.ZodOptional<z.ZodString>;
9
- }, z.core.$strip>;
10
- //# sourceMappingURL=date-range.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"date-range.d.ts","sourceRoot":"","sources":["../../src/patterns/date-range.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8CAA8C;AAC9C,eAAO,MAAM,eAAe;;;iBAIxB,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Date-range schema helpers for @ontrails/core/patterns
3
- */
4
- import { z } from 'zod';
5
- /** Optional since/until date-range fields. */
6
- export const dateRangeFields = () => z.object({
7
- since: z.string().optional(),
8
- until: z.string().optional(),
9
- });
10
- //# sourceMappingURL=date-range.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"date-range.js","sourceRoot":"","sources":["../../src/patterns/date-range.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8CAA8C;AAC9C,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE,CAClC,CAAC,CAAC,MAAM,CAAC;IACP,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAC"}
@@ -1,9 +0,0 @@
1
- export { paginationFields, paginatedOutput } from './pagination.js';
2
- export { bulkOutput } from './bulk.js';
3
- export { timestampFields } from './timestamps.js';
4
- export { dateRangeFields } from './date-range.js';
5
- export { sortFields } from './sorting.js';
6
- export { statusFields } from './status.js';
7
- export { changeOutput } from './change.js';
8
- export { progressFields } from './progress.js';
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/patterns/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
@@ -1,9 +0,0 @@
1
- export { paginationFields, paginatedOutput } from './pagination.js';
2
- export { bulkOutput } from './bulk.js';
3
- export { timestampFields } from './timestamps.js';
4
- export { dateRangeFields } from './date-range.js';
5
- export { sortFields } from './sorting.js';
6
- export { statusFields } from './status.js';
7
- export { changeOutput } from './change.js';
8
- export { progressFields } from './progress.js';
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/patterns/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
@@ -1,18 +0,0 @@
1
- /**
2
- * Pagination schema helpers for @ontrails/core/patterns
3
- */
4
- import { z } from 'zod';
5
- /** Common pagination input fields. */
6
- export declare const paginationFields: () => z.ZodObject<{
7
- cursor: z.ZodOptional<z.ZodString>;
8
- limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
9
- offset: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10
- }, z.core.$strip>;
11
- /** Paginated output wrapper for a given item schema. */
12
- export declare const paginatedOutput: <T>(itemSchema: z.ZodType<T>) => z.ZodObject<{
13
- hasMore: z.ZodBoolean;
14
- items: z.ZodArray<z.ZodType<T, unknown, z.core.$ZodTypeInternals<T, unknown>>>;
15
- nextCursor: z.ZodOptional<z.ZodString>;
16
- total: z.ZodNumber;
17
- }, z.core.$strip>;
18
- //# sourceMappingURL=pagination.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/patterns/pagination.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,sCAAsC;AACtC,eAAO,MAAM,gBAAgB;;;;iBAKzB,CAAC;AAEL,wDAAwD;AACxD,eAAO,MAAM,eAAe,GAAI,CAAC,EAAE,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;;;;;iBAMvD,CAAC"}
@@ -1,18 +0,0 @@
1
- /**
2
- * Pagination schema helpers for @ontrails/core/patterns
3
- */
4
- import { z } from 'zod';
5
- /** Common pagination input fields. */
6
- export const paginationFields = () => z.object({
7
- cursor: z.string().optional(),
8
- limit: z.number().optional().default(20),
9
- offset: z.number().optional().default(0),
10
- });
11
- /** Paginated output wrapper for a given item schema. */
12
- export const paginatedOutput = (itemSchema) => z.object({
13
- hasMore: z.boolean(),
14
- items: z.array(itemSchema),
15
- nextCursor: z.string().optional(),
16
- total: z.number(),
17
- });
18
- //# sourceMappingURL=pagination.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../src/patterns/pagination.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,sCAAsC;AACtC,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE,CACnC,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IACxC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;CACzC,CAAC,CAAC;AAEL,wDAAwD;AACxD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAI,UAAwB,EAAE,EAAE,CAC7D,CAAC,CAAC,MAAM,CAAC;IACP,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;IAC1B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC"}
@@ -1,11 +0,0 @@
1
- /**
2
- * Progress schema helpers for @ontrails/core/patterns
3
- */
4
- import { z } from 'zod';
5
- /** Progress tracking fields. */
6
- export declare const progressFields: () => z.ZodObject<{
7
- current: z.ZodNumber;
8
- percentage: z.ZodOptional<z.ZodNumber>;
9
- total: z.ZodNumber;
10
- }, z.core.$strip>;
11
- //# sourceMappingURL=progress.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/patterns/progress.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gCAAgC;AAChC,eAAO,MAAM,cAAc;;;;iBAKvB,CAAC"}
@@ -1,11 +0,0 @@
1
- /**
2
- * Progress schema helpers for @ontrails/core/patterns
3
- */
4
- import { z } from 'zod';
5
- /** Progress tracking fields. */
6
- export const progressFields = () => z.object({
7
- current: z.number(),
8
- percentage: z.number().optional(),
9
- total: z.number(),
10
- });
11
- //# sourceMappingURL=progress.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"progress.js","sourceRoot":"","sources":["../../src/patterns/progress.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gCAAgC;AAChC,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE,CACjC,CAAC,CAAC,MAAM,CAAC;IACP,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Sorting schema helpers for @ontrails/core/patterns
3
- */
4
- import { z } from 'zod';
5
- /** Sort fields constrained to a set of allowed column names. */
6
- export declare const sortFields: <const T extends string>(allowedFields: [T, ...T[]]) => z.ZodObject<{
7
- sortBy: z.ZodOptional<z.ZodEnum<{ [k_1 in T]: k_1; } extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never>>;
8
- sortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
9
- asc: "asc";
10
- desc: "desc";
11
- }>>>;
12
- }, z.core.$strip>;
13
- //# sourceMappingURL=sorting.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sorting.d.ts","sourceRoot":"","sources":["../../src/patterns/sorting.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gEAAgE;AAChE,eAAO,MAAM,UAAU,GAAI,KAAK,CAAC,CAAC,SAAS,MAAM,EAC/C,eAAe,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;;;;;;iBAKxB,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Sorting schema helpers for @ontrails/core/patterns
3
- */
4
- import { z } from 'zod';
5
- /** Sort fields constrained to a set of allowed column names. */
6
- export const sortFields = (allowedFields) => z.object({
7
- sortBy: z.enum(allowedFields).optional(),
8
- sortOrder: z.enum(['asc', 'desc']).optional().default('asc'),
9
- });
10
- //# sourceMappingURL=sorting.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sorting.js","sourceRoot":"","sources":["../../src/patterns/sorting.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gEAAgE;AAChE,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,aAA0B,EAC1B,EAAE,CACF,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE;IACxC,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;CAC7D,CAAC,CAAC"}
@@ -1,15 +0,0 @@
1
- /**
2
- * Status schema helpers for @ontrails/core/patterns
3
- */
4
- import { z } from 'zod';
5
- /** Standard workflow status field. */
6
- export declare const statusFields: () => z.ZodObject<{
7
- status: z.ZodEnum<{
8
- cancelled: "cancelled";
9
- pending: "pending";
10
- running: "running";
11
- completed: "completed";
12
- failed: "failed";
13
- }>;
14
- }, z.core.$strip>;
15
- //# sourceMappingURL=status.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/patterns/status.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,sCAAsC;AACtC,eAAO,MAAM,YAAY;;;;;;;;iBAGrB,CAAC"}
@@ -1,9 +0,0 @@
1
- /**
2
- * Status schema helpers for @ontrails/core/patterns
3
- */
4
- import { z } from 'zod';
5
- /** Standard workflow status field. */
6
- export const statusFields = () => z.object({
7
- status: z.enum(['pending', 'running', 'completed', 'failed', 'cancelled']),
8
- });
9
- //# sourceMappingURL=status.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/patterns/status.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,sCAAsC;AACtC,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE,CAC/B,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;CAC3E,CAAC,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Timestamp schema helpers for @ontrails/core/patterns
3
- */
4
- import { z } from 'zod';
5
- /** Standard createdAt / updatedAt fields. */
6
- export declare const timestampFields: () => z.ZodObject<{
7
- createdAt: z.ZodString;
8
- updatedAt: z.ZodString;
9
- }, z.core.$strip>;
10
- //# sourceMappingURL=timestamps.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"timestamps.d.ts","sourceRoot":"","sources":["../../src/patterns/timestamps.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,6CAA6C;AAC7C,eAAO,MAAM,eAAe;;;iBAIxB,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Timestamp schema helpers for @ontrails/core/patterns
3
- */
4
- import { z } from 'zod';
5
- /** Standard createdAt / updatedAt fields. */
6
- export const timestampFields = () => z.object({
7
- createdAt: z.string(),
8
- updatedAt: z.string(),
9
- });
10
- //# sourceMappingURL=timestamps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"timestamps.js","sourceRoot":"","sources":["../../src/patterns/timestamps.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,6CAA6C;AAC7C,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE,CAClC,CAAC,CAAC,MAAM,CAAC;IACP,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- export { DEFAULT_PATTERNS, DEFAULT_SENSITIVE_KEYS } from './patterns.js';
2
- export { createRedactor } from './redactor.js';
3
- export type { Redactor, RedactorConfig } from './redactor.js';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/redaction/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,YAAY,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
@@ -1,3 +0,0 @@
1
- export { DEFAULT_PATTERNS, DEFAULT_SENSITIVE_KEYS } from './patterns.js';
2
- export { createRedactor } from './redactor.js';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/redaction/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
@@ -1,9 +0,0 @@
1
- /**
2
- * Default redaction patterns and sensitive key lists.
3
- *
4
- * These are used by {@link createRedactor} to strip secrets from strings
5
- * and object values before they reach logs, traces, or error payloads.
6
- */
7
- export declare const DEFAULT_PATTERNS: RegExp[];
8
- export declare const DEFAULT_SENSITIVE_KEYS: string[];
9
- //# sourceMappingURL=patterns.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"patterns.d.ts","sourceRoot":"","sources":["../../src/redaction/patterns.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,eAAO,MAAM,gBAAgB,EAAE,MAAM,EAkBpC,CAAC;AAMF,eAAO,MAAM,sBAAsB,EAAE,MAAM,EAW1C,CAAC"}