azure-pipelines-task-lib 4.0.1-preview → 4.1.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/LICENSE CHANGED
@@ -1,22 +1,22 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) Microsoft Corporation. All rights reserved.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
package/internal.d.ts CHANGED
@@ -1,130 +1,130 @@
1
- import vm = require('./vault');
2
- /**
3
- * Hash table of known variable info. The formatted env var name is the lookup key.
4
- *
5
- * The purpose of this hash table is to keep track of known variables. The hash table
6
- * needs to be maintained for multiple reasons:
7
- * 1) to distinguish between env vars and job vars
8
- * 2) to distinguish between secret vars and public
9
- * 3) to know the real variable name and not just the formatted env var name.
10
- */
11
- export declare var _knownVariableMap: {
12
- [key: string]: _KnownVariableInfo;
13
- };
14
- export declare var _vault: vm.Vault;
15
- export declare function _startsWith(str: string, start: string): boolean;
16
- export declare function _endsWith(str: string, end: string): boolean;
17
- export declare function _writeLine(str: string): void;
18
- export declare function _setStdStream(stdStream: any): void;
19
- export declare function _setErrStream(errStream: any): void;
20
- /**
21
- * Sets the location of the resources json. This is typically the task.json file.
22
- * Call once at the beginning of the script before any calls to loc.
23
- * @param path Full path to the json.
24
- * @param ignoreWarnings Won't throw warnings if path already set.
25
- * @returns void
26
- */
27
- export declare function _setResourcePath(path: string, ignoreWarnings?: boolean): void;
28
- /**
29
- * Gets the localized string from the json resource file. Optionally formats with additional params.
30
- *
31
- * @param key key of the resources string in the resource file
32
- * @param param additional params for formatting the string
33
- * @returns string
34
- */
35
- export declare function _loc(key: string, ...param: any[]): string;
36
- /**
37
- * Gets a variable value that is defined on the build/release definition or set at runtime.
38
- *
39
- * @param name name of the variable to get
40
- * @returns string
41
- */
42
- export declare function _getVariable(name: string): string | undefined;
43
- export declare function _getVariableKey(name: string): string;
44
- /**
45
- * Used to store the following information about job variables:
46
- * 1) the real variable name (not the formatted environment variable name)
47
- * 2) whether the variable is a secret variable
48
- */
49
- export interface _KnownVariableInfo {
50
- name: string;
51
- secret: boolean;
52
- }
53
- export declare function _command(command: string, properties: any, message: string): void;
54
- export declare function _warning(message: string): void;
55
- export declare function _error(message: string): void;
56
- export declare function _debug(message: string): void;
57
- /**
58
- * Returns whether a path exists.
59
- *
60
- * @param path path to check
61
- * @returns boolean
62
- */
63
- export declare function _exist(path: string): boolean;
64
- /**
65
- * Checks whether a path exists.
66
- * If the path does not exist, it will throw.
67
- *
68
- * @param p path to check
69
- * @param name name only used in error message to identify the path
70
- * @returns void
71
- */
72
- export declare function _checkPath(p: string, name: string): void;
73
- /**
74
- * Returns path of a tool had the tool actually been invoked. Resolves via paths.
75
- * If you check and the tool does not exist, it will throw.
76
- *
77
- * @param tool name of the tool
78
- * @param check whether to check if tool exists
79
- * @returns string
80
- */
81
- export declare function _which(tool: string, check?: boolean): string;
82
- export declare function _legacyFindFiles_convertPatternToRegExp(pattern: string): RegExp;
83
- export interface _MatchOptions {
84
- debug?: boolean;
85
- nobrace?: boolean;
86
- noglobstar?: boolean;
87
- dot?: boolean;
88
- noext?: boolean;
89
- nocase?: boolean;
90
- nonull?: boolean;
91
- matchBase?: boolean;
92
- nocomment?: boolean;
93
- nonegate?: boolean;
94
- flipNegate?: boolean;
95
- }
96
- export declare function _cloneMatchOptions(matchOptions: _MatchOptions): _MatchOptions;
97
- export interface _PatternFindInfo {
98
- /** Adjusted pattern to use. Unrooted patterns are typically rooted using the default info, although this is not true for match-base scenarios. */
99
- adjustedPattern: string;
100
- /** Path interpreted from the pattern to call find() on. */
101
- findPath: string;
102
- /** Indicates whether to call stat() or find(). When all path segemnts in the pattern are literal, there is no need to call find(). */
103
- statOnly: boolean;
104
- }
105
- export declare function _getFindInfoFromPattern(defaultRoot: string, pattern: string, matchOptions: _MatchOptions): _PatternFindInfo;
106
- export declare function _ensurePatternRooted(root: string, p: string): string;
107
- export declare function _loadData(): void;
108
- /**
109
- * Defines if path is unc-path.
110
- *
111
- * @param path a path to a file.
112
- * @returns true if path starts with double backslash, otherwise returns false.
113
- */
114
- export declare function _isUncPath(path: string): boolean;
115
- export declare function _ensureRooted(root: string, p: string): string;
116
- /**
117
- * Determines the parent path and trims trailing slashes (when safe). Path separators are normalized
118
- * in the result. This function works similar to the .NET System.IO.Path.GetDirectoryName() method.
119
- * For example, C:\hello\world\ returns C:\hello\world (trailing slash removed). Returns empty when
120
- * no higher directory can be determined.
121
- */
122
- export declare function _getDirectoryName(p: string): string;
123
- /**
124
- * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like:
125
- * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases).
126
- */
127
- export declare function _isRooted(p: string): boolean;
128
- export declare function _normalizeSeparators(p: string): string;
129
- export declare function _exposeProxySettings(): void;
130
- export declare function _exposeCertSettings(): void;
1
+ import vm = require('./vault');
2
+ /**
3
+ * Hash table of known variable info. The formatted env var name is the lookup key.
4
+ *
5
+ * The purpose of this hash table is to keep track of known variables. The hash table
6
+ * needs to be maintained for multiple reasons:
7
+ * 1) to distinguish between env vars and job vars
8
+ * 2) to distinguish between secret vars and public
9
+ * 3) to know the real variable name and not just the formatted env var name.
10
+ */
11
+ export declare var _knownVariableMap: {
12
+ [key: string]: _KnownVariableInfo;
13
+ };
14
+ export declare var _vault: vm.Vault;
15
+ export declare function _startsWith(str: string, start: string): boolean;
16
+ export declare function _endsWith(str: string, end: string): boolean;
17
+ export declare function _writeLine(str: string): void;
18
+ export declare function _setStdStream(stdStream: any): void;
19
+ export declare function _setErrStream(errStream: any): void;
20
+ /**
21
+ * Sets the location of the resources json. This is typically the task.json file.
22
+ * Call once at the beginning of the script before any calls to loc.
23
+ * @param path Full path to the json.
24
+ * @param ignoreWarnings Won't throw warnings if path already set.
25
+ * @returns void
26
+ */
27
+ export declare function _setResourcePath(path: string, ignoreWarnings?: boolean): void;
28
+ /**
29
+ * Gets the localized string from the json resource file. Optionally formats with additional params.
30
+ *
31
+ * @param key key of the resources string in the resource file
32
+ * @param param additional params for formatting the string
33
+ * @returns string
34
+ */
35
+ export declare function _loc(key: string, ...param: any[]): string;
36
+ /**
37
+ * Gets a variable value that is defined on the build/release definition or set at runtime.
38
+ *
39
+ * @param name name of the variable to get
40
+ * @returns string
41
+ */
42
+ export declare function _getVariable(name: string): string | undefined;
43
+ export declare function _getVariableKey(name: string): string;
44
+ /**
45
+ * Used to store the following information about job variables:
46
+ * 1) the real variable name (not the formatted environment variable name)
47
+ * 2) whether the variable is a secret variable
48
+ */
49
+ export interface _KnownVariableInfo {
50
+ name: string;
51
+ secret: boolean;
52
+ }
53
+ export declare function _command(command: string, properties: any, message: string): void;
54
+ export declare function _warning(message: string): void;
55
+ export declare function _error(message: string): void;
56
+ export declare function _debug(message: string): void;
57
+ /**
58
+ * Returns whether a path exists.
59
+ *
60
+ * @param path path to check
61
+ * @returns boolean
62
+ */
63
+ export declare function _exist(path: string): boolean;
64
+ /**
65
+ * Checks whether a path exists.
66
+ * If the path does not exist, it will throw.
67
+ *
68
+ * @param p path to check
69
+ * @param name name only used in error message to identify the path
70
+ * @returns void
71
+ */
72
+ export declare function _checkPath(p: string, name: string): void;
73
+ /**
74
+ * Returns path of a tool had the tool actually been invoked. Resolves via paths.
75
+ * If you check and the tool does not exist, it will throw.
76
+ *
77
+ * @param tool name of the tool
78
+ * @param check whether to check if tool exists
79
+ * @returns string
80
+ */
81
+ export declare function _which(tool: string, check?: boolean): string;
82
+ export declare function _legacyFindFiles_convertPatternToRegExp(pattern: string): RegExp;
83
+ export interface _MatchOptions {
84
+ debug?: boolean;
85
+ nobrace?: boolean;
86
+ noglobstar?: boolean;
87
+ dot?: boolean;
88
+ noext?: boolean;
89
+ nocase?: boolean;
90
+ nonull?: boolean;
91
+ matchBase?: boolean;
92
+ nocomment?: boolean;
93
+ nonegate?: boolean;
94
+ flipNegate?: boolean;
95
+ }
96
+ export declare function _cloneMatchOptions(matchOptions: _MatchOptions): _MatchOptions;
97
+ export interface _PatternFindInfo {
98
+ /** Adjusted pattern to use. Unrooted patterns are typically rooted using the default info, although this is not true for match-base scenarios. */
99
+ adjustedPattern: string;
100
+ /** Path interpreted from the pattern to call find() on. */
101
+ findPath: string;
102
+ /** Indicates whether to call stat() or find(). When all path segemnts in the pattern are literal, there is no need to call find(). */
103
+ statOnly: boolean;
104
+ }
105
+ export declare function _getFindInfoFromPattern(defaultRoot: string, pattern: string, matchOptions: _MatchOptions): _PatternFindInfo;
106
+ export declare function _ensurePatternRooted(root: string, p: string): string;
107
+ export declare function _loadData(): void;
108
+ /**
109
+ * Defines if path is unc-path.
110
+ *
111
+ * @param path a path to a file.
112
+ * @returns true if path starts with double backslash, otherwise returns false.
113
+ */
114
+ export declare function _isUncPath(path: string): boolean;
115
+ export declare function _ensureRooted(root: string, p: string): string;
116
+ /**
117
+ * Determines the parent path and trims trailing slashes (when safe). Path separators are normalized
118
+ * in the result. This function works similar to the .NET System.IO.Path.GetDirectoryName() method.
119
+ * For example, C:\hello\world\ returns C:\hello\world (trailing slash removed). Returns empty when
120
+ * no higher directory can be determined.
121
+ */
122
+ export declare function _getDirectoryName(p: string): string;
123
+ /**
124
+ * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like:
125
+ * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases).
126
+ */
127
+ export declare function _isRooted(p: string): boolean;
128
+ export declare function _normalizeSeparators(p: string): string;
129
+ export declare function _exposeProxySettings(): void;
130
+ export declare function _exposeCertSettings(): void;