@boxxy/pepys 0.0.1 → 0.1.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.
- package/README.md +42 -5
- package/dist/boxxy-source.d.ts +636 -0
- package/dist/boxxy-work-plugin.d.ts +1 -0
- package/dist/build-boxxy-plugin.d.ts +181 -0
- package/dist/consumers/apply-scope.d.ts +5 -0
- package/dist/create-pepys-fact-sink.d.ts +9 -0
- package/dist/create-pepys-reader.d.ts +9 -0
- package/dist/generated/boxxy-work-boundary.d.ts +566 -0
- package/dist/index.d.ts +5 -0
- package/dist/queries/build-cost-to-land-query.d.ts +156 -0
- package/dist/queries/build-cost-to-land.d.ts +12 -0
- package/dist/queries/build-stage-time-query.d.ts +29 -0
- package/dist/queries/build-stage-time.d.ts +10 -0
- package/dist/queries/constants.d.ts +6 -0
- package/dist/queries/find-item-entity-id.d.ts +2 -0
- package/dist/queries/types.d.ts +109 -0
- package/dist/sink/is-outgoing-fact.d.ts +3 -0
- package/dist/sink/pick-sink-answer.d.ts +7 -0
- package/dist/sink/to-wire-fact.d.ts +5 -0
- package/dist/types.d.ts +6 -0
- package/dist/wire-fact-schemas.d.ts +319 -0
- package/dist/work/boxxy-work-consumer.d.ts +125 -0
- package/dist/work/constants.d.ts +3 -0
- package/dist/work/fold-work-facts.d.ts +2 -0
- package/dist/work/types.d.ts +147 -0
- package/package.json +51 -4
- package/src/boxxy-source.ts +25 -0
- package/src/boxxy-work-plugin.ts +11 -0
- package/src/build-boxxy-plugin.ts +18 -0
- package/src/consumers/apply-scope.ts +125 -0
- package/src/create-pepys-fact-sink.ts +64 -0
- package/src/create-pepys-reader.ts +79 -0
- package/src/generated/boxxy-work-boundary.ts +2923 -0
- package/src/generated/boxxy-work.sql +71 -0
- package/src/index.ts +17 -0
- package/src/queries/build-cost-to-land-query.ts +127 -0
- package/src/queries/build-cost-to-land.ts +226 -0
- package/src/queries/build-stage-time-query.ts +59 -0
- package/src/queries/build-stage-time.ts +195 -0
- package/src/queries/constants.ts +10 -0
- package/src/queries/find-item-entity-id.ts +16 -0
- package/src/queries/types.ts +168 -0
- package/src/sink/is-outgoing-fact.ts +19 -0
- package/src/sink/pick-sink-answer.ts +29 -0
- package/src/sink/to-wire-fact.ts +31 -0
- package/src/test-utils/build-foreign-stand-in.ts +139 -0
- package/src/test-utils/build-mock-applied-fact.ts +39 -0
- package/src/test-utils/build-mock-attempt-read-row.ts +17 -0
- package/src/test-utils/build-mock-binding-read-row.ts +12 -0
- package/src/test-utils/build-mock-item-facts.ts +149 -0
- package/src/test-utils/build-mock-request-read-row.ts +20 -0
- package/src/test-utils/build-mock-scope-fact.ts +13 -0
- package/src/test-utils/create-ingest-stand-in.ts +56 -0
- package/src/test-utils/create-query-stand-in.ts +51 -0
- package/src/test-utils/create-test-pepys.ts +228 -0
- package/src/test-utils/to-entity-id.ts +14 -0
- package/src/test-utils/to-scope-fact.ts +92 -0
- package/src/types.ts +14 -0
- package/src/wire-fact-schemas.ts +41 -0
- package/src/work/boxxy-work-consumer.ts +95 -0
- package/src/work/constants.ts +25 -0
- package/src/work/fold-work-facts.ts +490 -0
- package/src/work/types.ts +177 -0
package/README.md
CHANGED
|
@@ -1,7 +1,44 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<h1>@boxxy/pepys</h1>
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
boxxy
|
|
4
|
+
<p>
|
|
5
|
+
<a href="https://www.npmjs.com/package/@boxxy/pepys"><img src="https://img.shields.io/npm/v/@boxxy/pepys" alt="npm version"></a>
|
|
6
|
+
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT license"></a>
|
|
7
|
+
</p>
|
|
5
8
|
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
<p>
|
|
10
|
+
<a href="../../docs/design/boxxy/v1-facts-and-pepys.md">Documentation</a>
|
|
11
|
+
</p>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
The pepys plug-in of boxxy, with the fact sink that sends boxxy's facts to pepys and the reader that
|
|
15
|
+
asks pepys for boxxy's two reports.
|
|
16
|
+
|
|
17
|
+
A pepys deployment lists the plug-in, and the boxxy server builds the sink and the reader. The
|
|
18
|
+
plug-in folds boxxy's facts into the `boxxy_work` tables and answers two queries: what an item cost
|
|
19
|
+
to land, and how long it spent in each step.
|
|
20
|
+
|
|
21
|
+
## Install
|
|
22
|
+
|
|
23
|
+
Install the package and the pepys kit it plugs into from
|
|
24
|
+
[npm](https://www.npmjs.com/package/@boxxy/pepys) with Bun:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
bun add @boxxy/pepys @pepys/kit zod
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
`@pepys/kit` and `zod` are peer dependencies: the deployment's own copy is the one the plug-in uses.
|
|
31
|
+
The package runs on [Bun](https://bun.sh) 1.3 or newer.
|
|
32
|
+
|
|
33
|
+
## Features
|
|
34
|
+
|
|
35
|
+
- `@boxxy/pepys`: the plug-in parts, `boxxySource`, `boxxyWorkConsumer` and `buildBoxxyPlugin`, and
|
|
36
|
+
the query types.
|
|
37
|
+
- `@boxxy/pepys/sink`: `createPepysFactSink`, the `FactSink` that sends a batch of facts to pepys
|
|
38
|
+
ingest.
|
|
39
|
+
- `@boxxy/pepys/reader`: `createPepysReader`, the `PepysReader` that runs the two queries.
|
|
40
|
+
|
|
41
|
+
## Documentation
|
|
42
|
+
|
|
43
|
+
[Facts and pepys in v1](../../docs/design/boxxy/v1-facts-and-pepys.md) describes the outbox, the
|
|
44
|
+
fact catalog, the `boxxy_work` package and the two queries.
|