@hs-x/checkpoint 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,11 +7,16 @@ redaction, exemplar sampling policy, fake/in-memory writers for tests, and the
|
|
|
7
7
|
Cloudflare binding writers that persist the data, all against the canonical
|
|
8
8
|
schemas in [`@hs-x/types`](https://www.npmjs.com/package/@hs-x/types).
|
|
9
9
|
|
|
10
|
-
You normally do
|
|
10
|
+
You normally do not install this directly. It is a transitive dependency of
|
|
11
11
|
[`@hs-x/runtime`](https://www.npmjs.com/package/@hs-x/runtime), which calls it
|
|
12
12
|
for you when you enable checkpointing in `createRuntime(...)`. A fake-writer
|
|
13
13
|
surface for tests is published at the `@hs-x/checkpoint/test` subpath.
|
|
14
14
|
|
|
15
|
+
```bash
|
|
16
|
+
# only for standalone tooling against the checkpoint contracts
|
|
17
|
+
bun add @hs-x/checkpoint
|
|
18
|
+
```
|
|
19
|
+
|
|
15
20
|
## Recording an invocation
|
|
16
21
|
|
|
17
22
|
`recordCheckpointInvocation(...)` (and its Effect form,
|
|
@@ -52,3 +57,22 @@ CREATE TABLE checkpoint_exemplars (
|
|
|
52
57
|
```
|
|
53
58
|
|
|
54
59
|
`listD1CheckpointExemplars()` reads those D1 rows back through the same shared schema with optional project, deploy, outcome, fingerprint, and limit filters.
|
|
60
|
+
|
|
61
|
+
## Part of HS-X
|
|
62
|
+
|
|
63
|
+
HS-X is a leaveable, type-safe HubSpot app framework on Cloudflare Workers.
|
|
64
|
+
Deployed apps run in your own Cloudflare account, and the checkpoint data this
|
|
65
|
+
package writes lands in your own Analytics Engine, D1, and R2, not in HS-X's.
|
|
66
|
+
Start with the CLI:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npm i -g @hs-x/cli
|
|
70
|
+
hs-x init myapp
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
See [`@hs-x/cli`](https://www.npmjs.com/package/@hs-x/cli) and the docs at
|
|
74
|
+
[hs-x.dev/docs](https://hs-x.dev/docs).
|
|
75
|
+
|
|
76
|
+
## License
|
|
77
|
+
|
|
78
|
+
Apache-2.0
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CheckpointErrorFingerprint, CheckpointMetricEvent, CheckpointRunExemplar } from '@hs-x/types';
|
|
2
2
|
import { Effect } from 'effect';
|
|
3
|
-
export declare const CHECKPOINT_VERSION = "0.1
|
|
3
|
+
export declare const CHECKPOINT_VERSION = "0.2.1";
|
|
4
4
|
export declare const REDACTED = "[redacted]";
|
|
5
5
|
export interface FingerprintErrorOptions {
|
|
6
6
|
readonly capabilityId: string;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { schemas } from '@hs-x/types';
|
|
2
2
|
import { Effect, Schema } from 'effect';
|
|
3
|
-
export const CHECKPOINT_VERSION = '0.1
|
|
3
|
+
export const CHECKPOINT_VERSION = '0.2.1';
|
|
4
4
|
export const REDACTED = '[redacted]';
|
|
5
5
|
const defaultPolicy = createExemplarPolicy();
|
|
6
6
|
export function fingerprintError({ capabilityId, error, }) {
|