@pgpm/types 0.13.0 → 0.15.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/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 Interweb, Inc.
4
+ Copyright (c) 2025 Constructive
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  of this software and associated documentation files (the "Software"), to deal
package/Makefile CHANGED
@@ -1,5 +1,5 @@
1
- EXTENSION = launchql-types
2
- DATA = sql/launchql-types--0.9.0.sql
1
+ EXTENSION = pgpm-types
2
+ DATA = sql/pgpm-types--0.14.0.sql
3
3
 
4
4
  PG_CONFIG = pg_config
5
5
  PGXS := $(shell $(PG_CONFIG) --pgxs)
package/README.md CHANGED
@@ -1,15 +1,15 @@
1
1
  # @pgpm/types
2
2
 
3
3
  <p align="center" width="100%">
4
- <img height="250" src="https://raw.githubusercontent.com/launchql/launchql/refs/heads/main/assets/outline-logo.svg" />
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/launchql/pgpm-modules/actions/workflows/ci.yml">
9
- <img height="20" src="https://github.com/launchql/pgpm-modules/actions/workflows/ci.yml/badge.svg" />
8
+ <a href="https://github.com/constructive-io/pgpm-modules/actions/workflows/ci.yml">
9
+ <img height="20" src="https://github.com/constructive-io/pgpm-modules/actions/workflows/ci.yml/badge.svg" />
10
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/types"><img height="20" src="https://img.shields.io/github/package-json/v/launchql/pgpm-modules?filename=packages%2Fdata-types%2Ftypes%2Fpackage.json"/></a>
11
+ <a href="https://github.com/constructive-io/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/types"><img height="20" src="https://img.shields.io/github/package-json/v/constructive-io/pgpm-modules?filename=packages%2Fdata-types%2Ftypes%2Fpackage.json"/></a>
13
13
  </p>
14
14
 
15
15
  Core PostgreSQL data types with SQL scripts.
@@ -68,7 +68,7 @@ pgpm deploy
68
68
 
