@fusebase/fusebase-gate-sdk 2.2.13-sdk.2 → 2.2.13-sdk.5
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/dist/extras/sqlMigrationBundle.d.ts +1 -0
- package/dist/extras/sqlMigrationBundle.js +7 -2
- package/dist/types/mcp-manager/mcp-manager.d.ts +6 -6
- package/dist/types/mcp-manager/mcp-manager.js +1 -1
- package/package.json +1 -1
- package/release-notes/2.2.13-sdk.5.md +9 -0
- package/release-notes/latest.md +3 -3
- package/release-notes/2.2.13-sdk.2.md +0 -9
|
@@ -9,5 +9,6 @@ export interface BuildSqlMigrationBundleInput {
|
|
|
9
9
|
bundleVersion?: string | null;
|
|
10
10
|
migrations: BuildSqlMigrationBundleEntryInput[];
|
|
11
11
|
}
|
|
12
|
+
export declare function canonicalizeSqlMigrationContent(sql: string): string;
|
|
12
13
|
export declare function calculateSqlMigrationChecksum(sql: string): Promise<string>;
|
|
13
14
|
export declare function buildSqlMigrationBundle(input: BuildSqlMigrationBundleInput): Promise<IsolatedStoreSqlMigrationBundleContract>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.canonicalizeSqlMigrationContent = canonicalizeSqlMigrationContent;
|
|
3
4
|
exports.calculateSqlMigrationChecksum = calculateSqlMigrationChecksum;
|
|
4
5
|
exports.buildSqlMigrationBundle = buildSqlMigrationBundle;
|
|
5
6
|
function normalizePositiveInteger(value, field) {
|
|
@@ -20,12 +21,16 @@ function toSha256Hex(buffer) {
|
|
|
20
21
|
.map((byte) => byte.toString(16).padStart(2, "0"))
|
|
21
22
|
.join("");
|
|
22
23
|
}
|
|
24
|
+
function canonicalizeSqlMigrationContent(sql) {
|
|
25
|
+
return sql.replace(/\r\n/g, "\n").trimEnd();
|
|
26
|
+
}
|
|
23
27
|
async function calculateSqlMigrationChecksum(sql) {
|
|
24
28
|
if (typeof globalThis.crypto === "undefined" ||
|
|
25
29
|
typeof globalThis.crypto.subtle === "undefined") {
|
|
26
30
|
throw new Error("SQL migration checksum requires globalThis.crypto.subtle (available in modern browsers and Node.js 20+)");
|
|
27
31
|
}
|
|
28
|
-
const
|
|
32
|
+
const canonicalSql = canonicalizeSqlMigrationContent(sql);
|
|
33
|
+
const bytes = new TextEncoder().encode(canonicalSql);
|
|
29
34
|
const digest = await globalThis.crypto.subtle.digest("SHA-256", bytes);
|
|
30
35
|
return toSha256Hex(digest);
|
|
31
36
|
}
|
|
@@ -48,7 +53,7 @@ async function buildSqlMigrationBundle(input) {
|
|
|
48
53
|
throw new Error(`Migrations must be strictly increasing by version; got ${String(version)} after ${String(previousVersion)}`);
|
|
49
54
|
}
|
|
50
55
|
const name = normalizeNonEmptyString(entry.name, `migrations[${index}].name`);
|
|
51
|
-
const sql = entry.sql;
|
|
56
|
+
const sql = canonicalizeSqlMigrationContent(entry.sql);
|
|
52
57
|
const checksum = await calculateSqlMigrationChecksum(sql);
|
|
53
58
|
const expectedChecksum = entry.expectedChecksum == null ? null : entry.expectedChecksum.trim();
|
|
54
59
|
if (expectedChecksum !== null && expectedChecksum !== checksum) {
|
|
@@ -44,7 +44,7 @@ export declare const AuthScopeTypeContract: {
|
|
|
44
44
|
readonly Workspace: "workspace";
|
|
45
45
|
readonly Portal: "portal";
|
|
46
46
|
readonly User: "user";
|
|
47
|
-
readonly
|
|
47
|
+
readonly Client: "client";
|
|
48
48
|
};
|
|
49
49
|
export type AuthScopeTypeContract = (typeof AuthScopeTypeContract)[keyof typeof AuthScopeTypeContract];
|
|
50
50
|
export type McpManagerAuthGlobalIdInPathRequired = string;
|
|
@@ -122,7 +122,7 @@ export interface TemplateContract {
|
|
|
122
122
|
export interface TemplatesListResponseContract {
|
|
123
123
|
templates: TemplateContract[];
|
|
124
124
|
}
|
|
125
|
-
export interface
|
|
125
|
+
export interface McpManagerScopeContract {
|
|
126
126
|
scopeType: AuthScopeTypeContract;
|
|
127
127
|
scopeId: string;
|
|
128
128
|
}
|
|
@@ -132,7 +132,7 @@ export interface McpManagerServerChannelContract {
|
|
|
132
132
|
}
|
|
133
133
|
export interface CreateMcpManagerServerFromTemplateRequestContract {
|
|
134
134
|
globalId: string;
|
|
135
|
-
scopes: Array<
|
|
135
|
+
scopes: Array<McpManagerScopeContract>;
|
|
136
136
|
channels: Array<McpManagerServerChannelContract>;
|
|
137
137
|
name?: string;
|
|
138
138
|
prompt?: string;
|
|
@@ -147,7 +147,7 @@ export interface McpManagerServerResponseContract {
|
|
|
147
147
|
connectedAt?: string;
|
|
148
148
|
deletedAt?: string;
|
|
149
149
|
globalId: string;
|
|
150
|
-
scopes: Array<
|
|
150
|
+
scopes: Array<McpManagerScopeContract>;
|
|
151
151
|
channels: Array<McpManagerServerChannelContract>;
|
|
152
152
|
name: string;
|
|
153
153
|
prompt: string;
|
|
@@ -169,7 +169,7 @@ export type CallMcpManagerServerToolResponseContract = object;
|
|
|
169
169
|
interface InitiateMcpManagerAuthRequestBaseContract {
|
|
170
170
|
name?: string;
|
|
171
171
|
globalId: string;
|
|
172
|
-
scopes: Array<
|
|
172
|
+
scopes: Array<McpManagerScopeContract>;
|
|
173
173
|
type: AuthTypeContract;
|
|
174
174
|
app: string;
|
|
175
175
|
replaceInactiveAuth?: boolean;
|
|
@@ -194,7 +194,7 @@ export interface McpManagerAuthDataContract {
|
|
|
194
194
|
interface McpManagerAuthResponseBaseContract {
|
|
195
195
|
name: string;
|
|
196
196
|
globalId: string;
|
|
197
|
-
scopes: Array<
|
|
197
|
+
scopes: Array<McpManagerScopeContract>;
|
|
198
198
|
type: AuthTypeContract;
|
|
199
199
|
app: string;
|
|
200
200
|
status: AuthStatusContract;
|
package/package.json
CHANGED
package/release-notes/latest.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Release Notes 2.2.13-sdk.
|
|
1
|
+
# Release Notes 2.2.13-sdk.5
|
|
2
2
|
|
|
3
3
|
- Current ref: `HEAD`
|
|
4
|
-
- Previous tag: `v2.2.13-sdk.
|
|
5
|
-
- Generated at: 2026-05-
|
|
4
|
+
- Previous tag: `v2.2.13-sdk.5`
|
|
5
|
+
- Generated at: 2026-05-08T11:10:38.008Z
|
|
6
6
|
|
|
7
7
|
## Included Drafts
|
|
8
8
|
|