@pya-platform/reviews 0.1.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,14 @@
1
+ # @pya/reviews
2
+
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - a9ca6bf: Initial release of the Pya platform packages. Extracted from `pyaeats-app`, consumed by `pyaeats-app` (food delivery) and `pyaserv` (services classifieds).
8
+
9
+ Each package exposes a Hono router factory (auth/cms/reviews/comments) or a typed helper (email/audit/cf) parameterised over Cloudflare D1 + KV bindings. UI primitives ship as Lit web components on top of `@pya/tokens` (CSS custom properties). See `ROADMAP.md` and `docs/phase-6-rollout.md` for the consumer cutover plan.
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [a9ca6bf]
14
+ - @pya/shared@0.1.0
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@pya-platform/reviews",
3
+ "version": "0.1.0",
4
+ "private": false,
5
+ "publishConfig": {
6
+ "registry": "https://registry.npmjs.org",
7
+ "access": "public"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/undeadliner/pya-platform.git"
12
+ },
13
+ "type": "module",
14
+ "description": "Reviews engine — 5-star ratings, running-average rounding, owner reply. Generic over targetId (storeId for PyaEats, profileId for PyaServ).",
15
+ "exports": {
16
+ ".": "./src/index.ts"
17
+ },
18
+ "scripts": {
19
+ "type-check": "tsc --noEmit",
20
+ "test": "echo '@pya/reviews has no tests yet'"
21
+ },
22
+ "dependencies": {
23
+ "@pya-platform/shared": "workspace:*",
24
+ "valibot": "^1.0.0"
25
+ },
26
+ "peerDependencies": {
27
+ "@cloudflare/workers-types": "^4.20240909.0"
28
+ }
29
+ }
package/src/index.ts ADDED
@@ -0,0 +1,9 @@
1
+ // @pya-platform/reviews — 5-star reviews + running-average rounding.
2
+ //
3
+ // Pyaeats-app has the canonical implementation in
4
+ // `apps/api/src/features/reviews/reviews.repo.ts`. The shape is already
5
+ // generic — `targetId` works for any reviewable entity. Phase 6 moves it
6
+ // here, parameterises the SQL table name (`store_reviews` ↔ `reviews`),
7
+ // and exposes `createReviewsRepo({ db, tableName })`.
8
+
9
+ export {}
package/tsconfig.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "rootDir": "src",
5
+ "outDir": "dist",
6
+ "noEmit": true,
7
+ "types": ["@cloudflare/workers-types"]
8
+ },
9
+ "include": ["src/**/*.ts"]
10
+ }