@pithy-sh/leaderboard 0.1.3 → 0.1.5
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/dist/board/registry.d.ts +2 -0
- package/dist/board/registry.js +2 -0
- package/dist/capability.d.ts +2 -0
- package/dist/capability.js +2 -0
- package/dist/config/boardKey.d.ts +2 -0
- package/dist/config/boardKey.js +2 -0
- package/dist/config/config.d.ts +2 -0
- package/dist/config/config.js +2 -0
- package/dist/data/boardRecord.d.ts +2 -0
- package/dist/data/boardRecord.js +2 -0
- package/dist/data/entry.d.ts +2 -0
- package/dist/data/entry.js +2 -0
- package/dist/data/lock.d.ts +2 -0
- package/dist/data/lock.js +2 -0
- package/dist/data/tables.d.ts +2 -0
- package/dist/data/tables.js +2 -0
- package/dist/entry/store.d.ts +2 -0
- package/dist/entry/store.js +2 -0
- package/dist/error/errors.d.ts +2 -0
- package/dist/error/errors.js +2 -0
- package/dist/http/guard.d.ts +2 -0
- package/dist/http/guard.js +2 -0
- package/dist/http/handlers.d.ts +2 -0
- package/dist/http/handlers.js +2 -0
- package/dist/http/routes.d.ts +2 -0
- package/dist/http/routes.js +2 -0
- package/dist/http/schemas.d.ts +2 -0
- package/dist/http/schemas.js +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/migrations/0001_entries.d.ts +2 -0
- package/dist/migrations/0001_entries.js +2 -0
- package/dist/rank/lock.d.ts +2 -0
- package/dist/rank/lock.js +2 -0
- package/dist/rank/materialize.d.ts +2 -0
- package/dist/rank/materialize.js +2 -0
- package/dist/rank/query.d.ts +2 -0
- package/dist/rank/query.js +2 -0
- package/dist/rank/retryPolicy.d.ts +2 -0
- package/dist/rank/retryPolicy.js +2 -0
- package/dist/rank/segment.d.ts +2 -0
- package/dist/rank/segment.js +2 -0
- package/dist/rank/tiers.d.ts +2 -0
- package/dist/rank/tiers.js +2 -0
- package/dist/rank/worker.d.ts +2 -0
- package/dist/rank/worker.entry.d.ts +2 -0
- package/dist/rank/worker.entry.js +2 -0
- package/dist/rank/worker.js +2 -0
- package/dist/retention/prune.d.ts +2 -0
- package/dist/retention/prune.js +2 -0
- package/dist/seeds/example.d.ts +2 -0
- package/dist/seeds/example.js +2 -0
- package/dist/session/bookmark.d.ts +2 -0
- package/dist/session/bookmark.js +2 -0
- package/dist/version.generated.d.ts +3 -1
- package/dist/version.generated.js +3 -1
- package/dist/window/schedule.d.ts +2 -0
- package/dist/window/schedule.js +2 -0
- package/package.json +3 -3
- package/src/version.generated.ts +1 -1
package/dist/board/registry.d.ts
CHANGED
package/dist/board/registry.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { LeaderboardBoardImmutableError } from "../error/errors.js";
|
|
2
4
|
import { LeaderboardBoardRecord } from "../data/boardRecord.js";
|
|
3
5
|
import { LEADERBOARD_BOARDS_TABLE } from "../data/tables.js";
|
package/dist/capability.d.ts
CHANGED
package/dist/capability.js
CHANGED
package/dist/config/boardKey.js
CHANGED
package/dist/config/config.d.ts
CHANGED
package/dist/config/config.js
CHANGED
package/dist/data/boardRecord.js
CHANGED
package/dist/data/entry.d.ts
CHANGED
package/dist/data/entry.js
CHANGED
package/dist/data/lock.d.ts
CHANGED
package/dist/data/lock.js
CHANGED
package/dist/data/tables.d.ts
CHANGED
package/dist/data/tables.js
CHANGED
package/dist/entry/store.d.ts
CHANGED
package/dist/entry/store.js
CHANGED
package/dist/error/errors.d.ts
CHANGED
package/dist/error/errors.js
CHANGED
package/dist/http/guard.d.ts
CHANGED
package/dist/http/guard.js
CHANGED
package/dist/http/handlers.d.ts
CHANGED
package/dist/http/handlers.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { LeaderboardBoardNotFoundError, LeaderboardEntryNotFoundError, LeaderboardScoreRejectedError } from "../error/errors.js";
|
|
2
4
|
import { windowKeyAt } from "../window/schedule.js";
|
|
3
5
|
import { assertBoardDefinition } from "../board/registry.js";
|
package/dist/http/routes.d.ts
CHANGED
package/dist/http/routes.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { BOOKMARK_HEADER, leaderboardSession, readBookmark } from "../session/bookmark.js";
|
|
2
4
|
import { requireAdminScope, requireAuth, requireSubmitScope } from "./guard.js";
|
|
3
5
|
import { hideEntry, listBoards, readAround, readOwnRank, readSegment, readTop, removeEntry, setOwnVisibility, submitScore } from "./handlers.js";
|
package/dist/http/schemas.d.ts
CHANGED
package/dist/http/schemas.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
/**
|
|
2
4
|
* The package entrypoint — the surface `pithy add leaderboard` wires into `pithy.config.ts`. Deliberately
|
|
3
5
|
* narrow: the capability factory, its config and options types, and the read shapes an app renders. Every
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { ALL_TIME_WINDOW, previousWindowKeys, windowKeyAt } from "./window/schedule.js";
|
|
2
4
|
import { LeaderboardBoard, LeaderboardConfig, LeaderboardRank, LeaderboardStore, LeaderboardTier, ScoreAggregation, ScoreDirection, materializeSchedule, resolveBoard } from "./config/config.js";
|
|
3
5
|
import { LeaderboardEntry } from "./data/entry.js";
|
package/dist/rank/lock.d.ts
CHANGED
package/dist/rank/lock.js
CHANGED
package/dist/rank/materialize.js
CHANGED
package/dist/rank/query.d.ts
CHANGED
package/dist/rank/query.js
CHANGED
package/dist/rank/retryPolicy.js
CHANGED
package/dist/rank/segment.d.ts
CHANGED
package/dist/rank/segment.js
CHANGED
package/dist/rank/tiers.d.ts
CHANGED
package/dist/rank/tiers.js
CHANGED
package/dist/rank/worker.d.ts
CHANGED
package/dist/rank/worker.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import type { LeaderboardBoard } from "../config/config";
|
|
2
4
|
import type { LeaderboardDatabase } from "../data/tables";
|
|
3
5
|
export declare function pruneBoard(db: LeaderboardDatabase, board: LeaderboardBoard, now: Date): Promise<number>;
|
package/dist/retention/prune.js
CHANGED
package/dist/seeds/example.d.ts
CHANGED
package/dist/seeds/example.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { LeaderboardEntry } from "../data/entry.js";
|
|
2
4
|
import { LEADERBOARD_ENTRIES_TABLE } from "../data/tables.js";
|
|
3
5
|
import { EXAMPLE_ADA, EXAMPLE_ALAN, EXAMPLE_GRACE } from "@pithy-sh/core/src/seed/exampleIdentities";
|
package/dist/session/bookmark.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
/** This package's npm name — the join key against a release feed. */
|
|
2
4
|
export declare const PACKAGE_NAME = "@pithy-sh/leaderboard";
|
|
3
5
|
/** This package's version, stamped from its own package.json at generation time. */
|
|
4
|
-
export declare const PACKAGE_VERSION = "0.1.
|
|
6
|
+
export declare const PACKAGE_VERSION = "0.1.5";
|
|
5
7
|
//# sourceMappingURL=version.generated.d.ts.map
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
//#region src/version.generated.ts
|
|
2
4
|
/** This package's npm name — the join key against a release feed. */
|
|
3
5
|
const PACKAGE_NAME = "@pithy-sh/leaderboard";
|
|
4
6
|
/** This package's version, stamped from its own package.json at generation time. */
|
|
5
|
-
const PACKAGE_VERSION = "0.1.
|
|
7
|
+
const PACKAGE_VERSION = "0.1.5";
|
|
6
8
|
//#endregion
|
|
7
9
|
export { PACKAGE_NAME, PACKAGE_VERSION };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
/**
|
|
2
4
|
* Window keys. A board's `window` is a CRON expression; the window a score falls into is keyed by the
|
|
3
5
|
* instant that CRON last fired at or before the score. Omitting the schedule means one all-time window.
|
package/dist/window/schedule.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pithy-sh/leaderboard",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
|
-
"build": "tsdown && tsc -p tsconfig.build.json",
|
|
29
|
+
"build": "tsdown && tsc -p tsconfig.build.json && bun ../../tooling/build/src/stampDeclarations.ts",
|
|
30
30
|
"typecheck": "tsc -p tsconfig.json",
|
|
31
31
|
"test": "vitest run",
|
|
32
32
|
"test:node": "vitest run --project=node",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@cloudflare/workers-types": "^5.20260729.1",
|
|
40
40
|
"@hono/zod-validator": "^0.9.0",
|
|
41
|
-
"@pithy-sh/core": "^0.
|
|
41
|
+
"@pithy-sh/core": "^0.2.0",
|
|
42
42
|
"croner": "^10.0.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
package/src/version.generated.ts
CHANGED