@pgpm/measurements 0.5.0 → 0.7.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/Makefile
CHANGED
package/README.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @pgpm/measurements
|
|
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/measurements"><img height="20" src="https://img.shields.io/github/package-json/v/launchql/pgpm-modules?filename=packages%2Fmetrics%2Fmeasurements%2Fpackage.json"/></a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
3
15
|
Measurement utilities for performance tracking and analytics.
|
|
4
16
|
|
|
5
17
|
## Overview
|
|
@@ -27,40 +39,42 @@ This is a quick way to get started. The sections below provide more detailed ins
|
|
|
27
39
|
### Prerequisites
|
|
28
40
|
|
|
29
41
|
```bash
|
|
30
|
-
# Install pgpm
|
|
42
|
+
# Install pgpm CLI
|
|
31
43
|
npm install -g pgpm
|
|
32
44
|
|
|
33
|
-
# Start
|
|
45
|
+
# Start local Postgres (via Docker) and export env vars
|
|
34
46
|
pgpm docker start
|
|
35
|
-
|
|
36
|
-
# Set environment variables
|
|
37
47
|
eval "$(pgpm env)"
|
|
38
48
|
```
|
|
39
49
|
|
|
40
|
-
|
|
50
|
+
> **Tip:** Already running Postgres? Skip the Docker step and just export your `PG*` environment variables.
|
|
41
51
|
|
|
42
|
-
|
|
52
|
+
### **Add to an Existing Package**
|
|
43
53
|
|
|
44
54
|
```bash
|
|
55
|
+
# 1. Install the package
|
|
45
56
|
pgpm install @pgpm/measurements
|
|
46
|
-
|
|
57
|
+
|
|
58
|
+
# 2. Deploy locally
|
|
59
|
+
pgpm deploy
|
|
47
60
|
```
|
|
48
61
|
|
|
49
|
-
|
|
62
|
+
### **Add to a New Project**
|
|
50
63
|
|
|
51
64
|
```bash
|
|
52
|
-
|
|
53
|
-
pgpm
|
|
54
|
-
|
|
65
|
+
# 1. Create a workspace
|
|
66
|
+
pgpm init --workspace
|
|
67
|
+
cd my-app
|
|
55
68
|
|
|
56
|
-
|
|
69
|
+
# 2. Create your first module
|
|
70
|
+
pgpm init
|
|
71
|
+
cd packages/your-module
|
|
57
72
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
pgpm install
|
|
73
|
+
# 3. Install a package
|
|
74
|
+
pgpm install @pgpm/measurements
|
|
61
75
|
|
|
62
|
-
# Deploy
|
|
63
|
-
pgpm deploy
|
|
76
|
+
# 4. Deploy everything
|
|
77
|
+
pgpm deploy --createdb --database mydb1
|
|
64
78
|
```
|
|
65
79
|
|
|
66
80
|
## Core Schema
|
|
@@ -173,76 +187,6 @@ Store scientific measurements with proper units:
|
|
|
173
187
|
pnpm test
|
|
174
188
|
```
|
|
175
189
|
|
|
176
|
-
## Development
|
|
177
|
-
|
|
178
|
-
See the [Development](#development) section below for information on working with this package.
|
|
179
|
-
|
|
180
|
-
---
|
|
181
|
-
|
|
182
|
-
## Development
|
|
183
|
-
|
|
184
|
-
### **Before You Begin**
|
|
185
|
-
|
|
186
|
-
```bash
|
|
187
|
-
# 1. Install pgpm
|
|
188
|
-
npm install -g pgpm
|
|
189
|
-
|
|
190
|
-
# 2. Start Postgres (Docker or local)
|
|
191
|
-
pgpm docker start
|
|
192
|
-
|
|
193
|
-
# 3. Load PG* environment variables (PGHOST, PGUSER, ...)
|
|
194
|
-
eval "$(pgpm env)"
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
---
|
|
198
|
-
|
|
199
|
-
### **Starting a New Project**
|
|
200
|
-
|
|
201
|
-
```bash
|
|
202
|
-
# 1. Create a workspace
|
|
203
|
-
pgpm init --workspace
|
|
204
|
-
cd my-app
|
|
205
|
-
|
|
206
|
-
# 2. Create your first module
|
|
207
|
-
pgpm init
|
|
208
|
-
|
|
209
|
-
# 3. Add a migration
|
|
210
|
-
pgpm add some_change
|
|
211
|
-
|
|
212
|
-
# 4. Deploy (auto-creates database)
|
|
213
|
-
pgpm deploy --createdb
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
---
|
|
217
|
-
|
|
218
|
-
### **Working With an Existing Project**
|
|
219
|
-
|
|
220
|
-
```bash
|
|
221
|
-
# 1. Clone and enter the project
|
|
222
|
-
git clone <repo> && cd <project>
|
|
223
|
-
|
|
224
|
-
# 2. Install dependencies
|
|
225
|
-
pnpm install
|
|
226
|
-
|
|
227
|
-
# 3. Deploy locally
|
|
228
|
-
pgpm deploy --createdb
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
---
|
|
232
|
-
|
|
233
|
-
### **Testing a Module Inside a Workspace**
|
|
234
|
-
|
|
235
|
-
```bash
|
|
236
|
-
# 1. Install workspace deps
|
|
237
|
-
pnpm install
|
|
238
|
-
|
|
239
|
-
# 2. Enter the module directory
|
|
240
|
-
cd packages/<some-module>
|
|
241
|
-
|
|
242
|
-
# 3. Run tests in watch mode
|
|
243
|
-
pnpm test:watch
|
|
244
|
-
```
|
|
245
|
-
|
|
246
190
|
## Related Tooling
|
|
247
191
|
|
|
248
192
|
* [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.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pgpm/measurements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Measurement utilities for performance tracking and analytics",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -11,18 +11,18 @@
|
|
|
11
11
|
"test:watch": "jest --watch"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@pgpm/verify": "0.
|
|
14
|
+
"@pgpm/verify": "0.7.0"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"pgpm": "^0.2.0"
|
|
18
18
|
},
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
21
|
-
"url": "https://github.com/launchql/
|
|
21
|
+
"url": "https://github.com/launchql/pgpm-modules"
|
|
22
22
|
},
|
|
23
|
-
"homepage": "https://github.com/launchql/
|
|
23
|
+
"homepage": "https://github.com/launchql/pgpm-modules",
|
|
24
24
|
"bugs": {
|
|
25
|
-
"url": "https://github.com/launchql/
|
|
25
|
+
"url": "https://github.com/launchql/pgpm-modules/issues"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "1f24d8fa95fb141f16e5b8345458c3b687d80908"
|
|
28
28
|
}
|
|
File without changes
|