@settlemint/sdk-cli 2.5.0 → 2.5.1-main60477d93

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
@@ -249,7 +249,7 @@ settlemint scs subgraph deploy --accept-defaults <subgraph-name>
249
249
 
250
250
  ## API Reference
251
251
 
252
- See the [documentation](https://github.com/settlemint/sdk/tree/v2.5.0/sdk/cli/docs/settlemint.md) for available commands.
252
+ See the [documentation](https://github.com/settlemint/sdk/tree/v2.5.1/sdk/cli/docs/settlemint.md) for available commands.
253
253
 
254
254
  ## Contributing
255
255
 
package/dist/cli.js CHANGED
@@ -265083,7 +265083,7 @@ function pruneCurrentEnv(currentEnv, env2) {
265083
265083
  var package_default = {
265084
265084
  name: "@settlemint/sdk-cli",
265085
265085
  description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
265086
- version: "2.5.0",
265086
+ version: "2.5.1-main60477d93",
265087
265087
  type: "module",
265088
265088
  private: false,
265089
265089
  license: "FSL-1.1-MIT",
@@ -265134,11 +265134,11 @@ var package_default = {
265134
265134
  "@inquirer/input": "4.2.0",
265135
265135
  "@inquirer/password": "4.0.16",
265136
265136
  "@inquirer/select": "4.2.4",
265137
- "@settlemint/sdk-hasura": "2.5.0",
265138
- "@settlemint/sdk-js": "2.5.0",
265139
- "@settlemint/sdk-utils": "2.5.0",
265140
- "@settlemint/sdk-viem": "2.5.0",
265141
- "@types/node": "24.0.12",
265137
+ "@settlemint/sdk-hasura": "2.5.1-main60477d93",
265138
+ "@settlemint/sdk-js": "2.5.1-main60477d93",
265139
+ "@settlemint/sdk-utils": "2.5.1-main60477d93",
265140
+ "@settlemint/sdk-viem": "2.5.1-main60477d93",
265141
+ "@types/node": "24.0.13",
265142
265142
  "@types/semver": "7.7.0",
265143
265143
  "@types/which": "3.0.4",
265144
265144
  "get-tsconfig": "4.10.1",
@@ -301868,7 +301868,7 @@ async function codegenHasura(env2) {
301868
301868
  ...accessToken ? { "x-auth-token": accessToken } : {}
301869
301869
  }
301870
301870
  });
301871
- const hasuraTemplate = `import { createHasuraClient } from "${PACKAGE_NAME}";
301871
+ const hasuraTemplate = `import { createHasuraClient, createHasuraMetadataClient } from "${PACKAGE_NAME}";
301872
301872
  import type { introspection } from "@schemas/hasura-env";
301873
301873
  import { createLogger, requestLogger, type LogLevel } from '@settlemint/sdk-utils/logging';
301874
301874
 
@@ -326150,8 +326150,12 @@ function createCommand2() {
326150
326150
  }
326151
326151
 
326152
326152
  // ../hasura/dist/hasura.js
326153
- async function trackAllTables(databaseName, client) {
326153
+ async function trackAllTables(databaseName, client, tableOptions = {
326154
+ includeSchemas: undefined,
326155
+ excludeSchemas: undefined
326156
+ }) {
326154
326157
  const messages = [];
326158
+ const { includeSchemas, excludeSchemas } = tableOptions;
326155
326159
  const getTablesResult = await client({
326156
326160
  type: "pg_get_source_tables",
326157
326161
  args: { source: databaseName }
@@ -326170,21 +326174,30 @@ async function trackAllTables(databaseName, client) {
326170
326174
  await client({
326171
326175
  type: "pg_untrack_tables",
326172
326176
  args: {
326173
- tables: tables.map((table2) => ({ table: table2.name })),
326177
+ tables: tables.map((table2) => ({ table: table2 })),
326174
326178
  allow_warnings: true
326175
326179
  }
326176
326180
  });
326181
+ const tablesToTrack = tables.filter((table2) => {
326182
+ if (Array.isArray(includeSchemas)) {
326183
+ return includeSchemas.includes(table2.schema);
326184
+ }
326185
+ if (Array.isArray(excludeSchemas)) {
326186
+ return !excludeSchemas.includes(table2.schema);
326187
+ }
326188
+ return true;
326189
+ });
326177
326190
  const trackResult = await client({
326178
326191
  type: "pg_track_tables",
326179
326192
  args: {
326180
- tables: tables.map((table2) => ({ table: table2.name })),
326193
+ tables: tablesToTrack.map((table2) => ({ table: table2 })),
326181
326194
  allow_warnings: true
326182
326195
  }
326183
326196
  });
326184
326197
  if (!trackResult.ok) {
326185
326198
  throw new Error(`Failed to track tables: ${JSON.stringify(trackResult.data)}`);
326186
326199
  }
326187
- messages.push(`Successfully tracked ${tables.length} tables`);
326200
+ messages.push(`Successfully tracked ${tablesToTrack.length} tables`);
326188
326201
  return {
326189
326202
  result: "success",
326190
326203
  messages
@@ -330916,4 +330929,4 @@ async function sdkCliCommand(argv = process.argv) {
330916
330929
  // src/cli.ts
330917
330930
  sdkCliCommand();
330918
330931
 
330919
- //# debugId=990D23653639549864756E2164756E21
330932
+ //# debugId=3663B51FBFB2040164756E2164756E21