@pithy-sh/leaderboard 0.1.6 → 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.
@@ -3,5 +3,5 @@
3
3
  /** This package's npm name — the join key against a release feed. */
4
4
  export declare const PACKAGE_NAME = "@pithy-sh/leaderboard";
5
5
  /** This package's version, stamped from its own package.json at generation time. */
6
- export declare const PACKAGE_VERSION = "0.1.6";
6
+ export declare const PACKAGE_VERSION = "0.2.1";
7
7
  //# sourceMappingURL=version.generated.d.ts.map
@@ -4,6 +4,6 @@
4
4
  /** This package's npm name — the join key against a release feed. */
5
5
  const PACKAGE_NAME = "@pithy-sh/leaderboard";
6
6
  /** This package's version, stamped from its own package.json at generation time. */
7
- const PACKAGE_VERSION = "0.1.6";
7
+ const PACKAGE_VERSION = "0.2.1";
8
8
  //#endregion
9
9
  export { PACKAGE_NAME, PACKAGE_VERSION };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pithy-sh/leaderboard",
3
- "version": "0.1.6",
3
+ "version": "0.2.1",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -38,11 +38,17 @@
38
38
  "dependencies": {
39
39
  "@cloudflare/workers-types": "^5.20260729.1",
40
40
  "@hono/zod-validator": "^0.9.0",
41
- "@pithy-sh/core": "^0.3.0",
42
41
  "croner": "^10.0.1"
43
42
  },
43
+ "peerDependencies": {
44
+ "@pithy-sh/core": "^0.5.0",
45
+ "hono": "^4.13.2",
46
+ "kysely": "^0.29.0",
47
+ "zod": "^4.4.0"
48
+ },
44
49
  "devDependencies": {
45
50
  "@cloudflare/vitest-plugin": "^1.0.0",
51
+ "@pithy-sh/core": "workspace:*",
46
52
  "@pithy-sh/tsconfig": "workspace:*",
47
53
  "@types/node": "^22.15.0",
48
54
  "@vitest/coverage-v8": "^4.1.0",
@@ -54,10 +60,5 @@
54
60
  "vitest": "^4.1.0",
55
61
  "wrangler": "^4.115.0",
56
62
  "zod": "^4.4.0"
57
- },
58
- "peerDependencies": {
59
- "hono": "^4.13.2",
60
- "kysely": "^0.29.0",
61
- "zod": "^4.4.0"
62
63
  }
63
64
  }
@@ -1,8 +1,17 @@
1
1
  {
2
- // The leaderboard rank-refresh worker. This is a TEMPLATE, not a wrangler env-stanza file: `pithy add
3
- // leaderboard` resolves it per environment — filling the `<...>` placeholders and the cron from the
4
- // adopter's `rank: { materialize }` setting — and deploys each with its own config
5
- // (`wrangler deploy --config <resolved>`). The adopter authors none of it.
2
+ // The leaderboard rank-refresh worker. This is a TEMPLATE, not a wrangler env-stanza file: the
3
+ // `<...>` placeholders and the cron are meant to be filled per environment from the adopter's
4
+ // `rank: { materialize }` setting, and each resolved config deployed with `wrangler deploy --config
5
+ // <resolved>`.
6
+ //
7
+ // **Nothing in the kit does that yet, and this file is not deployed by any command.**
8
+ // `cli/src/capabilities/hostRegistry.ts` leaves `@pithy-sh/leaderboard` out of `HOST_WORKERS`
9
+ // deliberately: the rank worker ships this template and a `RankRefreshWorkflow`, but no
10
+ // `resolveLeaderboardConfig` and no provisioner, so there is nothing to drive — and
11
+ // `hostRegistry.test.ts` pins that absence so it cannot become an oversight. Filling and deploying it
12
+ // is an adopter's own step today. This comment said otherwise for as long as the template has
13
+ // existed, which is the kind of claim that sends somebody looking for a command that was never
14
+ // written.
6
15
  //
7
16
  // It does NOT have to be its own worker. What the refresh actually needs is three things: the
8
17
  // `RankRefreshWorkflow` class, a `scheduled()` handler that starts an instance, and a cron trigger.
@@ -14,7 +23,12 @@
14
23
  // once capped the refresh at ~64k entries per run. A Workflow step has unlimited wall-clock and burns
15
24
  // no CPU while awaiting D1, so a board of any size ranks across bounded, individually-durable steps
16
25
  // that checkpoint a keyset cursor. See `worker.entry.ts`.
17
- "name": "pithy-leaderboard-rank", // resolved per env → pithy-leaderboard-rank-staging / -production
26
+ // A placeholder, not the deployed name. When something does resolve this template it will compose
27
+ // `<project>-<env>-leaderboard` — `workflowHostName` in `core/src/workflow/naming.ts` is
28
+ // `<project>-<env>-<capability>`, so the project leads and the environment is second, never trailing
29
+ // and never `production`. Worker script names are account-scoped, which is what makes the project
30
+ // segment load-bearing: without it a second Pithy project's deploy overwrites this one's worker.
31
+ "name": "pithy-leaderboard-rank",
18
32
  "main": "./worker.entry.ts",
19
33
  // The compatibility date every Worker in this repository runs on. Stated once in the repository
20
34
  // root's `compatibility.ts` and copied here because JSONC cannot import it —
@@ -13,4 +13,4 @@
13
13
  export const PACKAGE_NAME = "@pithy-sh/leaderboard";
14
14
 
15
15
  /** This package's version, stamped from its own package.json at generation time. */
16
- export const PACKAGE_VERSION = "0.1.6";
16
+ export const PACKAGE_VERSION = "0.2.1";