@sentry/cli 2.58.2 → 2.58.3-alpha0

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/LICENSE CHANGED
@@ -1,27 +1,110 @@
1
- Copyright (c) 2016-2025 Sentry (https://sentry.io/) and individual contributors.
2
- All rights reserved.
3
-
4
- Redistribution and use in source and binary forms, with or without
5
- modification, are permitted provided that the following conditions are met:
6
-
7
- 1. Redistributions of source code must retain the above copyright notice,
8
- this list of conditions and the following disclaimer.
9
-
10
- 2. Redistributions in binary form must reproduce the above copyright
11
- notice, this list of conditions and the following disclaimer in the
12
- documentation and/or other materials provided with the distribution.
13
-
14
- 3. Neither the name of the Sentry nor the names of its contributors may be
15
- used to endorse or promote products derived from this software without specific
16
- prior written permission.
17
-
18
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25
- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1
+ # Functional Source License, Version 1.1, MIT Future License
2
+
3
+ ## Abbreviation
4
+
5
+ FSL-1.1-MIT
6
+
7
+ ## Notice
8
+
9
+ Copyright 2008-2025 Functional Software, Inc. dba Sentry
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the MIT license that is effective on the second anniversary of the date we make
91
+ the Software available. On or after that date, you may use the Software under
92
+ the MIT license, in which case the following will apply:
93
+
94
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
95
+ this software and associated documentation files (the "Software"), to deal in
96
+ the Software without restriction, including without limitation the rights to
97
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
98
+ of the Software, and to permit persons to whom the Software is furnished to do
99
+ so, subject to the following conditions:
100
+
101
+ The above copyright notice and this permission notice shall be included in all
102
+ copies or substantial portions of the Software.
103
+
104
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
105
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
106
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
107
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
108
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
109
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
110
+ SOFTWARE.
package/checksums.txt CHANGED
@@ -1,10 +1,7 @@
1
- sentry-cli-Darwin-arm64=f84d5716d74ea4b1355c64ef6cb6a14f2097ab2541c9747b7aee4bad39a647e4
2
- sentry-cli-Darwin-universal=5c893f7bc57dbcb87ec941c08420ef07cf485e931238c83cc8fbbe2ba69fec9f
3
- sentry-cli-Darwin-x86_64=e95fa80e6f06797c56eb4f18f65f82a4c859599c572d940e7a156885cbd8dd21
4
- sentry-cli-Linux-aarch64=3853e2071623941d96c7b69a99929f1d3222a4b696f4b74c875be340aa75926a
5
- sentry-cli-Linux-armv7=31fab9396e879ae49cd27aca025caa453ffbd965c2d018bd873f09d8d71a06d9
6
- sentry-cli-Linux-i686=a995decaad61160bfac84634b280f005003931726e14fd964f8c3cf6ce00aa20
7
- sentry-cli-Linux-x86_64=61b1c19345694ce31ac663e9875194d45f4f317f2b9134269605f810132df88b
8
- sentry-cli-Windows-aarch64.exe=a4a4dff5e176392510674b1afd73324bedf0ea66bdd8234654389429cda9b576
9
- sentry-cli-Windows-i686.exe=29290444fd2b796fe14c5d058eafe883293257f9f650fe20080bd37214b2ffe5
10
- sentry-cli-Windows-x86_64.exe=e89a23566d5e17a5fb2fe40e182e6e0a6cf07134330c7588d5b6025071bcae3f
1
+ sentry-cli-Linux-aarch64=dc847900b90b04eb9ae12a342bb68626d6a617f0dd3e806038f8db34a02e438c
2
+ sentry-cli-Linux-armv7=6293a4e62f0cf12d2882864f71f9d243675b7092cce32eabdbbb404c80dd7809
3
+ sentry-cli-Linux-i686=306384389c5685cf7174e903a1bacf804080437b89bb9335656b06eeed313e3a
4
+ sentry-cli-Linux-x86_64=d49103860d24e6ba630bc78bdc9da6afab34464c645a7418ff378d23d55628b6
5
+ sentry-cli-Windows-aarch64.exe=c054d584647fc5e4c6cb401be2c2b4ab63a3efd5cef4663a37b077857191496e
6
+ sentry-cli-Windows-i686.exe=43e44eb88462d0bc8c3eb9f1bceb1e94ada25b6d4dddc06b66dcb81860a78af7
7
+ sentry-cli-Windows-x86_64.exe=3e468f56865bfa4dea45b5a113f7399f2514fc954e358aa12ca88da97407e511
package/js/helper.d.ts ADDED
@@ -0,0 +1,123 @@
1
+ /**
2
+ * The javascript type of a command line option.
3
+ */
4
+ export type OptionType = "array" | "string" | "boolean" | "inverted-boolean";
5
+ /**
6
+ * Schema definition of a command line option.
7
+ */
8
+ export type OptionSchema = {
9
+ /**
10
+ * The flag of the command line option including dashes.
11
+ */
12
+ param: string;
13
+ /**
14
+ * The value type of the command line option.
15
+ */
16
+ type: OptionType;
17
+ /**
18
+ * The flag of the command line option including dashes (optional).
19
+ */
20
+ invertedParam?: string;
21
+ };
22
+ /**
23
+ * Schema definition for a command.
24
+ */
25
+ export type OptionsSchema = {
26
+ [x: string]: OptionSchema;
27
+ };
28
+ /**
29
+ * Runs `sentry-cli` with the given command line arguments.
30
+ *
31
+ * Use {@link prepareCommand} to specify the command and add arguments for command-
32
+ * specific options. For top-level options, use {@link serializeOptions} directly.
33
+ *
34
+ * The returned promise resolves with the standard output of the command invocation
35
+ * including all newlines. In order to parse this output, be sure to trim the output
36
+ * first.
37
+ *
38
+ * If the command failed to execute, the Promise rejects with the error returned by the
39
+ * CLI. This error includes a `code` property with the process exit status.
40
+ *
41
+ * @example
42
+ * const output = await execute(['--version']);
43
+ * expect(output.trim()).toBe('sentry-cli x.y.z');
44
+ *
45
+ * @param {string[]} args Command line arguments passed to `sentry-cli`.
46
+ * @param {boolean | 'rejectOnError'} live can be set to:
47
+ * - `true` to inherit stdio to display `sentry-cli` output directly.
48
+ * - `false` to not inherit stdio and return the output as a string.
49
+ * - `'rejectOnError'` to inherit stdio and reject the promise if the command
50
+ * exits with a non-zero exit code.
51
+ * @param {boolean} silent Disable stdout for silents build (CI/Webpack Stats, ...)
52
+ * @param {string} [configFile] Relative or absolute path to the configuration file.
53
+ * @param {import('./index').SentryCliOptions} [config] More configuration to pass to the CLI
54
+ * @returns {Promise<string>} A promise that resolves to the standard output.
55
+ */
56
+ export function execute(args: string[], live: boolean | "rejectOnError", silent: boolean, configFile?: string, config?: import("./index").SentryCliOptions): Promise<string>;
57
+ /**
58
+ * Returns the absolute path to the `sentry-cli` binary.
59
+ * @returns {string}
60
+ */
61
+ export function getPath(): string;
62
+ export function getProjectFlagsFromOptions({ projects }?: {
63
+ projects?: any[];
64
+ }): any;
65
+ /**
66
+ * Overrides the default binary path with a mock value, useful for testing.
67
+ *
68
+ * @param {string} mockPath The new path to the mock sentry-cli binary
69
+ * @deprecated This was used in tests internally and will be removed in the next major version.
70
+ */
71
+ export function mockBinaryPath(mockPath: string): void;
72
+ /**
73
+ * Serializes the command and its options into an arguments array.
74
+ *
75
+ * @param {string[]} command The literal name of the command.
76
+ * @param {OptionsSchema} [schema] An options schema required by the command.
77
+ * @param {object} [options] An options object according to the schema.
78
+ * @returns {string[]} An arguments array that can be passed via command line.
79
+ */
80
+ export function prepareCommand(command: string[], schema?: OptionsSchema, options?: object): string[];
81
+ /**
82
+ * The javascript type of a command line option.
83
+ * @typedef {'array'|'string'|'boolean'|'inverted-boolean'} OptionType
84
+ */
85
+ /**
86
+ * Schema definition of a command line option.
87
+ * @typedef {object} OptionSchema
88
+ * @prop {string} param The flag of the command line option including dashes.
89
+ * @prop {OptionType} type The value type of the command line option.
90
+ * @prop {string} [invertedParam] The flag of the command line option including dashes (optional).
91
+ */
92
+ /**
93
+ * Schema definition for a command.
94
+ * @typedef {Object.<string, OptionSchema>} OptionsSchema
95
+ */
96
+ /**
97
+ * Serializes command line options into an arguments array.
98
+ *
99
+ * @param {OptionsSchema} schema An options schema required by the command.
100
+ * @param {object} options An options object according to the schema.
101
+ * @returns {string[]} An arguments array that can be passed via command line.
102
+ */
103
+ export function serializeOptions(schema: OptionsSchema, options: object): string[];
104
+ export function getDistributionForThisPlatform(): {
105
+ packageName: string;
106
+ subpath: string;
107
+ };
108
+ /**
109
+ * Throws an error with a message stating that Sentry CLI doesn't support the current platform.
110
+ *
111
+ * @returns {never} nothing. It throws.
112
+ */
113
+ export function throwUnsupportedPlatformError(): never;
114
+ /**
115
+ * This convoluted function resolves the path to the manually downloaded fallback
116
+ * `sentry-cli` binary in a way that can't be analysed by @vercel/nft.
117
+ *
118
+ * Without this, the binary can be detected as an asset and included by bundlers
119
+ * that use @vercel/nft.
120
+ *
121
+ * @returns {string} The path to the sentry-cli binary
122
+ */
123
+ export function getFallbackBinaryPath(): string;