@squidcloud/cli 1.0.426 → 1.0.427

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/index.js CHANGED
@@ -30625,7 +30625,7 @@ function exitWithError(...messages) {
30625
30625
  /***/ ((module) => {
30626
30626
 
30627
30627
  "use strict";
30628
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@squidcloud/cli","version":"1.0.426","description":"The Squid CLI","main":"dist/index.js","scripts":{"start":"node dist/index.js","start-ts":"ts-node -r tsconfig-paths/register src/index.ts","prebuild":"rimraf dist","build":"webpack --mode=production","build:dev":"webpack --mode=development","lint":"eslint","link":"npm run build && chmod 755 dist/index.js && npm link","watch":"webpack --watch","deploy":"npm run build && npm pack --silent | xargs -I {} mv {} package.tgz && npm install -g package.tgz && rm -rf package.tgz","publish:public":"npm run build && npm publish --access public"},"files":["dist/**/*"],"bin":{"squid":"dist/index.js"},"keywords":[],"author":"","license":"ISC","engines":{"node":">=18.0.0"},"dependencies":{"@squidcloud/local-backend":"^1.0.426","adm-zip":"^0.5.16","copy-webpack-plugin":"^12.0.2","decompress":"^4.2.1","nodemon":"^3.1.9","terser-webpack-plugin":"^5.3.10","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0","tsconfig-paths-webpack-plugin":"^4.1.0","webpack":"^5.101.3","zip-webpack-plugin":"^4.0.1"},"devDependencies":{"@types/adm-zip":"^0.5.7","@types/decompress":"^4.2.7","@types/node":"^20.19.9","terminal-link":"^3.0.0"}}');
30628
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@squidcloud/cli","version":"1.0.427","description":"The Squid CLI","main":"dist/index.js","scripts":{"start":"node dist/index.js","start-ts":"ts-node -r tsconfig-paths/register src/index.ts","prebuild":"rimraf dist","build":"webpack --mode=production","build:dev":"webpack --mode=development","lint":"eslint","link":"npm run build && chmod 755 dist/index.js && npm link","watch":"webpack --watch","deploy":"npm run build && npm pack --silent | xargs -I {} mv {} package.tgz && npm install -g package.tgz && rm -rf package.tgz","publish:public":"npm run build && npm publish --access public"},"files":["dist/**/*"],"bin":{"squid":"dist/index.js"},"keywords":[],"author":"","license":"ISC","engines":{"node":">=18.0.0"},"dependencies":{"@squidcloud/local-backend":"^1.0.427","adm-zip":"^0.5.16","copy-webpack-plugin":"^12.0.2","decompress":"^4.2.1","nodemon":"^3.1.9","terser-webpack-plugin":"^5.3.10","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0","tsconfig-paths-webpack-plugin":"^4.1.0","webpack":"^5.101.3","zip-webpack-plugin":"^4.0.1"},"devDependencies":{"@types/adm-zip":"^0.5.7","@types/decompress":"^4.2.7","@types/node":"^20.19.9","terminal-link":"^3.0.0"}}');
30629
30629
 
30630
30630
  /***/ }),
30631
30631
 
@@ -1897,6 +1897,59 @@ await integrations.setIntegrationSchema('postgres-db', {
1897
1897
  }
1898
1898
  ]
1899
1899
  });
1900
+
1901
+ // Generate AI descriptions for data schema (collections and fields)
1902
+ const schemaResult = await integrations.generateAiDescriptionsForDataSchema('postgres-db', {
1903
+ schema: currentSchema, // The current schema of the integration
1904
+ collections: ['users', 'orders'], // Optional: specific collections to generate for
1905
+ instructions: 'Use business terminology' // Optional: guide the AI
1906
+ });
1907
+ console.log(schemaResult.schema); // Schema with AI-generated descriptions
1908
+
1909
+ // Generate AI descriptions for associations (relationships between entities)
1910
+ const assocResult = await integrations.generateAiDescriptionsForAssociations('postgres-db', {
1911
+ schema: currentSchema,
1912
+ associations: ['User_Order'], // Optional: specific associations to generate for
1913
+ instructions: 'Explain the business relationship'
1914
+ });
1915
+
1916
+ // Generate AI descriptions for stored procedures
1917
+ const spResult = await integrations.generateAiDescriptionsForStoredProcedures('postgres-db', {
1918
+ schema: currentSchema,
1919
+ storedProcedures: ['calculate_totals'], // Optional: specific procedures to generate for
1920
+ instructions: 'Describe what the procedure does'
1921
+ });
1922
+
1923
+ // Generate AI descriptions for API endpoints
1924
+ const apiResult = await integrations.generateAiDescriptionsForEndpoints('my-api', {
1925
+ schema: apiSchema,
1926
+ endpoints: ['GET /users', 'POST /orders'], // Optional: specific endpoints to generate for
1927
+ instructions: 'Use REST API terminology'
1928
+ });
1929
+
1930
+ // Discover schema from a database connection
1931
+ const discovered = await integrations.discoverDataConnectionSchema('postgres-db');
1932
+ console.log(discovered.schema); // Discovered tables, columns, relationships
1933
+ console.log(discovered.collectionReadiness); // Permission and replication status
1934
+
1935
+ // Discover schema from a GraphQL endpoint
1936
+ const graphqlSchema = await integrations.discoverGraphQLConnectionSchema('my-graphql', {
1937
+ connectionOptions: {
1938
+ url: 'https://api.example.com/graphql',
1939
+ headers: { 'Authorization': 'Bearer token' }
1940
+ }
1941
+ });
1942
+
1943
+ // Discover schema from an OpenAPI spec URL
1944
+ const openApiSchema = await integrations.discoverOpenApiSchema('my-api', {
1945
+ discoveryOptions: {
1946
+ openApiSpecUrl: 'https://api.example.com/openapi.json',
1947
+ headers: { 'Authorization': 'Bearer token' }
1948
+ }
1949
+ });
1950
+
1951
+ // Discover schema from an uploaded OpenAPI spec file
1952
+ const fileSchema = await integrations.discoverOpenApiSchemaFromFile('my-api');
1900
1953
  ```
1901
1954
 
1902
1955
  ### Admin - Secrets
@@ -1925,6 +1978,7 @@ await secrets.deleteMany(['KEY1', 'KEY2']);
1925
1978
  const apiKeys = secrets.apiKeys;
1926
1979
  await apiKeys.upsert('my-key');
1927
1980
  const key = await apiKeys.get('my-key');
1981
+ const allApiKeys = await apiKeys.getAll(); // Get all API keys
1928
1982
  await apiKeys.delete('my-key');
1929
1983
  ```
1930
1984
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/cli",
3
- "version": "1.0.426",
3
+ "version": "1.0.427",
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.426",
31
+ "@squidcloud/local-backend": "^1.0.427",
32
32
  "adm-zip": "^0.5.16",
33
33
  "copy-webpack-plugin": "^12.0.2",
34
34
  "decompress": "^4.2.1",