@squidcloud/cli 1.0.430 → 1.0.432

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.
@@ -1932,6 +1932,26 @@ const discovered = await integrations.discoverDataConnectionSchema('postgres-db'
1932
1932
  console.log(discovered.schema); // Discovered tables, columns, relationships
1933
1933
  console.log(discovered.collectionReadiness); // Permission and replication status
1934
1934
 
1935
+ // Test a database connection to verify it is working (before or after saving)
1936
+ const testResult = await integrations.testDataConnection({
1937
+ id: 'my-postgres',
1938
+ type: 'postgres',
1939
+ configuration: {
1940
+ connectionOptions: {
1941
+ host: 'localhost',
1942
+ port: 5432,
1943
+ database: 'mydb',
1944
+ user: 'user',
1945
+ secrets: { password: 'pass' }
1946
+ }
1947
+ }
1948
+ });
1949
+ if (testResult.success) {
1950
+ console.log('Connection successful!');
1951
+ } else {
1952
+ console.log('Connection failed:', testResult.errorMessage);
1953
+ }
1954
+
1935
1955
  // Discover schema from a GraphQL endpoint
1936
1956
  const graphqlSchema = await integrations.discoverGraphQLConnectionSchema('my-graphql', {
1937
1957
  connectionOptions: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/cli",
3
- "version": "1.0.430",
3
+ "version": "1.0.432",
4
4
  "description": "The Squid CLI",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -28,7 +28,7 @@
28
28
  "node": ">=18.0.0"
29
29
  },
30
30
  "dependencies": {
31
- "@squidcloud/local-backend": "^1.0.430",
31
+ "@squidcloud/local-backend": "^1.0.432",
32
32
  "adm-zip": "^0.5.16",
33
33
  "copy-webpack-plugin": "^12.0.2",
34
34
  "decompress": "^4.2.1",