pg-codegen 2.13.14 → 2.13.16
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/LICENSE +1 -1
- package/README.md +38 -38
- package/package.json +11 -11
package/LICENSE
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
3
|
Copyright (c) 2025 Dan Lynch <pyramation@gmail.com>
|
|
4
|
-
Copyright (c) 2025
|
|
4
|
+
Copyright (c) 2025 Constructive <developers@constructive.io>
|
|
5
5
|
Copyright (c) 2020-present, Interweb, Inc.
|
|
6
6
|
|
|
7
7
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
package/README.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# pg-codegen
|
|
2
2
|
|
|
3
3
|
<p align="center" width="100%">
|
|
4
|
-
<img height="250" src="https://raw.githubusercontent.com/
|
|
4
|
+
<img height="250" src="https://raw.githubusercontent.com/constructive-io/constructive/refs/heads/main/assets/outline-logo.svg" />
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
7
|
<p align="center" width="100%">
|
|
8
|
-
<a href="https://github.com/
|
|
9
|
-
<img height="20" src="https://github.com/
|
|
8
|
+
<a href="https://github.com/constructive-io/constructive/actions/workflows/run-tests.yaml">
|
|
9
|
+
<img height="20" src="https://github.com/constructive-io/constructive/actions/workflows/run-tests.yaml/badge.svg" />
|
|
10
10
|
</a>
|
|
11
|
-
<a href="https://github.com/
|
|
12
|
-
<a href="https://www.npmjs.com/package/pg-codegen"><img height="20" src="https://img.shields.io/github/package-json/v/
|
|
11
|
+
<a href="https://github.com/constructive-io/constructive/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/pg-codegen"><img height="20" src="https://img.shields.io/github/package-json/v/constructive-io/constructive?filename=packages%2Fcodegen%2Fpackage.json"/></a>
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
Generate fully-typed TypeScript classes and interfaces from a live PostgreSQL schema via introspection.
|
|
@@ -101,71 +101,71 @@ export class Users implements Users {
|
|
|
101
101
|
|
|
102
102
|
## Education and Tutorials
|
|
103
103
|
|
|
104
|
-
1. 🚀 [Quickstart: Getting Up and Running](https://
|
|
104
|
+
1. 🚀 [Quickstart: Getting Up and Running](https://constructive.io/learn/quickstart)
|
|
105
105
|
Get started with modular databases in minutes. Install prerequisites and deploy your first module.
|
|
106
106
|
|
|
107
|
-
2. 📦 [Modular PostgreSQL Development with Database Packages](https://
|
|
107
|
+
2. 📦 [Modular PostgreSQL Development with Database Packages](https://constructive.io/learn/modular-postgres)
|
|
108
108
|
Learn to organize PostgreSQL projects with pgpm workspaces and reusable database modules.
|
|
109
109
|
|
|
110
|
-
3. ✏️ [Authoring Database Changes](https://
|
|
110
|
+
3. ✏️ [Authoring Database Changes](https://constructive.io/learn/authoring-database-changes)
|
|
111
111
|
Master the workflow for adding, organizing, and managing database changes with pgpm.
|
|
112
112
|
|
|
113
|
-
4. 🧪 [End-to-End PostgreSQL Testing with TypeScript](https://
|
|
113
|
+
4. 🧪 [End-to-End PostgreSQL Testing with TypeScript](https://constructive.io/learn/e2e-postgres-testing)
|
|
114
114
|
Master end-to-end PostgreSQL testing with ephemeral databases, RLS testing, and CI/CD automation.
|
|
115
115
|
|
|
116
|
-
5. ⚡ [Supabase Testing](https://
|
|
116
|
+
5. ⚡ [Supabase Testing](https://constructive.io/learn/supabase)
|
|
117
117
|
Use TypeScript-first tools to test Supabase projects with realistic RLS, policies, and auth contexts.
|
|
118
118
|
|
|
119
|
-
6. 💧 [Drizzle ORM Testing](https://
|
|
119
|
+
6. 💧 [Drizzle ORM Testing](https://constructive.io/learn/drizzle-testing)
|
|
120
120
|
Run full-stack tests with Drizzle ORM, including database setup, teardown, and RLS enforcement.
|
|
121
121
|
|
|
122
|
-
7. 🔧 [Troubleshooting](https://
|
|
122
|
+
7. 🔧 [Troubleshooting](https://constructive.io/learn/troubleshooting)
|
|
123
123
|
Common issues and solutions for pgpm, PostgreSQL, and testing.
|
|
124
124
|
|
|
125
|
-
## Related
|
|
125
|
+
## Related Constructive Tooling
|
|
126
126
|
|
|
127
127
|
### 🧪 Testing
|
|
128
128
|
|
|
129
|
-
* [
|
|
130
|
-
* [
|
|
131
|
-
* [
|
|
132
|
-
* [
|
|
129
|
+
* [pgsql-test](https://github.com/constructive-io/constructive/tree/main/packages/pgsql-test): **📊 Isolated testing environments** with per-test transaction rollbacks—ideal for integration tests, complex migrations, and RLS simulation.
|
|
130
|
+
* [supabase-test](https://github.com/constructive-io/constructive/tree/main/packages/supabase-test): **🧪 Supabase-native test harness** preconfigured for the local Supabase stack—per-test rollbacks, JWT/role context helpers, and CI/GitHub Actions ready.
|
|
131
|
+
* [graphile-test](https://github.com/constructive-io/constructive/tree/main/packages/graphile-test): **🔐 Authentication mocking** for Graphile-focused test helpers and emulating row-level security contexts.
|
|
132
|
+
* [pg-query-context](https://github.com/constructive-io/constructive/tree/main/packages/pg-query-context): **🔒 Session context injection** to add session-local context (e.g., `SET LOCAL`) into queries—ideal for setting `role`, `jwt.claims`, and other session settings.
|
|
133
133
|
|
|
134
134
|
### 🧠 Parsing & AST
|
|
135
135
|
|
|
136
|
-
* [
|
|
137
|
-
* [
|
|
138
|
-
* [
|
|
139
|
-
* [@pgsql/enums](https://
|
|
140
|
-
* [@pgsql/types](https://
|
|
141
|
-
* [@pgsql/utils](https://
|
|
142
|
-
* [
|
|
136
|
+
* [pgsql-parser](https://www.npmjs.com/package/pgsql-parser): **🔄 SQL conversion engine** that interprets and converts PostgreSQL syntax.
|
|
137
|
+
* [libpg-query-node](https://www.npmjs.com/package/libpg-query): **🌉 Node.js bindings** for `libpg_query`, converting SQL into parse trees.
|
|
138
|
+
* [pg-proto-parser](https://www.npmjs.com/package/pg-proto-parser): **📦 Protobuf parser** for parsing PostgreSQL Protocol Buffers definitions to generate TypeScript interfaces, utility functions, and JSON mappings for enums.
|
|
139
|
+
* [@pgsql/enums](https://www.npmjs.com/package/@pgsql/enums): **🏷️ TypeScript enums** for PostgreSQL AST for safe and ergonomic parsing logic.
|
|
140
|
+
* [@pgsql/types](https://www.npmjs.com/package/@pgsql/types): **📝 Type definitions** for PostgreSQL AST nodes in TypeScript.
|
|
141
|
+
* [@pgsql/utils](https://www.npmjs.com/package/@pgsql/utils): **🛠️ AST utilities** for constructing and transforming PostgreSQL syntax trees.
|
|
142
|
+
* [pg-ast](https://www.npmjs.com/package/pg-ast): **🔍 Low-level AST tools** and transformations for Postgres query structures.
|
|
143
143
|
|
|
144
144
|
### 🚀 API & Dev Tools
|
|
145
145
|
|
|
146
|
-
* [launchql/server](https://github.com/
|
|
147
|
-
* [launchql/explorer](https://github.com/
|
|
146
|
+
* [launchql/server](https://github.com/constructive-io/constructive/tree/main/packages/server): **⚡ Express-based API server** powered by PostGraphile to expose a secure, scalable GraphQL API over your Postgres database.
|
|
147
|
+
* [launchql/explorer](https://github.com/constructive-io/constructive/tree/main/packages/explorer): **🔎 Visual API explorer** with GraphiQL for browsing across all databases and schemas—useful for debugging, documentation, and API prototyping.
|
|
148
148
|
|
|
149
149
|
### 🔁 Streaming & Uploads
|
|
150
150
|
|
|
151
|
-
* [launchql/s3-streamer](https://github.com/
|
|
152
|
-
* [launchql/etag-hash](https://github.com/
|
|
153
|
-
* [launchql/etag-stream](https://github.com/
|
|
154
|
-
* [launchql/uuid-hash](https://github.com/
|
|
155
|
-
* [launchql/uuid-stream](https://github.com/
|
|
156
|
-
* [launchql/upload-names](https://github.com/
|
|
151
|
+
* [launchql/s3-streamer](https://github.com/constructive-io/constructive/tree/main/packages/s3-streamer): **📤 Direct S3 streaming** for large files with support for metadata injection and content validation.
|
|
152
|
+
* [launchql/etag-hash](https://github.com/constructive-io/constructive/tree/main/packages/etag-hash): **🏷️ S3-compatible ETags** created by streaming and hashing file uploads in chunks.
|
|
153
|
+
* [launchql/etag-stream](https://github.com/constructive-io/constructive/tree/main/packages/etag-stream): **🔄 ETag computation** via Node stream transformer during upload or transfer.
|
|
154
|
+
* [launchql/uuid-hash](https://github.com/constructive-io/constructive/tree/main/packages/uuid-hash): **🆔 Deterministic UUIDs** generated from hashed content, great for deduplication and asset referencing.
|
|
155
|
+
* [launchql/uuid-stream](https://github.com/constructive-io/constructive/tree/main/packages/uuid-stream): **🌊 Streaming UUID generation** based on piped file content—ideal for upload pipelines.
|
|
156
|
+
* [launchql/upload-names](https://github.com/constructive-io/constructive/tree/main/packages/upload-names): **📂 Collision-resistant filenames** utility for structured and unique file names for uploads.
|
|
157
157
|
|
|
158
158
|
### 🧰 CLI & Codegen
|
|
159
159
|
|
|
160
|
-
* [pgpm](https://github.com/
|
|
161
|
-
* [@launchql/cli](https://github.com/
|
|
162
|
-
* [
|
|
163
|
-
* [@launchql/query-builder](https://github.com/
|
|
164
|
-
* [@launchql/query](https://github.com/
|
|
160
|
+
* [pgpm](https://github.com/constructive-io/constructive/tree/main/packages/pgpm): **🖥️ PostgreSQL Package Manager** for modular Postgres development. Works with database workspaces, scaffolding, migrations, seeding, and installing database packages.
|
|
161
|
+
* [@launchql/cli](https://github.com/constructive-io/constructive/tree/main/packages/cli): **🖥️ Command-line toolkit** for managing LaunchQL projects—supports database scaffolding, migrations, seeding, code generation, and automation.
|
|
162
|
+
* [constructive-io/constructive-gen](https://github.com/constructive-io/constructive/tree/main/packages/launchql-gen): **✨ Auto-generated GraphQL** mutations and queries dynamically built from introspected schema data.
|
|
163
|
+
* [@launchql/query-builder](https://github.com/constructive-io/constructive/tree/main/packages/query-builder): **🏗️ SQL constructor** providing a robust TypeScript-based query builder for dynamic generation of `SELECT`, `INSERT`, `UPDATE`, `DELETE`, and stored procedure calls—supports advanced SQL features like `JOIN`, `GROUP BY`, and schema-qualified queries.
|
|
164
|
+
* [@launchql/query](https://github.com/constructive-io/constructive/tree/main/packages/query): **🧩 Fluent GraphQL builder** for PostGraphile schemas. ⚡ Schema-aware via introspection, 🧩 composable and ergonomic for building deeply nested queries.
|
|
165
165
|
|
|
166
166
|
## Credits
|
|
167
167
|
|
|
168
|
-
🛠 Built by
|
|
168
|
+
🛠 Built by Constructive — if you like our tools, please checkout and contribute to [our github ⚛️](https://github.com/constructive-io)
|
|
169
169
|
|
|
170
170
|
|
|
171
171
|
## Disclaimer
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pg-codegen",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.16",
|
|
4
4
|
"author": "Dan Lynch <pyramation@gmail.com>",
|
|
5
5
|
"description": "PostgreSQL Codegen",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"module": "esm/index.js",
|
|
8
8
|
"types": "index.d.ts",
|
|
9
|
-
"homepage": "https://github.com/
|
|
9
|
+
"homepage": "https://github.com/constructive-io/constructive",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
17
|
-
"url": "https://github.com/
|
|
17
|
+
"url": "https://github.com/constructive-io/constructive"
|
|
18
18
|
},
|
|
19
19
|
"bugs": {
|
|
20
|
-
"url": "https://github.com/
|
|
20
|
+
"url": "https://github.com/constructive-io/constructive/issues"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"clean": "makage clean",
|
|
@@ -41,18 +41,18 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@babel/generator": "^7.26.3",
|
|
43
43
|
"@babel/types": "^7.26.3",
|
|
44
|
-
"@launchql/logger": "^1.1.
|
|
45
|
-
"@launchql/server-utils": "^2.6.
|
|
46
|
-
"@launchql/types": "^2.
|
|
44
|
+
"@launchql/logger": "^1.1.13",
|
|
45
|
+
"@launchql/server-utils": "^2.6.10",
|
|
46
|
+
"@launchql/types": "^2.9.0",
|
|
47
47
|
"pg": "^8.16.0",
|
|
48
|
-
"pg-cache": "^1.4.
|
|
49
|
-
"pg-env": "^1.1.
|
|
50
|
-
"pgsql-test": "^2.14.
|
|
48
|
+
"pg-cache": "^1.4.10",
|
|
49
|
+
"pg-env": "^1.1.8",
|
|
50
|
+
"pgsql-test": "^2.14.16"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/babel__generator": "^7.6.8",
|
|
54
54
|
"@types/pg": "^8.15.2",
|
|
55
55
|
"makage": "^0.1.8"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "6a35ff5a2c49e0c4cf1ec9abdd81b62c57d621e9"
|
|
58
58
|
}
|