@mastra/mssql 0.4.0 → 0.4.1-alpha.1
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 +18 -0
- package/dist/index.cjs +7 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts +2 -1
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +2 -1
- package/dist/storage/index.d.ts.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @mastra/mssql
|
|
2
2
|
|
|
3
|
+
## 0.4.1-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Update peerdep of @mastra/core ([#7619](https://github.com/mastra-ai/mastra/pull/7619))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`a1bb887`](https://github.com/mastra-ai/mastra/commit/a1bb887e8bfae44230f487648da72e96ef824561), [`a0f5f1c`](https://github.com/mastra-ai/mastra/commit/a0f5f1ca39c3c5c6d26202e9fcab986b4fe14568), [`b356f5f`](https://github.com/mastra-ai/mastra/commit/b356f5f7566cb3edb755d91f00b72fc1420b2a37), [`f5ce05f`](https://github.com/mastra-ai/mastra/commit/f5ce05f831d42c69559bf4c0fdb46ccb920fc3a3), [`9f6f30f`](https://github.com/mastra-ai/mastra/commit/9f6f30f04ec6648bbca798ea8aad59317c40d8db), [`d706fad`](https://github.com/mastra-ai/mastra/commit/d706fad6e6e4b72357b18d229ba38e6c913c0e70), [`5c3768f`](https://github.com/mastra-ai/mastra/commit/5c3768fa959454232ad76715c381f4aac00c6881), [`8a3f5e4`](https://github.com/mastra-ai/mastra/commit/8a3f5e4212ec36b302957deb4bd47005ab598382)]:
|
|
10
|
+
- @mastra/core@0.17.0-alpha.3
|
|
11
|
+
|
|
12
|
+
## 0.4.1-alpha.0
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Add resource id to workflow run snapshots ([#7740](https://github.com/mastra-ai/mastra/pull/7740))
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`547c621`](https://github.com/mastra-ai/mastra/commit/547c62104af3f7a551b3754e9cbdf0a3fbba15e4)]:
|
|
19
|
+
- @mastra/core@0.16.4-alpha.1
|
|
20
|
+
|
|
3
21
|
## 0.4.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -1896,6 +1896,7 @@ var WorkflowsMSSQL = class extends storage.WorkflowsStorage {
|
|
|
1896
1896
|
async persistWorkflowSnapshot({
|
|
1897
1897
|
workflowName,
|
|
1898
1898
|
runId,
|
|
1899
|
+
resourceId,
|
|
1899
1900
|
snapshot
|
|
1900
1901
|
}) {
|
|
1901
1902
|
const table = getTableName({ indexName: storage.TABLE_WORKFLOW_SNAPSHOT, schemaName: getSchemaName(this.schema) });
|
|
@@ -1904,6 +1905,7 @@ var WorkflowsMSSQL = class extends storage.WorkflowsStorage {
|
|
|
1904
1905
|
const request = this.pool.request();
|
|
1905
1906
|
request.input("workflow_name", workflowName);
|
|
1906
1907
|
request.input("run_id", runId);
|
|
1908
|
+
request.input("resourceId", resourceId);
|
|
1907
1909
|
request.input("snapshot", JSON.stringify(snapshot));
|
|
1908
1910
|
request.input("createdAt", sql2__default.default.DateTime2, new Date(now));
|
|
1909
1911
|
request.input("updatedAt", sql2__default.default.DateTime2, new Date(now));
|
|
@@ -1911,10 +1913,11 @@ var WorkflowsMSSQL = class extends storage.WorkflowsStorage {
|
|
|
1911
1913
|
USING (SELECT @workflow_name AS workflow_name, @run_id AS run_id) AS src
|
|
1912
1914
|
ON target.workflow_name = src.workflow_name AND target.run_id = src.run_id
|
|
1913
1915
|
WHEN MATCHED THEN UPDATE SET
|
|
1916
|
+
resourceId = @resourceId,
|
|
1914
1917
|
snapshot = @snapshot,
|
|
1915
1918
|
[updatedAt] = @updatedAt
|
|
1916
|
-
WHEN NOT MATCHED THEN INSERT (workflow_name, run_id, snapshot, [createdAt], [updatedAt])
|
|
1917
|
-
VALUES (@workflow_name, @run_id, @snapshot, @createdAt, @updatedAt);`;
|
|
1919
|
+
WHEN NOT MATCHED THEN INSERT (workflow_name, run_id, resourceId, snapshot, [createdAt], [updatedAt])
|
|
1920
|
+
VALUES (@workflow_name, @run_id, @resourceId, @snapshot, @createdAt, @updatedAt);`;
|
|
1918
1921
|
await request.query(mergeSql);
|
|
1919
1922
|
} catch (error$1) {
|
|
1920
1923
|
throw new error.MastraError(
|
|
@@ -2299,9 +2302,10 @@ var MSSQLStore = class extends storage.MastraStorage {
|
|
|
2299
2302
|
async persistWorkflowSnapshot({
|
|
2300
2303
|
workflowName,
|
|
2301
2304
|
runId,
|
|
2305
|
+
resourceId,
|
|
2302
2306
|
snapshot
|
|
2303
2307
|
}) {
|
|
2304
|
-
return this.stores.workflows.persistWorkflowSnapshot({ workflowName, runId, snapshot });
|
|
2308
|
+
return this.stores.workflows.persistWorkflowSnapshot({ workflowName, runId, resourceId, snapshot });
|
|
2305
2309
|
}
|
|
2306
2310
|
async loadWorkflowSnapshot({
|
|
2307
2311
|
workflowName,
|