@credal/actions 0.1.70 → 0.1.71
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.
@@ -41,13 +41,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
41
41
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
42
42
|
});
|
43
43
|
};
|
44
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
45
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
46
|
-
};
|
47
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
48
45
|
exports.getSnowflakeConnection = getSnowflakeConnection;
|
49
46
|
exports.connectToSnowflakeAndWarehouse = connectToSnowflakeAndWarehouse;
|
50
|
-
const
|
47
|
+
const snowflake = __importStar(require("snowflake-sdk"));
|
51
48
|
const forge = __importStar(require("node-forge"));
|
52
49
|
const getPrivateKeyCorrectFormat = (privateKey) => {
|
53
50
|
try {
|
@@ -66,7 +63,7 @@ function getSnowflakeConnection(snowflakeData, authParams) {
|
|
66
63
|
const { account, username, warehouse, database } = snowflakeData;
|
67
64
|
if (authToken) {
|
68
65
|
// Always try to use Nango-Snowflake OAuth (unused for now)
|
69
|
-
return
|
66
|
+
return snowflake.createConnection({
|
70
67
|
account: account,
|
71
68
|
username: username,
|
72
69
|
authenticator: "OAUTH",
|
@@ -78,7 +75,7 @@ function getSnowflakeConnection(snowflakeData, authParams) {
|
|
78
75
|
}
|
79
76
|
else if (apiKey) {
|
80
77
|
const privateKeyCorrectFormatString = getPrivateKeyCorrectFormat(apiKey);
|
81
|
-
return
|
78
|
+
return snowflake.createConnection({
|
82
79
|
account: account,
|
83
80
|
username: username,
|
84
81
|
privateKey: privateKeyCorrectFormatString,
|