@secondlayer/shared 6.41.2 → 6.41.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/dist/src/db/index.d.ts +1 -0
- package/dist/src/db/queries/chain-reorgs.d.ts +1 -0
- package/dist/src/db/queries/contracts.d.ts +1 -0
- package/dist/src/db/queries/integrity.d.ts +1 -0
- package/dist/src/db/queries/subgraph-gaps.d.ts +1 -0
- package/dist/src/db/queries/subgraph-operations.d.ts +1 -0
- package/dist/src/db/queries/subgraphs.d.ts +1 -0
- package/dist/src/db/queries/subscriptions.d.ts +1 -0
- package/dist/src/db/schema.d.ts +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/node/local-client.d.ts +1 -0
- package/migrations/0109_subgraphs_sandbox_workers.ts +28 -0
- package/package.json +2 -2
package/dist/src/db/index.d.ts
CHANGED
|
@@ -137,6 +137,7 @@ interface SubgraphsTable {
|
|
|
137
137
|
/** (event type, contract) probe pairs persisted at deploy for weight classification. */
|
|
138
138
|
sparse_probe_targets: unknown | null;
|
|
139
139
|
database_url_enc: ColumnType<Buffer | null, Buffer | null | undefined, Buffer | null>;
|
|
140
|
+
sandbox_workers: Generated<boolean>;
|
|
140
141
|
created_at: Generated<Date>;
|
|
141
142
|
updated_at: Generated<Date>;
|
|
142
143
|
}
|
|
@@ -119,6 +119,7 @@ interface SubgraphsTable {
|
|
|
119
119
|
/** (event type, contract) probe pairs persisted at deploy for weight classification. */
|
|
120
120
|
sparse_probe_targets: unknown | null;
|
|
121
121
|
database_url_enc: ColumnType<Buffer | null, Buffer | null | undefined, Buffer | null>;
|
|
122
|
+
sandbox_workers: Generated<boolean>;
|
|
122
123
|
created_at: Generated<Date>;
|
|
123
124
|
updated_at: Generated<Date>;
|
|
124
125
|
}
|
|
@@ -119,6 +119,7 @@ interface SubgraphsTable {
|
|
|
119
119
|
/** (event type, contract) probe pairs persisted at deploy for weight classification. */
|
|
120
120
|
sparse_probe_targets: unknown | null;
|
|
121
121
|
database_url_enc: ColumnType<Buffer | null, Buffer | null | undefined, Buffer | null>;
|
|
122
|
+
sandbox_workers: Generated<boolean>;
|
|
122
123
|
created_at: Generated<Date>;
|
|
123
124
|
updated_at: Generated<Date>;
|
|
124
125
|
}
|
|
@@ -119,6 +119,7 @@ interface SubgraphsTable {
|
|
|
119
119
|
/** (event type, contract) probe pairs persisted at deploy for weight classification. */
|
|
120
120
|
sparse_probe_targets: unknown | null;
|
|
121
121
|
database_url_enc: ColumnType<Buffer | null, Buffer | null | undefined, Buffer | null>;
|
|
122
|
+
sandbox_workers: Generated<boolean>;
|
|
122
123
|
created_at: Generated<Date>;
|
|
123
124
|
updated_at: Generated<Date>;
|
|
124
125
|
}
|
|
@@ -119,6 +119,7 @@ interface SubgraphsTable {
|
|
|
119
119
|
/** (event type, contract) probe pairs persisted at deploy for weight classification. */
|
|
120
120
|
sparse_probe_targets: unknown | null;
|
|
121
121
|
database_url_enc: ColumnType<Buffer | null, Buffer | null | undefined, Buffer | null>;
|
|
122
|
+
sandbox_workers: Generated<boolean>;
|
|
122
123
|
created_at: Generated<Date>;
|
|
123
124
|
updated_at: Generated<Date>;
|
|
124
125
|
}
|
|
@@ -119,6 +119,7 @@ interface SubgraphsTable {
|
|
|
119
119
|
/** (event type, contract) probe pairs persisted at deploy for weight classification. */
|
|
120
120
|
sparse_probe_targets: unknown | null;
|
|
121
121
|
database_url_enc: ColumnType<Buffer | null, Buffer | null | undefined, Buffer | null>;
|
|
122
|
+
sandbox_workers: Generated<boolean>;
|
|
122
123
|
created_at: Generated<Date>;
|
|
123
124
|
updated_at: Generated<Date>;
|
|
124
125
|
}
|
|
@@ -120,6 +120,7 @@ interface SubgraphsTable {
|
|
|
120
120
|
/** (event type, contract) probe pairs persisted at deploy for weight classification. */
|
|
121
121
|
sparse_probe_targets: unknown | null;
|
|
122
122
|
database_url_enc: ColumnType<Buffer | null, Buffer | null | undefined, Buffer | null>;
|
|
123
|
+
sandbox_workers: Generated<boolean>;
|
|
123
124
|
created_at: Generated<Date>;
|
|
124
125
|
updated_at: Generated<Date>;
|
|
125
126
|
}
|
|
@@ -119,6 +119,7 @@ interface SubgraphsTable {
|
|
|
119
119
|
/** (event type, contract) probe pairs persisted at deploy for weight classification. */
|
|
120
120
|
sparse_probe_targets: unknown | null;
|
|
121
121
|
database_url_enc: ColumnType<Buffer | null, Buffer | null | undefined, Buffer | null>;
|
|
122
|
+
sandbox_workers: Generated<boolean>;
|
|
122
123
|
created_at: Generated<Date>;
|
|
123
124
|
updated_at: Generated<Date>;
|
|
124
125
|
}
|
package/dist/src/db/schema.d.ts
CHANGED
|
@@ -118,6 +118,7 @@ interface SubgraphsTable {
|
|
|
118
118
|
/** (event type, contract) probe pairs persisted at deploy for weight classification. */
|
|
119
119
|
sparse_probe_targets: unknown | null;
|
|
120
120
|
database_url_enc: ColumnType<Buffer | null, Buffer | null | undefined, Buffer | null>;
|
|
121
|
+
sandbox_workers: Generated<boolean>;
|
|
121
122
|
created_at: Generated<Date>;
|
|
122
123
|
updated_at: Generated<Date>;
|
|
123
124
|
}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -118,6 +118,7 @@ interface SubgraphsTable {
|
|
|
118
118
|
/** (event type, contract) probe pairs persisted at deploy for weight classification. */
|
|
119
119
|
sparse_probe_targets: unknown | null;
|
|
120
120
|
database_url_enc: ColumnType<Buffer | null, Buffer | null | undefined, Buffer | null>;
|
|
121
|
+
sandbox_workers: Generated<boolean>;
|
|
121
122
|
created_at: Generated<Date>;
|
|
122
123
|
updated_at: Generated<Date>;
|
|
123
124
|
}
|
|
@@ -119,6 +119,7 @@ interface SubgraphsTable {
|
|
|
119
119
|
/** (event type, contract) probe pairs persisted at deploy for weight classification. */
|
|
120
120
|
sparse_probe_targets: unknown | null;
|
|
121
121
|
database_url_enc: ColumnType<Buffer | null, Buffer | null | undefined, Buffer | null>;
|
|
122
|
+
sandbox_workers: Generated<boolean>;
|
|
122
123
|
created_at: Generated<Date>;
|
|
123
124
|
updated_at: Generated<Date>;
|
|
124
125
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
|
+
import { onControlPlane } from "../src/db/migration-role.ts";
|
|
3
|
+
|
|
4
|
+
// f071 Stage 2a: per-subgraph opt-in for the sandboxed (Bun Worker) handler
|
|
5
|
+
// execution path. Default FALSE everywhere — the global env flag
|
|
6
|
+
// (SUBGRAPH_SANDBOX_WORKERS) is the capability switch, this column is the
|
|
7
|
+
// per-tenant rollout switch; both must be true for a subgraph to route
|
|
8
|
+
// through the worker path (see runtime/sandbox/flag.ts). No subgraph is
|
|
9
|
+
// opted in by this migration — that's a later, separate cutover decision
|
|
10
|
+
// (Stage 2c). Control-plane (TARGET) — the subgraphs control-plane table.
|
|
11
|
+
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
12
|
+
await sql`SET lock_timeout = '30s'`.execute(db);
|
|
13
|
+
await onControlPlane(async () => {
|
|
14
|
+
await sql`
|
|
15
|
+
ALTER TABLE subgraphs
|
|
16
|
+
ADD COLUMN IF NOT EXISTS sandbox_workers BOOLEAN NOT NULL DEFAULT FALSE
|
|
17
|
+
`.execute(db);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export async function down(db: Kysely<unknown>): Promise<void> {
|
|
22
|
+
await onControlPlane(async () => {
|
|
23
|
+
await sql`
|
|
24
|
+
ALTER TABLE subgraphs
|
|
25
|
+
DROP COLUMN IF EXISTS sandbox_workers
|
|
26
|
+
`.execute(db);
|
|
27
|
+
});
|
|
28
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@secondlayer/shared",
|
|
3
|
-
"version": "6.41.
|
|
3
|
+
"version": "6.41.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
"prepublishOnly": "bun run build"
|
|
168
168
|
},
|
|
169
169
|
"dependencies": {
|
|
170
|
-
"@secondlayer/stacks": "^2.
|
|
170
|
+
"@secondlayer/stacks": "^2.11.0",
|
|
171
171
|
"kysely": "0.28.15",
|
|
172
172
|
"kysely-postgres-js": "3.0.0",
|
|
173
173
|
"postgres": "^3.4.6",
|