@webiny/pulumi-sdk 5.34.3 → 5.34.4-beta.0
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/downloadBinaries.js +3 -1
- package/downloadBinaries.js.map +1 -1
- package/package.json +4 -4
package/downloadBinaries.js
CHANGED
|
@@ -66,10 +66,12 @@ var _default = async (downloadFolder, beforeInstall, afterInstall) => {
|
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
exports.default = _default;
|
|
69
|
+
const SUPPORTED_ARCHITECTURES = ["x64", "arm64"];
|
|
69
70
|
|
|
70
71
|
async function setupDarwin(downloadFolder) {
|
|
71
72
|
const version = getPulumiVersion();
|
|
72
|
-
const
|
|
73
|
+
const arch = SUPPORTED_ARCHITECTURES.includes(process.arch) ? process.arch : "x64";
|
|
74
|
+
const filename = `pulumi-v${version}-darwin-${arch}.tar.gz`;
|
|
73
75
|
const downloadUrl = "https://get.pulumi.com/releases/sdk/" + filename;
|
|
74
76
|
await download(downloadUrl, downloadFolder);
|
|
75
77
|
await tar.extract({
|
package/downloadBinaries.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["os","require","tar","fs","download","path","decompress","semver","getPulumiVersion","version","clean","downloadFolder","beforeInstall","afterInstall","existsSync","platform","setupDarwin","setupLinux","setupWindows","Error","filename","downloadUrl","extract","cwd","file","join","unlinkSync","archive","destination","strip"],"sources":["downloadBinaries.ts"],"sourcesContent":["const os = require(\"os\");\nconst tar = require(\"tar\");\nconst fs = require(\"fs\");\nconst download = require(\"download\");\nconst path = require(\"path\");\nconst decompress = require(\"decompress\");\nconst semver = require(\"semver\");\n\n// We gotta sanitize the package version, since on a few occasions, we've detected the Pulumi version\n// can look like the following: \"2.25.2+dirty\". We want to ensure only \"2.25.2\" is returned.\n// @see https://github.com/pulumi/pulumi/issues/6847\nconst getPulumiVersion = () => {\n const { version } = require(\"@pulumi/pulumi/package.json\");\n return semver.clean(version);\n};\n\nexport default async (\n downloadFolder: string,\n beforeInstall?: () => void,\n afterInstall?: () => void\n) => {\n if (fs.existsSync(downloadFolder)) {\n return false;\n }\n\n if (typeof beforeInstall === \"function\") {\n await beforeInstall();\n }\n\n const platform = os.platform();\n switch (platform) {\n case \"darwin\":\n await setupDarwin(downloadFolder);\n break;\n case \"linux\":\n await setupLinux(downloadFolder);\n break;\n case \"win32\":\n await setupWindows(downloadFolder);\n break;\n default:\n throw Error(\n `Cannot download Pulumi binaries - platform \"${platform}\" not supported. Supported ones are \"darwin\", \"linux\", and \"win32\"`\n );\n }\n\n if (typeof afterInstall === \"function\") {\n await afterInstall();\n }\n\n return true;\n};\n\nasync function setupDarwin(downloadFolder: string) {\n const version = getPulumiVersion();\n const filename = `pulumi-v${version}-darwin
|
|
1
|
+
{"version":3,"names":["os","require","tar","fs","download","path","decompress","semver","getPulumiVersion","version","clean","downloadFolder","beforeInstall","afterInstall","existsSync","platform","setupDarwin","setupLinux","setupWindows","Error","SUPPORTED_ARCHITECTURES","arch","includes","process","filename","downloadUrl","extract","cwd","file","join","unlinkSync","archive","destination","strip"],"sources":["downloadBinaries.ts"],"sourcesContent":["const os = require(\"os\");\nconst tar = require(\"tar\");\nconst fs = require(\"fs\");\nconst download = require(\"download\");\nconst path = require(\"path\");\nconst decompress = require(\"decompress\");\nconst semver = require(\"semver\");\n\n// We gotta sanitize the package version, since on a few occasions, we've detected the Pulumi version\n// can look like the following: \"2.25.2+dirty\". We want to ensure only \"2.25.2\" is returned.\n// @see https://github.com/pulumi/pulumi/issues/6847\nconst getPulumiVersion = () => {\n const { version } = require(\"@pulumi/pulumi/package.json\");\n return semver.clean(version);\n};\n\nexport default async (\n downloadFolder: string,\n beforeInstall?: () => void,\n afterInstall?: () => void\n) => {\n if (fs.existsSync(downloadFolder)) {\n return false;\n }\n\n if (typeof beforeInstall === \"function\") {\n await beforeInstall();\n }\n\n const platform = os.platform();\n switch (platform) {\n case \"darwin\":\n await setupDarwin(downloadFolder);\n break;\n case \"linux\":\n await setupLinux(downloadFolder);\n break;\n case \"win32\":\n await setupWindows(downloadFolder);\n break;\n default:\n throw Error(\n `Cannot download Pulumi binaries - platform \"${platform}\" not supported. Supported ones are \"darwin\", \"linux\", and \"win32\"`\n );\n }\n\n if (typeof afterInstall === \"function\") {\n await afterInstall();\n }\n\n return true;\n};\n\nconst SUPPORTED_ARCHITECTURES = [\"x64\", \"arm64\"];\n\nasync function setupDarwin(downloadFolder: string) {\n const version = getPulumiVersion();\n const arch = SUPPORTED_ARCHITECTURES.includes(process.arch) ? process.arch : \"x64\";\n\n const filename = `pulumi-v${version}-darwin-${arch}.tar.gz`;\n const downloadUrl = \"https://get.pulumi.com/releases/sdk/\" + filename;\n\n await download(downloadUrl, downloadFolder);\n\n await tar.extract({\n cwd: downloadFolder,\n file: path.join(downloadFolder, filename)\n });\n\n fs.unlinkSync(path.join(downloadFolder, filename));\n}\n\nasync function setupWindows(downloadFolder: string) {\n const version = getPulumiVersion();\n const filename = `pulumi-v${version}-windows-x64.zip`;\n const downloadUrl = \"https://get.pulumi.com/releases/sdk/\" + filename;\n\n await download(downloadUrl, downloadFolder);\n\n const archive = path.join(downloadFolder, filename);\n const destination = path.join(downloadFolder, \"pulumi\");\n await decompress(archive, destination, { strip: 2 });\n\n fs.unlinkSync(path.join(downloadFolder, filename));\n}\n\nasync function setupLinux(downloadFolder: string) {\n const version = getPulumiVersion();\n const filename = `pulumi-v${version}-linux-x64.tar.gz`;\n const downloadUrl = \"https://get.pulumi.com/releases/sdk/\" + filename;\n\n await download(downloadUrl, downloadFolder);\n\n await tar.extract({\n cwd: downloadFolder,\n file: path.join(downloadFolder, filename)\n });\n\n fs.unlinkSync(path.join(downloadFolder, filename));\n}\n"],"mappings":";;;;;;;AAAA,MAAMA,EAAE,GAAGC,OAAO,CAAC,IAAD,CAAlB;;AACA,MAAMC,GAAG,GAAGD,OAAO,CAAC,KAAD,CAAnB;;AACA,MAAME,EAAE,GAAGF,OAAO,CAAC,IAAD,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;EAEA,MAAMpB,QAAQ,CAACqB,WAAD,EAAcd,cAAd,CAAd;EAEA,MAAMT,GAAG,CAACwB,OAAJ,CAAY;IACdC,GAAG,EAAEhB,cADS;IAEdiB,IAAI,EAAEvB,IAAI,CAACwB,IAAL,CAAUlB,cAAV,EAA0Ba,QAA1B;EAFQ,CAAZ,CAAN;EAKArB,EAAE,CAAC2B,UAAH,CAAczB,IAAI,CAACwB,IAAL,CAAUlB,cAAV,EAA0Ba,QAA1B,CAAd;AACH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/pulumi-sdk",
|
|
3
|
-
"version": "5.34.
|
|
3
|
+
"version": "5.34.4-beta.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"@babel/core": "^7.19.3",
|
|
30
30
|
"@types/lodash": "^4.14.190",
|
|
31
31
|
"@types/node": "*",
|
|
32
|
-
"@webiny/cli": "^5.34.
|
|
33
|
-
"@webiny/project-utils": "^5.34.
|
|
32
|
+
"@webiny/cli": "^5.34.4-beta.0",
|
|
33
|
+
"@webiny/project-utils": "^5.34.4-beta.0",
|
|
34
34
|
"rimraf": "^3.0.2",
|
|
35
35
|
"typescript": "4.7.4"
|
|
36
36
|
},
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"build": "yarn webiny run build",
|
|
47
47
|
"watch": "yarn webiny run watch"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "e5e63a5a02def63eeded2c8f61beb7f0b3744c01"
|
|
50
50
|
}
|