@ultimat3/cli 27.13.1 → 27.13.2
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/package.json +28 -28
- package/src/runtime-queue.ts +9 -2
- package/src/runtime-replica.ts +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultimat3/cli",
|
|
3
|
-
"version": "27.13.
|
|
3
|
+
"version": "27.13.2",
|
|
4
4
|
"description": "The `x` binary: new, dev, build, verify, generate, db, mcp, doctor, deploy",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -39,33 +39,33 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@babel/core": "^8.0.1",
|
|
42
|
-
"@ultimat3/action": "27.13.
|
|
43
|
-
"@ultimat3/admin": "27.13.
|
|
44
|
-
"@ultimat3/ai": "27.13.
|
|
45
|
-
"@ultimat3/auth": "27.13.
|
|
46
|
-
"@ultimat3/cache": "27.13.
|
|
47
|
-
"@ultimat3/core": "27.13.
|
|
48
|
-
"@ultimat3/db": "27.13.
|
|
49
|
-
"@ultimat3/entity": "27.13.
|
|
50
|
-
"@ultimat3/flags": "27.13.
|
|
51
|
-
"@ultimat3/http": "27.13.
|
|
52
|
-
"@ultimat3/i18n": "27.13.
|
|
53
|
-
"@ultimat3/jobs": "27.13.
|
|
54
|
-
"@ultimat3/mail": "27.13.
|
|
55
|
-
"@ultimat3/manifest": "27.13.
|
|
56
|
-
"@ultimat3/mcp": "27.13.
|
|
57
|
-
"@ultimat3/money": "27.13.
|
|
58
|
-
"@ultimat3/notify": "27.13.
|
|
59
|
-
"@ultimat3/policy": "27.13.
|
|
60
|
-
"@ultimat3/pwa": "27.13.
|
|
61
|
-
"@ultimat3/query": "27.13.
|
|
62
|
-
"@ultimat3/realtime": "27.13.
|
|
63
|
-
"@ultimat3/render": "27.13.
|
|
64
|
-
"@ultimat3/schema": "27.13.
|
|
65
|
-
"@ultimat3/seo": "27.13.
|
|
66
|
-
"@ultimat3/storage": "27.13.
|
|
67
|
-
"@ultimat3/testing": "27.13.
|
|
68
|
-
"@ultimat3/time": "27.13.
|
|
42
|
+
"@ultimat3/action": "27.13.2",
|
|
43
|
+
"@ultimat3/admin": "27.13.2",
|
|
44
|
+
"@ultimat3/ai": "27.13.2",
|
|
45
|
+
"@ultimat3/auth": "27.13.2",
|
|
46
|
+
"@ultimat3/cache": "27.13.2",
|
|
47
|
+
"@ultimat3/core": "27.13.2",
|
|
48
|
+
"@ultimat3/db": "27.13.2",
|
|
49
|
+
"@ultimat3/entity": "27.13.2",
|
|
50
|
+
"@ultimat3/flags": "27.13.2",
|
|
51
|
+
"@ultimat3/http": "27.13.2",
|
|
52
|
+
"@ultimat3/i18n": "27.13.2",
|
|
53
|
+
"@ultimat3/jobs": "27.13.2",
|
|
54
|
+
"@ultimat3/mail": "27.13.2",
|
|
55
|
+
"@ultimat3/manifest": "27.13.2",
|
|
56
|
+
"@ultimat3/mcp": "27.13.2",
|
|
57
|
+
"@ultimat3/money": "27.13.2",
|
|
58
|
+
"@ultimat3/notify": "27.13.2",
|
|
59
|
+
"@ultimat3/policy": "27.13.2",
|
|
60
|
+
"@ultimat3/pwa": "27.13.2",
|
|
61
|
+
"@ultimat3/query": "27.13.2",
|
|
62
|
+
"@ultimat3/realtime": "27.13.2",
|
|
63
|
+
"@ultimat3/render": "27.13.2",
|
|
64
|
+
"@ultimat3/schema": "27.13.2",
|
|
65
|
+
"@ultimat3/seo": "27.13.2",
|
|
66
|
+
"@ultimat3/storage": "27.13.2",
|
|
67
|
+
"@ultimat3/testing": "27.13.2",
|
|
68
|
+
"@ultimat3/time": "27.13.2",
|
|
69
69
|
"babel-preset-solid": "^1.9.15"
|
|
70
70
|
}
|
|
71
71
|
}
|
package/src/runtime-queue.ts
CHANGED
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
dbExecutor,
|
|
19
19
|
pgliteClient,
|
|
20
20
|
pgliteDataDir,
|
|
21
|
+
poolMaxFromEnv,
|
|
21
22
|
postgresClient,
|
|
22
23
|
setDbClient,
|
|
23
24
|
} from '@ultimat3/db';
|
|
@@ -93,6 +94,12 @@ export interface RunningQueue {
|
|
|
93
94
|
*/
|
|
94
95
|
export function startDb(services: DevServices, env: ReplicaEnv): StartedDb {
|
|
95
96
|
const binding = services.db;
|
|
97
|
+
// `DATABASE_POOL_MAX` from the env the boot was HANDED, for `env`'s reason below. Installing a
|
|
98
|
+
// client here means `defaultClient()` — the only other reader — never runs in a served role, so
|
|
99
|
+
// without this the operator's cap reached no booted process and every role ran its
|
|
100
|
+
// `POOL_PROFILES` default (web 20, sync 10, worker 8): a fleet sized to fit a role's
|
|
101
|
+
// `CONNECTION LIMIT` was refused `53300` on its first roll.
|
|
102
|
+
const profile = poolMaxFromEnv(env);
|
|
96
103
|
const client =
|
|
97
104
|
binding.mode === 'embedded'
|
|
98
105
|
? // `pgliteDataDir` is `@ultimat3/db`'s own reader of the `pglite://` form; a second parser
|
|
@@ -104,8 +111,8 @@ export function startDb(services: DevServices, env: ReplicaEnv): StartedDb {
|
|
|
104
111
|
dataDir: pgliteDataDir(binding.url),
|
|
105
112
|
extensions: () => appExtensions(services.root),
|
|
106
113
|
})
|
|
107
|
-
: postgresClient({ url: binding.url });
|
|
108
|
-
const attached = attachReplica(client, replicaUrlFor(binding, env));
|
|
114
|
+
: postgresClient({ url: binding.url, profile });
|
|
115
|
+
const attached = attachReplica(client, replicaUrlFor(binding, env), profile);
|
|
109
116
|
setDbClient(attached.client);
|
|
110
117
|
return { client, replica: attached.replica };
|
|
111
118
|
}
|
package/src/runtime-replica.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
// HTTP tier depend on `@ultimat3/db` — legal downward, and still a package that would then know
|
|
17
17
|
// what a database is.
|
|
18
18
|
|
|
19
|
-
import type { DbClient, PostgresClient } from '@ultimat3/db';
|
|
19
|
+
import type { DbClient, PoolProfile, PostgresClient } from '@ultimat3/db';
|
|
20
20
|
import { postgresClient, REPLICA_URL_ENV, replicatedClient, withReplicaReads } from '@ultimat3/db';
|
|
21
21
|
import type { Middleware } from '@ultimat3/http';
|
|
22
22
|
import type { ServiceBinding } from './runtime-bindings';
|
|
@@ -54,9 +54,10 @@ export interface ReplicaAttachment {
|
|
|
54
54
|
export function attachReplica(
|
|
55
55
|
primary: DbClient,
|
|
56
56
|
replicaUrl: string | undefined,
|
|
57
|
+
profile: Partial<PoolProfile> = {},
|
|
57
58
|
): ReplicaAttachment {
|
|
58
59
|
if (replicaUrl === undefined) return { client: primary, replica: undefined };
|
|
59
|
-
const replica = postgresClient({ url: replicaUrl, applicationName: 'ultimate-replica' });
|
|
60
|
+
const replica = postgresClient({ url: replicaUrl, applicationName: 'ultimate-replica', profile });
|
|
60
61
|
return { client: replicatedClient(primary, replica), replica };
|
|
61
62
|
}
|
|
62
63
|
|