@pgpm/achievements 0.6.0 → 0.7.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/Makefile CHANGED
@@ -1,5 +1,5 @@
1
1
  EXTENSION = launchql-achievements
2
- DATA = sql/launchql-achievements--0.5.0.sql
2
+ DATA = sql/launchql-achievements--0.6.0.sql
3
3
 
4
4
  PG_CONFIG = pg_config
5
5
  PGXS := $(shell $(PG_CONFIG) --pgxs)
package/README.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @pgpm/achievements
2
2
 
3
+ <p align="center" width="100%">
4
+ <img height="250" src="https://raw.githubusercontent.com/launchql/launchql/refs/heads/main/assets/outline-logo.svg" />
5
+ </p>
6
+
7
+ <p align="center" width="100%">
8
+ <a href="https://github.com/launchql/pgpm-modules/actions/workflows/ci.yml">
9
+ <img height="20" src="https://github.com/launchql/pgpm-modules/actions/workflows/ci.yml/badge.svg" />
10
+ </a>
11
+ <a href="https://github.com/launchql/pgpm-modules/blob/main/LICENSE"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/></a>
12
+ <a href="https://www.npmjs.com/package/@pgpm/achievements"><img height="20" src="https://img.shields.io/github/package-json/v/launchql/pgpm-modules?filename=packages%2Fmetrics%2Fachievements%2Fpackage.json"/></a>
13
+ </p>
14
+
3
15
  Achievement system for tracking user progress and milestones.
4
16
 
5
17
  ## Overview
@@ -30,40 +42,42 @@ This is a quick way to get started. The sections below provide more detailed ins
30
42
  ### Prerequisites
31
43
 
32
44
  ```bash
33
- # Install pgpm globally
45
+ # Install pgpm CLI
34
46
  npm install -g pgpm
35
47
 
36
- # Start PostgreSQL
48
+ # Start local Postgres (via Docker) and export env vars
37
49
  pgpm docker start
38
-
39
- # Set environment variables
40
50
  eval "$(pgpm env)"
41
51
  ```
42
52
 
43
- ### Deploy
53
+ > **Tip:** Already running Postgres? Skip the Docker step and just export your `PG*` environment variables.
44
54
 
45
- #### Option 1: Deploy by installing with pgpm
55
+ ### **Add to an Existing Package**
46
56
 
47
57
  ```bash
58
+ # 1. Install the package
48
59
  pgpm install @pgpm/achievements
49
- pgpm deploy
60
+
61
+ # 2. Deploy locally
62
+ pgpm deploy
50
63
  ```
51
64
 
52
- #### Option 2: Deploy from Package Directory
65
+ ### **Add to a New Project**
53
66
 
54
67
  ```bash
55
- cd packages/metrics/achievements
56
- pgpm deploy --createdb
57
- ```
68
+ # 1. Create a workspace
69
+ pgpm init --workspace
70
+ cd my-app
58
71
 
59
- #### Option 3: Deploy from Workspace Root
72
+ # 2. Create your first module
73
+ pgpm init
74
+ cd packages/your-module
60
75
 
61
- ```bash
62
- # Install workspace dependencies
63
- pnpm install
76
+ # 3. Install a package
77
+ pgpm install @pgpm/achievements
64
78
 
65
- # Deploy with dependencies
66
- pgpm deploy mydb1 --yes --createdb
79
+ # 4. Deploy everything
80
+ pgpm deploy --createdb --database mydb1
67
81
  ```
68
82
 
69
83
  ## Core Concepts
@@ -259,76 +273,6 @@ SELECT status_public.user_achieved('beginner', 'user-uuid');
259
273
  pnpm test
260
274
  ```
261
275
 
262
- ## Development
263
-
264
- See the [Development](#development) section below for information on working with this package.
265
-
266
- ---
267
-
268
- ## Development
269
-
270
- ### **Before You Begin**
271
-
272
- ```bash
273
- # 1. Install pgpm
274
- npm install -g pgpm
275
-
276
- # 2. Start Postgres (Docker or local)
277
- pgpm docker start
278
-
279
- # 3. Load PG* environment variables (PGHOST, PGUSER, ...)
280
- eval "$(pgpm env)"
281
- ```
282
-
283
- ---
284
-
285
- ### **Starting a New Project**
286
-
287
- ```bash
288
- # 1. Create a workspace
289
- pgpm init --workspace
290
- cd my-app
291
-
292
- # 2. Create your first module
293
- pgpm init
294
-
295
- # 3. Add a migration
296
- pgpm add some_change
297
-
298
- # 4. Deploy (auto-creates database)
299
- pgpm deploy --createdb
300
- ```
301
-
302
- ---
303
-
304
- ### **Working With an Existing Project**
305
-
306
- ```bash
307
- # 1. Clone and enter the project
308
- git clone <repo> && cd <project>
309
-
310
- # 2. Install dependencies
311
- pnpm install
312
-
313
- # 3. Deploy locally
314
- pgpm deploy --createdb
315
- ```
316
-
317
- ---
318
-
319
- ### **Testing a Module Inside a Workspace**
320
-
321
- ```bash
322
- # 1. Install workspace deps
323
- pnpm install
324
-
325
- # 2. Enter the module directory
326
- cd packages/<some-module>
327
-
328
- # 3. Run tests in watch mode
329
- pnpm test:watch
330
- ```
331
-
332
276
  ## Related Tooling
333
277
 
334
278
  * [pgpm](https://github.com/launchql/launchql/tree/main/packages/pgpm): **🖥️ PostgreSQL Package Manager** for modular Postgres development. Works with database workspaces, scaffolding, migrations, seeding, and installing database packages.
@@ -1,6 +1,6 @@
1
1
  # launchql-achievements extension
2
2
  comment = 'launchql-achievements extension'
3
- default_version = '0.5.0'
3
+ default_version = '0.6.0'
4
4
  module_pathname = '$libdir/launchql-achievements'
5
5
  requires = 'plpgsql,uuid-ossp,launchql-jwt-claims,launchql-verify'
6
6
  relocatable = false
package/package.json CHANGED
@@ -1,7 +1,13 @@
1
1
  {
2
2
  "name": "@pgpm/achievements",
3
- "version": "0.6.0",
3
+ "version": "0.7.1",
4
4
  "description": "Achievement system for tracking user progress and milestones",
5
+ "keywords": [
6
+ "postgresql",
7
+ "pgpm",
8
+ "achievements",
9
+ "gamification"
10
+ ],
5
11
  "publishConfig": {
6
12
  "access": "public"
7
13
  },
@@ -11,8 +17,8 @@
11
17
  "test:watch": "jest --watch"
12
18
  },
13
19
  "dependencies": {
14
- "@pgpm/jwt-claims": "0.6.0",
15
- "@pgpm/verify": "0.6.0"
20
+ "@pgpm/jwt-claims": "0.7.1",
21
+ "@pgpm/verify": "0.7.1"
16
22
  },
17
23
  "devDependencies": {
18
24
  "pgpm": "^0.2.0"
@@ -25,5 +31,5 @@
25
31
  "bugs": {
26
32
  "url": "https://github.com/launchql/pgpm-modules/issues"
27
33
  },
28
- "gitHead": "c7d0eae588d7a764b382a330c8b853b341b13fb2"
34
+ "gitHead": "f3156553b409bd27b66ac03562151d439d779f53"
29
35
  }