pgflow 0.0.0-array-map-steps-cd94242a-20251008042921 → 0.0.0-array-map-steps-fixed-types-38a198ae-20251011160533
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.
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Updates the config.toml file with necessary configurations for EdgeWorker
|
|
3
|
-
*
|
|
4
|
-
* NOTE: Comments and custom formatting will be lost. A backup is always created.
|
|
3
|
+
* while preserving comments and formatting
|
|
5
4
|
*
|
|
6
5
|
* Makes the following changes:
|
|
7
6
|
* 1. Enables the connection pooler
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-config-toml.d.ts","sourceRoot":"","sources":["../../../src/commands/install/update-config-toml.ts"],"names":[],"mappings":"AAqBA
|
|
1
|
+
{"version":3,"file":"update-config-toml.d.ts","sourceRoot":"","sources":["../../../src/commands/install/update-config-toml.ts"],"names":[],"mappings":"AAqBA;;;;;;;;;;;;;GAaG;AACH,wBAAsB,gBAAgB,CAAC,EACrC,YAAY,EACZ,WAAmB,GACpB,EAAE;IACD,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GAAG,OAAO,CAAC,OAAO,CAAC,CAwHnB"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { log, confirm, note } from '@clack/prompts';
|
|
4
|
-
import
|
|
4
|
+
import * as TOML from '@decimalturn/toml-patch';
|
|
5
5
|
import chalk from 'chalk';
|
|
6
6
|
/**
|
|
7
7
|
* Updates the config.toml file with necessary configurations for EdgeWorker
|
|
8
|
-
*
|
|
9
|
-
* NOTE: Comments and custom formatting will be lost. A backup is always created.
|
|
8
|
+
* while preserving comments and formatting
|
|
10
9
|
*
|
|
11
10
|
* Makes the following changes:
|
|
12
11
|
* 1. Enables the connection pooler
|
|
@@ -30,7 +29,7 @@ export async function updateConfigToml({ supabasePath, autoConfirm = false, }) {
|
|
|
30
29
|
const configContent = fs.readFileSync(configPath, 'utf8');
|
|
31
30
|
let config;
|
|
32
31
|
try {
|
|
33
|
-
config =
|
|
32
|
+
config = TOML.parse(configContent);
|
|
34
33
|
}
|
|
35
34
|
catch (parseError) {
|
|
36
35
|
const errorMsg = parseError instanceof Error ? parseError.message : String(parseError);
|
|
@@ -91,11 +90,11 @@ ${chalk.green('+ policy = "per_worker"')}`);
|
|
|
91
90
|
updatedConfig.db.pooler.enabled = true;
|
|
92
91
|
updatedConfig.db.pooler.pool_mode = 'transaction';
|
|
93
92
|
updatedConfig.edge_runtime.policy = 'per_worker';
|
|
94
|
-
// Stringify the updated config
|
|
95
|
-
// Note: This will not preserve comments from the original file
|
|
96
93
|
let updatedContent;
|
|
97
94
|
try {
|
|
98
|
-
updatedContent =
|
|
95
|
+
updatedContent = TOML.patch(configContent, updatedConfig, {
|
|
96
|
+
trailingComma: false,
|
|
97
|
+
});
|
|
99
98
|
}
|
|
100
99
|
catch (stringifyError) {
|
|
101
100
|
const errorMsg = stringifyError instanceof Error ? stringifyError.message : String(stringifyError);
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pgflow",
|
|
3
|
-
"version": "0.0.0-array-map-steps-
|
|
3
|
+
"version": "0.0.0-array-map-steps-fixed-types-38a198ae-20251011160533",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"typings": "./dist/index.d.ts",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@clack/prompts": "^0.10.1",
|
|
23
23
|
"@commander-js/extra-typings": "^13.1.0",
|
|
24
|
+
"@decimalturn/toml-patch": "0.3.7",
|
|
24
25
|
"@pgflow/core": "workspace:*",
|
|
25
26
|
"chalk": "^5.4.1",
|
|
26
|
-
"commander": "^13.1.0"
|
|
27
|
-
"smol-toml": "^1.4.2"
|
|
27
|
+
"commander": "^13.1.0"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pgflow",
|
|
3
|
-
"version": "0.0.0-array-map-steps-
|
|
3
|
+
"version": "0.0.0-array-map-steps-fixed-types-38a198ae-20251011160533",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"typings": "./dist/index.d.ts",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@clack/prompts": "^0.10.1",
|
|
23
23
|
"@commander-js/extra-typings": "^13.1.0",
|
|
24
|
+
"@decimalturn/toml-patch": "0.3.7",
|
|
24
25
|
"chalk": "^5.4.1",
|
|
25
26
|
"commander": "^13.1.0",
|
|
26
|
-
"
|
|
27
|
-
"@pgflow/core": "0.0.0-array-map-steps-cd94242a-20251008042921"
|
|
27
|
+
"@pgflow/core": "0.0.0-array-map-steps-fixed-types-38a198ae-20251011160533"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|