@pikku/deploy 0.12.10 → 0.12.12
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/CHANGELOG.md +35 -0
- package/dist/provider-adapter.d.ts +33 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @pikku/deploy
|
|
2
2
|
|
|
3
|
+
## 0.12.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1fe79bc: SQLite extensions now load under bun on macOS. Bun there opens Apple's SQLite, which is built without extension loading, so the CLI points bun at Homebrew's libsqlite3 (`brew install sqlite`) as it starts, or at the one `PIKKU_SQLITE_LIBRARY` names; without one it warns and carries on without extensions. A bun standalone build on macOS embeds that libsqlite3 and opens its database with it, and fails if the build machine has none. Linux is unchanged: bun there brings a SQLite that loads extensions, and node uses `node:sqlite` everywhere.
|
|
8
|
+
- 1fe79bc: A standalone build of a SQLite app now ships its `db.sqliteExtensions` (sqlite-vec's vec0 by default) inside the artifact, so a migration or query that uses them works in production the way it does under `pikku dev`. The node bundle loads them from `sqlite-extensions/` beside itself; a compiled bun binary embeds them and writes them out under `$PIKKU_DATA_DIR/.pikku-sqlite-extensions/` on start. The libraries are the build machine's, so an extension that cannot be resolved there fails the build; `[]` builds without them.
|
|
9
|
+
|
|
10
|
+
`createNodeSqliteKysely` and `createBunSqliteKysely` take an `extensions` list of library paths to load into the connection.
|
|
11
|
+
|
|
12
|
+
## 0.12.11
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- d10f5c2: Resolve a standalone build's database the way every other pikku host resolves it.
|
|
17
|
+
|
|
18
|
+
A standalone artifact opens its own database, and decided it had one by looking
|
|
19
|
+
for `db/sqlite` or `db/postgres` on disk. Every other host goes through
|
|
20
|
+
`loadUserConfigForDb`: `createConfig`'s `sqliteDb` / `postgresUrl` first, the
|
|
21
|
+
directory conventions only as the fallback. An app that declares its database in
|
|
22
|
+
config and keeps no migrations therefore got a `kysely` under `pikku dev` and
|
|
23
|
+
none in its artifact — a clean build, a plausible 94MB bundle, and a first run
|
|
24
|
+
that died on the line of `createSingletonServices` that reads it.
|
|
25
|
+
|
|
26
|
+
The build now asks the same question in the same order. Only the engine travels:
|
|
27
|
+
a configured SQLite path is a developer's local file and has no meaning on the
|
|
28
|
+
target host, which still names its own through `PIKKU_DATA_DIR`. Declaring both
|
|
29
|
+
dialects is refused by name, matching the existing refusal of two migration
|
|
30
|
+
directories, and a `createConfig` that cannot be loaded falls back to the
|
|
31
|
+
directories rather than failing a build — a project with no database at all must
|
|
32
|
+
still bundle.
|
|
33
|
+
|
|
34
|
+
Two JSDoc blocks that had drifted off their declarations are reattached:
|
|
35
|
+
`EntryGenerationContext['db']`, which was documenting `version`, and
|
|
36
|
+
`resolveStandaloneDb`, which was documenting `resolveProjectVersion`.
|
|
37
|
+
|
|
3
38
|
## 0.12.10
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
|
@@ -51,6 +51,15 @@ export interface EntryGenerationContext {
|
|
|
51
51
|
urlPrefix: string;
|
|
52
52
|
spaFallback: boolean;
|
|
53
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* The project's own version, for the artifact to report as its own.
|
|
56
|
+
*
|
|
57
|
+
* An operator holding a bundle on a machine has no other way to tell which
|
|
58
|
+
* build it is — there is no manifest to read and no registry to ask — and
|
|
59
|
+
* "which version is actually running" is the first question of every
|
|
60
|
+
* incident.
|
|
61
|
+
*/
|
|
62
|
+
version?: string;
|
|
54
63
|
/**
|
|
55
64
|
* The database the generated entry has to open for itself, or undefined when
|
|
56
65
|
* the project has none.
|
|
@@ -66,15 +75,6 @@ export interface EntryGenerationContext {
|
|
|
66
75
|
* business — a compiled bun binary and a node bundle do not open SQLite the
|
|
67
76
|
* same way, and Postgres is reached by URL rather than by path at all.
|
|
68
77
|
*/
|
|
69
|
-
/**
|
|
70
|
-
* The project's own version, for the artifact to report as its own.
|
|
71
|
-
*
|
|
72
|
-
* An operator holding a bundle on a machine has no other way to tell which
|
|
73
|
-
* build it is — there is no manifest to read and no registry to ask — and
|
|
74
|
-
* "which version is actually running" is the first question of every
|
|
75
|
-
* incident.
|
|
76
|
-
*/
|
|
77
|
-
version?: string;
|
|
78
78
|
db?: {
|
|
79
79
|
engine: 'sqlite' | 'postgres';
|
|
80
80
|
/**
|
|
@@ -86,6 +86,23 @@ export interface EntryGenerationContext {
|
|
|
86
86
|
* the same reason.
|
|
87
87
|
*/
|
|
88
88
|
coercionImportPath?: string;
|
|
89
|
+
/**
|
|
90
|
+
* File names of the loadable SQLite extensions the build staged into
|
|
91
|
+
* `<unitDir>/sqlite-extensions/`, from `db.sqliteExtensions` (sqlite-vec's
|
|
92
|
+
* `vec0` by default). SQLite only; absent when there are none.
|
|
93
|
+
*
|
|
94
|
+
* Beside the directory is `sqlite-extensions.gen.js`, which embeds each
|
|
95
|
+
* one with `with { type: 'file' }` for a runtime that compiles to a single
|
|
96
|
+
* binary.
|
|
97
|
+
*/
|
|
98
|
+
sqliteExtensions?: string[];
|
|
99
|
+
/**
|
|
100
|
+
* File name of the libsqlite3 the build staged beside the extensions, for a
|
|
101
|
+
* runtime that must be pointed at one before it opens a database — bun on
|
|
102
|
+
* macOS, whose own is Apple's and cannot load extensions. Also embedded by
|
|
103
|
+
* `sqlite-extensions.gen.js`. Absent everywhere else.
|
|
104
|
+
*/
|
|
105
|
+
sqliteLibrary?: string;
|
|
89
106
|
};
|
|
90
107
|
/**
|
|
91
108
|
* The app's `pikkuServerLifecycle` export, when it declares one.
|
|
@@ -129,6 +146,13 @@ export interface ProviderAdapter {
|
|
|
129
146
|
* `wireQueue(...)` user code are unaffected.
|
|
130
147
|
*/
|
|
131
148
|
readonly workflowQueues?: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Whether the artifact opens SQLite through a libsqlite3 it has to carry
|
|
151
|
+
* itself. True for a compiled bun binary: on macOS bun otherwise opens
|
|
152
|
+
* Apple's SQLite, which cannot load extensions, so the build ships the host's
|
|
153
|
+
* own libsqlite3 and the entry points bun at it before the first open.
|
|
154
|
+
*/
|
|
155
|
+
readonly bundlesSqliteLibrary?: boolean;
|
|
132
156
|
/**
|
|
133
157
|
* Generate the entry file source for a deployment unit.
|
|
134
158
|
* Called once per unit.
|