npm package diff

Package: @forge/lint

Versions: 5.5.2-next.10 - 5.6.0-next.11

File: package/out/lint/linters/storage-module-linter/visitors/sql-node-visitor.js

Index: package/out/lint/linters/storage-module-linter/visitors/sql-node-visitor.js
===================================================================
--- package/out/lint/linters/storage-module-linter/visitors/sql-node-visitor.js
+++ package/out/lint/linters/storage-module-linter/visitors/sql-node-visitor.js
@@ -0,0 +1,23 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SQLNodeVisitor = void 0;
+const typescript_estree_1 = require("@typescript-eslint/typescript-estree");
+const api_call_interface_1 = require("../api-call-interface");
+class SQLNodeVisitor {
+    visit(node, _parent, callback) {
+        if (node.type === typescript_estree_1.AST_NODE_TYPES.ImportDeclaration && node.source.value === '@forge/sql') {
+            node.specifiers.forEach((specifier) => {
+                if (specifier.type === 'ImportDefaultSpecifier' && specifier.local.type === 'Identifier') {
+                    if (specifier.loc) {
+                        const sqlApiCall = {
+                            type: api_call_interface_1.ApiCallTypes.SQL,
+                            ...specifier.loc.start
+                        };
+                        callback(sqlApiCall);
+                    }
+                }
+            });
+        }
+    }
+}
+exports.SQLNodeVisitor = SQLNodeVisitor;