69
69
  ```bash
70
70
  # 1. Create a workspace
71
- pgpm init --workspace
71
+ pgpm init workspace
72
72
 
73
73
  # 2. Create your first module
74
74
  cd my-workspace
@@ -217,13 +217,13 @@ The test suite validates:
217
217
 
218
218
  ## Related Tooling
219
219
 
220
- * [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.
221
- * [pgsql-test](https://github.com/launchql/launchql/tree/main/packages/pgsql-test): **📊 Isolated testing environments** with per-test transaction rollbacks—ideal for integration tests, complex migrations, and RLS simulation.
222
- * [supabase-test](https://github.com/launchql/launchql/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.
223
- * [graphile-test](https://github.com/launchql/launchql/tree/main/packages/graphile-test): **🔐 Authentication mocking** for Graphile-focused test helpers and emulating row-level security contexts.
224
- * [pgsql-parser](https://github.com/launchql/pgsql-parser): **🔄 SQL conversion engine** that interprets and converts PostgreSQL syntax.
225
- * [libpg-query-node](https://github.com/launchql/libpg-query-node): **🌉 Node.js bindings** for `libpg_query`, converting SQL into parse trees.
226
- * [pg-proto-parser](https://github.com/launchql/pg-proto-parser): **📦 Protobuf parser** for parsing PostgreSQL Protocol Buffers definitions to generate TypeScript interfaces, utility functions, and JSON mappings for enums.
220
+ * [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.
221
+ * [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.
222
+ * [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.
223
+ * [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.
224
+ * [pgsql-parser](https://github.com/constructive-io/pgsql-parser): **🔄 SQL conversion engine** that interprets and converts PostgreSQL syntax.
225
+ * [libpg-query-node](https://github.com/constructive-io/libpg-query-node): **🌉 Node.js bindings** for `libpg_query`, converting SQL into parse trees.
226
+ * [pg-proto-parser](https://github.com/constructive-io/pg-proto-parser): **📦 Protobuf parser** for parsing PostgreSQL Protocol Buffers definitions to generate TypeScript interfaces, utility functions, and JSON mappings for enums.
227
227
 
228
228
  ## Disclaimer
229
229
 
@@ -3,5 +3,5 @@
3
3
 
4
4
  BEGIN;
5
5
  CREATE DOMAIN attachment AS text CHECK (VALUE ~ '^(https?)://[^\s/$.?#].[^\s]*$');
6
- COMMENT ON DOMAIN attachment IS E'@name launchqlInternalTypeAttachment';
6
+ COMMENT ON DOMAIN attachment IS E'@name pgpmInternalTypeAttachment';
7
7
  COMMIT;
@@ -3,6 +3,6 @@
3
3
 
4
4
  BEGIN;
5
5
  CREATE DOMAIN email AS citext CHECK (value ~ '^[a-zA-Z0-9.!#$%&''*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$');
6
- COMMENT ON DOMAIN email IS E'@name launchqlInternalTypeEmail';
6
+ COMMENT ON DOMAIN email IS E'@name pgpmInternalTypeEmail';
7
7
  COMMIT;
8
8
 
@@ -3,6 +3,6 @@
3
3
 
4
4
  BEGIN;
5
5
  CREATE DOMAIN hostname AS text CHECK (VALUE ~ '^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$');
6
- COMMENT ON DOMAIN hostname IS E'@name launchqlInternalTypeHostname';
6
+ COMMENT ON DOMAIN hostname IS E'@name pgpmInternalTypeHostname';
7
7
  COMMIT;
8
8
 
@@ -7,6 +7,6 @@ CREATE DOMAIN image AS jsonb CHECK (
7
7
  AND
8
8
  value->>'url' ~ '^(https?)://[^\s/$.?#].[^\s]*$'
9
9
  );
10
- COMMENT ON DOMAIN image IS E'@name launchqlInternalTypeImage';
10
+ COMMENT ON DOMAIN image IS E'@name pgpmInternalTypeImage';
11
11
  COMMIT;
12
12
 
@@ -3,6 +3,6 @@
3
3
 
4
4
  BEGIN;
5
5
  CREATE DOMAIN multiple_select AS jsonb CHECK (value ?& ARRAY['value']);
6
- COMMENT ON DOMAIN multiple_select IS E'@name launchqlInternalTypeMultipleSelect';
6
+ COMMENT ON DOMAIN multiple_select IS E'@name pgpmInternalTypeMultipleSelect';
7
7
  COMMIT;
8
8
 
@@ -3,6 +3,6 @@
3
3
 
4
4
  BEGIN;
5
5
  CREATE DOMAIN origin AS text CHECK (VALUE = substring(VALUE from '^(https?://[^/]*)'));
6
- COMMENT ON DOMAIN origin IS E'@name launchqlInternalTypeOrigin';
6
+ COMMENT ON DOMAIN origin IS E'@name pgpmInternalTypeOrigin';
7
7
  COMMIT;
8
8
 
@@ -7,6 +7,6 @@ BEGIN;
7
7
  CREATE DOMAIN single_select AS jsonb CHECK (
8
8
  value ?& ARRAY['value']
9
9
  );
10
- COMMENT ON DOMAIN single_select IS E'@name launchqlInternalTypeSingleSelect';
10
+ COMMENT ON DOMAIN single_select IS E'@name pgpmInternalTypeSingleSelect';
11
11
 
12
12
  COMMIT;
@@ -9,6 +9,6 @@ CREATE DOMAIN upload AS jsonb CHECK (
9
9
  AND
10
10
  value->>'url' ~ '^(https?)://[^\s/$.?#].[^\s]*$'
11
11
  );
12
- COMMENT ON DOMAIN upload IS E'@name launchqlInternalTypeUpload';
12
+ COMMENT ON DOMAIN upload IS E'@name pgpmInternalTypeUpload';
13
13
 
14
14
  COMMIT;
@@ -3,6 +3,6 @@
3
3
 
4
4
  BEGIN;
5
5
  CREATE DOMAIN url AS text CHECK (VALUE ~ '^(https?)://[^\s/$.?#].[^\s]*$');
6
- COMMENT ON DOMAIN url IS E'@name launchqlInternalTypeUrl';
6
+ COMMENT ON DOMAIN url IS E'@name pgpmInternalTypeUrl';
7
7
  COMMIT;
8
8
 
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@pgpm/types",
3
- "version": "0.13.0",
3
+ "version": "0.15.0",
4
4
  "description": "Core PostgreSQL data types with deploy/verify/revert SQL scripts",
5
5
  "author": "Dan Lynch <pyramation@gmail.com>",
6
6
  "contributors": [
7
- "Interweb <developers@interweb.co>"
7
+ "Constructive <developers@constructive.io>"
8
8
  ],
9
9
  "keywords": [
10
10
  "postgresql",
@@ -21,18 +21,18 @@
21
21
  "test:watch": "jest --watch"
22
22
  },
23
23
  "dependencies": {
24
- "@pgpm/verify": "0.13.0"
24
+ "@pgpm/verify": "0.15.0"
25
25
  },
26
26
  "devDependencies": {
27
- "pgpm": "^0.2.0"
27
+ "pgpm": "^1.0.0"
28
28
  },
29
29
  "repository": {
30
30
  "type": "git",
31
- "url": "https://github.com/launchql/pgpm-modules"
31
+ "url": "https://github.com/constructive-io/pgpm-modules"
32
32
  },
33
- "homepage": "https://github.com/launchql/pgpm-modules",
33
+ "homepage": "https://github.com/constructive-io/pgpm-modules",
34
34
  "bugs": {
35
- "url": "https://github.com/launchql/pgpm-modules/issues"
35
+ "url": "https://github.com/constructive-io/pgpm-modules/issues"
36
36
  },
37
- "gitHead": "e7de11be3a2fd806929adf48acc556d812c75aa6"
37
+ "gitHead": "118ac6f810720378fa954e9620abf2516293c148"
38
38
  }
@@ -0,0 +1,8 @@
1
+ # pgpm-types extension
2
+ comment = 'pgpm-types extension'
3
+ default_version = '0.14.0'
4
+ module_pathname = '$libdir/pgpm-types'
5
+ requires = 'plpgsql,citext,pgpm-verify'
6
+ relocatable = false
7
+ superuser = false
8
+
package/pgpm.plan CHANGED
@@ -1,6 +1,6 @@
1
1
  %syntax-version=1.0.0
2
- %project=launchql-types
3
- %uri=launchql-types
2
+ %project=pgpm-types
3
+ %uri=pgpm-types
4
4
 
5
5
  schemas/public/schema 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/public/schema
6
6
  schemas/public/domains/attachment [schemas/public/schema] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/public/domains/attachment
@@ -1,21 +1,18 @@
1
- \echo Use "CREATE EXTENSION launchql-types" to load this file. \quit
2
- CREATE DOMAIN attachment AS jsonb
3
- CHECK (
4
- value ?& ARRAY['url', 'mime']
5
- AND (value ->> 'url') ~ E'^(https?)://[^\\s/$.?#].[^\\s]*$'
6
- );
1
+ \echo Use "CREATE EXTENSION pgpm-types" to load this file. \quit
2
+ CREATE DOMAIN attachment AS text
3
+ CHECK (value ~ E'^(https?)://[^\\s/$.?#].[^\\s]*$');
7
4
 
8
- COMMENT ON DOMAIN attachment IS '@name launchqlInternalTypeAttachment';
5
+ COMMENT ON DOMAIN attachment IS '@name pgpmInternalTypeAttachment';
9
6
 
10
7
  CREATE DOMAIN email AS citext
11
8
  CHECK (value ~ E'^[a-zA-Z0-9.!#$%&''*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$');
12
9
 
13
- COMMENT ON DOMAIN email IS '@name launchqlInternalTypeEmail';
10
+ COMMENT ON DOMAIN email IS '@name pgpmInternalTypeEmail';
14
11
 
15
12
  CREATE DOMAIN hostname AS text
16
13
  CHECK (value ~ E'^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])$');
17
14
 
18
- COMMENT ON DOMAIN hostname IS '@name launchqlInternalTypeHostname';
15
+ COMMENT ON DOMAIN hostname IS '@name pgpmInternalTypeHostname';
19
16
 
20
17
  CREATE DOMAIN image AS jsonb
21
18
  CHECK (
@@ -23,17 +20,22 @@ CREATE DOMAIN image AS jsonb
23
20
  AND (value ->> 'url') ~ E'^(https?)://[^\\s/$.?#].[^\\s]*$'
24
21
  );
25
22
 
26
- COMMENT ON DOMAIN image IS '@name launchqlInternalTypeImage';
23
+ COMMENT ON DOMAIN image IS '@name pgpmInternalTypeImage';
27
24
 
28
25
  CREATE DOMAIN multiple_select AS jsonb
29
26
  CHECK (value ?& ARRAY['value']);
30
27
 
31
- COMMENT ON DOMAIN multiple_select IS '@name launchqlInternalTypeMultipleSelect';
28
+ COMMENT ON DOMAIN multiple_select IS '@name pgpmInternalTypeMultipleSelect';
29
+
30
+ CREATE DOMAIN origin AS text
31
+ CHECK (value = SUBSTRING(value FROM '^(https?://[^/]*)'));
32
+
33
+ COMMENT ON DOMAIN origin IS '@name pgpmInternalTypeOrigin';
32
34
 
33
35
  CREATE DOMAIN single_select AS jsonb
34
36
  CHECK (value ?& ARRAY['value']);
35
37
 
36
- COMMENT ON DOMAIN single_select IS '@name launchqlInternalTypeSingleSelect';
38
+ COMMENT ON DOMAIN single_select IS '@name pgpmInternalTypeSingleSelect';
37
39
 
38
40
  CREATE DOMAIN upload AS jsonb
39
41
  CHECK (
@@ -41,9 +43,9 @@ CREATE DOMAIN upload AS jsonb
41
43
  AND (value ->> 'url') ~ E'^(https?)://[^\\s/$.?#].[^\\s]*$'
42
44
  );
43
45
 
44
- COMMENT ON DOMAIN upload IS '@name launchqlInternalTypeUpload';
46
+ COMMENT ON DOMAIN upload IS '@name pgpmInternalTypeUpload';
45
47
 
46
48
  CREATE DOMAIN url AS text
47
49
  CHECK (value ~ E'^(https?)://[^\\s/$.?#].[^\\s]*$');
48
50
 
49
- COMMENT ON DOMAIN url IS '@name launchqlInternalTypeUrl';
51
+ COMMENT ON DOMAIN url IS '@name pgpmInternalTypeUrl';
@@ -1,8 +0,0 @@
1
- # launchql-types extension
2
- comment = 'launchql-types extension'
3
- default_version = '0.9.0'
4
- module_pathname = '$libdir/launchql-types'
5
- requires = 'plpgsql,citext,launchql-verify'
6
- relocatable = false
7
- superuser = false
8
-