@mastra/libsql 1.17.0-alpha.1 → 1.17.0-alpha.3
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 +47 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +14 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/storage/factory-storage.d.ts +1 -0
- package/dist/storage/factory-storage.d.ts.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
# @mastra/libsql
|
|
2
2
|
|
|
3
|
+
## 1.17.0-alpha.3
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Added configurable local journal modes while preserving WAL as the default. ([#19901](https://github.com/mastra-ai/mastra/pull/19901))
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
const storage = new LibSQLStore({
|
|
11
|
+
id: 'local-storage',
|
|
12
|
+
url: 'file:./mastra.db',
|
|
13
|
+
journalMode: 'delete',
|
|
14
|
+
});
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [[`c7d30cd`](https://github.com/mastra-ai/mastra/commit/c7d30cd86009c407df91105591f03cd6e3d2854d), [`ef03fbc`](https://github.com/mastra-ai/mastra/commit/ef03fbcc556bcbc04c9b3d06fab88771ecaa043c), [`a7bbe77`](https://github.com/mastra-ai/mastra/commit/a7bbe773577f60bc4761b534ef7ec6b476332dad), [`a7bbe77`](https://github.com/mastra-ai/mastra/commit/a7bbe773577f60bc4761b534ef7ec6b476332dad), [`4e68363`](https://github.com/mastra-ai/mastra/commit/4e683634f94ebd062d26a3bb6093a8dfc7263d37), [`9251370`](https://github.com/mastra-ai/mastra/commit/9251370ad413af464aa22d7566338bec5613e8de)]:
|
|
20
|
+
- @mastra/core@1.52.0-alpha.11
|
|
21
|
+
|
|
22
|
+
## 1.17.0-alpha.2
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- Replaced GitHub-specific Mastra Code session state with Factory project and linked-repository identities. This lets SDK consumers represent sessions independently of a source-control provider and select a repository explicitly when sandbox execution is required. ([#19849](https://github.com/mastra-ai/mastra/pull/19849))
|
|
27
|
+
|
|
28
|
+
Updated Mastra Code onboarding to be Factory-first: create a Factory by name, then link repositories from your connected source-control installations in a separate step. A Factory is valid with zero linked repositories, and the Board, Metrics, and Audit pages stay available for any server-backed Factory. Factory pages keep project-scoped data separate from repository-scoped intake and provide a repository selector when a Factory has multiple linked repositories. Creating a Factory from a local folder remains available as a secondary option.
|
|
29
|
+
|
|
30
|
+
**Before**
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
const state = { githubProjectId: 'project-1', sandboxId, sandboxWorkdir };
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**After**
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
const state = {
|
|
40
|
+
factoryProjectId: 'factory-project-1',
|
|
41
|
+
projectRepositoryId: 'project-repository-1',
|
|
42
|
+
sandboxId,
|
|
43
|
+
sandboxWorkdir,
|
|
44
|
+
};
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
- Updated dependencies [[`41a5392`](https://github.com/mastra-ai/mastra/commit/41a5392d9f6c5e18d6b227f0fc0ddf49c50774e9), [`675fbff`](https://github.com/mastra-ai/mastra/commit/675fbff84d3274391b33e852f76083c38a5514e5), [`da009e1`](https://github.com/mastra-ai/mastra/commit/da009e1aacd89ed94b8d1b2af09c9d4fe7c4db49), [`35c2181`](https://github.com/mastra-ai/mastra/commit/35c2181e6a50e47c90ba36260db7c9723d54696f), [`b4b7ea8`](https://github.com/mastra-ai/mastra/commit/b4b7ea8733f033fc441ea47ed03f6afb17ec2248), [`675fbff`](https://github.com/mastra-ai/mastra/commit/675fbff84d3274391b33e852f76083c38a5514e5), [`c328769`](https://github.com/mastra-ai/mastra/commit/c3287698ff8ef98dba86d415faa566fa3e5f4d56), [`232fcbc`](https://github.com/mastra-ai/mastra/commit/232fcbc14fce625dd672ba043329c0b732c62be2), [`3491666`](https://github.com/mastra-ai/mastra/commit/34916663c4fdd43b48c21f4ab2d5fb6dcccc94f9)]:
|
|
48
|
+
- @mastra/core@1.52.0-alpha.10
|
|
49
|
+
|
|
3
50
|
## 1.17.0-alpha.1
|
|
4
51
|
|
|
5
52
|
### Minor Changes
|
package/dist/docs/SKILL.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -13676,6 +13676,20 @@ var LibSQLFactoryStorage = class extends storage.FactoryStorage {
|
|
|
13676
13676
|
async initStorage() {
|
|
13677
13677
|
await this.#client.execute("SELECT 1");
|
|
13678
13678
|
}
|
|
13679
|
+
async withTransaction(fn) {
|
|
13680
|
+
if (this.#config.url.includes(":memory:")) return fn(this.ops);
|
|
13681
|
+
const transaction = await this.#client.transaction("write");
|
|
13682
|
+
try {
|
|
13683
|
+
const result = await fn(new LibSQLFactoryStorageOps(transaction, this.#schemas));
|
|
13684
|
+
await transaction.commit();
|
|
13685
|
+
return result;
|
|
13686
|
+
} catch (error) {
|
|
13687
|
+
await transaction.rollback();
|
|
13688
|
+
throw error;
|
|
13689
|
+
} finally {
|
|
13690
|
+
transaction.close();
|
|
13691
|
+
}
|
|
13692
|
+
}
|
|
13679
13693
|
async ensureCollections(schemas) {
|
|
13680
13694
|
for (const schema of schemas) {
|
|
13681
13695
|
await this.#ensureCollection(schema);
|