@databricks/sdk-core 0.1.0-dev.6 → 0.1.0-dev.7
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/dist/apierror/apierror.d.ts +3 -2
- package/dist/apierror/apierror.d.ts.map +1 -1
- package/dist/apierror/apierror.js +18 -59
- package/dist/apierror/apierror.js.map +1 -1
- package/dist/apierror/codes/codes.d.ts +25 -47
- package/dist/apierror/codes/codes.d.ts.map +1 -1
- package/dist/apierror/codes/codes.js +25 -74
- package/dist/apierror/codes/codes.js.map +1 -1
- package/dist/apierror/codes/index.d.ts +1 -1
- package/dist/apierror/codes/index.d.ts.map +1 -1
- package/dist/apierror/codes/index.js +1 -1
- package/dist/apierror/codes/index.js.map +1 -1
- package/dist/profiles/errors.d.ts +1 -1
- package/dist/profiles/errors.d.ts.map +1 -1
- package/dist/profiles/errors.js.map +1 -1
- package/dist/profiles/index.browser.d.ts +1 -1
- package/dist/profiles/index.d.ts +1 -1
- package/dist/profiles/profile.d.ts +20 -20
- package/dist/profiles/profile.d.ts.map +1 -1
- package/dist/profiles/resolve.d.ts +8 -7
- package/dist/profiles/resolve.d.ts.map +1 -1
- package/dist/profiles/resolve.js +14 -12
- package/dist/profiles/resolve.js.map +1 -1
- package/package.json +1 -1
|
@@ -11,7 +11,9 @@ interface ApiErrorOptions {
|
|
|
11
11
|
}
|
|
12
12
|
/** ApiError is a transport-agnostic error representing a Databricks API error. */
|
|
13
13
|
export declare class ApiError extends Error {
|
|
14
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* The error code of the error.
|
|
16
|
+
*/
|
|
15
17
|
readonly code: Code;
|
|
16
18
|
/**
|
|
17
19
|
* The structured error details of the error. This is left empty if the
|
|
@@ -48,6 +50,5 @@ export declare class ApiError extends Error {
|
|
|
48
50
|
*/
|
|
49
51
|
static fromHttpError(statusCode: number, header: Headers | undefined, body: Uint8Array | undefined): ApiError | undefined;
|
|
50
52
|
}
|
|
51
|
-
export declare function toCode(httpCode: number): Code;
|
|
52
53
|
export {};
|
|
53
54
|
//# sourceMappingURL=apierror.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apierror.d.ts","sourceRoot":"","sources":["../../src/apierror/apierror.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"apierror.d.ts","sourceRoot":"","sources":["../../src/apierror/apierror.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,IAAI,EAAC,MAAM,SAAS,CAAC;AAC7B,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,WAAW,CAAC;AA8B5C,UAAU,eAAe;IACvB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,YAAY,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,QAAQ,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAClC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,kFAAkF;AAClF,qBAAa,QAAS,SAAQ,KAAK;IACjC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IAEpB;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAG/B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAIvB;IAEF;;;;;;OAMG;gBACS,OAAO,EAAE,eAAe;IAcpC;;;OAGG;IACH,IAAI,cAAc,IAAI,MAAM,CAK3B;IAED;;;OAGG;IACH,IAAI,UAAU,IAAI,OAAO,GAAG,SAAS,CAKpC;IAED;;;OAGG;IACH,IAAI,QAAQ,IAAI,UAAU,GAAG,SAAS,CAKrC;IAED;;;OAGG;IACH,MAAM,CAAC,aAAa,CAClB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,OAAO,GAAG,SAAS,EAC3B,IAAI,EAAE,UAAU,GAAG,SAAS,GAC3B,QAAQ,GAAG,SAAS;CAqFxB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { Code
|
|
2
|
+
import { Code } from './codes';
|
|
3
3
|
import { parseErrorDetails } from './details';
|
|
4
4
|
// Reusable schema fragment for nullish string fields.
|
|
5
5
|
const nullishString = z
|
|
@@ -27,7 +27,9 @@ const errorResponseSchema = z.object({
|
|
|
27
27
|
});
|
|
28
28
|
/** ApiError is a transport-agnostic error representing a Databricks API error. */
|
|
29
29
|
export class ApiError extends Error {
|
|
30
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* The error code of the error.
|
|
32
|
+
*/
|
|
31
33
|
code;
|
|
32
34
|
/**
|
|
33
35
|
* The structured error details of the error. This is left empty if the
|
|
@@ -97,7 +99,7 @@ export class ApiError extends Error {
|
|
|
97
99
|
const emptyDetails = { unknownDetails: [] };
|
|
98
100
|
if (body === undefined || body.length === 0) {
|
|
99
101
|
return new ApiError({
|
|
100
|
-
code:
|
|
102
|
+
code: Code.UNKNOWN,
|
|
101
103
|
message: '',
|
|
102
104
|
details: emptyDetails,
|
|
103
105
|
httpStatusCode: statusCode,
|
|
@@ -115,7 +117,7 @@ export class ApiError extends Error {
|
|
|
115
117
|
// error does not come directly from a Databricks API. A typical example
|
|
116
118
|
// is when the error is returned by a proxy.
|
|
117
119
|
return new ApiError({
|
|
118
|
-
code:
|
|
120
|
+
code: Code.UNKNOWN,
|
|
119
121
|
message: '',
|
|
120
122
|
details: emptyDetails,
|
|
121
123
|
httpStatusCode: statusCode,
|
|
@@ -127,7 +129,7 @@ export class ApiError extends Error {
|
|
|
127
129
|
const result = errorResponseSchema.safeParse(parsed);
|
|
128
130
|
if (!result.success) {
|
|
129
131
|
return new ApiError({
|
|
130
|
-
code:
|
|
132
|
+
code: Code.UNKNOWN,
|
|
131
133
|
message: '',
|
|
132
134
|
details: emptyDetails,
|
|
133
135
|
httpStatusCode: statusCode,
|
|
@@ -137,16 +139,16 @@ export class ApiError extends Error {
|
|
|
137
139
|
});
|
|
138
140
|
}
|
|
139
141
|
const errResp = result.data;
|
|
140
|
-
//
|
|
141
|
-
//
|
|
142
|
-
//
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
142
|
+
// code carries the error_code string verbatim: a canonical code (e.g.
|
|
143
|
+
// "NOT_FOUND") matches a named Code member, while a Databricks
|
|
144
|
+
// product-specific code (e.g. "CATALOG_DOES_NOT_EXIST") is an open Code
|
|
145
|
+
// value. It is Code.UNKNOWN when the response carries no string error_code
|
|
146
|
+
// (missing or an integer); the HTTP status is never used to infer a code,
|
|
147
|
+
// since it may not reflect the true error semantic, so callers fall back to
|
|
148
|
+
// httpStatusCode.
|
|
149
|
+
const code = typeof errResp.error_code === 'string' && errResp.error_code !== ''
|
|
150
|
+
? errResp.error_code
|
|
151
|
+
: Code.UNKNOWN;
|
|
150
152
|
// Determine the error message from available fields.
|
|
151
153
|
let errorMessage = '';
|
|
152
154
|
if (errResp.message !== '') {
|
|
@@ -162,7 +164,7 @@ export class ApiError extends Error {
|
|
|
162
164
|
errorMessage = errResp.scimType;
|
|
163
165
|
}
|
|
164
166
|
return new ApiError({
|
|
165
|
-
code
|
|
167
|
+
code,
|
|
166
168
|
message: errorMessage,
|
|
167
169
|
details: parseErrorDetails(errResp.details),
|
|
168
170
|
httpStatusCode: statusCode,
|
|
@@ -171,47 +173,4 @@ export class ApiError extends Error {
|
|
|
171
173
|
});
|
|
172
174
|
}
|
|
173
175
|
}
|
|
174
|
-
// Maps an HTTP status code to the closest canonical error code.
|
|
175
|
-
export function toCode(httpCode) {
|
|
176
|
-
// Canonical mappings.
|
|
177
|
-
switch (httpCode) {
|
|
178
|
-
case 200:
|
|
179
|
-
return Code.OK;
|
|
180
|
-
case 400:
|
|
181
|
-
return Code.INVALID_ARGUMENT;
|
|
182
|
-
case 401:
|
|
183
|
-
return Code.UNAUTHENTICATED;
|
|
184
|
-
case 403:
|
|
185
|
-
return Code.PERMISSION_DENIED;
|
|
186
|
-
case 404:
|
|
187
|
-
return Code.NOT_FOUND;
|
|
188
|
-
case 409:
|
|
189
|
-
return Code.ABORTED;
|
|
190
|
-
case 416:
|
|
191
|
-
return Code.OUT_OF_RANGE;
|
|
192
|
-
case 429:
|
|
193
|
-
return Code.RESOURCE_EXHAUSTED;
|
|
194
|
-
case 501:
|
|
195
|
-
return Code.UNIMPLEMENTED;
|
|
196
|
-
case 503:
|
|
197
|
-
return Code.UNAVAILABLE;
|
|
198
|
-
case 504:
|
|
199
|
-
return Code.DEADLINE_EXCEEDED;
|
|
200
|
-
default:
|
|
201
|
-
break;
|
|
202
|
-
}
|
|
203
|
-
// Fallback for status codes without a direct canonical mapping.
|
|
204
|
-
if (httpCode >= 200 && httpCode < 300) {
|
|
205
|
-
return Code.OK;
|
|
206
|
-
}
|
|
207
|
-
if (httpCode >= 400 && httpCode < 500) {
|
|
208
|
-
// Most non-canonical 4xx status codes are state related and map
|
|
209
|
-
// to the definition of FailedPrecondition.
|
|
210
|
-
return Code.FAILED_PRECONDITION;
|
|
211
|
-
}
|
|
212
|
-
if (httpCode >= 500 && httpCode < 600) {
|
|
213
|
-
return Code.INTERNAL;
|
|
214
|
-
}
|
|
215
|
-
return Code.UNKNOWN;
|
|
216
|
-
}
|
|
217
176
|
//# sourceMappingURL=apierror.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apierror.js","sourceRoot":"","sources":["../../src/apierror/apierror.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"apierror.js","sourceRoot":"","sources":["../../src/apierror/apierror.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAC,IAAI,EAAC,M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AAU;YACpB,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;QAEnB,qDAAqD;QACrD,IAAI,YAAY,GAAG,EAAE,CAAC;QACtB,IAAI,OAAO,CAAC,OAAO,KAAK,EAAE,EAAE,CAAC;YAC3B,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC;QACjC,CAAC;aAAM,IAAI,OAAO,CAAC,KAAK,KAAK,EAAE,EAAE,CAAC;YAChC,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC;QAC/B,CAAC;aAAM,IAAI,OAAO,CAAC,MAAM,KAAK,EAAE,EAAE,CAAC;YACjC,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;QAChC,CAAC;aAAM,IAAI,OAAO,CAAC,QAAQ,KAAK,EAAE,EAAE,CAAC;YACnC,YAAY,GAAG,OAAO,CAAC,QAAQ,CAAC;QAClC,CAAC;QAED,OAAO,IAAI,QAAQ,CAAC;YAClB,IAAI;YACJ,OAAO,EAAE,YAAY;YACrB,OAAO,EAAE,iBAAiB,CAAC,OAAO,CAAC,OAAO,CAAC;YAC3C,cAAc,EAAE,UAAU;YAC1B,UAAU,EAAE,MAAM;YAClB,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* @packageDocumentation
|
|
2
|
+
* Code is the error code carried by an API error.
|
|
5
3
|
*/
|
|
6
|
-
|
|
7
|
-
* Code is a numeric code for an error.
|
|
8
|
-
*
|
|
9
|
-
* The numeric values are stable and can be relied upon across SDK versions.
|
|
10
|
-
*/
|
|
11
|
-
declare enum Code {
|
|
4
|
+
export declare const Code: {
|
|
12
5
|
/**
|
|
13
|
-
* Unknown indicates an error that cannot be classified.
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* using an error code that cannot be mapped to a code in this package.
|
|
6
|
+
* Unknown indicates an error that cannot be classified. It is used for
|
|
7
|
+
* malformed error responses and for responses that carry no string error
|
|
8
|
+
* code (missing or an integer).
|
|
17
9
|
*/
|
|
18
|
-
UNKNOWN
|
|
10
|
+
readonly UNKNOWN: "UNKNOWN";
|
|
19
11
|
/** OK indicates the operation completed successfully. */
|
|
20
|
-
OK
|
|
21
|
-
/**
|
|
22
|
-
|
|
12
|
+
readonly OK: "OK";
|
|
13
|
+
/** Cancelled indicates the operation was cancelled (typically by the caller). */
|
|
14
|
+
readonly CANCELLED: "CANCELLED";
|
|
23
15
|
/**
|
|
24
16
|
* InvalidArgument indicates the client specified an invalid argument.
|
|
25
17
|
*
|
|
@@ -27,7 +19,7 @@ declare enum Code {
|
|
|
27
19
|
* that are problematic regardless of the state of the system. For example,
|
|
28
20
|
* a malformed request parameter.
|
|
29
21
|
*/
|
|
30
|
-
INVALID_ARGUMENT
|
|
22
|
+
readonly INVALID_ARGUMENT: "INVALID_ARGUMENT";
|
|
31
23
|
/**
|
|
32
24
|
* DeadlineExceeded means the operation expired before completion.
|
|
33
25
|
*
|
|
@@ -36,17 +28,17 @@ declare enum Code {
|
|
|
36
28
|
* example, a successful response from a server could have been delayed
|
|
37
29
|
* long enough for the deadline to expire.
|
|
38
30
|
*/
|
|
39
|
-
DEADLINE_EXCEEDED
|
|
31
|
+
readonly DEADLINE_EXCEEDED: "DEADLINE_EXCEEDED";
|
|
40
32
|
/**
|
|
41
33
|
* NotFound means a requested entity (e.g. a resource or a file) was
|
|
42
34
|
* not found.
|
|
43
35
|
*/
|
|
44
|
-
NOT_FOUND
|
|
36
|
+
readonly NOT_FOUND: "NOT_FOUND";
|
|
45
37
|
/**
|
|
46
38
|
* AlreadyExists means an attempt to create an entity failed because one
|
|
47
39
|
* already exists.
|
|
48
40
|
*/
|
|
49
|
-
ALREADY_EXISTS
|
|
41
|
+
readonly ALREADY_EXISTS: "ALREADY_EXISTS";
|
|
50
42
|
/**
|
|
51
43
|
* PermissionDenied indicates the caller does not have permission to
|
|
52
44
|
* execute the specified operation.
|
|
@@ -55,25 +47,25 @@ declare enum Code {
|
|
|
55
47
|
* some resource (e.g. too many requests) which is a ResourceExhausted
|
|
56
48
|
* error.
|
|
57
49
|
*/
|
|
58
|
-
PERMISSION_DENIED
|
|
50
|
+
readonly PERMISSION_DENIED: "PERMISSION_DENIED";
|
|
59
51
|
/**
|
|
60
52
|
* ResourceExhausted indicates some resource has been exhausted, perhaps
|
|
61
53
|
* a per-user quota, or perhaps the entire file system is out of space.
|
|
62
54
|
*/
|
|
63
|
-
RESOURCE_EXHAUSTED
|
|
55
|
+
readonly RESOURCE_EXHAUSTED: "RESOURCE_EXHAUSTED";
|
|
64
56
|
/**
|
|
65
57
|
* FailedPrecondition indicates the operation was rejected because the
|
|
66
58
|
* system is not in a state required for the operation's execution.
|
|
67
59
|
* For example, directory to be deleted may be non-empty, an rmdir
|
|
68
60
|
* operation is applied to a non-directory, etc.
|
|
69
61
|
*/
|
|
70
|
-
FAILED_PRECONDITION
|
|
62
|
+
readonly FAILED_PRECONDITION: "FAILED_PRECONDITION";
|
|
71
63
|
/**
|
|
72
64
|
* Aborted indicates the operation was aborted, typically due to a
|
|
73
65
|
* concurrency issue like sequencer check failures, transaction aborts,
|
|
74
66
|
* etc.
|
|
75
67
|
*/
|
|
76
|
-
ABORTED
|
|
68
|
+
readonly ABORTED: "ABORTED";
|
|
77
69
|
/**
|
|
78
70
|
* OutOfRange means the operation was attempted past the valid range.
|
|
79
71
|
* E.g., seeking or reading past end of file.
|
|
@@ -91,18 +83,18 @@ declare enum Code {
|
|
|
91
83
|
* a space can easily look for an OutOfRange error to detect when
|
|
92
84
|
* they are done.
|
|
93
85
|
*/
|
|
94
|
-
OUT_OF_RANGE
|
|
86
|
+
readonly OUT_OF_RANGE: "OUT_OF_RANGE";
|
|
95
87
|
/**
|
|
96
88
|
* Unimplemented indicates the operation is not implemented or not
|
|
97
89
|
* supported/enabled in this service.
|
|
98
90
|
*/
|
|
99
|
-
UNIMPLEMENTED
|
|
91
|
+
readonly UNIMPLEMENTED: "UNIMPLEMENTED";
|
|
100
92
|
/**
|
|
101
93
|
* Internal indicates an internal error. This means some invariants
|
|
102
94
|
* expected by the underlying system have been broken. If you see
|
|
103
95
|
* this error, something is very broken.
|
|
104
96
|
*/
|
|
105
|
-
INTERNAL
|
|
97
|
+
readonly INTERNAL: "INTERNAL";
|
|
106
98
|
/**
|
|
107
99
|
* Unavailable indicates the service is currently unavailable.
|
|
108
100
|
*
|
|
@@ -113,28 +105,14 @@ declare enum Code {
|
|
|
113
105
|
* The Databricks SDK will generally automatically retry the request
|
|
114
106
|
* with a backoff when encountering this error.
|
|
115
107
|
*/
|
|
116
|
-
UNAVAILABLE
|
|
108
|
+
readonly UNAVAILABLE: "UNAVAILABLE";
|
|
117
109
|
/** DataLoss indicates unrecoverable data loss or corruption. */
|
|
118
|
-
DATA_LOSS
|
|
110
|
+
readonly DATA_LOSS: "DATA_LOSS";
|
|
119
111
|
/**
|
|
120
112
|
* Unauthenticated indicates the request does not have valid
|
|
121
113
|
* authentication credentials for the operation.
|
|
122
114
|
*/
|
|
123
|
-
UNAUTHENTICATED
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
* Returns the canonical string representation of an error code.
|
|
127
|
-
*
|
|
128
|
-
* If the code is not recognized, "UNKNOWN" is returned. Note that
|
|
129
|
-
* Code.CANCELED maps to "CANCELLED" (British spelling) to match the gRPC
|
|
130
|
-
* convention.
|
|
131
|
-
*/
|
|
132
|
-
declare function codeToString(code: Code): string;
|
|
133
|
-
/**
|
|
134
|
-
* Converts a string representation of an error code to its corresponding
|
|
135
|
-
* Code value. If the string does not match any known code, Code.UNKNOWN is
|
|
136
|
-
* returned.
|
|
137
|
-
*/
|
|
138
|
-
declare function codeFromString(s: string): Code;
|
|
139
|
-
export { Code, codeToString, codeFromString };
|
|
115
|
+
readonly UNAUTHENTICATED: "UNAUTHENTICATED";
|
|
116
|
+
};
|
|
117
|
+
export type Code = (typeof Code)[keyof typeof Code] | (string & {});
|
|
140
118
|
//# sourceMappingURL=codes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codes.d.ts","sourceRoot":"","sources":["../../../src/apierror/codes/codes.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"codes.d.ts","sourceRoot":"","sources":["../../../src/apierror/codes/codes.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,IAAI;IACf;;;;OAIG;;IAGH,yDAAyD;;IAGzD,iFAAiF;;IAGjF;;;;;;OAMG;;IAGH;;;;;;;OAOG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;;;;;OAOG;;IAGH;;;OAGG;;IAGH;;;;;OAKG;;IAGH;;;;OAIG;;IAGH;;;;;;;;;;;;;;;;OAgBG;;IAGH;;;OAGG;;IAGH;;;;OAIG;;IAGH;;;;;;;;;OASG;;IAGH,gEAAgE;;IAGhE;;;OAGG;;CAEK,CAAC;AAEX,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC"}
|
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* @packageDocumentation
|
|
2
|
+
* Code is the error code carried by an API error.
|
|
5
3
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*
|
|
9
|
-
* The numeric values are stable and can be relied upon across SDK versions.
|
|
10
|
-
*/
|
|
11
|
-
var Code;
|
|
12
|
-
(function (Code) {
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
|
|
5
|
+
export const Code = {
|
|
13
6
|
/**
|
|
14
|
-
* Unknown indicates an error that cannot be classified.
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* using an error code that cannot be mapped to a code in this package.
|
|
7
|
+
* Unknown indicates an error that cannot be classified. It is used for
|
|
8
|
+
* malformed error responses and for responses that carry no string error
|
|
9
|
+
* code (missing or an integer).
|
|
18
10
|
*/
|
|
19
|
-
|
|
11
|
+
UNKNOWN: 'UNKNOWN',
|
|
20
12
|
/** OK indicates the operation completed successfully. */
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
|
|
13
|
+
OK: 'OK',
|
|
14
|
+
/** Cancelled indicates the operation was cancelled (typically by the caller). */
|
|
15
|
+
CANCELLED: 'CANCELLED',
|
|
24
16
|
/**
|
|
25
17
|
* InvalidArgument indicates the client specified an invalid argument.
|
|
26
18
|
*
|
|
@@ -28,7 +20,7 @@ var Code;
|
|
|
28
20
|
* that are problematic regardless of the state of the system. For example,
|
|
29
21
|
* a malformed request parameter.
|
|
30
22
|
*/
|
|
31
|
-
|
|
23
|
+
INVALID_ARGUMENT: 'INVALID_ARGUMENT',
|
|
32
24
|
/**
|
|
33
25
|
* DeadlineExceeded means the operation expired before completion.
|
|
34
26
|
*
|
|
@@ -37,17 +29,17 @@ var Code;
|
|
|
37
29
|
* example, a successful response from a server could have been delayed
|
|
38
30
|
* long enough for the deadline to expire.
|
|
39
31
|
*/
|
|
40
|
-
|
|
32
|
+
DEADLINE_EXCEEDED: 'DEADLINE_EXCEEDED',
|
|
41
33
|
/**
|
|
42
34
|
* NotFound means a requested entity (e.g. a resource or a file) was
|
|
43
35
|
* not found.
|
|
44
36
|
*/
|
|
45
|
-
|
|
37
|
+
NOT_FOUND: 'NOT_FOUND',
|
|
46
38
|
/**
|
|
47
39
|
* AlreadyExists means an attempt to create an entity failed because one
|
|
48
40
|
* already exists.
|
|
49
41
|
*/
|
|
50
|
-
|
|
42
|
+
ALREADY_EXISTS: 'ALREADY_EXISTS',
|
|
51
43
|
/**
|
|
52
44
|
* PermissionDenied indicates the caller does not have permission to
|
|
53
45
|
* execute the specified operation.
|
|
@@ -56,25 +48,25 @@ var Code;
|
|
|
56
48
|
* some resource (e.g. too many requests) which is a ResourceExhausted
|
|
57
49
|
* error.
|
|
58
50
|
*/
|
|
59
|
-
|
|
51
|
+
PERMISSION_DENIED: 'PERMISSION_DENIED',
|
|
60
52
|
/**
|
|
61
53
|
* ResourceExhausted indicates some resource has been exhausted, perhaps
|
|
62
54
|
* a per-user quota, or perhaps the entire file system is out of space.
|
|
63
55
|
*/
|
|
64
|
-
|
|
56
|
+
RESOURCE_EXHAUSTED: 'RESOURCE_EXHAUSTED',
|
|
65
57
|
/**
|
|
66
58
|
* FailedPrecondition indicates the operation was rejected because the
|
|
67
59
|
* system is not in a state required for the operation's execution.
|
|
68
60
|
* For example, directory to be deleted may be non-empty, an rmdir
|
|
69
61
|
* operation is applied to a non-directory, etc.
|
|
70
62
|
*/
|
|
71
|
-
|
|
63
|
+
FAILED_PRECONDITION: 'FAILED_PRECONDITION',
|
|
72
64
|
/**
|
|
73
65
|
* Aborted indicates the operation was aborted, typically due to a
|
|
74
66
|
* concurrency issue like sequencer check failures, transaction aborts,
|
|
75
67
|
* etc.
|
|
76
68
|
*/
|
|
77
|
-
|
|
69
|
+
ABORTED: 'ABORTED',
|
|
78
70
|
/**
|
|
79
71
|
* OutOfRange means the operation was attempted past the valid range.
|
|
80
72
|
* E.g., seeking or reading past end of file.
|
|
@@ -92,18 +84,18 @@ var Code;
|
|
|
92
84
|
* a space can easily look for an OutOfRange error to detect when
|
|
93
85
|
* they are done.
|
|
94
86
|
*/
|
|
95
|
-
|
|
87
|
+
OUT_OF_RANGE: 'OUT_OF_RANGE',
|
|
96
88
|
/**
|
|
97
89
|
* Unimplemented indicates the operation is not implemented or not
|
|
98
90
|
* supported/enabled in this service.
|
|
99
91
|
*/
|
|
100
|
-
|
|
92
|
+
UNIMPLEMENTED: 'UNIMPLEMENTED',
|
|
101
93
|
/**
|
|
102
94
|
* Internal indicates an internal error. This means some invariants
|
|
103
95
|
* expected by the underlying system have been broken. If you see
|
|
104
96
|
* this error, something is very broken.
|
|
105
97
|
*/
|
|
106
|
-
|
|
98
|
+
INTERNAL: 'INTERNAL',
|
|
107
99
|
/**
|
|
108
100
|
* Unavailable indicates the service is currently unavailable.
|
|
109
101
|
*
|
|
@@ -114,54 +106,13 @@ var Code;
|
|
|
114
106
|
* The Databricks SDK will generally automatically retry the request
|
|
115
107
|
* with a backoff when encountering this error.
|
|
116
108
|
*/
|
|
117
|
-
|
|
109
|
+
UNAVAILABLE: 'UNAVAILABLE',
|
|
118
110
|
/** DataLoss indicates unrecoverable data loss or corruption. */
|
|
119
|
-
|
|
111
|
+
DATA_LOSS: 'DATA_LOSS',
|
|
120
112
|
/**
|
|
121
113
|
* Unauthenticated indicates the request does not have valid
|
|
122
114
|
* authentication credentials for the operation.
|
|
123
115
|
*/
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
// Maps Code values to their canonical string representation.
|
|
127
|
-
const CODE_TO_STRING = new Map([
|
|
128
|
-
[Code.UNKNOWN, 'UNKNOWN'],
|
|
129
|
-
[Code.OK, 'OK'],
|
|
130
|
-
[Code.CANCELED, 'CANCELLED'],
|
|
131
|
-
[Code.INVALID_ARGUMENT, 'INVALID_ARGUMENT'],
|
|
132
|
-
[Code.DEADLINE_EXCEEDED, 'DEADLINE_EXCEEDED'],
|
|
133
|
-
[Code.NOT_FOUND, 'NOT_FOUND'],
|
|
134
|
-
[Code.ALREADY_EXISTS, 'ALREADY_EXISTS'],
|
|
135
|
-
[Code.PERMISSION_DENIED, 'PERMISSION_DENIED'],
|
|
136
|
-
[Code.RESOURCE_EXHAUSTED, 'RESOURCE_EXHAUSTED'],
|
|
137
|
-
[Code.FAILED_PRECONDITION, 'FAILED_PRECONDITION'],
|
|
138
|
-
[Code.ABORTED, 'ABORTED'],
|
|
139
|
-
[Code.OUT_OF_RANGE, 'OUT_OF_RANGE'],
|
|
140
|
-
[Code.UNIMPLEMENTED, 'UNIMPLEMENTED'],
|
|
141
|
-
[Code.INTERNAL, 'INTERNAL'],
|
|
142
|
-
[Code.UNAVAILABLE, 'UNAVAILABLE'],
|
|
143
|
-
[Code.DATA_LOSS, 'DATA_LOSS'],
|
|
144
|
-
[Code.UNAUTHENTICATED, 'UNAUTHENTICATED'],
|
|
145
|
-
]);
|
|
146
|
-
// Maps canonical strings back to Code values.
|
|
147
|
-
const STRING_TO_CODE = new Map([...CODE_TO_STRING.entries()].map(([code, str]) => [str, code]));
|
|
148
|
-
/**
|
|
149
|
-
* Returns the canonical string representation of an error code.
|
|
150
|
-
*
|
|
151
|
-
* If the code is not recognized, "UNKNOWN" is returned. Note that
|
|
152
|
-
* Code.CANCELED maps to "CANCELLED" (British spelling) to match the gRPC
|
|
153
|
-
* convention.
|
|
154
|
-
*/
|
|
155
|
-
function codeToString(code) {
|
|
156
|
-
return CODE_TO_STRING.get(code) ?? 'UNKNOWN';
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Converts a string representation of an error code to its corresponding
|
|
160
|
-
* Code value. If the string does not match any known code, Code.UNKNOWN is
|
|
161
|
-
* returned.
|
|
162
|
-
*/
|
|
163
|
-
function codeFromString(s) {
|
|
164
|
-
return STRING_TO_CODE.get(s) ?? Code.UNKNOWN;
|
|
165
|
-
}
|
|
166
|
-
export { Code, codeToString, codeFromString };
|
|
116
|
+
UNAUTHENTICATED: 'UNAUTHENTICATED',
|
|
117
|
+
};
|
|
167
118
|
//# sourceMappingURL=codes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codes.js","sourceRoot":"","sources":["../../../src/apierror/codes/codes.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"codes.js","sourceRoot":"","sources":["../../../src/apierror/codes/codes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,4FAA4F;AAC5F,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB;;;;OAIG;IACH,OAAO,EAAE,SAAS;IAElB,yDAAyD;IACzD,EAAE,EAAE,IAAI;IAER,iFAAiF;IACjF,SAAS,EAAE,WAAW;IAEtB;;;;;;OAMG;IACH,gBAAgB,EAAE,kBAAkB;IAEpC;;;;;;;OAOG;IACH,iBAAiB,EAAE,mBAAmB;IAEtC;;;OAGG;IACH,SAAS,EAAE,WAAW;IAEtB;;;OAGG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;;;;;;OAOG;IACH,iBAAiB,EAAE,mBAAmB;IAEtC;;;OAGG;IACH,kBAAkB,EAAE,oBAAoB;IAExC;;;;;OAKG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;;;OAIG;IACH,OAAO,EAAE,SAAS;IAElB;;;;;;;;;;;;;;;;OAgBG;IACH,YAAY,EAAE,cAAc;IAE5B;;;OAGG;IACH,aAAa,EAAE,eAAe;IAE9B;;;;OAIG;IACH,QAAQ,EAAE,UAAU;IAEpB;;;;;;;;;OASG;IACH,WAAW,EAAE,aAAa;IAE1B,gEAAgE;IAChE,SAAS,EAAE,WAAW;IAEtB;;;OAGG;IACH,eAAe,EAAE,iBAAiB;CAC1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/apierror/codes/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/apierror/codes/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,IAAI,EAAC,MAAM,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/apierror/codes/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/apierror/codes/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,IAAI,EAAC,MAAM,SAAS,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
6
|
/** Discriminant codes for {@link ProfileError}. */
|
|
7
|
-
export type ProfileErrorCode = 'CONFIG_FILE_NOT_FOUND' | 'PROFILE_NOT_FOUND' | 'EMPTY_PATH' | 'EMPTY_PROFILE' | 'INVALID_PROFILE_NAME';
|
|
7
|
+
export type ProfileErrorCode = 'CONFIG_FILE_NOT_FOUND' | 'PROFILE_NOT_FOUND' | 'EMPTY_PATH' | 'EMPTY_PROFILE' | 'INVALID_PROFILE_NAME' | 'CONFLICTING_OPTIONS';
|
|
8
8
|
/**
|
|
9
9
|
* Error thrown by profile operations.
|
|
10
10
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/profiles/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,mDAAmD;AACnD,MAAM,MAAM,gBAAgB,GACxB,uBAAuB,GACvB,mBAAmB,GACnB,YAAY,GACZ,eAAe,GACf,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/profiles/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,mDAAmD;AACnD,MAAM,MAAM,gBAAgB,GACxB,uBAAuB,GACvB,mBAAmB,GACnB,YAAY,GACZ,eAAe,GACf,sBAAsB,GACtB,qBAAqB,CAAC;AAE1B;;;;GAIG;AACH,qBAAa,YAAa,SAAQ,KAAK;IACrC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;gBAEpB,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM;CAKpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/profiles/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/profiles/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH;;;;GAIG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK;IAC5B,IAAI,CAAmB;IAEhC,YAAY,IAAsB,EAAE,OAAe;QACjD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF"}
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export { ProfileError } from './errors';
|
|
7
7
|
export type { ProfileErrorCode } from './errors';
|
|
8
|
-
export type { Profile,
|
|
8
|
+
export type { Profile, ProfileOptions } from './profile';
|
|
9
9
|
export { Secret } from './secret';
|
|
10
10
|
//# sourceMappingURL=index.browser.d.ts.map
|
package/dist/profiles/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export { ProfileError } from './errors';
|
|
11
11
|
export type { ProfileErrorCode } from './errors';
|
|
12
|
-
export type { Profile,
|
|
12
|
+
export type { Profile, ProfileOptions } from './profile';
|
|
13
13
|
export { defaultConfigFile, listProfiles, resolve } from './resolve';
|
|
14
14
|
export { Secret } from './secret';
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -34,36 +34,36 @@ export interface Profile {
|
|
|
34
34
|
*/
|
|
35
35
|
extra?: Record<string, string>;
|
|
36
36
|
}
|
|
37
|
-
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Configures how a profile is resolved by {@link resolve}.
|
|
39
|
+
*
|
|
40
|
+
* Resolution is enabled by default: with no options, {@link resolve} reads the
|
|
41
|
+
* config file and overlays DATABRICKS_* environment variables on top. Each
|
|
42
|
+
* source can be disabled independently with {@link ProfileOptions.noProfile}
|
|
43
|
+
* and {@link ProfileOptions.disableEnv}.
|
|
44
|
+
*/
|
|
45
|
+
export interface ProfileOptions {
|
|
45
46
|
/**
|
|
46
47
|
* Profile name (INI section) to load. If not set, resolves from the
|
|
47
48
|
* DATABRICKS_CONFIG_PROFILE environment variable, then the default_profile
|
|
48
49
|
* key in the __settings__ section, then falls back to the DEFAULT section.
|
|
49
|
-
* Setting this implies withFile: true.
|
|
50
50
|
*/
|
|
51
51
|
profile?: string;
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
* Path to the databrickscfg file. If not set, reads DATABRICKS_CONFIG_FILE
|
|
54
|
+
* from the environment, falling back to ~/.databrickscfg.
|
|
55
|
+
*/
|
|
56
|
+
configFile?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Disable reading the config file. Cannot be combined with
|
|
59
|
+
* {@link ProfileOptions.profile} or {@link ProfileOptions.configFile},
|
|
60
|
+
* which would have nothing to read.
|
|
57
61
|
*/
|
|
58
|
-
|
|
62
|
+
noProfile?: boolean;
|
|
59
63
|
/**
|
|
60
|
-
*
|
|
61
|
-
* When enabled, environment variables take precedence over file values. The
|
|
62
|
-
* default is context-dependent: a bare {@link resolve} call with no options
|
|
63
|
-
* overlays environment variables, but once any option is supplied this
|
|
64
|
-
* defaults to false unless explicitly set to true.
|
|
64
|
+
* Disable overlaying DATABRICKS_* environment variables.
|
|
65
65
|
*/
|
|
66
|
-
|
|
66
|
+
disableEnv?: boolean;
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
69
|
* Reserved INI section name for SDK settings. It is never treated as a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/profiles/profile.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAEhC;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACtB,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,yDAAyD;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAA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AAC;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,iBAAiB,CAAC;AAM/C;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,oDAAoD;IACpD,QAAQ,CAAC,KAAK,EAAE,MAAM,OAAO,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,8DAA8D;IAC9D,QAAQ,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,oEAAoE;IACpE,QAAQ,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,GAAG,SAAS,CAAC;CACxD;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,WAAW,EAyE/C,CAAC"}
|
|
@@ -3,18 +3,19 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
|
-
import type { Profile,
|
|
6
|
+
import type { Profile, ProfileOptions } from './profile';
|
|
7
7
|
/**
|
|
8
8
|
* Creates a {@link Profile} from a databrickscfg file and/or environment
|
|
9
9
|
* variables.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
11
|
+
* Both sources are read by default: the config file is loaded and DATABRICKS_*
|
|
12
|
+
* environment variables are overlaid on top (env takes precedence). This holds
|
|
13
|
+
* whether or not a specific {@link ProfileOptions.profile} or
|
|
14
|
+
* {@link ProfileOptions.configFile} is given. Disable the config file with
|
|
15
|
+
* {@link ProfileOptions.noProfile} and the environment overlay with
|
|
16
|
+
* {@link ProfileOptions.disableEnv}.
|
|
16
17
|
*/
|
|
17
|
-
export declare function resolve(options?:
|
|
18
|
+
export declare function resolve(options?: ProfileOptions): Promise<Profile>;
|
|
18
19
|
/**
|
|
19
20
|
* Returns the path to the default databrickscfg file. Reads
|
|
20
21
|
* DATABRICKS_CONFIG_FILE from the environment, falling back to
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/profiles/resolve.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,KAAK,EAAC,OAAO,EAAE,cAAc,EAAC,MAAM,WAAW,CAAC;AA8JvD
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/profiles/resolve.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,KAAK,EAAC,OAAO,EAAE,cAAc,EAAC,MAAM,WAAW,CAAC;AA8JvD;;;;;;;;;;GAUG;AACH,wBAAsB,OAAO,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CA0BxE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAM1C;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA8BlE"}
|
package/dist/profiles/resolve.js
CHANGED
|
@@ -142,26 +142,28 @@ function loadEnv() {
|
|
|
142
142
|
* Creates a {@link Profile} from a databrickscfg file and/or environment
|
|
143
143
|
* variables.
|
|
144
144
|
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
145
|
+
* Both sources are read by default: the config file is loaded and DATABRICKS_*
|
|
146
|
+
* environment variables are overlaid on top (env takes precedence). This holds
|
|
147
|
+
* whether or not a specific {@link ProfileOptions.profile} or
|
|
148
|
+
* {@link ProfileOptions.configFile} is given. Disable the config file with
|
|
149
|
+
* {@link ProfileOptions.noProfile} and the environment overlay with
|
|
150
|
+
* {@link ProfileOptions.disableEnv}.
|
|
150
151
|
*/
|
|
151
152
|
export async function resolve(options) {
|
|
152
|
-
if (options?.
|
|
153
|
+
if (options?.configFile === '') {
|
|
153
154
|
throw new ProfileError('EMPTY_PATH', 'empty path');
|
|
154
155
|
}
|
|
155
156
|
if (options?.profile === '') {
|
|
156
157
|
throw new ProfileError('EMPTY_PROFILE', 'empty profile');
|
|
157
158
|
}
|
|
158
|
-
|
|
159
|
-
options.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
const
|
|
159
|
+
if (options?.noProfile === true &&
|
|
160
|
+
(options.profile !== undefined || options.configFile !== undefined)) {
|
|
161
|
+
throw new ProfileError('CONFLICTING_OPTIONS', 'noProfile cannot be combined with profile or configFile');
|
|
162
|
+
}
|
|
163
|
+
const shouldReadFile = options?.noProfile !== true;
|
|
164
|
+
const shouldReadEnv = options?.disableEnv !== true;
|
|
163
165
|
const fileProfile = shouldReadFile
|
|
164
|
-
? await loadFile(options?.
|
|
166
|
+
? await loadFile(options?.configFile, options?.profile)
|
|
165
167
|
: {};
|
|
166
168
|
const envProfile = shouldReadEnv ? loadEnv() : {};
|
|
167
169
|
return { ...fileProfile, ...envProfile };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../src/profiles/resolve.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAC,OAAO,EAAC,MAAM,SAAS,CAAC;AAChC,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAE/B,OAAO,EAAC,YAAY,EAAC,MAAM,UAAU,CAAC;AACtC,OAAO,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,aAAa,EAAE,gBAAgB,EAAC,MAAM,WAAW,CAAC;AAE1D;;;;;;;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