@pikku/deploy 0.12.11 → 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 CHANGED
@@ -1,5 +1,14 @@
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
+
3
12
  ## 0.12.11
4
13
 
5
14
  ### Patch Changes
@@ -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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikku/deploy",
3
- "version": "0.12.11",
3
+ "version": "0.12.12",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/pikkujs/pikku.git",