@pgpm/faker 0.12.2 → 0.14.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 +1 -1
- package/README.md +13 -13
- package/deploy/schemas/faker/procedures/utils.sql +1 -5
- package/package.json +9 -9
- package/sql/launchql-faker--0.9.0.sql +2 -6
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
|
|
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/README.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# @pgpm/faker
|
|
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/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/
|
|
12
|
-
<a href="https://www.npmjs.com/package/@pgpm/faker"><img height="20" src="https://img.shields.io/github/package-json/v/
|
|
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/faker"><img height="20" src="https://img.shields.io/github/package-json/v/constructive-io/pgpm-modules?filename=packages%2Futils%2Ffaker%2Fpackage.json"/></a>
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
create fake data in PostgreSQL
|
|
@@ -68,7 +68,7 @@ pgpm deploy
|
|
|
68
68
|
|
|
69
69
|
```bash
|
|
70
70
|
# 1. Create a workspace
|
|
71
|
-
pgpm init
|
|
71
|
+
pgpm init workspace
|
|
72
72
|
|
|
73
73
|
# 2. Create your first module
|
|
74
74
|
cd my-workspace
|
|
@@ -520,13 +520,13 @@ None - this is a pure plpgsql implementation.
|
|
|
520
520
|
|
|
521
521
|
## Related Tooling
|
|
522
522
|
|
|
523
|
-
* [pgpm](https://github.com/
|
|
524
|
-
* [pgsql-test](https://github.com/
|
|
525
|
-
* [supabase-test](https://github.com/
|
|
526
|
-
* [graphile-test](https://github.com/
|
|
527
|
-
* [pgsql-parser](https://github.com/
|
|
528
|
-
* [libpg-query-node](https://github.com/
|
|
529
|
-
* [pg-proto-parser](https://github.com/
|
|
523
|
+
* [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.
|
|
524
|
+
* [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.
|
|
525
|
+
* [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.
|
|
526
|
+
* [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.
|
|
527
|
+
* [pgsql-parser](https://github.com/constructive-io/pgsql-parser): **🔄 SQL conversion engine** that interprets and converts PostgreSQL syntax.
|
|
528
|
+
* [libpg-query-node](https://github.com/constructive-io/libpg-query-node): **🌉 Node.js bindings** for `libpg_query`, converting SQL into parse trees.
|
|
529
|
+
* [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.
|
|
530
530
|
|
|
531
531
|
## Disclaimer
|
|
532
532
|
|
|
@@ -724,15 +724,11 @@ $$
|
|
|
724
724
|
LANGUAGE 'plpgsql' VOLATILE;
|
|
725
725
|
|
|
726
726
|
CREATE FUNCTION faker.attachment(mime text default null) returns attachment as $$
|
|
727
|
-
DECLARE
|
|
728
|
-
obj jsonb = '{}'::jsonb;
|
|
729
727
|
BEGIN
|
|
730
728
|
IF (mime IS NULL) THEN
|
|
731
729
|
mime = faker.mime();
|
|
732
730
|
END IF;
|
|
733
|
-
|
|
734
|
-
obj = jsonb_set(obj, '{mime}', to_jsonb(mime));
|
|
735
|
-
RETURN obj;
|
|
731
|
+
RETURN faker.url(mime);
|
|
736
732
|
END;
|
|
737
733
|
$$
|
|
738
734
|
LANGUAGE 'plpgsql' VOLATILE;
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pgpm/faker",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Fake data generation utilities for testing and development",
|
|
5
5
|
"author": "Dan Lynch <pyramation@gmail.com>",
|
|
6
6
|
"contributors": [
|
|
7
|
-
"
|
|
7
|
+
"Constructive <developers@constructive.io>"
|
|
8
8
|
],
|
|
9
9
|
"keywords": [
|
|
10
10
|
"postgresql",
|
|
@@ -21,19 +21,19 @@
|
|
|
21
21
|
"test:watch": "jest --watch"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@pgpm/types": "0.
|
|
25
|
-
"@pgpm/verify": "0.
|
|
24
|
+
"@pgpm/types": "0.14.0",
|
|
25
|
+
"@pgpm/verify": "0.14.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"pgpm": "^0.
|
|
28
|
+
"pgpm": "^1.0.0"
|
|
29
29
|
},
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|
|
32
|
-
"url": "https://github.com/
|
|
32
|
+
"url": "https://github.com/constructive-io/pgpm-modules"
|
|
33
33
|
},
|
|
34
|
-
"homepage": "https://github.com/
|
|
34
|
+
"homepage": "https://github.com/constructive-io/pgpm-modules",
|
|
35
35
|
"bugs": {
|
|
36
|
-
"url": "https://github.com/
|
|
36
|
+
"url": "https://github.com/constructive-io/pgpm-modules/issues"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "7369638ab084da95b0cb00ec63ad236637f6ebe5"
|
|
39
39
|
}
|
|
@@ -677,15 +677,11 @@ END;
|
|
|
677
677
|
$EOFCODE$ LANGUAGE plpgsql VOLATILE;
|
|
678
678
|
|
|
679
679
|
CREATE FUNCTION faker.attachment(mime text DEFAULT NULL) RETURNS attachment AS $EOFCODE$
|
|
680
|
-
DECLARE
|
|
681
|
-
obj jsonb = '{}'::jsonb;
|
|
682
680
|
BEGIN
|
|
683
681
|
IF (mime IS NULL) THEN
|
|
684
682
|
mime = faker.mime();
|
|
685
683
|
END IF;
|
|
686
|
-
|
|
687
|
-
obj = jsonb_set(obj, '{mime}', to_jsonb(mime));
|
|
688
|
-
RETURN obj;
|
|
684
|
+
RETURN faker.url(mime);
|
|
689
685
|
END;
|
|
690
686
|
$EOFCODE$ LANGUAGE plpgsql VOLATILE;
|
|
691
687
|
|
|
@@ -10405,4 +10401,4 @@ INSERT INTO faker.dictionary (
|
|
|
10405
10401
|
('cta', 'Learn more'),
|
|
10406
10402
|
('cta', 'Join now'),
|
|
10407
10403
|
('cta', 'Start now'),
|
|
10408
|
-
('cta', 'Get yours now');
|
|
10404
|
+
('cta', 'Get yours now');
|