@protobase/cli 0.21.9 → 0.21.10
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.
|
@@ -23,8 +23,13 @@ const loadMigrationProject = async (dir, extensions = []) => {
|
|
|
23
23
|
config: custom.config ?? await importProjectFile(index)
|
|
24
24
|
};
|
|
25
25
|
const extended = await Promise.all(extensions.flatMap((extension) => extension.config ? [configOf(extension.config)] : []));
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
return migrationProject(mergeConfig(...extended, own), process.env.DATABASE_URL);
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* A merged project config, for what its database needs: its resources' models, its database (the one it exports, or a
|
|
30
|
+
* pool on `url`) and the features that write migrations. `close` ends the pool it opened.
|
|
31
|
+
*/
|
|
32
|
+
const migrationProject = (project, url) => {
|
|
28
33
|
if (!project.db && !url) throw new Error("No database: set DATABASE_URL or export `db` from protobase.config.ts");
|
|
29
34
|
const ownDb = project.db ? void 0 : createPgDb(pg, url);
|
|
30
35
|
return {
|
|
@@ -40,4 +45,4 @@ const loadMigrationProject = async (dir, extensions = []) => {
|
|
|
40
45
|
};
|
|
41
46
|
};
|
|
42
47
|
//#endregion
|
|
43
|
-
export { loadMigrationProject };
|
|
48
|
+
export { loadMigrationProject, migrationProject };
|
package/dist/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/cli",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.10",
|
|
4
4
|
"description": "The protobase command: scaffold, doctor, dev, build and serve a Protobase project.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@hono/node-server": "^2.1.3",
|
|
36
36
|
"@hono/vite-dev-server": "^0.26.1",
|
|
37
|
-
"@protobase/layout": "0.21.
|
|
38
|
-
"@protobase/query": "0.21.
|
|
39
|
-
"@protobase/schema": "0.21.
|
|
40
|
-
"@protobase/server": "0.21.
|
|
41
|
-
"@protobase/ui": "0.21.
|
|
37
|
+
"@protobase/layout": "0.21.10",
|
|
38
|
+
"@protobase/query": "0.21.10",
|
|
39
|
+
"@protobase/schema": "0.21.10",
|
|
40
|
+
"@protobase/server": "0.21.10",
|
|
41
|
+
"@protobase/ui": "0.21.10",
|
|
42
42
|
"@react-email/render": "^2.1.0",
|
|
43
43
|
"@scalar/hono-api-reference": "^0.12.10",
|
|
44
44
|
"@tailwindcss/vite": "^4.3.3",
|