@secondlayer/subgraphs 7.7.4 → 8.0.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/README.md CHANGED
@@ -57,7 +57,6 @@ Every source needs a handler of the same name. Handlers write with `ctx.insert`,
57
57
  | Subpath | Description |
58
58
  | --- | --- |
59
59
  | `.` | `defineSubgraph`, `defineSchema`, `InferContext` / `TypedSubgraphContext`, `readContractAt`, `validateSubgraphDefinition`, ORM generators (`generatePrismaSchema`, `generateDrizzleSchema`, `generateKyselySchema`), `deploySchema`, `diffSchema`, `generateSubgraphSQL`, `pgSchemaName` |
60
- | `./types` | All schema + filter + handler types (`SubgraphDefinition`, `SubgraphFilter`, `StxTransferFilter`, etc.) |
61
60
  | `./schema` | Generator + deployer internals |
62
61
  | `./validate` | Shape + filter validation for deploys |
63
62
  | `./testing` | `runSubgraphTest`, `createTestContext`, `buildEvent`: run handlers against real or built events before deploying |
@@ -83,9 +82,6 @@ Delivery bodies and response previews land in `webhook_deliveries`. Rows whose r
83
82
  | --- | --- | --- |
84
83
  | `SECONDLAYER_ALLOW_PRIVATE_EGRESS` | `false` | Allow the emitter to deliver to private IP ranges (localhost, 10/8, 172.16/12, 192.168/16, link-local, v6 mapped). Leave off in production. |
85
84
  | `SECONDLAYER_SECRETS_KEY` | — | 32-byte hex key for the AES-GCM envelope around webhook signing secrets. OSS mode auto-generates + persists to `.env.local`. |
86
- | `SUBGRAPH_REINDEX_BATCH_SIZE` | adaptive | Override the default historical block batch size used by reindex/backfill. |
87
- | `SUBGRAPH_REINDEX_MIN_BATCH_SIZE` | adaptive | Override the adaptive lower bound for reindex/backfill batches. |
88
- | `SUBGRAPH_REINDEX_MAX_BATCH_SIZE` | adaptive | Override the adaptive upper bound for reindex/backfill batches. |
89
85
  | `DATABASE_MAX_POOLS` | `25` | Max cached connection pools; the least-recently-used pool is evicted past this cap. The source/target pools are never evicted. |
90
86
  | `DATABASE_IDLE_TIMEOUT` | `300` | Seconds before idle connections are closed (`0` = never). |
91
87
 
package/dist/index.d.ts CHANGED
@@ -1169,8 +1169,6 @@ interface HandlerFinding {
1169
1169
  /** 1-based. */
1170
1170
  column: number;
1171
1171
  }
