@coalescesoftware/coa 1.0.123 → 1.0.124
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/bin/CLIProfile.js +2 -0
- package/bin/CommonCLI.js +3 -3
- package/bin/Package.js +3 -4
- package/bin/RunOutput.js +6 -2
- package/bin/index.js +0 -0
- package/package.json +4 -3
package/bin/CLIProfile.js
CHANGED
|
@@ -59,6 +59,7 @@ exports.ICLIProfileExample = {
|
|
|
59
59
|
snowflakeAccount: "Snowflake Account To Use",
|
|
60
60
|
snowflakeAuthType: "Snowflake Auth Type (Basic, KeyPair)",
|
|
61
61
|
snowflakeKeyPairPath: "Snowflake Key Pair Path",
|
|
62
|
+
snowflakeKeyPairPass: "Snowflake Key Pair Pass",
|
|
62
63
|
snowflakePassword: "Snowflake Password",
|
|
63
64
|
snowflakeRole: "Snowflake Role",
|
|
64
65
|
snowflakeUsername: "Snowflake Username",
|
|
@@ -132,6 +133,7 @@ const GetCLIConfig = (commandLineOverrides, configFileLocation) => {
|
|
|
132
133
|
snowflakeAuthType: cliProfile.snowflakeAuthType,
|
|
133
134
|
snowflakePassword: cliProfile.snowflakePassword,
|
|
134
135
|
snowflakeKeyPairPath: cliProfile.snowflakeKeyPairPath,
|
|
136
|
+
snowflakeKeyPairPass: cliProfile.snowflakeKeyPairPass,
|
|
135
137
|
snowflakeRole: cliProfile.snowflakeRole,
|
|
136
138
|
snowflakeUsername: cliProfile.snowflakeUsername,
|
|
137
139
|
snowflakeWarehouse: cliProfile.snowflakeWarehouse
|
package/bin/CommonCLI.js
CHANGED
|
@@ -53,14 +53,14 @@ const CleanupCLIJob = (runCompletion, firebase, logContext, action) => {
|
|
|
53
53
|
return cleanupPromise;
|
|
54
54
|
};
|
|
55
55
|
exports.CleanupCLIJob = CleanupCLIJob;
|
|
56
|
-
const GetKeyPairKey = (keyPairPath) => {
|
|
56
|
+
const GetKeyPairKey = (keyPairPath, keyPairPass) => {
|
|
57
57
|
return new Promise((resolve, reject) => {
|
|
58
58
|
Shared.Common.assert(Shared.Logging.LoggingArea.RunnerBackend, !!keyPairPath, "ERROR (GetKeyPairPath): invalid or missing keyPairPath");
|
|
59
59
|
const privateKeyFile = fs.readFileSync(keyPairPath);
|
|
60
60
|
const privateKeyObject = crypto.createPrivateKey({
|
|
61
61
|
key: privateKeyFile,
|
|
62
62
|
format: "pem",
|
|
63
|
-
passphrase:
|
|
63
|
+
passphrase: keyPairPass
|
|
64
64
|
});
|
|
65
65
|
const privateKey = privateKeyObject.export({
|
|
66
66
|
format: "pem",
|
|
@@ -90,7 +90,7 @@ const GetUserConnectionForCLI = (userID, runInfo) => {
|
|
|
90
90
|
reject(new Error("ERROR (GetUserConnectionForCLI): no auth type provided"));
|
|
91
91
|
}
|
|
92
92
|
else if (((_f = runInfo.userCredentials) === null || _f === void 0 ? void 0 : _f.snowflakeAuthType) === Shared.ConnectionOperations.EUserConnectionTypes.keyPair) {
|
|
93
|
-
GetKeyPairKey(Shared.Common.getValueSafe(runInfo, ["userCredentials", "snowflakeKeyPairPath"], ""))
|
|
93
|
+
GetKeyPairKey(Shared.Common.getValueSafe(runInfo, ["userCredentials", "snowflakeKeyPairPath"], ""), Shared.Common.getValueSafe(runInfo, ["userCredentials", "snowflakeKeyPairPass"], ""))
|
|
94
94
|
.then((keyPair) => {
|
|
95
95
|
output.connectionDetails.keyPair = keyPair;
|
|
96
96
|
resolve(output);
|
package/bin/Package.js
CHANGED
|
@@ -423,7 +423,6 @@ const BuildManifest = (workspaceData) => {
|
|
|
423
423
|
const entityImportedData = Object.keys(workspaceData[entityType]);
|
|
424
424
|
manifest[entityType] = {};
|
|
425
425
|
entityImportedData.forEach(namedEntityKey => {
|
|
426
|
-
debugger;
|
|
427
426
|
manifest[entityType][namedEntityKey] = {
|
|
428
427
|
id: namedEntityKey,
|
|
429
428
|
name: getEntityNameFromPackageManifest(entityType, namedEntityKey)
|
|
@@ -469,7 +468,7 @@ const FlushFirestoreWorkspaceWithAllWorkspaceDataForCLIPackages = (firestore, te
|
|
|
469
468
|
};
|
|
470
469
|
const GetPackageListMessageCLI = (packageContext) => {
|
|
471
470
|
const { environmentID, teamID, firestore } = packageContext;
|
|
472
|
-
return Shared.Workspaces.getAllWorkspaceDataFromFirebase(firestore, teamID, environmentID)
|
|
471
|
+
return Shared.Workspaces.getAllWorkspaceDataFromFirebase(firestore, teamID, environmentID.toString())
|
|
473
472
|
.then(wsData => {
|
|
474
473
|
const packages = Shared.Common.getValueSafe(wsData, ["packages"], null);
|
|
475
474
|
if (packages && Object.keys(packages).length) {
|
|
@@ -592,7 +591,7 @@ const InstallPackage = (packageProvider, packageContext) => {
|
|
|
592
591
|
let packageDependencyInfo;
|
|
593
592
|
let manifest;
|
|
594
593
|
PackagesLogger.infoContext(loggerContext, `Gathering your project workspace data for environment: ${environmentID}`);
|
|
595
|
-
return Shared.Workspaces.getAllWorkspaceDataFromFirebase(firestore, teamID, environmentID)
|
|
594
|
+
return Shared.Workspaces.getAllWorkspaceDataFromFirebase(firestore, teamID, environmentID.toString())
|
|
596
595
|
.then((projectWorkspaceDataFromFirestore) => {
|
|
597
596
|
projectWorkspaceData = projectWorkspaceDataFromFirestore;
|
|
598
597
|
return packageProvider.getWorkspaceDataFS();
|
|
@@ -654,7 +653,7 @@ const UninstallPackage = (packageID, packageContext) => {
|
|
|
654
653
|
let projectWorkspaceData;
|
|
655
654
|
let prunedWorkspaceData;
|
|
656
655
|
PackagesLogger.infoContext(loggerContext, `Gathering your project workspace data for environment: ${environmentID}`);
|
|
657
|
-
return Shared.Workspaces.getAllWorkspaceDataFromFirebase(firestore, teamID, environmentID)
|
|
656
|
+
return Shared.Workspaces.getAllWorkspaceDataFromFirebase(firestore, teamID, environmentID.toString())
|
|
658
657
|
.then((projectWorkspaceDataFromFirestore) => {
|
|
659
658
|
projectWorkspaceData = projectWorkspaceDataFromFirestore;
|
|
660
659
|
const allProjectDependencies = Shared.Common.getValueSafe(projectWorkspaceDataFromFirestore, ["packages"], {});
|
package/bin/RunOutput.js
CHANGED
|
@@ -22,6 +22,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
22
22
|
exports.SaveRunOutputToFile = void 0;
|
|
23
23
|
const Shared = __importStar(require("@coalescesoftware/shared"));
|
|
24
24
|
const CLILogger = Shared.Logging.GetLogger(Shared.Logging.LoggingArea.CLI);
|
|
25
|
+
//convert from firestore shape to run output shape
|
|
25
26
|
const cleanRunResult = (nodeID, runResult) => {
|
|
26
27
|
return {
|
|
27
28
|
nodeID,
|
|
@@ -56,9 +57,11 @@ const GetRunOutputForRunCounter = (firestore, teamID, runID) => {
|
|
|
56
57
|
queryResult.docs.forEach((runResultDoc) => {
|
|
57
58
|
const stepCounter = runResultDoc.id;
|
|
58
59
|
const runResult = runResultDoc.data();
|
|
59
|
-
|
|
60
|
+
Shared.RunsTypes.RunResult.check(runResult);
|
|
61
|
+
runResults[stepCounter] = cleanRunResult(stepCounter, runResult);
|
|
60
62
|
});
|
|
61
|
-
|
|
63
|
+
const executionSequence = Shared.Runs.GetExecutionSequenceFromRunResults(runResults);
|
|
64
|
+
runData.runResults.runResults = executionSequence.map((stepCounter) => {
|
|
62
65
|
return runResults[stepCounter];
|
|
63
66
|
});
|
|
64
67
|
});
|
|
@@ -74,6 +77,7 @@ const SaveRunOutputToFile = (runOutputFileLocation, runIDString, token) => {
|
|
|
74
77
|
const runID = parseInt(runIDString);
|
|
75
78
|
return GetRunOutputForRunCounter(firestore, teamID, runID);
|
|
76
79
|
}).then((runOutput) => {
|
|
80
|
+
Shared.RunsTypes.RRunOutput.check(runOutput);
|
|
77
81
|
const runOutputJSON = Shared.Common.StringifyFirestoreObject(runOutput);
|
|
78
82
|
return Shared.Common.WriteFile(runOutputFileLocation, runOutputJSON + "\n");
|
|
79
83
|
});
|
package/bin/index.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coalescesoftware/coa",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.124",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"author": "Coalesce Automation, Inc.",
|
|
6
6
|
"main": "index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"start-cli-debug": "yarn run start --debug"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@coalescesoftware/shared": "^1.0.
|
|
15
|
+
"@coalescesoftware/shared": "^1.0.124",
|
|
16
16
|
"chalk": "^4.1.2",
|
|
17
17
|
"commander": "^9.2.0",
|
|
18
18
|
"firebase": "8.2.0",
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"ink": "^3.2.0",
|
|
22
22
|
"inquirer": "^8.2.4",
|
|
23
23
|
"react": "^17.0.2",
|
|
24
|
-
"react-redux": "^7.2.6"
|
|
24
|
+
"react-redux": "^7.2.6",
|
|
25
|
+
"runtypes": "^6.5.1"
|
|
25
26
|
},
|
|
26
27
|
"devDependencies": {
|
|
27
28
|
"typescript": "^4.5.5"
|