@pgpmjs/export 0.15.2 → 0.16.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/esm/export-graphql-meta.js +3 -2
- package/esm/export-meta.js +3 -2
- package/esm/export-utils.js +20 -8
- package/export-graphql-meta.js +3 -2
- package/export-meta.js +3 -2
- package/export-utils.d.ts +1 -1
- package/export-utils.js +20 -8
- package/package.json +5 -5
|
@@ -139,9 +139,9 @@ export const exportGraphQLMeta = async ({ client, database_id }) => {
|
|
|
139
139
|
queryAndParse('invites_module'),
|
|
140
140
|
queryAndParse('emails_module'),
|
|
141
141
|
queryAndParse('sessions_module'),
|
|
142
|
-
queryAndParse('
|
|
142
|
+
queryAndParse('user_state_module'),
|
|
143
143
|
queryAndParse('profiles_module'),
|
|
144
|
-
queryAndParse('
|
|
144
|
+
queryAndParse('config_secrets_user_module'),
|
|
145
145
|
queryAndParse('connected_accounts_module'),
|
|
146
146
|
queryAndParse('phone_numbers_module'),
|
|
147
147
|
queryAndParse('crypto_addresses_module'),
|
|
@@ -165,6 +165,7 @@ export const exportGraphQLMeta = async ({ client, database_id }) => {
|
|
|
165
165
|
queryAndParse('plans_module'),
|
|
166
166
|
queryAndParse('realtime_module'),
|
|
167
167
|
queryAndParse('session_secrets_module'),
|
|
168
|
+
queryAndParse('config_secrets_org_module'),
|
|
168
169
|
queryAndParse('webauthn_auth_module'),
|
|
169
170
|
queryAndParse('webauthn_credentials_module')
|
|
170
171
|
]);
|
package/esm/export-meta.js
CHANGED
|
@@ -151,9 +151,9 @@ export const exportMeta = async ({ opts, dbname, database_id }) => {
|
|
|
151
151
|
await queryAndParse('invites_module', `SELECT * FROM metaschema_modules_public.invites_module WHERE database_id = $1 ORDER BY id`);
|
|
152
152
|
await queryAndParse('emails_module', `SELECT * FROM metaschema_modules_public.emails_module WHERE database_id = $1 ORDER BY id`);
|
|
153
153
|
await queryAndParse('sessions_module', `SELECT * FROM metaschema_modules_public.sessions_module WHERE database_id = $1 ORDER BY id`);
|
|
154
|
-
await queryAndParse('
|
|
154
|
+
await queryAndParse('user_state_module', `SELECT * FROM metaschema_modules_public.user_state_module WHERE database_id = $1 ORDER BY id`);
|
|
155
155
|
await queryAndParse('profiles_module', `SELECT * FROM metaschema_modules_public.profiles_module WHERE database_id = $1 ORDER BY id`);
|
|
156
|
-
await queryAndParse('
|
|
156
|
+
await queryAndParse('config_secrets_user_module', `SELECT * FROM metaschema_modules_public.config_secrets_user_module WHERE database_id = $1 ORDER BY id`);
|
|
157
157
|
await queryAndParse('connected_accounts_module', `SELECT * FROM metaschema_modules_public.connected_accounts_module WHERE database_id = $1 ORDER BY id`);
|
|
158
158
|
await queryAndParse('phone_numbers_module', `SELECT * FROM metaschema_modules_public.phone_numbers_module WHERE database_id = $1 ORDER BY id`);
|
|
159
159
|
await queryAndParse('crypto_addresses_module', `SELECT * FROM metaschema_modules_public.crypto_addresses_module WHERE database_id = $1 ORDER BY id`);
|
|
@@ -177,6 +177,7 @@ export const exportMeta = async ({ opts, dbname, database_id }) => {
|
|
|
177
177
|
await queryAndParse('plans_module', `SELECT * FROM metaschema_modules_public.plans_module WHERE database_id = $1 ORDER BY id`);
|
|
178
178
|
await queryAndParse('realtime_module', `SELECT * FROM metaschema_modules_public.realtime_module WHERE database_id = $1 ORDER BY id`);
|
|
179
179
|
await queryAndParse('session_secrets_module', `SELECT * FROM metaschema_modules_public.session_secrets_module WHERE database_id = $1 ORDER BY id`);
|
|
180
|
+
await queryAndParse('config_secrets_org_module', `SELECT * FROM metaschema_modules_public.config_secrets_org_module WHERE database_id = $1 ORDER BY id`);
|
|
180
181
|
await queryAndParse('webauthn_auth_module', `SELECT * FROM metaschema_modules_public.webauthn_auth_module WHERE database_id = $1 ORDER BY id`);
|
|
181
182
|
await queryAndParse('webauthn_credentials_module', `SELECT * FROM metaschema_modules_public.webauthn_credentials_module WHERE database_id = $1 ORDER BY id`);
|
|
182
183
|
return sql;
|
package/esm/export-utils.js
CHANGED
|
@@ -160,9 +160,9 @@ export const META_TABLE_ORDER = [
|
|
|
160
160
|
'invites_module',
|
|
161
161
|
'emails_module',
|
|
162
162
|
'sessions_module',
|
|
163
|
-
'
|
|
163
|
+
'user_state_module',
|
|
164
164
|
'profiles_module',
|
|
165
|
-
'
|
|
165
|
+
'config_secrets_user_module',
|
|
166
166
|
'connected_accounts_module',
|
|
167
167
|
'phone_numbers_module',
|
|
168
168
|
'crypto_addresses_module',
|
|
@@ -186,6 +186,7 @@ export const META_TABLE_ORDER = [
|
|
|
186
186
|
'plans_module',
|
|
187
187
|
'realtime_module',
|
|
188
188
|
'session_secrets_module',
|
|
189
|
+
'config_secrets_org_module',
|
|
189
190
|
'webauthn_auth_module',
|
|
190
191
|
'webauthn_credentials_module'
|
|
191
192
|
];
|
|
@@ -700,8 +701,8 @@ export const META_TABLE_CONFIG = {
|
|
|
700
701
|
sign_in_function: 'text',
|
|
701
702
|
sign_up_function: 'text',
|
|
702
703
|
sign_out_function: 'text',
|
|
703
|
-
|
|
704
|
-
|
|
704
|
+
sign_in_cross_origin_function: 'text',
|
|
705
|
+
request_cross_origin_token_function: 'text',
|
|
705
706
|
extend_token_expires: 'text',
|
|
706
707
|
send_account_deletion_email_function: 'text',
|
|
707
708
|
delete_account_function: 'text',
|
|
@@ -929,9 +930,9 @@ export const META_TABLE_CONFIG = {
|
|
|
929
930
|
auth_settings_table: 'text'
|
|
930
931
|
}
|
|
931
932
|
},
|
|
932
|
-
|
|
933
|
+
user_state_module: {
|
|
933
934
|
schema: 'metaschema_modules_public',
|
|
934
|
-
table: '
|
|
935
|
+
table: 'user_state_module',
|
|
935
936
|
fields: {
|
|
936
937
|
id: 'uuid',
|
|
937
938
|
database_id: 'uuid',
|
|
@@ -964,9 +965,9 @@ export const META_TABLE_CONFIG = {
|
|
|
964
965
|
prefix: 'text'
|
|
965
966
|
}
|
|
966
967
|
},
|
|
967
|
-
|
|
968
|
+
config_secrets_user_module: {
|
|
968
969
|
schema: 'metaschema_modules_public',
|
|
969
|
-
table: '
|
|
970
|
+
table: 'config_secrets_user_module',
|
|
970
971
|
fields: {
|
|
971
972
|
id: 'uuid',
|
|
972
973
|
database_id: 'uuid',
|
|
@@ -1386,6 +1387,17 @@ export const META_TABLE_CONFIG = {
|
|
|
1386
1387
|
sessions_table_id: 'uuid'
|
|
1387
1388
|
}
|
|
1388
1389
|
},
|
|
1390
|
+
config_secrets_org_module: {
|
|
1391
|
+
schema: 'metaschema_modules_public',
|
|
1392
|
+
table: 'config_secrets_org_module',
|
|
1393
|
+
fields: {
|
|
1394
|
+
id: 'uuid',
|
|
1395
|
+
database_id: 'uuid',
|
|
1396
|
+
schema_id: 'uuid',
|
|
1397
|
+
table_id: 'uuid',
|
|
1398
|
+
table_name: 'text'
|
|
1399
|
+
}
|
|
1400
|
+
},
|
|
1389
1401
|
webauthn_auth_module: {
|
|
1390
1402
|
schema: 'metaschema_modules_public',
|
|
1391
1403
|
table: 'webauthn_auth_module',
|
package/export-graphql-meta.js
CHANGED
|
@@ -142,9 +142,9 @@ const exportGraphQLMeta = async ({ client, database_id }) => {
|
|
|
142
142
|
queryAndParse('invites_module'),
|
|
143
143
|
queryAndParse('emails_module'),
|
|
144
144
|
queryAndParse('sessions_module'),
|
|
145
|
-
queryAndParse('
|
|
145
|
+
queryAndParse('user_state_module'),
|
|
146
146
|
queryAndParse('profiles_module'),
|
|
147
|
-
queryAndParse('
|
|
147
|
+
queryAndParse('config_secrets_user_module'),
|
|
148
148
|
queryAndParse('connected_accounts_module'),
|
|
149
149
|
queryAndParse('phone_numbers_module'),
|
|
150
150
|
queryAndParse('crypto_addresses_module'),
|
|
@@ -168,6 +168,7 @@ const exportGraphQLMeta = async ({ client, database_id }) => {
|
|
|
168
168
|
queryAndParse('plans_module'),
|
|
169
169
|
queryAndParse('realtime_module'),
|
|
170
170
|
queryAndParse('session_secrets_module'),
|
|
171
|
+
queryAndParse('config_secrets_org_module'),
|
|
171
172
|
queryAndParse('webauthn_auth_module'),
|
|
172
173
|
queryAndParse('webauthn_credentials_module')
|
|
173
174
|
]);
|
package/export-meta.js
CHANGED
|
@@ -154,9 +154,9 @@ const exportMeta = async ({ opts, dbname, database_id }) => {
|
|
|
154
154
|
await queryAndParse('invites_module', `SELECT * FROM metaschema_modules_public.invites_module WHERE database_id = $1 ORDER BY id`);
|
|
155
155
|
await queryAndParse('emails_module', `SELECT * FROM metaschema_modules_public.emails_module WHERE database_id = $1 ORDER BY id`);
|
|
156
156
|
await queryAndParse('sessions_module', `SELECT * FROM metaschema_modules_public.sessions_module WHERE database_id = $1 ORDER BY id`);
|
|
157
|
-
await queryAndParse('
|
|
157
|
+
await queryAndParse('user_state_module', `SELECT * FROM metaschema_modules_public.user_state_module WHERE database_id = $1 ORDER BY id`);
|
|
158
158
|
await queryAndParse('profiles_module', `SELECT * FROM metaschema_modules_public.profiles_module WHERE database_id = $1 ORDER BY id`);
|
|
159
|
-
await queryAndParse('
|
|
159
|
+
await queryAndParse('config_secrets_user_module', `SELECT * FROM metaschema_modules_public.config_secrets_user_module WHERE database_id = $1 ORDER BY id`);
|
|
160
160
|
await queryAndParse('connected_accounts_module', `SELECT * FROM metaschema_modules_public.connected_accounts_module WHERE database_id = $1 ORDER BY id`);
|
|
161
161
|
await queryAndParse('phone_numbers_module', `SELECT * FROM metaschema_modules_public.phone_numbers_module WHERE database_id = $1 ORDER BY id`);
|
|
162
162
|
await queryAndParse('crypto_addresses_module', `SELECT * FROM metaschema_modules_public.crypto_addresses_module WHERE database_id = $1 ORDER BY id`);
|
|
@@ -180,6 +180,7 @@ const exportMeta = async ({ opts, dbname, database_id }) => {
|
|
|
180
180
|
await queryAndParse('plans_module', `SELECT * FROM metaschema_modules_public.plans_module WHERE database_id = $1 ORDER BY id`);
|
|
181
181
|
await queryAndParse('realtime_module', `SELECT * FROM metaschema_modules_public.realtime_module WHERE database_id = $1 ORDER BY id`);
|
|
182
182
|
await queryAndParse('session_secrets_module', `SELECT * FROM metaschema_modules_public.session_secrets_module WHERE database_id = $1 ORDER BY id`);
|
|
183
|
+
await queryAndParse('config_secrets_org_module', `SELECT * FROM metaschema_modules_public.config_secrets_org_module WHERE database_id = $1 ORDER BY id`);
|
|
183
184
|
await queryAndParse('webauthn_auth_module', `SELECT * FROM metaschema_modules_public.webauthn_auth_module WHERE database_id = $1 ORDER BY id`);
|
|
184
185
|
await queryAndParse('webauthn_credentials_module', `SELECT * FROM metaschema_modules_public.webauthn_credentials_module WHERE database_id = $1 ORDER BY id`);
|
|
185
186
|
return sql;
|
package/export-utils.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export declare const META_COMMON_FOOTER = "\nSET session_replication_role TO DEF
|
|
|
23
23
|
* Ordered list of meta tables for export.
|
|
24
24
|
* Tables are processed in this order to satisfy foreign key dependencies.
|
|
25
25
|
*/
|
|
26
|
-
export declare const META_TABLE_ORDER: readonly ["database", "schema", "function", "table", "field", "spatial_relation", "policy", "index", "trigger", "trigger_function", "rls_function", "foreign_key_constraint", "primary_key_constraint", "unique_constraint", "check_constraint", "full_text_search", "schema_grant", "table_grant", "default_privilege", "domains", "sites", "apis", "apps", "site_modules", "site_themes", "site_metadata", "api_modules", "api_extensions", "api_schemas", "database_settings", "api_settings", "rls_settings", "cors_settings", "pubkey_settings", "webauthn_settings", "rls_module", "user_auth_module", "memberships_module", "permissions_module", "limits_module", "levels_module", "users_module", "hierarchy_module", "membership_types_module", "invites_module", "emails_module", "sessions_module", "
|
|
26
|
+
export declare const META_TABLE_ORDER: readonly ["database", "schema", "function", "table", "field", "spatial_relation", "policy", "index", "trigger", "trigger_function", "rls_function", "foreign_key_constraint", "primary_key_constraint", "unique_constraint", "check_constraint", "full_text_search", "schema_grant", "table_grant", "default_privilege", "domains", "sites", "apis", "apps", "site_modules", "site_themes", "site_metadata", "api_modules", "api_extensions", "api_schemas", "database_settings", "api_settings", "rls_settings", "cors_settings", "pubkey_settings", "webauthn_settings", "rls_module", "user_auth_module", "memberships_module", "permissions_module", "limits_module", "levels_module", "users_module", "hierarchy_module", "membership_types_module", "invites_module", "emails_module", "sessions_module", "user_state_module", "profiles_module", "config_secrets_user_module", "connected_accounts_module", "phone_numbers_module", "crypto_addresses_module", "crypto_auth_module", "field_module", "table_module", "secure_table_provision", "uuid_module", "default_ids_module", "denormalized_table_field", "table_template_module", "relation_provision", "entity_type_provision", "rate_limits_module", "storage_module", "billing_module", "billing_provider_module", "devices_module", "identity_providers_module", "notifications_module", "plans_module", "realtime_module", "session_secrets_module", "config_secrets_org_module", "webauthn_auth_module", "webauthn_credentials_module"];
|
|
27
27
|
export type FieldType = 'uuid' | 'uuid[]' | 'text' | 'text[]' | 'boolean' | 'image' | 'upload' | 'url' | 'jsonb' | 'jsonb[]' | 'int' | 'interval' | 'timestamptz';
|
|
28
28
|
export interface TableConfig {
|
|
29
29
|
schema: string;
|
package/export-utils.js
CHANGED
|
@@ -166,9 +166,9 @@ exports.META_TABLE_ORDER = [
|
|
|
166
166
|
'invites_module',
|
|
167
167
|
'emails_module',
|
|
168
168
|
'sessions_module',
|
|
169
|
-
'
|
|
169
|
+
'user_state_module',
|
|
170
170
|
'profiles_module',
|
|
171
|
-
'
|
|
171
|
+
'config_secrets_user_module',
|
|
172
172
|
'connected_accounts_module',
|
|
173
173
|
'phone_numbers_module',
|
|
174
174
|
'crypto_addresses_module',
|
|
@@ -192,6 +192,7 @@ exports.META_TABLE_ORDER = [
|
|
|
192
192
|
'plans_module',
|
|
193
193
|
'realtime_module',
|
|
194
194
|
'session_secrets_module',
|
|
195
|
+
'config_secrets_org_module',
|
|
195
196
|
'webauthn_auth_module',
|
|
196
197
|
'webauthn_credentials_module'
|
|
197
198
|
];
|
|
@@ -706,8 +707,8 @@ exports.META_TABLE_CONFIG = {
|
|
|
706
707
|
sign_in_function: 'text',
|
|
707
708
|
sign_up_function: 'text',
|
|
708
709
|
sign_out_function: 'text',
|
|
709
|
-
|
|
710
|
-
|
|
710
|
+
sign_in_cross_origin_function: 'text',
|
|
711
|
+
request_cross_origin_token_function: 'text',
|
|
711
712
|
extend_token_expires: 'text',
|
|
712
713
|
send_account_deletion_email_function: 'text',
|
|
713
714
|
delete_account_function: 'text',
|
|
@@ -935,9 +936,9 @@ exports.META_TABLE_CONFIG = {
|
|
|
935
936
|
auth_settings_table: 'text'
|
|
936
937
|
}
|
|
937
938
|
},
|
|
938
|
-
|
|
939
|
+
user_state_module: {
|
|
939
940
|
schema: 'metaschema_modules_public',
|
|
940
|
-
table: '
|
|
941
|
+
table: 'user_state_module',
|
|
941
942
|
fields: {
|
|
942
943
|
id: 'uuid',
|
|
943
944
|
database_id: 'uuid',
|
|
@@ -970,9 +971,9 @@ exports.META_TABLE_CONFIG = {
|
|
|
970
971
|
prefix: 'text'
|
|
971
972
|
}
|
|
972
973
|
},
|
|
973
|
-
|
|
974
|
+
config_secrets_user_module: {
|
|
974
975
|
schema: 'metaschema_modules_public',
|
|
975
|
-
table: '
|
|
976
|
+
table: 'config_secrets_user_module',
|
|
976
977
|
fields: {
|
|
977
978
|
id: 'uuid',
|
|
978
979
|
database_id: 'uuid',
|
|
@@ -1392,6 +1393,17 @@ exports.META_TABLE_CONFIG = {
|
|
|
1392
1393
|
sessions_table_id: 'uuid'
|
|
1393
1394
|
}
|
|
1394
1395
|
},
|
|
1396
|
+
config_secrets_org_module: {
|
|
1397
|
+
schema: 'metaschema_modules_public',
|
|
1398
|
+
table: 'config_secrets_org_module',
|
|
1399
|
+
fields: {
|
|
1400
|
+
id: 'uuid',
|
|
1401
|
+
database_id: 'uuid',
|
|
1402
|
+
schema_id: 'uuid',
|
|
1403
|
+
table_id: 'uuid',
|
|
1404
|
+
table_name: 'text'
|
|
1405
|
+
}
|
|
1406
|
+
},
|
|
1395
1407
|
webauthn_auth_module: {
|
|
1396
1408
|
schema: 'metaschema_modules_public',
|
|
1397
1409
|
table: 'webauthn_auth_module',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pgpmjs/export",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "PGPM export tools for SQL and GraphQL database migration extraction",
|
|
6
6
|
"main": "index.js",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"@pgsql/types": "^17.6.2",
|
|
42
42
|
"@types/pg": "^8.18.0",
|
|
43
43
|
"makage": "^0.3.0",
|
|
44
|
-
"pgsql-test": "^4.14.
|
|
44
|
+
"pgsql-test": "^4.14.1"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@pgpmjs/core": "^6.18.
|
|
48
|
-
"@pgpmjs/migrate-client": "^0.13.
|
|
47
|
+
"@pgpmjs/core": "^6.18.1",
|
|
48
|
+
"@pgpmjs/migrate-client": "^0.13.4",
|
|
49
49
|
"@pgpmjs/types": "^2.27.0",
|
|
50
50
|
"csv-to-pg": "^3.17.0",
|
|
51
51
|
"glob": "^13.0.6",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"pg-cache": "^3.10.0",
|
|
56
56
|
"pg-env": "^1.14.0"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "1aaafe14a8ba4eeeaab099f5fdc69865ce4e2a2e"
|
|
59
59
|
}
|