@jahed/terraform 1.3.3 → 1.3.5
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/hashes.txt +14 -14
- package/lib/download.d.ts +3 -1
- package/lib/download.js +20 -6
- package/lib/downloadTerraformToMemory.js +1 -1
- package/lib/removeDirectory.js +3 -15
- package/package.json +7 -11
package/hashes.txt
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
6bf684dbc19ecbf9225f5a2409def32e5ef7d37af3899726accd9420a88a6bcd terraform_1.3.5_darwin_amd64.zip
|
|
2
|
+
33b25ad89dedbd98bba09cbde69dcf9e928029f322ae9494279cf2c8ce47db89 terraform_1.3.5_darwin_arm64.zip
|
|
3
|
+
e5a47e937c14e3b436e4087ff90591dd098676b557aa1bc356c1580b3c7e720a terraform_1.3.5_freebsd_386.zip
|
|
4
|
+
98bdf51a86f1764d7a5c7bb69c226671a376abaf40ab07921b8258d77bdf774f terraform_1.3.5_freebsd_amd64.zip
|
|
5
|
+
3fe1fc6ec511b4f332f5e4be3a855ebae3ad52f3514174855524da0c04d3bfe5 terraform_1.3.5_freebsd_arm.zip
|
|
6
|
+
774bf54d20e296eab35b154d9c35de75e306475b36dbd8b5e59dcad14de95bdd terraform_1.3.5_linux_386.zip
|
|
7
|
+
ac28037216c3bc41de2c22724e863d883320a770056969b8d211ca8af3d477cf terraform_1.3.5_linux_amd64.zip
|
|
8
|
+
ba5b1761046b899197bbfce3ad9b448d14550106d2cc37c52a60fc6822b584ed terraform_1.3.5_linux_arm64.zip
|
|
9
|
+
8e866d0753ccf6e92de19dc9dd8ce7a406bf668b315d31f947c1f67a067416e6 terraform_1.3.5_linux_arm.zip
|
|
10
|
+
b5109f8690e459b0026379f43de886bcc08e49a7cbcdcfa909587a59f4787d07 terraform_1.3.5_openbsd_386.zip
|
|
11
|
+
cf67fc0312a46996d16e7da474dcb6fe28886fa88029aa4c9297dcfd3ff104de terraform_1.3.5_openbsd_amd64.zip
|
|
12
|
+
d6df5fdb9977b942c68b027b5449ff67d9b3568693ecf1fe23ac0a7fa75b3893 terraform_1.3.5_solaris_amd64.zip
|
|
13
|
+
bd7cfa84e7b89bc5f4fc75f5bee0ef71e439f4e75a7708f986653e4661fb9dd3 terraform_1.3.5_windows_386.zip
|
|
14
|
+
ac2633f0a09af9e05d4f0303660af01ddbba08c06b6c46483639c36b7807e948 terraform_1.3.5_windows_amd64.zip
|
package/lib/download.d.ts
CHANGED
package/lib/download.js
CHANGED
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.download = void 0;
|
|
7
|
-
const
|
|
8
|
-
const node_fetch_1 = __importDefault(require("node-fetch"));
|
|
4
|
+
const https_1 = require("https");
|
|
9
5
|
const debug_1 = require("./debug");
|
|
10
|
-
const download = (
|
|
6
|
+
const download = (args) => {
|
|
7
|
+
(0, debug_1.debug)("downloading", args);
|
|
8
|
+
return new Promise((resolve, reject) => {
|
|
9
|
+
const req = (0, https_1.get)(args.url, (res) => {
|
|
10
|
+
if (res.statusCode !== 200) {
|
|
11
|
+
reject(new Error(`status was not okay (${res.statusCode})`));
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
const buffers = [];
|
|
15
|
+
res.on("data", (chunk) => {
|
|
16
|
+
buffers.push(chunk);
|
|
17
|
+
});
|
|
18
|
+
res.on("end", () => {
|
|
19
|
+
resolve(Buffer.concat(buffers));
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
req.on("error", reject);
|
|
23
|
+
});
|
|
24
|
+
};
|
|
11
25
|
exports.download = download;
|
|
@@ -20,7 +20,7 @@ const downloadTerraformToMemory = (0, promises_1.waterfall)((outputs) => {
|
|
|
20
20
|
});
|
|
21
21
|
}, (args) => {
|
|
22
22
|
return (0, promises_1.every)({
|
|
23
|
-
buffer: (0, promises_1.waterfall)(() => (0, getDownloadUrl_1.getDownloadUrl)(args), (url) => (0, download_1.download)({ url })
|
|
23
|
+
buffer: (0, promises_1.waterfall)(() => (0, getDownloadUrl_1.getDownloadUrl)(args), (url) => (0, download_1.download)({ url }))(""),
|
|
24
24
|
expectedHash: (0, getExpectedHash_1.getExpectedHash)(args),
|
|
25
25
|
});
|
|
26
26
|
}, ({ buffer, expectedHash }) => {
|
package/lib/removeDirectory.js
CHANGED
|
@@ -1,22 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.removeDirectory = void 0;
|
|
7
|
-
const promises_1 = require("@jahed/promises");
|
|
8
|
-
const rimraf_1 = __importDefault(require("rimraf"));
|
|
9
4
|
const debug_1 = require("./debug");
|
|
5
|
+
const promises_1 = require("fs/promises");
|
|
10
6
|
const removeDirectory = (directory) => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
(0, rimraf_1.default)(directory, (err) => {
|
|
14
|
-
if (err) {
|
|
15
|
-
reject(err);
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
resolve();
|
|
19
|
-
});
|
|
20
|
-
});
|
|
7
|
+
(0, debug_1.debug)("removing directory", { directory });
|
|
8
|
+
return (0, promises_1.rm)(directory, { recursive: true, force: true });
|
|
21
9
|
};
|
|
22
10
|
exports.removeDirectory = removeDirectory;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jahed/terraform",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.5",
|
|
4
4
|
"description": "A wrapper which downloads and runs Terraform locally via npm, yarn and more.",
|
|
5
5
|
"author": "Jahed",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,27 +22,23 @@
|
|
|
22
22
|
"hashes.txt"
|
|
23
23
|
],
|
|
24
24
|
"scripts": {
|
|
25
|
-
"lint": "prettier -c
|
|
26
|
-
"build": "
|
|
25
|
+
"lint": "prettier -c .",
|
|
26
|
+
"build": "rm -rf ./lib && tsc",
|
|
27
27
|
"test": "./tests/run.sh",
|
|
28
28
|
"version": "./scripts/verify-version.sh"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@jahed/promises": "^1.0.2",
|
|
32
32
|
"find-cache-dir": "^3.3.2",
|
|
33
|
-
"node-fetch": "^2.6.7",
|
|
34
|
-
"rimraf": "^3.0.2",
|
|
35
33
|
"yauzl": "^2.10.0"
|
|
36
34
|
},
|
|
37
35
|
"devDependencies": {
|
|
38
|
-
"@tsconfig/
|
|
36
|
+
"@tsconfig/node16": "^1.0.3",
|
|
39
37
|
"@types/find-cache-dir": "^3.2.1",
|
|
40
|
-
"@types/node": "^16.
|
|
41
|
-
"@types/node-fetch": "^2.6.2",
|
|
42
|
-
"@types/rimraf": "^3.0.2",
|
|
38
|
+
"@types/node": "^16.18.3",
|
|
43
39
|
"@types/yauzl": "^2.10.0",
|
|
44
|
-
"npm-check-updates": "^
|
|
40
|
+
"npm-check-updates": "^16.4.0",
|
|
45
41
|
"prettier": "^2.7.1",
|
|
46
|
-
"typescript": "4.
|
|
42
|
+
"typescript": "4.8.x"
|
|
47
43
|
}
|
|
48
44
|
}
|