@sentry/cli 2.21.4 → 2.22.1
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/checksums.txt +9 -9
- package/js/helper.js +113 -5
- package/package.json +10 -1
- package/scripts/bump-version.sh +13 -0
package/checksums.txt
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
sentry-cli-Darwin-arm64=
|
|
2
|
-
sentry-cli-Darwin-universal=
|
|
3
|
-
sentry-cli-Darwin-x86_64=
|
|
4
|
-
sentry-cli-Linux-aarch64=
|
|
5
|
-
sentry-cli-Linux-armv7=
|
|
6
|
-
sentry-cli-Linux-i686=
|
|
7
|
-
sentry-cli-Linux-x86_64=
|
|
8
|
-
sentry-cli-Windows-i686.exe=
|
|
9
|
-
sentry-cli-Windows-x86_64.exe=
|
|
1
|
+
sentry-cli-Darwin-arm64=744dfe9b9502c4c3a35a224838a1bce7db0132c122f8615417cc9d32217f7fa9
|
|
2
|
+
sentry-cli-Darwin-universal=508f76bd7ce43cdbab9e0b2ce068917ef95c0ea9c5a57ddd5546f95f8cdd8a3b
|
|
3
|
+
sentry-cli-Darwin-x86_64=a16caaa9fc7405ba50aed5d576042ee1c3a91eee13d2b1da0f59fd9dec665655
|
|
4
|
+
sentry-cli-Linux-aarch64=c7ed4c6586692ed56ce84db202aa5e5dee48e5d56dcd45b42b45eb5384dcbffa
|
|
5
|
+
sentry-cli-Linux-armv7=aa69ed00523ead7448dddb679e0c5a0f599a5808adff5205cb1397e1004f3203
|
|
6
|
+
sentry-cli-Linux-i686=d8aeee45ae41a104d2cb1586eca953dbd697a6d1c92cb00ef45e3bf7c31bc70c
|
|
7
|
+
sentry-cli-Linux-x86_64=0a34cf9b3d3069b7a5c816650fa9cf07963ccc77e881629a6ed82db9727bdf91
|
|
8
|
+
sentry-cli-Windows-i686.exe=fe57cc17abcf8bd50f6ded08dc36fc723a5a2ddfd93dbc18edaf00856d6bfa36
|
|
9
|
+
sentry-cli-Windows-x86_64.exe=49ae8dfa38d11d234c9816001e3c1af0741e780860eebaf89a971c8c6f49c7f4
|
package/js/helper.js
CHANGED
|
@@ -1,8 +1,72 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const os = require('os');
|
|
3
4
|
const path = require('path');
|
|
4
5
|
const childProcess = require('child_process');
|
|
5
6
|
|
|
7
|
+
const BINARY_DISTRIBUTIONS = [
|
|
8
|
+
{ packageName: '@sentry/cli-darwin', subpath: 'bin/sentry-cli' },
|
|
9
|
+
{ packageName: '@sentry/cli-linux-x64', subpath: 'bin/sentry-cli' },
|
|
10
|
+
{ packageName: '@sentry/cli-linux-i686', subpath: 'bin/sentry-cli' },
|
|
11
|
+
{ packageName: '@sentry/cli-linux-arm64', subpath: 'bin/sentry-cli' },
|
|
12
|
+
{ packageName: '@sentry/cli-linux-arm', subpath: 'bin/sentry-cli' },
|
|
13
|
+
{ packageName: '@sentry/cli-win32-x64', subpath: 'bin/sentry-cli.exe' },
|
|
14
|
+
{ packageName: '@sentry/cli-win32-i686', subpath: 'bin/sentry-cli.exe' },
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
function getDistributionForThisPlatform() {
|
|
18
|
+
const arch = os.arch();
|
|
19
|
+
const platform = os.platform();
|
|
20
|
+
|
|
21
|
+
let packageName = undefined;
|
|
22
|
+
if (platform === 'darwin') {
|
|
23
|
+
packageName = '@sentry/cli-darwin';
|
|
24
|
+
} else if (platform === 'linux' || platform === 'freebsd') {
|
|
25
|
+
switch (arch) {
|
|
26
|
+
case 'x64':
|
|
27
|
+
packageName = '@sentry/cli-linux-x64';
|
|
28
|
+
break;
|
|
29
|
+
case 'x86':
|
|
30
|
+
case 'ia32':
|
|
31
|
+
packageName = '@sentry/cli-linux-i686';
|
|
32
|
+
break;
|
|
33
|
+
case 'arm64':
|
|
34
|
+
packageName = '@sentry/cli-linux-arm64';
|
|
35
|
+
break;
|
|
36
|
+
case 'arm':
|
|
37
|
+
packageName = '@sentry/cli-linux-arm';
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
} else if (platform === 'win32') {
|
|
41
|
+
switch (arch) {
|
|
42
|
+
case 'x64':
|
|
43
|
+
packageName = '@sentry/cli-win32-x64';
|
|
44
|
+
break;
|
|
45
|
+
case 'x86':
|
|
46
|
+
case 'ia32':
|
|
47
|
+
packageName = '@sentry/cli-win32-i686';
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
let subpath = undefined;
|
|
53
|
+
switch (platform) {
|
|
54
|
+
case 'win32':
|
|
55
|
+
subpath = 'bin/sentry-cli.exe';
|
|
56
|
+
break;
|
|
57
|
+
case 'darwin':
|
|
58
|
+
case 'linux':
|
|
59
|
+
case 'freebsd':
|
|
60
|
+
subpath = 'bin/sentry-cli';
|
|
61
|
+
break;
|
|
62
|
+
default:
|
|
63
|
+
subpath = 'bin/sentry-cli';
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return { packageName, subpath };
|
|
68
|
+
}
|
|
69
|
+
|
|
6
70
|
/**
|
|
7
71
|
* This convoluted function resolves the path to the `sentry-cli` binary in a
|
|
8
72
|
* way that can't be analysed by @vercel/nft.
|
|
@@ -16,11 +80,55 @@ function getBinaryPath() {
|
|
|
16
80
|
return process.env.SENTRY_BINARY_PATH;
|
|
17
81
|
}
|
|
18
82
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
83
|
+
if (!process.env.USE_SENTRY_BINARY_NPM_DISTRIBUTION) {
|
|
84
|
+
const parts = [];
|
|
85
|
+
parts.push(__dirname);
|
|
86
|
+
parts.push('..');
|
|
87
|
+
parts.push(`sentry-cli${process.platform === 'win32' ? '.exe' : ''}`);
|
|
88
|
+
return path.resolve(...parts);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const { packageName, subpath } = getDistributionForThisPlatform();
|
|
92
|
+
|
|
93
|
+
if (packageName === undefined) {
|
|
94
|
+
throw new Error(
|
|
95
|
+
`Unsupported operating system or architecture! Sentry CLI does not work on this architecture.
|
|
96
|
+
|
|
97
|
+
Sentry CLI supports:
|
|
98
|
+
- Darwin (macOS)
|
|
99
|
+
- Linux and FreeBSD on x64, x86, ia32, arm64, and arm architectures
|
|
100
|
+
- Windows x64, x86, and ia32 architectures`
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
let compatibleBinaryPath;
|
|
105
|
+
try {
|
|
106
|
+
compatibleBinaryPath = require.resolve(`${packageName}/${subpath}`);
|
|
107
|
+
} catch (e) {
|
|
108
|
+
const otherInstalledDistribution = BINARY_DISTRIBUTIONS.find(({ packageName, subpath }) => {
|
|
109
|
+
try {
|
|
110
|
+
require.resolve(`${packageName}/${subpath}`);
|
|
111
|
+
return true;
|
|
112
|
+
} catch (e) {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
// These error messages are heavily inspired by esbuild's error messages: https://github.com/evanw/esbuild/blob/f3d535262e3998d845d0f102b944ecd5a9efda57/lib/npm/node-platform.ts#L150
|
|
118
|
+
if (otherInstalledDistribution) {
|
|
119
|
+
throw new Error(`Sentry CLI binary for this platform/architecture not found!
|
|
120
|
+
|
|
121
|
+
The "${otherInstalledDistribution.packageName}" package is installed, but for the current platform, you should have the "${packageName}" package installed instead. This usually happens if the "@sentry/cli" package is installed on one platform (for example Windows or MacOS) and then the "node_modules" folder is reused on another operating system (for example Linux in Docker).
|
|
122
|
+
|
|
123
|
+
To fix this, avoid copying the "node_modules" folder, and instead freshly install your dependencies on the target system. You can also configure your package manager to install the right package. For example, yarn has the "supportedArchitectures" feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitecture.`);
|
|
124
|
+
} else {
|
|
125
|
+
throw new Error(`Sentry CLI binary for this platform/architecture not found!
|
|
126
|
+
|
|
127
|
+
It seems like none of the "@sentry/cli" package's optional dependencies got installed. Please make sure your package manager is configured to install optional dependencies. If you are using npm to install your dependencies, please don't set the "--no-optional" or "--omit=optional" flags. Sentry CLI needs the "optionalDependencies" feature in order to install its binary.`);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return compatibleBinaryPath;
|
|
24
132
|
}
|
|
25
133
|
|
|
26
134
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.22.1",
|
|
4
4
|
"description": "A command line utility to work with Sentry. https://docs.sentry.io/hosted/learn/cli/",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-cli.git",
|
|
6
6
|
"homepage": "https://docs.sentry.io/hosted/learn/cli/",
|
|
@@ -29,6 +29,15 @@
|
|
|
29
29
|
"npm-run-all": "^4.1.5",
|
|
30
30
|
"prettier": "^2.6.2"
|
|
31
31
|
},
|
|
32
|
+
"optionalDependencies": {
|
|
33
|
+
"@sentry/cli-darwin": "2.22.1",
|
|
34
|
+
"@sentry/cli-linux-arm": "2.22.1",
|
|
35
|
+
"@sentry/cli-linux-arm64": "2.22.1",
|
|
36
|
+
"@sentry/cli-linux-i686": "2.22.1",
|
|
37
|
+
"@sentry/cli-linux-x64": "2.22.1",
|
|
38
|
+
"@sentry/cli-win32-i686": "2.22.1",
|
|
39
|
+
"@sentry/cli-win32-x64": "2.22.1"
|
|
40
|
+
},
|
|
32
41
|
"scripts": {
|
|
33
42
|
"install": "node ./scripts/install.js",
|
|
34
43
|
"fix": "npm-run-all fix:eslint fix:prettier",
|
package/scripts/bump-version.sh
CHANGED
|
@@ -21,4 +21,17 @@ cargo update -p sentry-cli
|
|
|
21
21
|
|
|
22
22
|
# Do not tag and commit changes made by "npm version"
|
|
23
23
|
export npm_config_git_tag_version=false
|
|
24
|
+
|
|
25
|
+
# Bump main sentry cli npm package
|
|
24
26
|
npm version "${TARGET}"
|
|
27
|
+
|
|
28
|
+
# Bump the binary npm distributions
|
|
29
|
+
for dir in $SCRIPT_DIR/../npm-binary-distributions/*; do
|
|
30
|
+
cd $dir
|
|
31
|
+
npm version "${TARGET}"
|
|
32
|
+
cd -
|
|
33
|
+
done
|
|
34
|
+
|
|
35
|
+
# Update the optional deps in the main cli npm package
|
|
36
|
+
# Requires jq to be installed - should be installed ootb on github runners
|
|
37
|
+
jq '.optionalDependencies |= map_values("'"${TARGET}"'")' $SCRIPT_DIR/../package.json > package.json.tmp && mv package.json.tmp $SCRIPT_DIR/../package.json
|