1172
- /** Formats a handler finding as `file:line:column name: reason`. */
1173
- declare function formatFinding(f: HandlerFinding): string;
1174
1172
  /**
1175
1173
  * Derive how far a subgraph's rows can be checked. Level = the highest any
1176
1174
  * source or handler read needs. `reasons` lists everything standing between
@@ -1457,4 +1455,4 @@ interface ReindexOptions {
1457
1455
  operationId?: string;
1458
1456
  signal?: AbortSignal;
1459
1457
  }
1460
- export { AggregateResult, AggregateSpec, AnyEvent, ChainReadCacheMode, ChainReadClient, ChainReadError, ChainReadMethods, ChainReadOptions, ColumnDiff, ColumnToTS, ColumnType, ComparisonFilter, ContractCallEvent, ContractCallFilter, ContractCallPayload, ContractDeployFilter, ContractDeployPayload, DeployDiff, DeployPlan, DrizzleGenOptions, ErasedChainReadClient, EventForFilter, FactoryScope, FindManyOptions, FindManyPage, FtBurnFilter, FtBurnPayload, FtMintFilter, FtMintPayload, FtTransferFilter, FtTransferPayload, GeneratedSQL, HandlerFinding, HandlerReadError, IndexCodegenOptions, IndexCodegenTarget, InferColumnType, InferContext, InferSubgraphClient, InferTableRow, InferredPrintField, InferredTopicSchema, KyselyGenOptions, MapDeletePayload, MapWritePayload, NestedContractCallPayload, NftBurnFilter, NftBurnPayload, NftMintFilter, NftMintPayload, NftTransferFilter, NftTransferPayload, NondeterminismError, PinInput, PinnedPrintEventFilter, PrintDataOf, PrintEventFilter, PrintEventFor, PrintEventPayload, PrintEventPrints, PrintField, PrintFieldToTS, PrintSample, PrintValidationResult, PrismaGenOptions, ReindexOptions, RowValue, SUBGRAPHS_RUNTIME, SparseProbeTarget, StxBurnFilter, StxBurnPayload, StxLockFilter, StxLockPayload, StxMintFilter, StxMintPayload, StxTransferFilter, StxTransferPayload, SubgraphColumn, SubgraphContext, SubgraphDefinition, SubgraphFilter, SubgraphHandler, SubgraphSchema, SubgraphTable, SubgraphTableClient, SubgraphTip, SubgraphVerification, SubscribeOptions, SystemRow, TableDiff, TraitPrintEventFilter, TxMeta, TypedHandlers, TypedSubgraphContext, TypedSubgraphDefinition, UnpinnedPrintEventFilter, VarSetPayload, WhereInput, WriteRow, camelizeKeys, canSparseScan, computePin, defineSchema, defineSubgraph, deploySchema, deriveVerification, diffSchema, filterFieldsByType, formatFinding, generateDrizzleSchema, generateIndexSchema, generateKyselySchema, generatePrismaSchema, generateSubgraphSQL, hasBreakingChanges, inferPrintTopics, isDeterminismViolation, isStreamsIndexEligible, loadDeterministicDefinition, pgSchemaName, readContractAt, renderDeployPlan, sparseProbeTargets, validateSubgraphDefinition };
1458
+ export { AggregateResult, AggregateSpec, AnyEvent, ChainReadCacheMode, ChainReadClient, ChainReadError, ChainReadMethods, ChainReadOptions, ColumnDiff, ColumnToTS, ColumnType, ComparisonFilter, ContractCallEvent, ContractCallFilter, ContractCallPayload, ContractDeployFilter, ContractDeployPayload, DeployDiff, DeployPlan, DrizzleGenOptions, ErasedChainReadClient, EventForFilter, FactoryScope, FindManyOptions, FindManyPage, FtBurnFilter, FtBurnPayload, FtMintFilter, FtMintPayload, FtTransferFilter, FtTransferPayload, GeneratedSQL, HandlerFinding, HandlerReadError, IndexCodegenOptions, IndexCodegenTarget, InferColumnType, InferContext, InferSubgraphClient, InferTableRow, InferredPrintField, InferredTopicSchema, KyselyGenOptions, MapDeletePayload, MapWriteFilter, MapWritePayload, NestedContractCallFilter, NestedContractCallPayload, NftBurnFilter, NftBurnPayload, NftMintFilter, NftMintPayload, NftTransferFilter, NftTransferPayload, NondeterminismError, PinInput, PinnedPrintEventFilter, PrintDataOf, PrintEventFilter, PrintEventFor, PrintEventPayload, PrintEventPrints, PrintField, PrintFieldToTS, PrintSample, PrintValidationResult, PrismaGenOptions, ReindexOptions, RowValue, SUBGRAPHS_RUNTIME, SparseProbeTarget, StxBurnFilter, StxBurnPayload, StxLockFilter, StxLockPayload, StxMintFilter, StxMintPayload, StxTransferFilter, StxTransferPayload, SubgraphColumn, SubgraphContext, SubgraphDefinition, SubgraphFilter, SubgraphHandler, SubgraphSchema, SubgraphTable, SubgraphTableClient, SubgraphTip, SubgraphVerification, SubscribeOptions, SystemRow, TableDiff, TraitPrintEventFilter, TxMeta, TypedHandlers, TypedSubgraphContext, TypedSubgraphDefinition, UnpinnedPrintEventFilter, VarSetFilter, VarSetPayload, WhereInput, WriteRow, camelizeKeys, canSparseScan, computePin, defineSchema, defineSubgraph, deploySchema, deriveVerification, diffSchema, filterFieldsByType, generateDrizzleSchema, generateIndexSchema, generateKyselySchema, generatePrismaSchema, generateSubgraphSQL, hasBreakingChanges, inferPrintTopics, isDeterminismViolation, isStreamsIndexEligible, loadDeterministicDefinition, pgSchemaName, readContractAt, renderDeployPlan, sparseProbeTargets, validateSubgraphDefinition };
package/dist/index.js CHANGED
@@ -681,7 +681,7 @@ import { createHash } from "node:crypto";
681
681
  // package.json
682
682
  var package_default = {
683
683
  name: "@secondlayer/subgraphs",
684
- version: "7.7.4",
684
+ version: "8.0.1",
685
685
  description: "Describe the Stacks data you want as one TypeScript file; it fills itself and survives reorgs.",
686
686
  license: "MIT",
687
687
  repository: {
@@ -698,10 +698,6 @@ var package_default = {
698
698
  types: "./dist/index.d.ts",
699
699
  import: "./dist/index.js"
700
700
  },
701
- "./types": {
702
- types: "./dist/types.d.ts",
703
- import: "./dist/types.js"
704
- },
705
701
  "./schema": {
706
702
  types: "./dist/schema/index.d.ts",
707
703
  import: "./dist/schema/index.js"
@@ -741,7 +737,7 @@ var package_default = {
741
737
  prepublishOnly: "bun run build"
742
738
  },
743
739
  dependencies: {
744
- "@secondlayer/shared": "^14.2.0",
740
+ "@secondlayer/shared": "^15.0.0",
745
741
  "@secondlayer/stacks": "^6.5.4",
746
742
  "@secondlayer/verify": "^0.6.1",
747
743
  esbuild: "^0.28.2",
@@ -1242,13 +1238,8 @@ class ConcurrencyGate {
1242
1238
  }
1243
1239
  }
1244
1240
  }
1245
- var DEFAULT_MAX_CONCURRENT_READS = 4;
1246
- function maxConcurrentReads() {
1247
- const raw = process.env.SUBGRAPH_CHAIN_READ_CONCURRENCY;
1248
- const parsed = raw ? Number.parseInt(raw, 10) : Number.NaN;
1249
- return Number.isFinite(parsed) && parsed > 0 ? parsed : DEFAULT_MAX_CONCURRENT_READS;
1250
- }
1251
- var gate = new ConcurrencyGate(maxConcurrentReads());
1241
+ var MAX_CONCURRENT_READS = 4;
1242
+ var gate = new ConcurrencyGate(MAX_CONCURRENT_READS);
1252
1243
  function hashArgs(args) {
1253
1244
  return chainReadArgsHash(args.map((arg) => serializeCV(arg)));
1254
1245
  }
@@ -2563,11 +2554,6 @@ async function loadStateWrites(db, fromHeight, toHeight, feed) {
2563
2554
  return rows;
2564
2555
  }
2565
2556
 
2566
- // src/runtime/observer-http-source.ts
2567
- import {
2568
- VM_NODE_TO_STORED_TYPE
2569
- } from "@secondlayer/shared";
2570
-
2571
2557
  // src/runtime/reconstruct.ts
2572
2558
  function isoToUnixSeconds(iso) {
2573
2559
  if (!iso)
@@ -3013,7 +2999,6 @@ export {
3013
2999
  deriveVerification,
3014
3000
  diffSchema,
3015
3001
  filterFieldsByType,
3016
- formatFinding,
3017
3002
  generateDrizzleSchema,
3018
3003
  generateIndexSchema,
3019
3004
  generateKyselySchema,
@@ -3031,5 +3016,5 @@ export {
3031
3016
  validateSubgraphDefinition
3032
3017
  };
3033
3018
 
3034
- //# debugId=E4494BCC2925EBFB64756E2164756E21
3019
+ //# debugId=CA1F0971428A6BA164756E2164756E21
3035
3020
  //# sourceMappingURL=index.js.map