@dereekb/dbx-cli 13.23.0 → 13.24.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/eslint/index.cjs.js +2 -0
- package/eslint/index.esm.js +2 -0
- package/eslint/package.json +5 -4
- package/firebase-api-manifest/package.json +3 -3
- package/generate-firestore-indexes/main.js +2 -2
- package/generate-firestore-indexes/package.json +2 -2
- package/generate-mcp-manifest/package.json +3 -3
- package/generate-route-manifest/package.json +2 -2
- package/index.cjs.js +435 -991
- package/index.esm.js +433 -987
- package/lint-cache/package.json +2 -2
- package/manifest-extract/package.json +2 -2
- package/package.json +6 -6
- package/route/package.json +7 -7
- package/src/lib/auth/oidc.client.d.ts +7 -130
- package/src/lib/auth/oidc.flow.d.ts +9 -83
- package/src/lib/mcp-scan/manifest/css-utilities-schema.d.ts +2 -2
- package/src/lib/mcp-scan/manifest/pipes-schema.d.ts +2 -2
- package/test/package.json +9 -9
package/index.esm.js
CHANGED
|
@@ -2,10 +2,11 @@ import { existsSync, mkdirSync, writeFileSync, appendFileSync } from 'node:fs';
|
|
|
2
2
|
import { join, resolve, sep, basename, relative, posix, dirname, isAbsolute } from 'node:path';
|
|
3
3
|
import { CALL_MODEL_OIDC_SCOPES, CALL_MODEL_OIDC_SCOPE_FOR_CALL_TYPE, CALL_MODEL_MISSING_OIDC_SCOPE_ERROR_CODE, CALL_MODEL_OIDC_SCOPE_PREFIX, STORAGE_FILE_UPLOAD_USER_ROLE } from '@dereekb/firebase';
|
|
4
4
|
export { CALL_MODEL_APP_FUNCTION_KEY } from '@dereekb/firebase';
|
|
5
|
-
import { performAsyncTasks, compareStrings, expirationDetails,
|
|
5
|
+
import { performAsyncTasks, compareStrings, expirationDetails, OidcRelyingPartyError, buildAuthorizationUrl as buildAuthorizationUrl$1, parseAuthorizationRedirect, noop, generateOAuthState, generatePkceMaterial, MS_IN_SECOND, buildOidcDiscoveryCandidates, AUTH_TOS_SIGNED_ROLE, AUTH_ONBOARDED_ROLE, AUTH_ADMIN_ROLE, AUTH_USER_ROLE } from '@dereekb/util';
|
|
6
6
|
import { durationDataToMilliseconds, parseDurationString } from '@dereekb/date';
|
|
7
7
|
import { readJsonFile, writeJsonFile, createMemoizedJsonFileAsyncKeyedValueCache } from '@dereekb/nestjs';
|
|
8
8
|
import { homedir } from 'node:os';
|
|
9
|
+
import { discoverOidcMetadata as discoverOidcMetadata$1, exchangeAuthorizationCode as exchangeAuthorizationCode$1, refreshAccessToken as refreshAccessToken$1, revokeToken as revokeToken$1, fetchUserInfo as fetchUserInfo$1, fetchSessionInfo as fetchSessionInfo$1 } from '@dereekb/util/oidc';
|
|
9
10
|
import { createInterface } from 'node:readline';
|
|
10
11
|
import { arktypeToJsonSchemaForExport } from '@dereekb/model';
|
|
11
12
|
import yargs from 'yargs';
|
|
@@ -16,13 +17,13 @@ import { Node, SyntaxKind, Project } from 'ts-morph';
|
|
|
16
17
|
import { fileURLToPath } from 'node:url';
|
|
17
18
|
import { normalize, join as join$1, dirname as dirname$1 } from 'node:path/posix';
|
|
18
19
|
|
|
19
|
-
function _array_like_to_array$
|
|
20
|
+
function _array_like_to_array$16(arr, len) {
|
|
20
21
|
if (len == null || len > arr.length) len = arr.length;
|
|
21
22
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
22
23
|
return arr2;
|
|
23
24
|
}
|
|
24
25
|
function _array_without_holes$$(arr) {
|
|
25
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
26
|
+
if (Array.isArray(arr)) return _array_like_to_array$16(arr);
|
|
26
27
|
}
|
|
27
28
|
function _assert_this_initialized(self) {
|
|
28
29
|
if (self === void 0) {
|
|
@@ -30,7 +31,7 @@ function _assert_this_initialized(self) {
|
|
|
30
31
|
}
|
|
31
32
|
return self;
|
|
32
33
|
}
|
|
33
|
-
function asyncGeneratorStep$
|
|
34
|
+
function asyncGeneratorStep$1e(gen, resolve, reject, _next, _throw, key, arg) {
|
|
34
35
|
try {
|
|
35
36
|
var info = gen[key](arg);
|
|
36
37
|
var value = info.value;
|
|
@@ -44,16 +45,16 @@ function asyncGeneratorStep$1f(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
44
45
|
Promise.resolve(value).then(_next, _throw);
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
|
-
function _async_to_generator$
|
|
48
|
+
function _async_to_generator$1e(fn) {
|
|
48
49
|
return function() {
|
|
49
50
|
var self = this, args = arguments;
|
|
50
51
|
return new Promise(function(resolve, reject) {
|
|
51
52
|
var gen = fn.apply(self, args);
|
|
52
53
|
function _next(value) {
|
|
53
|
-
asyncGeneratorStep$
|
|
54
|
+
asyncGeneratorStep$1e(gen, resolve, reject, _next, _throw, "next", value);
|
|
54
55
|
}
|
|
55
56
|
function _throw(err) {
|
|
56
|
-
asyncGeneratorStep$
|
|
57
|
+
asyncGeneratorStep$1e(gen, resolve, reject, _next, _throw, "throw", err);
|
|
57
58
|
}
|
|
58
59
|
_next(undefined);
|
|
59
60
|
});
|
|
@@ -85,7 +86,7 @@ function _construct(Parent, args, Class) {
|
|
|
85
86
|
}
|
|
86
87
|
return _construct.apply(null, arguments);
|
|
87
88
|
}
|
|
88
|
-
function _define_property$
|
|
89
|
+
function _define_property$N(obj, key, value) {
|
|
89
90
|
if (key in obj) {
|
|
90
91
|
Object.defineProperty(obj, key, {
|
|
91
92
|
value: value,
|
|
@@ -134,7 +135,7 @@ function _iterable_to_array$$(iter) {
|
|
|
134
135
|
function _non_iterable_spread$$() {
|
|
135
136
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
136
137
|
}
|
|
137
|
-
function _object_spread$
|
|
138
|
+
function _object_spread$N(target) {
|
|
138
139
|
for(var i = 1; i < arguments.length; i++){
|
|
139
140
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
140
141
|
var ownKeys = Object.keys(source);
|
|
@@ -144,12 +145,12 @@ function _object_spread$M(target) {
|
|
|
144
145
|
}));
|
|
145
146
|
}
|
|
146
147
|
ownKeys.forEach(function(key) {
|
|
147
|
-
_define_property$
|
|
148
|
+
_define_property$N(target, key, source[key]);
|
|
148
149
|
});
|
|
149
150
|
}
|
|
150
151
|
return target;
|
|
151
152
|
}
|
|
152
|
-
function ownKeys$
|
|
153
|
+
function ownKeys$w(object, enumerableOnly) {
|
|
153
154
|
var keys = Object.keys(object);
|
|
154
155
|
if (Object.getOwnPropertySymbols) {
|
|
155
156
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -157,12 +158,12 @@ function ownKeys$u(object, enumerableOnly) {
|
|
|
157
158
|
}
|
|
158
159
|
return keys;
|
|
159
160
|
}
|
|
160
|
-
function _object_spread_props$
|
|
161
|
+
function _object_spread_props$w(target, source) {
|
|
161
162
|
source = source != null ? source : {};
|
|
162
163
|
if (Object.getOwnPropertyDescriptors) {
|
|
163
164
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
164
165
|
} else {
|
|
165
|
-
ownKeys$
|
|
166
|
+
ownKeys$w(Object(source)).forEach(function(key) {
|
|
166
167
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
167
168
|
});
|
|
168
169
|
}
|
|
@@ -182,19 +183,19 @@ function _set_prototype_of(o, p) {
|
|
|
182
183
|
return _set_prototype_of(o, p);
|
|
183
184
|
}
|
|
184
185
|
function _to_consumable_array$$(arr) {
|
|
185
|
-
return _array_without_holes$$(arr) || _iterable_to_array$$(arr) || _unsupported_iterable_to_array$
|
|
186
|
+
return _array_without_holes$$(arr) || _iterable_to_array$$(arr) || _unsupported_iterable_to_array$16(arr) || _non_iterable_spread$$();
|
|
186
187
|
}
|
|
187
188
|
function _type_of$2(obj) {
|
|
188
189
|
"@swc/helpers - typeof";
|
|
189
190
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
190
191
|
}
|
|
191
|
-
function _unsupported_iterable_to_array$
|
|
192
|
+
function _unsupported_iterable_to_array$16(o, minLen) {
|
|
192
193
|
if (!o) return;
|
|
193
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
194
|
+
if (typeof o === "string") return _array_like_to_array$16(o, minLen);
|
|
194
195
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
195
196
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
196
197
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
197
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
198
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$16(o, minLen);
|
|
198
199
|
}
|
|
199
200
|
function _wrap_native_super(Class) {
|
|
200
201
|
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
@@ -230,7 +231,7 @@ function _is_native_reflect_construct() {
|
|
|
230
231
|
return !!result;
|
|
231
232
|
})();
|
|
232
233
|
}
|
|
233
|
-
function _ts_generator$
|
|
234
|
+
function _ts_generator$1e(thisArg, body) {
|
|
234
235
|
var f, y, t, _ = {
|
|
235
236
|
label: 0,
|
|
236
237
|
sent: function() {
|
|
@@ -414,10 +415,10 @@ var _timeoutMs = DEFAULT_CLI_HTTP_TIMEOUT_MS;
|
|
|
414
415
|
* @param init - The RequestInit. Any existing `signal` is preserved; we only attach our own when no signal was supplied.
|
|
415
416
|
* @returns The fetch Response.
|
|
416
417
|
*/ function tracedFetch(fetcher, input, init) {
|
|
417
|
-
return _async_to_generator$
|
|
418
|
+
return _async_to_generator$1e(function() {
|
|
418
419
|
var _ref, fetchImpl, timeoutMs, method, url, controller, timeoutHandle, finalInit, // Don't let the abort timer itself keep the Node event loop (or a test worker) alive.
|
|
419
420
|
_timeoutHandle_unref, localController, e;
|
|
420
|
-
return _ts_generator$
|
|
421
|
+
return _ts_generator$1e(this, function(_state) {
|
|
421
422
|
switch(_state.label){
|
|
422
423
|
case 0:
|
|
423
424
|
fetchImpl = fetcher !== null && fetcher !== void 0 ? fetcher : fetch;
|
|
@@ -439,7 +440,7 @@ var _timeoutMs = DEFAULT_CLI_HTTP_TIMEOUT_MS;
|
|
|
439
440
|
return localController.abort();
|
|
440
441
|
}, timeoutMs);
|
|
441
442
|
(_timeoutHandle_unref = timeoutHandle.unref) === null || _timeoutHandle_unref === void 0 ? void 0 : _timeoutHandle_unref.call(timeoutHandle);
|
|
442
|
-
finalInit = _object_spread_props$
|
|
443
|
+
finalInit = _object_spread_props$w(_object_spread$N({}, init), {
|
|
443
444
|
signal: localController.signal
|
|
444
445
|
});
|
|
445
446
|
}
|
|
@@ -588,7 +589,7 @@ function dumpResponse(data, meta) {
|
|
|
588
589
|
if (!filePath) {
|
|
589
590
|
return;
|
|
590
591
|
}
|
|
591
|
-
var content = _object_spread$
|
|
592
|
+
var content = _object_spread$N({
|
|
592
593
|
ok: true,
|
|
593
594
|
data: data
|
|
594
595
|
}, meta ? {
|
|
@@ -665,7 +666,7 @@ function stringifyEnvelope(value) {
|
|
|
665
666
|
*/ function outputResult(data, meta) {
|
|
666
667
|
dumpResponse(data, meta);
|
|
667
668
|
var outputData = _outputOptions.pick ? pickFields(data, _outputOptions.pick) : data;
|
|
668
|
-
var output = _object_spread$
|
|
669
|
+
var output = _object_spread$N({
|
|
669
670
|
ok: true,
|
|
670
671
|
data: outputData
|
|
671
672
|
}, meta ? {
|
|
@@ -694,7 +695,7 @@ function stringifyEnvelope(value) {
|
|
|
694
695
|
var _this;
|
|
695
696
|
_this = _call_super(this, CliError, [
|
|
696
697
|
input.message
|
|
697
|
-
]), _define_property$
|
|
698
|
+
]), _define_property$N(_this, "code", void 0), _define_property$N(_this, "suggestion", void 0);
|
|
698
699
|
_this.name = 'CliError';
|
|
699
700
|
_this.code = input.code;
|
|
700
701
|
_this.suggestion = input.suggestion;
|
|
@@ -722,7 +723,7 @@ function stringifyEnvelope(value) {
|
|
|
722
723
|
if (mapped) {
|
|
723
724
|
result = mapped;
|
|
724
725
|
} else if (_instanceof$o(error, CliError)) {
|
|
725
|
-
result = _object_spread$
|
|
726
|
+
result = _object_spread$N({
|
|
726
727
|
ok: false,
|
|
727
728
|
error: sanitizeString(error.message),
|
|
728
729
|
code: error.code
|
|
@@ -745,15 +746,15 @@ function stringifyEnvelope(value) {
|
|
|
745
746
|
return result;
|
|
746
747
|
}
|
|
747
748
|
|
|
748
|
-
function _array_like_to_array$
|
|
749
|
+
function _array_like_to_array$15(arr, len) {
|
|
749
750
|
if (len == null || len > arr.length) len = arr.length;
|
|
750
751
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
751
752
|
return arr2;
|
|
752
753
|
}
|
|
753
754
|
function _array_without_holes$_(arr) {
|
|
754
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
755
|
+
if (Array.isArray(arr)) return _array_like_to_array$15(arr);
|
|
755
756
|
}
|
|
756
|
-
function asyncGeneratorStep$
|
|
757
|
+
function asyncGeneratorStep$1d(gen, resolve, reject, _next, _throw, key, arg) {
|
|
757
758
|
try {
|
|
758
759
|
var info = gen[key](arg);
|
|
759
760
|
var value = info.value;
|
|
@@ -767,22 +768,22 @@ function asyncGeneratorStep$1e(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
767
768
|
Promise.resolve(value).then(_next, _throw);
|
|
768
769
|
}
|
|
769
770
|
}
|
|
770
|
-
function _async_to_generator$
|
|
771
|
+
function _async_to_generator$1d(fn) {
|
|
771
772
|
return function() {
|
|
772
773
|
var self = this, args = arguments;
|
|
773
774
|
return new Promise(function(resolve, reject) {
|
|
774
775
|
var gen = fn.apply(self, args);
|
|
775
776
|
function _next(value) {
|
|
776
|
-
asyncGeneratorStep$
|
|
777
|
+
asyncGeneratorStep$1d(gen, resolve, reject, _next, _throw, "next", value);
|
|
777
778
|
}
|
|
778
779
|
function _throw(err) {
|
|
779
|
-
asyncGeneratorStep$
|
|
780
|
+
asyncGeneratorStep$1d(gen, resolve, reject, _next, _throw, "throw", err);
|
|
780
781
|
}
|
|
781
782
|
_next(undefined);
|
|
782
783
|
});
|
|
783
784
|
};
|
|
784
785
|
}
|
|
785
|
-
function _define_property$
|
|
786
|
+
function _define_property$M(obj, key, value) {
|
|
786
787
|
if (key in obj) {
|
|
787
788
|
Object.defineProperty(obj, key, {
|
|
788
789
|
value: value,
|
|
@@ -801,7 +802,7 @@ function _iterable_to_array$_(iter) {
|
|
|
801
802
|
function _non_iterable_spread$_() {
|
|
802
803
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
803
804
|
}
|
|
804
|
-
function _object_spread$
|
|
805
|
+
function _object_spread$M(target) {
|
|
805
806
|
for(var i = 1; i < arguments.length; i++){
|
|
806
807
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
807
808
|
var ownKeys = Object.keys(source);
|
|
@@ -811,12 +812,12 @@ function _object_spread$L(target) {
|
|
|
811
812
|
}));
|
|
812
813
|
}
|
|
813
814
|
ownKeys.forEach(function(key) {
|
|
814
|
-
_define_property$
|
|
815
|
+
_define_property$M(target, key, source[key]);
|
|
815
816
|
});
|
|
816
817
|
}
|
|
817
818
|
return target;
|
|
818
819
|
}
|
|
819
|
-
function ownKeys$
|
|
820
|
+
function ownKeys$v(object, enumerableOnly) {
|
|
820
821
|
var keys = Object.keys(object);
|
|
821
822
|
if (Object.getOwnPropertySymbols) {
|
|
822
823
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -824,33 +825,33 @@ function ownKeys$t(object, enumerableOnly) {
|
|
|
824
825
|
}
|
|
825
826
|
return keys;
|
|
826
827
|
}
|
|
827
|
-
function _object_spread_props$
|
|
828
|
+
function _object_spread_props$v(target, source) {
|
|
828
829
|
source = source != null ? source : {};
|
|
829
830
|
if (Object.getOwnPropertyDescriptors) {
|
|
830
831
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
831
832
|
} else {
|
|
832
|
-
ownKeys$
|
|
833
|
+
ownKeys$v(Object(source)).forEach(function(key) {
|
|
833
834
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
834
835
|
});
|
|
835
836
|
}
|
|
836
837
|
return target;
|
|
837
838
|
}
|
|
838
839
|
function _to_consumable_array$_(arr) {
|
|
839
|
-
return _array_without_holes$_(arr) || _iterable_to_array$_(arr) || _unsupported_iterable_to_array$
|
|
840
|
+
return _array_without_holes$_(arr) || _iterable_to_array$_(arr) || _unsupported_iterable_to_array$15(arr) || _non_iterable_spread$_();
|
|
840
841
|
}
|
|
841
842
|
function _type_of$1(obj) {
|
|
842
843
|
"@swc/helpers - typeof";
|
|
843
844
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
844
845
|
}
|
|
845
|
-
function _unsupported_iterable_to_array$
|
|
846
|
+
function _unsupported_iterable_to_array$15(o, minLen) {
|
|
846
847
|
if (!o) return;
|
|
847
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
848
|
+
if (typeof o === "string") return _array_like_to_array$15(o, minLen);
|
|
848
849
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
849
850
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
850
851
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
851
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
852
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$15(o, minLen);
|
|
852
853
|
}
|
|
853
|
-
function _ts_generator$
|
|
854
|
+
function _ts_generator$1d(thisArg, body) {
|
|
854
855
|
var f, y, t, _ = {
|
|
855
856
|
label: 0,
|
|
856
857
|
sent: function() {
|
|
@@ -962,14 +963,14 @@ var MAX_MODEL_ACCESS_MULTI_READ_KEYS = 50;
|
|
|
962
963
|
* @param input - The call envelope describing the API target, access token, model params, and optional fetch override.
|
|
963
964
|
* @returns The parsed JSON response body cast to `R`.
|
|
964
965
|
*/ function callModelOverHttp(input) {
|
|
965
|
-
return _async_to_generator$
|
|
966
|
+
return _async_to_generator$1d(function() {
|
|
966
967
|
var _input_params_call;
|
|
967
|
-
return _ts_generator$
|
|
968
|
+
return _ts_generator$1d(this, function(_state) {
|
|
968
969
|
return [
|
|
969
970
|
2,
|
|
970
971
|
requestJson({
|
|
971
972
|
method: 'POST',
|
|
972
|
-
url: "".concat(trimSlash
|
|
973
|
+
url: "".concat(trimSlash(input.apiBaseUrl)).concat(CALL_MODEL_API_PATH),
|
|
973
974
|
accessToken: input.accessToken,
|
|
974
975
|
jsonBody: input.params,
|
|
975
976
|
fetcher: input.fetcher,
|
|
@@ -992,13 +993,13 @@ var MAX_MODEL_ACCESS_MULTI_READ_KEYS = 50;
|
|
|
992
993
|
* @param input - The request envelope describing the API target, access token, model + key, and optional fetch override.
|
|
993
994
|
* @returns The parsed `{ key, data }` envelope.
|
|
994
995
|
*/ function getModelOverHttp(input) {
|
|
995
|
-
return _async_to_generator$
|
|
996
|
-
return _ts_generator$
|
|
996
|
+
return _async_to_generator$1d(function() {
|
|
997
|
+
return _ts_generator$1d(this, function(_state) {
|
|
997
998
|
return [
|
|
998
999
|
2,
|
|
999
1000
|
requestJson({
|
|
1000
1001
|
method: 'GET',
|
|
1001
|
-
url: "".concat(trimSlash
|
|
1002
|
+
url: "".concat(trimSlash(input.apiBaseUrl), "/model/").concat(encodeURIComponent(input.modelType), "/get?key=").concat(encodeURIComponent(input.key)),
|
|
1002
1003
|
accessToken: input.accessToken,
|
|
1003
1004
|
fetcher: input.fetcher,
|
|
1004
1005
|
errorPrefix: "get ".concat(input.modelType, "/").concat(input.key, " failed")
|
|
@@ -1021,8 +1022,8 @@ var MAX_MODEL_ACCESS_MULTI_READ_KEYS = 50;
|
|
|
1021
1022
|
* @param input - The request envelope describing the API target, access token, model, keys, and optional fetch override.
|
|
1022
1023
|
* @returns The parsed `{ results, errors }` envelope.
|
|
1023
1024
|
*/ function getMultipleModelsOverHttp(input) {
|
|
1024
|
-
return _async_to_generator$
|
|
1025
|
-
return _ts_generator$
|
|
1025
|
+
return _async_to_generator$1d(function() {
|
|
1026
|
+
return _ts_generator$1d(this, function(_state) {
|
|
1026
1027
|
if (input.keys.length === 0) {
|
|
1027
1028
|
throw new CliError({
|
|
1028
1029
|
message: 'get-many requires at least one key.',
|
|
@@ -1039,7 +1040,7 @@ var MAX_MODEL_ACCESS_MULTI_READ_KEYS = 50;
|
|
|
1039
1040
|
2,
|
|
1040
1041
|
requestJson({
|
|
1041
1042
|
method: 'POST',
|
|
1042
|
-
url: "".concat(trimSlash
|
|
1043
|
+
url: "".concat(trimSlash(input.apiBaseUrl), "/model/").concat(encodeURIComponent(input.modelType), "/get"),
|
|
1043
1044
|
accessToken: input.accessToken,
|
|
1044
1045
|
jsonBody: {
|
|
1045
1046
|
keys: input.keys
|
|
@@ -1060,9 +1061,9 @@ var MAX_MODEL_ACCESS_MULTI_READ_KEYS = 50;
|
|
|
1060
1061
|
* @param input - Same shape as {@link GetMultipleModelsOverHttpInput} but without the 50-key cap.
|
|
1061
1062
|
* @returns The merged `{ results, errors }` envelope across all chunks.
|
|
1062
1063
|
*/ function getMultipleModelsOverHttpChunked(input) {
|
|
1063
|
-
return _async_to_generator$
|
|
1064
|
+
return _async_to_generator$1d(function() {
|
|
1064
1065
|
var chunks, i, mergedResults, mergedErrors, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, chunk, _mergedResults, _mergedErrors, batch, err;
|
|
1065
|
-
return _ts_generator$
|
|
1066
|
+
return _ts_generator$1d(this, function(_state) {
|
|
1066
1067
|
switch(_state.label){
|
|
1067
1068
|
case 0:
|
|
1068
1069
|
if (input.keys.length === 0) {
|
|
@@ -1096,7 +1097,7 @@ var MAX_MODEL_ACCESS_MULTI_READ_KEYS = 50;
|
|
|
1096
1097
|
chunk = _step.value;
|
|
1097
1098
|
return [
|
|
1098
1099
|
4,
|
|
1099
|
-
getMultipleModelsOverHttp(_object_spread_props$
|
|
1100
|
+
getMultipleModelsOverHttp(_object_spread_props$v(_object_spread$M({}, input), {
|
|
1100
1101
|
keys: chunk
|
|
1101
1102
|
}))
|
|
1102
1103
|
];
|
|
@@ -1150,15 +1151,15 @@ var MAX_MODEL_ACCESS_MULTI_READ_KEYS = 50;
|
|
|
1150
1151
|
})();
|
|
1151
1152
|
}
|
|
1152
1153
|
function requestJson(input) {
|
|
1153
|
-
return _async_to_generator$
|
|
1154
|
+
return _async_to_generator$1d(function() {
|
|
1154
1155
|
var hasJsonBody, init, res, _ref, ok, body, fallbackMessage;
|
|
1155
|
-
return _ts_generator$
|
|
1156
|
+
return _ts_generator$1d(this, function(_state) {
|
|
1156
1157
|
switch(_state.label){
|
|
1157
1158
|
case 0:
|
|
1158
1159
|
hasJsonBody = input.jsonBody !== undefined;
|
|
1159
|
-
init = _object_spread$
|
|
1160
|
+
init = _object_spread$M({
|
|
1160
1161
|
method: input.method,
|
|
1161
|
-
headers: _object_spread$
|
|
1162
|
+
headers: _object_spread$M({
|
|
1162
1163
|
Accept: 'application/json',
|
|
1163
1164
|
Authorization: "Bearer ".concat(input.accessToken)
|
|
1164
1165
|
}, hasJsonBody ? {
|
|
@@ -1195,9 +1196,9 @@ function requestJson(input) {
|
|
|
1195
1196
|
})();
|
|
1196
1197
|
}
|
|
1197
1198
|
function readJsonResponse(res) {
|
|
1198
|
-
return _async_to_generator$
|
|
1199
|
+
return _async_to_generator$1d(function() {
|
|
1199
1200
|
var text, body;
|
|
1200
|
-
return _ts_generator$
|
|
1201
|
+
return _ts_generator$1d(this, function(_state) {
|
|
1201
1202
|
switch(_state.label){
|
|
1202
1203
|
case 0:
|
|
1203
1204
|
return [
|
|
@@ -1249,7 +1250,7 @@ function codeForStatus(status) {
|
|
|
1249
1250
|
}
|
|
1250
1251
|
return result;
|
|
1251
1252
|
}
|
|
1252
|
-
function trimSlash
|
|
1253
|
+
function trimSlash(url) {
|
|
1253
1254
|
return url.endsWith('/') ? url.slice(0, -1) : url;
|
|
1254
1255
|
}
|
|
1255
1256
|
|
|
@@ -1353,7 +1354,7 @@ var getCliContext = _cliContextSlot.get;
|
|
|
1353
1354
|
};
|
|
1354
1355
|
}
|
|
1355
1356
|
|
|
1356
|
-
function asyncGeneratorStep$
|
|
1357
|
+
function asyncGeneratorStep$1c(gen, resolve, reject, _next, _throw, key, arg) {
|
|
1357
1358
|
try {
|
|
1358
1359
|
var info = gen[key](arg);
|
|
1359
1360
|
var value = info.value;
|
|
@@ -1367,22 +1368,22 @@ function asyncGeneratorStep$1d(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
1367
1368
|
Promise.resolve(value).then(_next, _throw);
|
|
1368
1369
|
}
|
|
1369
1370
|
}
|
|
1370
|
-
function _async_to_generator$
|
|
1371
|
+
function _async_to_generator$1c(fn) {
|
|
1371
1372
|
return function() {
|
|
1372
1373
|
var self = this, args = arguments;
|
|
1373
1374
|
return new Promise(function(resolve, reject) {
|
|
1374
1375
|
var gen = fn.apply(self, args);
|
|
1375
1376
|
function _next(value) {
|
|
1376
|
-
asyncGeneratorStep$
|
|
1377
|
+
asyncGeneratorStep$1c(gen, resolve, reject, _next, _throw, "next", value);
|
|
1377
1378
|
}
|
|
1378
1379
|
function _throw(err) {
|
|
1379
|
-
asyncGeneratorStep$
|
|
1380
|
+
asyncGeneratorStep$1c(gen, resolve, reject, _next, _throw, "throw", err);
|
|
1380
1381
|
}
|
|
1381
1382
|
_next(undefined);
|
|
1382
1383
|
});
|
|
1383
1384
|
};
|
|
1384
1385
|
}
|
|
1385
|
-
function _ts_generator$
|
|
1386
|
+
function _ts_generator$1c(thisArg, body) {
|
|
1386
1387
|
var f, y, t, _ = {
|
|
1387
1388
|
label: 0,
|
|
1388
1389
|
sent: function() {
|
|
@@ -1495,9 +1496,9 @@ function _ts_generator$1d(thisArg, body) {
|
|
|
1495
1496
|
*/ function wrapCommandHandler(handler) {
|
|
1496
1497
|
var exitCode = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : CLI_EXIT_CODE_HANDLER;
|
|
1497
1498
|
return function(argv) {
|
|
1498
|
-
return _async_to_generator$
|
|
1499
|
+
return _async_to_generator$1c(function() {
|
|
1499
1500
|
var e;
|
|
1500
|
-
return _ts_generator$
|
|
1501
|
+
return _ts_generator$1c(this, function(_state) {
|
|
1501
1502
|
switch(_state.label){
|
|
1502
1503
|
case 0:
|
|
1503
1504
|
_state.trys.push([
|
|
@@ -1558,7 +1559,7 @@ function _ts_generator$1d(thisArg, body) {
|
|
|
1558
1559
|
};
|
|
1559
1560
|
}
|
|
1560
1561
|
|
|
1561
|
-
function asyncGeneratorStep$
|
|
1562
|
+
function asyncGeneratorStep$1b(gen, resolve, reject, _next, _throw, key, arg) {
|
|
1562
1563
|
try {
|
|
1563
1564
|
var info = gen[key](arg);
|
|
1564
1565
|
var value = info.value;
|
|
@@ -1572,22 +1573,22 @@ function asyncGeneratorStep$1c(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
1572
1573
|
Promise.resolve(value).then(_next, _throw);
|
|
1573
1574
|
}
|
|
1574
1575
|
}
|
|
1575
|
-
function _async_to_generator$
|
|
1576
|
+
function _async_to_generator$1b(fn) {
|
|
1576
1577
|
return function() {
|
|
1577
1578
|
var self = this, args = arguments;
|
|
1578
1579
|
return new Promise(function(resolve, reject) {
|
|
1579
1580
|
var gen = fn.apply(self, args);
|
|
1580
1581
|
function _next(value) {
|
|
1581
|
-
asyncGeneratorStep$
|
|
1582
|
+
asyncGeneratorStep$1b(gen, resolve, reject, _next, _throw, "next", value);
|
|
1582
1583
|
}
|
|
1583
1584
|
function _throw(err) {
|
|
1584
|
-
asyncGeneratorStep$
|
|
1585
|
+
asyncGeneratorStep$1b(gen, resolve, reject, _next, _throw, "throw", err);
|
|
1585
1586
|
}
|
|
1586
1587
|
_next(undefined);
|
|
1587
1588
|
});
|
|
1588
1589
|
};
|
|
1589
1590
|
}
|
|
1590
|
-
function _ts_generator$
|
|
1591
|
+
function _ts_generator$1b(thisArg, body) {
|
|
1591
1592
|
var f, y, t, _ = {
|
|
1592
1593
|
label: 0,
|
|
1593
1594
|
sent: function() {
|
|
@@ -1707,9 +1708,9 @@ function _ts_generator$1c(thisArg, body) {
|
|
|
1707
1708
|
return spec.helpEpilogue ? built.epilogue(spec.helpEpilogue) : built;
|
|
1708
1709
|
},
|
|
1709
1710
|
handler: wrapCommandHandler(function(argv) {
|
|
1710
|
-
return _async_to_generator$
|
|
1711
|
+
return _async_to_generator$1b(function() {
|
|
1711
1712
|
var context, result;
|
|
1712
|
-
return _ts_generator$
|
|
1713
|
+
return _ts_generator$1b(this, function(_state) {
|
|
1713
1714
|
switch(_state.label){
|
|
1714
1715
|
case 0:
|
|
1715
1716
|
context = requireCliContext();
|
|
@@ -1733,21 +1734,21 @@ function _ts_generator$1c(thisArg, body) {
|
|
|
1733
1734
|
};
|
|
1734
1735
|
}
|
|
1735
1736
|
|
|
1736
|
-
function _array_like_to_array$
|
|
1737
|
+
function _array_like_to_array$14(arr, len) {
|
|
1737
1738
|
if (len == null || len > arr.length) len = arr.length;
|
|
1738
1739
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
1739
1740
|
return arr2;
|
|
1740
1741
|
}
|
|
1741
|
-
function _array_with_holes$
|
|
1742
|
+
function _array_with_holes$i(arr) {
|
|
1742
1743
|
if (Array.isArray(arr)) return arr;
|
|
1743
1744
|
}
|
|
1744
1745
|
function _array_without_holes$Z(arr) {
|
|
1745
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
1746
|
+
if (Array.isArray(arr)) return _array_like_to_array$14(arr);
|
|
1746
1747
|
}
|
|
1747
1748
|
function _iterable_to_array$Z(iter) {
|
|
1748
1749
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
1749
1750
|
}
|
|
1750
|
-
function _iterable_to_array_limit$
|
|
1751
|
+
function _iterable_to_array_limit$i(arr, i) {
|
|
1751
1752
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
1752
1753
|
if (_i == null) return;
|
|
1753
1754
|
var _arr = [];
|
|
@@ -1771,25 +1772,25 @@ function _iterable_to_array_limit$j(arr, i) {
|
|
|
1771
1772
|
}
|
|
1772
1773
|
return _arr;
|
|
1773
1774
|
}
|
|
1774
|
-
function _non_iterable_rest$
|
|
1775
|
+
function _non_iterable_rest$i() {
|
|
1775
1776
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1776
1777
|
}
|
|
1777
1778
|
function _non_iterable_spread$Z() {
|
|
1778
1779
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1779
1780
|
}
|
|
1780
|
-
function _sliced_to_array$
|
|
1781
|
-
return _array_with_holes$
|
|
1781
|
+
function _sliced_to_array$i(arr, i) {
|
|
1782
|
+
return _array_with_holes$i(arr) || _iterable_to_array_limit$i(arr, i) || _unsupported_iterable_to_array$14(arr, i) || _non_iterable_rest$i();
|
|
1782
1783
|
}
|
|
1783
1784
|
function _to_consumable_array$Z(arr) {
|
|
1784
|
-
return _array_without_holes$Z(arr) || _iterable_to_array$Z(arr) || _unsupported_iterable_to_array$
|
|
1785
|
+
return _array_without_holes$Z(arr) || _iterable_to_array$Z(arr) || _unsupported_iterable_to_array$14(arr) || _non_iterable_spread$Z();
|
|
1785
1786
|
}
|
|
1786
|
-
function _unsupported_iterable_to_array$
|
|
1787
|
+
function _unsupported_iterable_to_array$14(o, minLen) {
|
|
1787
1788
|
if (!o) return;
|
|
1788
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
1789
|
+
if (typeof o === "string") return _array_like_to_array$14(o, minLen);
|
|
1789
1790
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1790
1791
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1791
1792
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
1792
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
1793
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$14(o, minLen);
|
|
1793
1794
|
}
|
|
1794
1795
|
/**
|
|
1795
1796
|
* Default name of the parent command that groups all registered action specs.
|
|
@@ -1845,7 +1846,7 @@ function _unsupported_iterable_to_array$15(o, minLen) {
|
|
|
1845
1846
|
}
|
|
1846
1847
|
}
|
|
1847
1848
|
var sortedModels = _to_consumable_array$Z(byModel.entries()).sort(function(param, param1) {
|
|
1848
|
-
var _param = _sliced_to_array$
|
|
1849
|
+
var _param = _sliced_to_array$i(param, 1), a = _param[0], _param1 = _sliced_to_array$i(param1, 1), b = _param1[0];
|
|
1849
1850
|
return a.localeCompare(b);
|
|
1850
1851
|
});
|
|
1851
1852
|
result = [
|
|
@@ -1876,7 +1877,7 @@ function _unsupported_iterable_to_array$15(o, minLen) {
|
|
|
1876
1877
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
1877
1878
|
try {
|
|
1878
1879
|
var _loop = function() {
|
|
1879
|
-
var _step_value = _sliced_to_array$
|
|
1880
|
+
var _step_value = _sliced_to_array$i(_step1.value, 2), model = _step_value[0], modelSpecs = _step_value[1];
|
|
1880
1881
|
yargs.command({
|
|
1881
1882
|
command: "".concat(model, " <action>"),
|
|
1882
1883
|
describe: "Composite actions scoped to model '".concat(model, "' (").concat(modelSpecs.length, ")."),
|
|
@@ -1934,18 +1935,18 @@ function _unsupported_iterable_to_array$15(o, minLen) {
|
|
|
1934
1935
|
return result;
|
|
1935
1936
|
}
|
|
1936
1937
|
|
|
1937
|
-
function _array_like_to_array$
|
|
1938
|
+
function _array_like_to_array$13(arr, len) {
|
|
1938
1939
|
if (len == null || len > arr.length) len = arr.length;
|
|
1939
1940
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
1940
1941
|
return arr2;
|
|
1941
1942
|
}
|
|
1942
|
-
function _array_with_holes$
|
|
1943
|
+
function _array_with_holes$h(arr) {
|
|
1943
1944
|
if (Array.isArray(arr)) return arr;
|
|
1944
1945
|
}
|
|
1945
1946
|
function _array_without_holes$Y(arr) {
|
|
1946
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
1947
|
+
if (Array.isArray(arr)) return _array_like_to_array$13(arr);
|
|
1947
1948
|
}
|
|
1948
|
-
function asyncGeneratorStep$
|
|
1949
|
+
function asyncGeneratorStep$1a(gen, resolve, reject, _next, _throw, key, arg) {
|
|
1949
1950
|
try {
|
|
1950
1951
|
var info = gen[key](arg);
|
|
1951
1952
|
var value = info.value;
|
|
@@ -1959,22 +1960,22 @@ function asyncGeneratorStep$1b(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
1959
1960
|
Promise.resolve(value).then(_next, _throw);
|
|
1960
1961
|
}
|
|
1961
1962
|
}
|
|
1962
|
-
function _async_to_generator$
|
|
1963
|
+
function _async_to_generator$1a(fn) {
|
|
1963
1964
|
return function() {
|
|
1964
1965
|
var self = this, args = arguments;
|
|
1965
1966
|
return new Promise(function(resolve, reject) {
|
|
1966
1967
|
var gen = fn.apply(self, args);
|
|
1967
1968
|
function _next(value) {
|
|
1968
|
-
asyncGeneratorStep$
|
|
1969
|
+
asyncGeneratorStep$1a(gen, resolve, reject, _next, _throw, "next", value);
|
|
1969
1970
|
}
|
|
1970
1971
|
function _throw(err) {
|
|
1971
|
-
asyncGeneratorStep$
|
|
1972
|
+
asyncGeneratorStep$1a(gen, resolve, reject, _next, _throw, "throw", err);
|
|
1972
1973
|
}
|
|
1973
1974
|
_next(undefined);
|
|
1974
1975
|
});
|
|
1975
1976
|
};
|
|
1976
1977
|
}
|
|
1977
|
-
function _define_property$
|
|
1978
|
+
function _define_property$L(obj, key, value) {
|
|
1978
1979
|
if (key in obj) {
|
|
1979
1980
|
Object.defineProperty(obj, key, {
|
|
1980
1981
|
value: value,
|
|
@@ -1990,7 +1991,7 @@ function _define_property$K(obj, key, value) {
|
|
|
1990
1991
|
function _iterable_to_array$Y(iter) {
|
|
1991
1992
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
1992
1993
|
}
|
|
1993
|
-
function _iterable_to_array_limit$
|
|
1994
|
+
function _iterable_to_array_limit$h(arr, i) {
|
|
1994
1995
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
1995
1996
|
if (_i == null) return;
|
|
1996
1997
|
var _arr = [];
|
|
@@ -2014,13 +2015,13 @@ function _iterable_to_array_limit$i(arr, i) {
|
|
|
2014
2015
|
}
|
|
2015
2016
|
return _arr;
|
|
2016
2017
|
}
|
|
2017
|
-
function _non_iterable_rest$
|
|
2018
|
+
function _non_iterable_rest$h() {
|
|
2018
2019
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2019
2020
|
}
|
|
2020
2021
|
function _non_iterable_spread$Y() {
|
|
2021
2022
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2022
2023
|
}
|
|
2023
|
-
function _object_spread$
|
|
2024
|
+
function _object_spread$L(target) {
|
|
2024
2025
|
for(var i = 1; i < arguments.length; i++){
|
|
2025
2026
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
2026
2027
|
var ownKeys = Object.keys(source);
|
|
@@ -2030,12 +2031,12 @@ function _object_spread$K(target) {
|
|
|
2030
2031
|
}));
|
|
2031
2032
|
}
|
|
2032
2033
|
ownKeys.forEach(function(key) {
|
|
2033
|
-
_define_property$
|
|
2034
|
+
_define_property$L(target, key, source[key]);
|
|
2034
2035
|
});
|
|
2035
2036
|
}
|
|
2036
2037
|
return target;
|
|
2037
2038
|
}
|
|
2038
|
-
function ownKeys$
|
|
2039
|
+
function ownKeys$u(object, enumerableOnly) {
|
|
2039
2040
|
var keys = Object.keys(object);
|
|
2040
2041
|
if (Object.getOwnPropertySymbols) {
|
|
2041
2042
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -2043,32 +2044,32 @@ function ownKeys$s(object, enumerableOnly) {
|
|
|
2043
2044
|
}
|
|
2044
2045
|
return keys;
|
|
2045
2046
|
}
|
|
2046
|
-
function _object_spread_props$
|
|
2047
|
+
function _object_spread_props$u(target, source) {
|
|
2047
2048
|
source = source != null ? source : {};
|
|
2048
2049
|
if (Object.getOwnPropertyDescriptors) {
|
|
2049
2050
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
2050
2051
|
} else {
|
|
2051
|
-
ownKeys$
|
|
2052
|
+
ownKeys$u(Object(source)).forEach(function(key) {
|
|
2052
2053
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
2053
2054
|
});
|
|
2054
2055
|
}
|
|
2055
2056
|
return target;
|
|
2056
2057
|
}
|
|
2057
|
-
function _sliced_to_array$
|
|
2058
|
-
return _array_with_holes$
|
|
2058
|
+
function _sliced_to_array$h(arr, i) {
|
|
2059
|
+
return _array_with_holes$h(arr) || _iterable_to_array_limit$h(arr, i) || _unsupported_iterable_to_array$13(arr, i) || _non_iterable_rest$h();
|
|
2059
2060
|
}
|
|
2060
2061
|
function _to_consumable_array$Y(arr) {
|
|
2061
|
-
return _array_without_holes$Y(arr) || _iterable_to_array$Y(arr) || _unsupported_iterable_to_array$
|
|
2062
|
+
return _array_without_holes$Y(arr) || _iterable_to_array$Y(arr) || _unsupported_iterable_to_array$13(arr) || _non_iterable_spread$Y();
|
|
2062
2063
|
}
|
|
2063
|
-
function _unsupported_iterable_to_array$
|
|
2064
|
+
function _unsupported_iterable_to_array$13(o, minLen) {
|
|
2064
2065
|
if (!o) return;
|
|
2065
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
2066
|
+
if (typeof o === "string") return _array_like_to_array$13(o, minLen);
|
|
2066
2067
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
2067
2068
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
2068
2069
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
2069
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
2070
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$13(o, minLen);
|
|
2070
2071
|
}
|
|
2071
|
-
function _ts_generator$
|
|
2072
|
+
function _ts_generator$1a(thisArg, body) {
|
|
2072
2073
|
var f, y, t, _ = {
|
|
2073
2074
|
label: 0,
|
|
2074
2075
|
sent: function() {
|
|
@@ -2182,7 +2183,7 @@ var _defaultResponseAdapter = {
|
|
|
2182
2183
|
}
|
|
2183
2184
|
};
|
|
2184
2185
|
function _defaultBuildRequestData(params, state, limit) {
|
|
2185
|
-
var base = _object_spread$
|
|
2186
|
+
var base = _object_spread$L({}, params);
|
|
2186
2187
|
if (state.cursorDocumentKey != null) {
|
|
2187
2188
|
base.cursorDocumentKey = state.cursorDocumentKey;
|
|
2188
2189
|
}
|
|
@@ -2192,9 +2193,9 @@ function _defaultBuildRequestData(params, state, limit) {
|
|
|
2192
2193
|
return base;
|
|
2193
2194
|
}
|
|
2194
2195
|
function _runItemTasks(input) {
|
|
2195
|
-
return _async_to_generator$
|
|
2196
|
+
return _async_to_generator$1a(function() {
|
|
2196
2197
|
var context, items, keys, pageIndex, iterateItem, itemPerformTasksConfig, maxParallelPerPage, indexed, taskConfig, performResult;
|
|
2197
|
-
return _ts_generator$
|
|
2198
|
+
return _ts_generator$1a(this, function(_state) {
|
|
2198
2199
|
switch(_state.label){
|
|
2199
2200
|
case 0:
|
|
2200
2201
|
context = input.context, items = input.items, keys = input.keys, pageIndex = input.pageIndex, iterateItem = input.iterateItem, itemPerformTasksConfig = input.itemPerformTasksConfig, maxParallelPerPage = input.maxParallelPerPage;
|
|
@@ -2206,7 +2207,7 @@ function _runItemTasks(input) {
|
|
|
2206
2207
|
itemIndex: itemIndex
|
|
2207
2208
|
};
|
|
2208
2209
|
});
|
|
2209
|
-
taskConfig = _object_spread_props$
|
|
2210
|
+
taskConfig = _object_spread_props$u(_object_spread$L({
|
|
2210
2211
|
sequential: true,
|
|
2211
2212
|
throwError: true
|
|
2212
2213
|
}, itemPerformTasksConfig), {
|
|
@@ -2230,7 +2231,7 @@ function _runItemTasks(input) {
|
|
|
2230
2231
|
return [
|
|
2231
2232
|
2,
|
|
2232
2233
|
performResult.results.map(function(param) {
|
|
2233
|
-
var _param = _sliced_to_array$
|
|
2234
|
+
var _param = _sliced_to_array$h(param, 2), output = _param[1];
|
|
2234
2235
|
return output;
|
|
2235
2236
|
})
|
|
2236
2237
|
];
|
|
@@ -2239,9 +2240,9 @@ function _runItemTasks(input) {
|
|
|
2239
2240
|
})();
|
|
2240
2241
|
}
|
|
2241
2242
|
function _processPage(input) {
|
|
2242
|
-
return _async_to_generator$
|
|
2243
|
+
return _async_to_generator$1a(function() {
|
|
2243
2244
|
var context, raw, pageIndex, responseAdapter, iterateItem, iteratePage, itemPerformTasksConfig, maxParallelPerPage, items, keys, nextCursorDocumentKey, hasMore, itemResults, _tmp, pageResult, _tmp1, output;
|
|
2244
|
-
return _ts_generator$
|
|
2245
|
+
return _ts_generator$1a(this, function(_state) {
|
|
2245
2246
|
switch(_state.label){
|
|
2246
2247
|
case 0:
|
|
2247
2248
|
context = input.context, raw = input.raw, pageIndex = input.pageIndex, responseAdapter = input.responseAdapter, iterateItem = input.iterateItem, iteratePage = input.iteratePage, itemPerformTasksConfig = input.itemPerformTasksConfig, maxParallelPerPage = input.maxParallelPerPage;
|
|
@@ -2381,9 +2382,9 @@ function _evaluateLoopExit(input) {
|
|
|
2381
2382
|
* });
|
|
2382
2383
|
* ```
|
|
2383
2384
|
*/ function iterateDbxCliCallModel(config) {
|
|
2384
|
-
return _async_to_generator$
|
|
2385
|
+
return _async_to_generator$1a(function() {
|
|
2385
2386
|
var context, modelType, call, specifier, params, _config_buildRequestData, buildRequestData, _config_responseAdapter, responseAdapter, limitPerPage, totalItemsLimit, maxPages, iterateItem, iteratePage, itemPerformTasksConfig, maxParallelPerPage, _config_collectItems, collectItems, _config_collectItemResults, collectItemResults, _config_collectPageResults, collectPageResults, allItems, allItemResults, allPageResults, pageIndex, totalItems, cursorDocumentKey, hitLimit, keepGoing, collectItemsForPage, collectItemResultsForPage, collectPageResultsForPage, effectiveLimit, data, raw, pageOutcome, _allItems, _allItemResults, exit, result;
|
|
2386
|
-
return _ts_generator$
|
|
2387
|
+
return _ts_generator$1a(this, function(_state) {
|
|
2387
2388
|
switch(_state.label){
|
|
2388
2389
|
case 0:
|
|
2389
2390
|
context = config.context, modelType = config.modelType, call = config.call, specifier = config.specifier, params = config.params, _config_buildRequestData = config.buildRequestData, buildRequestData = _config_buildRequestData === void 0 ? _defaultBuildRequestData : _config_buildRequestData, _config_responseAdapter = config.responseAdapter, responseAdapter = _config_responseAdapter === void 0 ? _defaultResponseAdapter : _config_responseAdapter, limitPerPage = config.limitPerPage, totalItemsLimit = config.totalItemsLimit, maxPages = config.maxPages, iterateItem = config.iterateItem, iteratePage = config.iteratePage, itemPerformTasksConfig = config.itemPerformTasksConfig, maxParallelPerPage = config.maxParallelPerPage, _config_collectItems = config.collectItems, collectItems = _config_collectItems === void 0 ? true : _config_collectItems, _config_collectItemResults = config.collectItemResults, collectItemResults = _config_collectItemResults === void 0 ? iterateItem != null : _config_collectItemResults, _config_collectPageResults = config.collectPageResults, collectPageResults = _config_collectPageResults === void 0 ? iteratePage != null : _config_collectPageResults;
|
|
@@ -2463,7 +2464,7 @@ function _evaluateLoopExit(input) {
|
|
|
2463
2464
|
1
|
|
2464
2465
|
];
|
|
2465
2466
|
case 4:
|
|
2466
|
-
result = _object_spread$
|
|
2467
|
+
result = _object_spread$L({
|
|
2467
2468
|
totalPages: pageIndex,
|
|
2468
2469
|
totalItems: totalItems,
|
|
2469
2470
|
hitLimit: hitLimit,
|
|
@@ -2484,7 +2485,7 @@ function _evaluateLoopExit(input) {
|
|
|
2484
2485
|
})();
|
|
2485
2486
|
}
|
|
2486
2487
|
|
|
2487
|
-
function asyncGeneratorStep$
|
|
2488
|
+
function asyncGeneratorStep$19(gen, resolve, reject, _next, _throw, key, arg) {
|
|
2488
2489
|
try {
|
|
2489
2490
|
var info = gen[key](arg);
|
|
2490
2491
|
var value = info.value;
|
|
@@ -2498,22 +2499,22 @@ function asyncGeneratorStep$1a(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
2498
2499
|
Promise.resolve(value).then(_next, _throw);
|
|
2499
2500
|
}
|
|
2500
2501
|
}
|
|
2501
|
-
function _async_to_generator$
|
|
2502
|
+
function _async_to_generator$19(fn) {
|
|
2502
2503
|
return function() {
|
|
2503
2504
|
var self = this, args = arguments;
|
|
2504
2505
|
return new Promise(function(resolve, reject) {
|
|
2505
2506
|
var gen = fn.apply(self, args);
|
|
2506
2507
|
function _next(value) {
|
|
2507
|
-
asyncGeneratorStep$
|
|
2508
|
+
asyncGeneratorStep$19(gen, resolve, reject, _next, _throw, "next", value);
|
|
2508
2509
|
}
|
|
2509
2510
|
function _throw(err) {
|
|
2510
|
-
asyncGeneratorStep$
|
|
2511
|
+
asyncGeneratorStep$19(gen, resolve, reject, _next, _throw, "throw", err);
|
|
2511
2512
|
}
|
|
2512
2513
|
_next(undefined);
|
|
2513
2514
|
});
|
|
2514
2515
|
};
|
|
2515
2516
|
}
|
|
2516
|
-
function _define_property$
|
|
2517
|
+
function _define_property$K(obj, key, value) {
|
|
2517
2518
|
if (key in obj) {
|
|
2518
2519
|
Object.defineProperty(obj, key, {
|
|
2519
2520
|
value: value,
|
|
@@ -2526,7 +2527,7 @@ function _define_property$J(obj, key, value) {
|
|
|
2526
2527
|
}
|
|
2527
2528
|
return obj;
|
|
2528
2529
|
}
|
|
2529
|
-
function _object_spread$
|
|
2530
|
+
function _object_spread$K(target) {
|
|
2530
2531
|
for(var i = 1; i < arguments.length; i++){
|
|
2531
2532
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
2532
2533
|
var ownKeys = Object.keys(source);
|
|
@@ -2536,12 +2537,12 @@ function _object_spread$J(target) {
|
|
|
2536
2537
|
}));
|
|
2537
2538
|
}
|
|
2538
2539
|
ownKeys.forEach(function(key) {
|
|
2539
|
-
_define_property$
|
|
2540
|
+
_define_property$K(target, key, source[key]);
|
|
2540
2541
|
});
|
|
2541
2542
|
}
|
|
2542
2543
|
return target;
|
|
2543
2544
|
}
|
|
2544
|
-
function ownKeys$
|
|
2545
|
+
function ownKeys$t(object, enumerableOnly) {
|
|
2545
2546
|
var keys = Object.keys(object);
|
|
2546
2547
|
if (Object.getOwnPropertySymbols) {
|
|
2547
2548
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -2549,18 +2550,18 @@ function ownKeys$r(object, enumerableOnly) {
|
|
|
2549
2550
|
}
|
|
2550
2551
|
return keys;
|
|
2551
2552
|
}
|
|
2552
|
-
function _object_spread_props$
|
|
2553
|
+
function _object_spread_props$t(target, source) {
|
|
2553
2554
|
source = source != null ? source : {};
|
|
2554
2555
|
if (Object.getOwnPropertyDescriptors) {
|
|
2555
2556
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
2556
2557
|
} else {
|
|
2557
|
-
ownKeys$
|
|
2558
|
+
ownKeys$t(Object(source)).forEach(function(key) {
|
|
2558
2559
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
2559
2560
|
});
|
|
2560
2561
|
}
|
|
2561
2562
|
return target;
|
|
2562
2563
|
}
|
|
2563
|
-
function _ts_generator$
|
|
2564
|
+
function _ts_generator$19(thisArg, body) {
|
|
2564
2565
|
var f, y, t, _ = {
|
|
2565
2566
|
label: 0,
|
|
2566
2567
|
sent: function() {
|
|
@@ -2676,14 +2677,14 @@ function _ts_generator$1a(thisArg, body) {
|
|
|
2676
2677
|
return spec.builder ? spec.builder(yargs) : yargs;
|
|
2677
2678
|
},
|
|
2678
2679
|
handler: wrapCommandHandler(function(argv) {
|
|
2679
|
-
return _async_to_generator$
|
|
2680
|
+
return _async_to_generator$19(function() {
|
|
2680
2681
|
var context, data, params, result;
|
|
2681
|
-
return _ts_generator$
|
|
2682
|
+
return _ts_generator$19(this, function(_state) {
|
|
2682
2683
|
switch(_state.label){
|
|
2683
2684
|
case 0:
|
|
2684
2685
|
context = requireCliContext();
|
|
2685
2686
|
data = spec.buildParams(argv);
|
|
2686
|
-
params = _object_spread_props$
|
|
2687
|
+
params = _object_spread_props$t(_object_spread$K({
|
|
2687
2688
|
modelType: spec.model,
|
|
2688
2689
|
call: spec.verb
|
|
2689
2690
|
}, spec.specifier == null ? {} : {
|
|
@@ -2861,7 +2862,7 @@ function AsyncFromSyncIterator$4(s) {
|
|
|
2861
2862
|
}
|
|
2862
2863
|
}, new AsyncFromSyncIterator$4(s);
|
|
2863
2864
|
}
|
|
2864
|
-
function asyncGeneratorStep$
|
|
2865
|
+
function asyncGeneratorStep$18(gen, resolve, reject, _next, _throw, key, arg) {
|
|
2865
2866
|
try {
|
|
2866
2867
|
var info = gen[key](arg);
|
|
2867
2868
|
var value = info.value;
|
|
@@ -2875,22 +2876,22 @@ function asyncGeneratorStep$19(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
2875
2876
|
Promise.resolve(value).then(_next, _throw);
|
|
2876
2877
|
}
|
|
2877
2878
|
}
|
|
2878
|
-
function _async_to_generator$
|
|
2879
|
+
function _async_to_generator$18(fn) {
|
|
2879
2880
|
return function() {
|
|
2880
2881
|
var self = this, args = arguments;
|
|
2881
2882
|
return new Promise(function(resolve, reject) {
|
|
2882
2883
|
var gen = fn.apply(self, args);
|
|
2883
2884
|
function _next(value) {
|
|
2884
|
-
asyncGeneratorStep$
|
|
2885
|
+
asyncGeneratorStep$18(gen, resolve, reject, _next, _throw, "next", value);
|
|
2885
2886
|
}
|
|
2886
2887
|
function _throw(err) {
|
|
2887
|
-
asyncGeneratorStep$
|
|
2888
|
+
asyncGeneratorStep$18(gen, resolve, reject, _next, _throw, "throw", err);
|
|
2888
2889
|
}
|
|
2889
2890
|
_next(undefined);
|
|
2890
2891
|
});
|
|
2891
2892
|
};
|
|
2892
2893
|
}
|
|
2893
|
-
function _ts_generator$
|
|
2894
|
+
function _ts_generator$18(thisArg, body) {
|
|
2894
2895
|
var f, y, t, _ = {
|
|
2895
2896
|
label: 0,
|
|
2896
2897
|
sent: function() {
|
|
@@ -3009,9 +3010,9 @@ function _ts_generator$19(thisArg, body) {
|
|
|
3009
3010
|
*
|
|
3010
3011
|
* @returns The UTF-8 decoded stdin contents.
|
|
3011
3012
|
*/ function readAllStdin() {
|
|
3012
|
-
return _async_to_generator$
|
|
3013
|
+
return _async_to_generator$18(function() {
|
|
3013
3014
|
var chunks, _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, chunk, err;
|
|
3014
|
-
return _ts_generator$
|
|
3015
|
+
return _ts_generator$18(this, function(_state) {
|
|
3015
3016
|
switch(_state.label){
|
|
3016
3017
|
case 0:
|
|
3017
3018
|
chunks = [];
|
|
@@ -3109,9 +3110,9 @@ function _ts_generator$19(thisArg, body) {
|
|
|
3109
3110
|
*
|
|
3110
3111
|
* @returns The tokens parsed from stdin.
|
|
3111
3112
|
*/ function readStdinTokens() {
|
|
3112
|
-
return _async_to_generator$
|
|
3113
|
+
return _async_to_generator$18(function() {
|
|
3113
3114
|
var raw;
|
|
3114
|
-
return _ts_generator$
|
|
3115
|
+
return _ts_generator$18(this, function(_state) {
|
|
3115
3116
|
switch(_state.label){
|
|
3116
3117
|
case 0:
|
|
3117
3118
|
return [
|
|
@@ -3131,7 +3132,7 @@ function _ts_generator$19(thisArg, body) {
|
|
|
3131
3132
|
})();
|
|
3132
3133
|
}
|
|
3133
3134
|
|
|
3134
|
-
function asyncGeneratorStep$
|
|
3135
|
+
function asyncGeneratorStep$17(gen, resolve, reject, _next, _throw, key, arg) {
|
|
3135
3136
|
try {
|
|
3136
3137
|
var info = gen[key](arg);
|
|
3137
3138
|
var value = info.value;
|
|
@@ -3145,22 +3146,22 @@ function asyncGeneratorStep$18(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
3145
3146
|
Promise.resolve(value).then(_next, _throw);
|
|
3146
3147
|
}
|
|
3147
3148
|
}
|
|
3148
|
-
function _async_to_generator$
|
|
3149
|
+
function _async_to_generator$17(fn) {
|
|
3149
3150
|
return function() {
|
|
3150
3151
|
var self = this, args = arguments;
|
|
3151
3152
|
return new Promise(function(resolve, reject) {
|
|
3152
3153
|
var gen = fn.apply(self, args);
|
|
3153
3154
|
function _next(value) {
|
|
3154
|
-
asyncGeneratorStep$
|
|
3155
|
+
asyncGeneratorStep$17(gen, resolve, reject, _next, _throw, "next", value);
|
|
3155
3156
|
}
|
|
3156
3157
|
function _throw(err) {
|
|
3157
|
-
asyncGeneratorStep$
|
|
3158
|
+
asyncGeneratorStep$17(gen, resolve, reject, _next, _throw, "throw", err);
|
|
3158
3159
|
}
|
|
3159
3160
|
_next(undefined);
|
|
3160
3161
|
});
|
|
3161
3162
|
};
|
|
3162
3163
|
}
|
|
3163
|
-
function _define_property$
|
|
3164
|
+
function _define_property$J(obj, key, value) {
|
|
3164
3165
|
if (key in obj) {
|
|
3165
3166
|
Object.defineProperty(obj, key, {
|
|
3166
3167
|
value: value,
|
|
@@ -3181,7 +3182,7 @@ function _instanceof$n(left, right) {
|
|
|
3181
3182
|
return left instanceof right;
|
|
3182
3183
|
}
|
|
3183
3184
|
}
|
|
3184
|
-
function _object_spread$
|
|
3185
|
+
function _object_spread$J(target) {
|
|
3185
3186
|
for(var i = 1; i < arguments.length; i++){
|
|
3186
3187
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
3187
3188
|
var ownKeys = Object.keys(source);
|
|
@@ -3191,12 +3192,12 @@ function _object_spread$I(target) {
|
|
|
3191
3192
|
}));
|
|
3192
3193
|
}
|
|
3193
3194
|
ownKeys.forEach(function(key) {
|
|
3194
|
-
_define_property$
|
|
3195
|
+
_define_property$J(target, key, source[key]);
|
|
3195
3196
|
});
|
|
3196
3197
|
}
|
|
3197
3198
|
return target;
|
|
3198
3199
|
}
|
|
3199
|
-
function ownKeys$
|
|
3200
|
+
function ownKeys$s(object, enumerableOnly) {
|
|
3200
3201
|
var keys = Object.keys(object);
|
|
3201
3202
|
if (Object.getOwnPropertySymbols) {
|
|
3202
3203
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -3204,18 +3205,18 @@ function ownKeys$q(object, enumerableOnly) {
|
|
|
3204
3205
|
}
|
|
3205
3206
|
return keys;
|
|
3206
3207
|
}
|
|
3207
|
-
function _object_spread_props$
|
|
3208
|
+
function _object_spread_props$s(target, source) {
|
|
3208
3209
|
source = source != null ? source : {};
|
|
3209
3210
|
if (Object.getOwnPropertyDescriptors) {
|
|
3210
3211
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
3211
3212
|
} else {
|
|
3212
|
-
ownKeys$
|
|
3213
|
+
ownKeys$s(Object(source)).forEach(function(key) {
|
|
3213
3214
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
3214
3215
|
});
|
|
3215
3216
|
}
|
|
3216
3217
|
return target;
|
|
3217
3218
|
}
|
|
3218
|
-
function _ts_generator$
|
|
3219
|
+
function _ts_generator$17(thisArg, body) {
|
|
3219
3220
|
var f, y, t, _ = {
|
|
3220
3221
|
label: 0,
|
|
3221
3222
|
sent: function() {
|
|
@@ -3326,9 +3327,9 @@ function _ts_generator$18(thisArg, body) {
|
|
|
3326
3327
|
return withCallModelArgs(yargs);
|
|
3327
3328
|
},
|
|
3328
3329
|
handler: wrapCommandHandler(function(argv) {
|
|
3329
|
-
return _async_to_generator$
|
|
3330
|
+
return _async_to_generator$17(function() {
|
|
3330
3331
|
var context, data, rawData, _tmp, params, result;
|
|
3331
|
-
return _ts_generator$
|
|
3332
|
+
return _ts_generator$17(this, function(_state) {
|
|
3332
3333
|
switch(_state.label){
|
|
3333
3334
|
case 0:
|
|
3334
3335
|
context = requireCliContext();
|
|
@@ -3368,7 +3369,7 @@ function _ts_generator$18(thisArg, body) {
|
|
|
3368
3369
|
});
|
|
3369
3370
|
}
|
|
3370
3371
|
}
|
|
3371
|
-
params = _object_spread_props$
|
|
3372
|
+
params = _object_spread_props$s(_object_spread$J({
|
|
3372
3373
|
modelType: argv.model,
|
|
3373
3374
|
call: argv.verb
|
|
3374
3375
|
}, argv.specifier == null ? {} : {
|
|
@@ -3392,12 +3393,12 @@ function _ts_generator$18(thisArg, body) {
|
|
|
3392
3393
|
})
|
|
3393
3394
|
};
|
|
3394
3395
|
|
|
3395
|
-
function _array_like_to_array$
|
|
3396
|
+
function _array_like_to_array$12(arr, len) {
|
|
3396
3397
|
if (len == null || len > arr.length) len = arr.length;
|
|
3397
3398
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
3398
3399
|
return arr2;
|
|
3399
3400
|
}
|
|
3400
|
-
function _array_with_holes$
|
|
3401
|
+
function _array_with_holes$g(arr) {
|
|
3401
3402
|
if (Array.isArray(arr)) return arr;
|
|
3402
3403
|
}
|
|
3403
3404
|
function _instanceof$m(left, right) {
|
|
@@ -3408,7 +3409,7 @@ function _instanceof$m(left, right) {
|
|
|
3408
3409
|
return left instanceof right;
|
|
3409
3410
|
}
|
|
3410
3411
|
}
|
|
3411
|
-
function _iterable_to_array_limit$
|
|
3412
|
+
function _iterable_to_array_limit$g(arr, i) {
|
|
3412
3413
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
3413
3414
|
if (_i == null) return;
|
|
3414
3415
|
var _arr = [];
|
|
@@ -3432,23 +3433,23 @@ function _iterable_to_array_limit$h(arr, i) {
|
|
|
3432
3433
|
}
|
|
3433
3434
|
return _arr;
|
|
3434
3435
|
}
|
|
3435
|
-
function _non_iterable_rest$
|
|
3436
|
+
function _non_iterable_rest$g() {
|
|
3436
3437
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
3437
3438
|
}
|
|
3438
|
-
function _sliced_to_array$
|
|
3439
|
-
return _array_with_holes$
|
|
3439
|
+
function _sliced_to_array$g(arr, i) {
|
|
3440
|
+
return _array_with_holes$g(arr) || _iterable_to_array_limit$g(arr, i) || _unsupported_iterable_to_array$12(arr, i) || _non_iterable_rest$g();
|
|
3440
3441
|
}
|
|
3441
3442
|
function _type_of(obj) {
|
|
3442
3443
|
"@swc/helpers - typeof";
|
|
3443
3444
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
3444
3445
|
}
|
|
3445
|
-
function _unsupported_iterable_to_array$
|
|
3446
|
+
function _unsupported_iterable_to_array$12(o, minLen) {
|
|
3446
3447
|
if (!o) return;
|
|
3447
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
3448
|
+
if (typeof o === "string") return _array_like_to_array$12(o, minLen);
|
|
3448
3449
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
3449
3450
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
3450
3451
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
3451
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
3452
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$12(o, minLen);
|
|
3452
3453
|
}
|
|
3453
3454
|
/**
|
|
3454
3455
|
* Resolves the manifest entry for `modelType`. Lookup tries
|
|
@@ -3541,7 +3542,7 @@ function rewriteWithFields(value, fields) {
|
|
|
3541
3542
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
3542
3543
|
try {
|
|
3543
3544
|
for(var _iterator1 = Object.entries(value)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
3544
|
-
var _step_value = _sliced_to_array$
|
|
3545
|
+
var _step_value = _sliced_to_array$g(_step1.value, 2), key = _step_value[0], raw = _step_value[1];
|
|
3545
3546
|
var field1 = fieldByName.get(key);
|
|
3546
3547
|
if (field1) {
|
|
3547
3548
|
var longKey = field1.longName.length > 0 ? field1.longName : key;
|
|
@@ -3601,13 +3602,13 @@ function isPlainObject(value) {
|
|
|
3601
3602
|
return result;
|
|
3602
3603
|
}
|
|
3603
3604
|
|
|
3604
|
-
function _array_like_to_array$
|
|
3605
|
+
function _array_like_to_array$11(arr, len) {
|
|
3605
3606
|
if (len == null || len > arr.length) len = arr.length;
|
|
3606
3607
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
3607
3608
|
return arr2;
|
|
3608
3609
|
}
|
|
3609
3610
|
function _array_without_holes$X(arr) {
|
|
3610
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
3611
|
+
if (Array.isArray(arr)) return _array_like_to_array$11(arr);
|
|
3611
3612
|
}
|
|
3612
3613
|
function _iterable_to_array$X(iter) {
|
|
3613
3614
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
@@ -3616,15 +3617,15 @@ function _non_iterable_spread$X() {
|
|
|
3616
3617
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
3617
3618
|
}
|
|
3618
3619
|
function _to_consumable_array$X(arr) {
|
|
3619
|
-
return _array_without_holes$X(arr) || _iterable_to_array$X(arr) || _unsupported_iterable_to_array$
|
|
3620
|
+
return _array_without_holes$X(arr) || _iterable_to_array$X(arr) || _unsupported_iterable_to_array$11(arr) || _non_iterable_spread$X();
|
|
3620
3621
|
}
|
|
3621
|
-
function _unsupported_iterable_to_array$
|
|
3622
|
+
function _unsupported_iterable_to_array$11(o, minLen) {
|
|
3622
3623
|
if (!o) return;
|
|
3623
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
3624
|
+
if (typeof o === "string") return _array_like_to_array$11(o, minLen);
|
|
3624
3625
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
3625
3626
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
3626
3627
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
3627
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
3628
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$11(o, minLen);
|
|
3628
3629
|
}
|
|
3629
3630
|
/**
|
|
3630
3631
|
* Default command name for the model-decode command. Top-level so it stays
|
|
@@ -3793,21 +3794,21 @@ function renderAncestorLine(ancestor) {
|
|
|
3793
3794
|
return ancestor.modelName ? "- ".concat(ancestor.modelName, " — prefix ").concat(ancestor.prefix, ", id ").concat(ancestor.id) : "- <unknown> — prefix ".concat(ancestor.prefix, ", id ").concat(ancestor.id);
|
|
3794
3795
|
}
|
|
3795
3796
|
|
|
3796
|
-
function _array_like_to_array$
|
|
3797
|
+
function _array_like_to_array$10(arr, len) {
|
|
3797
3798
|
if (len == null || len > arr.length) len = arr.length;
|
|
3798
3799
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
3799
3800
|
return arr2;
|
|
3800
3801
|
}
|
|
3801
|
-
function _array_with_holes$
|
|
3802
|
+
function _array_with_holes$f(arr) {
|
|
3802
3803
|
if (Array.isArray(arr)) return arr;
|
|
3803
3804
|
}
|
|
3804
3805
|
function _array_without_holes$W(arr) {
|
|
3805
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
3806
|
+
if (Array.isArray(arr)) return _array_like_to_array$10(arr);
|
|
3806
3807
|
}
|
|
3807
3808
|
function _iterable_to_array$W(iter) {
|
|
3808
3809
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
3809
3810
|
}
|
|
3810
|
-
function _iterable_to_array_limit$
|
|
3811
|
+
function _iterable_to_array_limit$f(arr, i) {
|
|
3811
3812
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
3812
3813
|
if (_i == null) return;
|
|
3813
3814
|
var _arr = [];
|
|
@@ -3831,25 +3832,25 @@ function _iterable_to_array_limit$g(arr, i) {
|
|
|
3831
3832
|
}
|
|
3832
3833
|
return _arr;
|
|
3833
3834
|
}
|
|
3834
|
-
function _non_iterable_rest$
|
|
3835
|
+
function _non_iterable_rest$f() {
|
|
3835
3836
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
3836
3837
|
}
|
|
3837
3838
|
function _non_iterable_spread$W() {
|
|
3838
3839
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
3839
3840
|
}
|
|
3840
|
-
function _sliced_to_array$
|
|
3841
|
-
return _array_with_holes$
|
|
3841
|
+
function _sliced_to_array$f(arr, i) {
|
|
3842
|
+
return _array_with_holes$f(arr) || _iterable_to_array_limit$f(arr, i) || _unsupported_iterable_to_array$10(arr, i) || _non_iterable_rest$f();
|
|
3842
3843
|
}
|
|
3843
3844
|
function _to_consumable_array$W(arr) {
|
|
3844
|
-
return _array_without_holes$W(arr) || _iterable_to_array$W(arr) || _unsupported_iterable_to_array$
|
|
3845
|
+
return _array_without_holes$W(arr) || _iterable_to_array$W(arr) || _unsupported_iterable_to_array$10(arr) || _non_iterable_spread$W();
|
|
3845
3846
|
}
|
|
3846
|
-
function _unsupported_iterable_to_array$
|
|
3847
|
+
function _unsupported_iterable_to_array$10(o, minLen) {
|
|
3847
3848
|
if (!o) return;
|
|
3848
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
3849
|
+
if (typeof o === "string") return _array_like_to_array$10(o, minLen);
|
|
3849
3850
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
3850
3851
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
3851
3852
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
3852
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
3853
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$10(o, minLen);
|
|
3853
3854
|
}
|
|
3854
3855
|
/**
|
|
3855
3856
|
* Parses the positionals for the top-level `get <modelOrKey> [key]` command into a
|
|
@@ -4017,7 +4018,7 @@ function inferModelTypeFromKeys(keys, manifest) {
|
|
|
4017
4018
|
code: 'INVALID_ARGUMENT'
|
|
4018
4019
|
});
|
|
4019
4020
|
}
|
|
4020
|
-
var _decodedTypes = _sliced_to_array$
|
|
4021
|
+
var _decodedTypes = _sliced_to_array$f(decodedTypes, 1), modelType = _decodedTypes[0];
|
|
4021
4022
|
return {
|
|
4022
4023
|
modelType: modelType,
|
|
4023
4024
|
keys: keys
|
|
@@ -4030,7 +4031,7 @@ function manifestPrefixList(manifest) {
|
|
|
4030
4031
|
return prefixes.join(', ');
|
|
4031
4032
|
}
|
|
4032
4033
|
|
|
4033
|
-
function asyncGeneratorStep$
|
|
4034
|
+
function asyncGeneratorStep$16(gen, resolve, reject, _next, _throw, key, arg) {
|
|
4034
4035
|
try {
|
|
4035
4036
|
var info = gen[key](arg);
|
|
4036
4037
|
var value = info.value;
|
|
@@ -4044,22 +4045,22 @@ function asyncGeneratorStep$17(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
4044
4045
|
Promise.resolve(value).then(_next, _throw);
|
|
4045
4046
|
}
|
|
4046
4047
|
}
|
|
4047
|
-
function _async_to_generator$
|
|
4048
|
+
function _async_to_generator$16(fn) {
|
|
4048
4049
|
return function() {
|
|
4049
4050
|
var self = this, args = arguments;
|
|
4050
4051
|
return new Promise(function(resolve, reject) {
|
|
4051
4052
|
var gen = fn.apply(self, args);
|
|
4052
4053
|
function _next(value) {
|
|
4053
|
-
asyncGeneratorStep$
|
|
4054
|
+
asyncGeneratorStep$16(gen, resolve, reject, _next, _throw, "next", value);
|
|
4054
4055
|
}
|
|
4055
4056
|
function _throw(err) {
|
|
4056
|
-
asyncGeneratorStep$
|
|
4057
|
+
asyncGeneratorStep$16(gen, resolve, reject, _next, _throw, "throw", err);
|
|
4057
4058
|
}
|
|
4058
4059
|
_next(undefined);
|
|
4059
4060
|
});
|
|
4060
4061
|
};
|
|
4061
4062
|
}
|
|
4062
|
-
function _ts_generator$
|
|
4063
|
+
function _ts_generator$16(thisArg, body) {
|
|
4063
4064
|
var f, y, t, _ = {
|
|
4064
4065
|
label: 0,
|
|
4065
4066
|
sent: function() {
|
|
@@ -4180,9 +4181,9 @@ function _ts_generator$17(thisArg, body) {
|
|
|
4180
4181
|
});
|
|
4181
4182
|
},
|
|
4182
4183
|
handler: wrapCommandHandler(function(argv) {
|
|
4183
|
-
return _async_to_generator$
|
|
4184
|
+
return _async_to_generator$16(function() {
|
|
4184
4185
|
var context, _parseGetArgs, modelType, key, result;
|
|
4185
|
-
return _ts_generator$
|
|
4186
|
+
return _ts_generator$16(this, function(_state) {
|
|
4186
4187
|
switch(_state.label){
|
|
4187
4188
|
case 0:
|
|
4188
4189
|
context = requireCliContext();
|
|
@@ -4207,7 +4208,7 @@ function _ts_generator$17(thisArg, body) {
|
|
|
4207
4208
|
})
|
|
4208
4209
|
};
|
|
4209
4210
|
|
|
4210
|
-
function asyncGeneratorStep$
|
|
4211
|
+
function asyncGeneratorStep$15(gen, resolve, reject, _next, _throw, key, arg) {
|
|
4211
4212
|
try {
|
|
4212
4213
|
var info = gen[key](arg);
|
|
4213
4214
|
var value = info.value;
|
|
@@ -4221,22 +4222,22 @@ function asyncGeneratorStep$16(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
4221
4222
|
Promise.resolve(value).then(_next, _throw);
|
|
4222
4223
|
}
|
|
4223
4224
|
}
|
|
4224
|
-
function _async_to_generator$
|
|
4225
|
+
function _async_to_generator$15(fn) {
|
|
4225
4226
|
return function() {
|
|
4226
4227
|
var self = this, args = arguments;
|
|
4227
4228
|
return new Promise(function(resolve, reject) {
|
|
4228
4229
|
var gen = fn.apply(self, args);
|
|
4229
4230
|
function _next(value) {
|
|
4230
|
-
asyncGeneratorStep$
|
|
4231
|
+
asyncGeneratorStep$15(gen, resolve, reject, _next, _throw, "next", value);
|
|
4231
4232
|
}
|
|
4232
4233
|
function _throw(err) {
|
|
4233
|
-
asyncGeneratorStep$
|
|
4234
|
+
asyncGeneratorStep$15(gen, resolve, reject, _next, _throw, "throw", err);
|
|
4234
4235
|
}
|
|
4235
4236
|
_next(undefined);
|
|
4236
4237
|
});
|
|
4237
4238
|
};
|
|
4238
4239
|
}
|
|
4239
|
-
function _ts_generator$
|
|
4240
|
+
function _ts_generator$15(thisArg, body) {
|
|
4240
4241
|
var f, y, t, _ = {
|
|
4241
4242
|
label: 0,
|
|
4242
4243
|
sent: function() {
|
|
@@ -4362,9 +4363,9 @@ function _ts_generator$16(thisArg, body) {
|
|
|
4362
4363
|
});
|
|
4363
4364
|
},
|
|
4364
4365
|
handler: wrapCommandHandler(function(argv) {
|
|
4365
|
-
return _async_to_generator$
|
|
4366
|
+
return _async_to_generator$15(function() {
|
|
4366
4367
|
var context, firstArg, rest, resolvedFirst, resolvedRest, stdinKeys, _parseGetManyArgs, modelType, keys, result;
|
|
4367
|
-
return _ts_generator$
|
|
4368
|
+
return _ts_generator$15(this, function(_state) {
|
|
4368
4369
|
switch(_state.label){
|
|
4369
4370
|
case 0:
|
|
4370
4371
|
context = requireCliContext();
|
|
@@ -4407,7 +4408,7 @@ function _ts_generator$16(thisArg, body) {
|
|
|
4407
4408
|
})
|
|
4408
4409
|
};
|
|
4409
4410
|
|
|
4410
|
-
function asyncGeneratorStep$
|
|
4411
|
+
function asyncGeneratorStep$14(gen, resolve, reject, _next, _throw, key, arg) {
|
|
4411
4412
|
try {
|
|
4412
4413
|
var info = gen[key](arg);
|
|
4413
4414
|
var value = info.value;
|
|
@@ -4421,22 +4422,22 @@ function asyncGeneratorStep$15(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
4421
4422
|
Promise.resolve(value).then(_next, _throw);
|
|
4422
4423
|
}
|
|
4423
4424
|
}
|
|
4424
|
-
function _async_to_generator$
|
|
4425
|
+
function _async_to_generator$14(fn) {
|
|
4425
4426
|
return function() {
|
|
4426
4427
|
var self = this, args = arguments;
|
|
4427
4428
|
return new Promise(function(resolve, reject) {
|
|
4428
4429
|
var gen = fn.apply(self, args);
|
|
4429
4430
|
function _next(value) {
|
|
4430
|
-
asyncGeneratorStep$
|
|
4431
|
+
asyncGeneratorStep$14(gen, resolve, reject, _next, _throw, "next", value);
|
|
4431
4432
|
}
|
|
4432
4433
|
function _throw(err) {
|
|
4433
|
-
asyncGeneratorStep$
|
|
4434
|
+
asyncGeneratorStep$14(gen, resolve, reject, _next, _throw, "throw", err);
|
|
4434
4435
|
}
|
|
4435
4436
|
_next(undefined);
|
|
4436
4437
|
});
|
|
4437
4438
|
};
|
|
4438
4439
|
}
|
|
4439
|
-
function _define_property$
|
|
4440
|
+
function _define_property$I(obj, key, value) {
|
|
4440
4441
|
if (key in obj) {
|
|
4441
4442
|
Object.defineProperty(obj, key, {
|
|
4442
4443
|
value: value,
|
|
@@ -4449,7 +4450,7 @@ function _define_property$H(obj, key, value) {
|
|
|
4449
4450
|
}
|
|
4450
4451
|
return obj;
|
|
4451
4452
|
}
|
|
4452
|
-
function _object_spread$
|
|
4453
|
+
function _object_spread$I(target) {
|
|
4453
4454
|
for(var i = 1; i < arguments.length; i++){
|
|
4454
4455
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
4455
4456
|
var ownKeys = Object.keys(source);
|
|
@@ -4459,12 +4460,12 @@ function _object_spread$H(target) {
|
|
|
4459
4460
|
}));
|
|
4460
4461
|
}
|
|
4461
4462
|
ownKeys.forEach(function(key) {
|
|
4462
|
-
_define_property$
|
|
4463
|
+
_define_property$I(target, key, source[key]);
|
|
4463
4464
|
});
|
|
4464
4465
|
}
|
|
4465
4466
|
return target;
|
|
4466
4467
|
}
|
|
4467
|
-
function _ts_generator$
|
|
4468
|
+
function _ts_generator$14(thisArg, body) {
|
|
4468
4469
|
var f, y, t, _ = {
|
|
4469
4470
|
label: 0,
|
|
4470
4471
|
sent: function() {
|
|
@@ -4620,9 +4621,9 @@ function _ts_generator$15(thisArg, body) {
|
|
|
4620
4621
|
* @param input.updates - The partial {@link CliConfig} to merge on top of the existing on-disk config.
|
|
4621
4622
|
* @returns The merged {@link CliConfig} that was just written.
|
|
4622
4623
|
*/ function mergeCliConfig(input) {
|
|
4623
|
-
return _async_to_generator$
|
|
4624
|
+
return _async_to_generator$14(function() {
|
|
4624
4625
|
var _ref, _input_updates_activeEnv, existing, merged;
|
|
4625
|
-
return _ts_generator$
|
|
4626
|
+
return _ts_generator$14(this, function(_state) {
|
|
4626
4627
|
switch(_state.label){
|
|
4627
4628
|
case 0:
|
|
4628
4629
|
return [
|
|
@@ -4635,7 +4636,7 @@ function _ts_generator$15(thisArg, body) {
|
|
|
4635
4636
|
existing = (_ref = _state.sent()) !== null && _ref !== void 0 ? _ref : {};
|
|
4636
4637
|
merged = {
|
|
4637
4638
|
activeEnv: (_input_updates_activeEnv = input.updates.activeEnv) !== null && _input_updates_activeEnv !== void 0 ? _input_updates_activeEnv : existing.activeEnv,
|
|
4638
|
-
envs: input.updates.envs ? _object_spread$
|
|
4639
|
+
envs: input.updates.envs ? _object_spread$I({}, existing.envs, input.updates.envs) : existing.envs,
|
|
4639
4640
|
output: input.updates.output === undefined ? existing.output : mergeOutputConfig(existing.output, input.updates.output)
|
|
4640
4641
|
};
|
|
4641
4642
|
return [
|
|
@@ -4677,12 +4678,12 @@ function mergeOutputCommandsConfig(existing, updates) {
|
|
|
4677
4678
|
var result;
|
|
4678
4679
|
if ('commands' in updates) {
|
|
4679
4680
|
if (updates.commands) {
|
|
4680
|
-
var merged = _object_spread$
|
|
4681
|
+
var merged = _object_spread$I({}, existing);
|
|
4681
4682
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
4682
4683
|
try {
|
|
4683
4684
|
for(var _iterator = Object.keys(updates.commands)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
4684
4685
|
var key = _step.value;
|
|
4685
|
-
merged[key] = _object_spread$
|
|
4686
|
+
merged[key] = _object_spread$I({}, existing === null || existing === void 0 ? void 0 : existing[key], updates.commands[key]);
|
|
4686
4687
|
}
|
|
4687
4688
|
} catch (err) {
|
|
4688
4689
|
_didIteratorError = true;
|
|
@@ -4747,15 +4748,15 @@ function mergeOutputCommandsConfig(existing, updates) {
|
|
|
4747
4748
|
return result;
|
|
4748
4749
|
}
|
|
4749
4750
|
|
|
4750
|
-
function _array_like_to_array
|
|
4751
|
+
function _array_like_to_array$$(arr, len) {
|
|
4751
4752
|
if (len == null || len > arr.length) len = arr.length;
|
|
4752
4753
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4753
4754
|
return arr2;
|
|
4754
4755
|
}
|
|
4755
4756
|
function _array_without_holes$V(arr) {
|
|
4756
|
-
if (Array.isArray(arr)) return _array_like_to_array
|
|
4757
|
+
if (Array.isArray(arr)) return _array_like_to_array$$(arr);
|
|
4757
4758
|
}
|
|
4758
|
-
function _define_property$
|
|
4759
|
+
function _define_property$H(obj, key, value) {
|
|
4759
4760
|
if (key in obj) {
|
|
4760
4761
|
Object.defineProperty(obj, key, {
|
|
4761
4762
|
value: value,
|
|
@@ -4774,7 +4775,7 @@ function _iterable_to_array$V(iter) {
|
|
|
4774
4775
|
function _non_iterable_spread$V() {
|
|
4775
4776
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
4776
4777
|
}
|
|
4777
|
-
function _object_spread$
|
|
4778
|
+
function _object_spread$H(target) {
|
|
4778
4779
|
for(var i = 1; i < arguments.length; i++){
|
|
4779
4780
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
4780
4781
|
var ownKeys = Object.keys(source);
|
|
@@ -4784,12 +4785,12 @@ function _object_spread$G(target) {
|
|
|
4784
4785
|
}));
|
|
4785
4786
|
}
|
|
4786
4787
|
ownKeys.forEach(function(key) {
|
|
4787
|
-
_define_property$
|
|
4788
|
+
_define_property$H(target, key, source[key]);
|
|
4788
4789
|
});
|
|
4789
4790
|
}
|
|
4790
4791
|
return target;
|
|
4791
4792
|
}
|
|
4792
|
-
function ownKeys$
|
|
4793
|
+
function ownKeys$r(object, enumerableOnly) {
|
|
4793
4794
|
var keys = Object.keys(object);
|
|
4794
4795
|
if (Object.getOwnPropertySymbols) {
|
|
4795
4796
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -4797,27 +4798,27 @@ function ownKeys$p(object, enumerableOnly) {
|
|
|
4797
4798
|
}
|
|
4798
4799
|
return keys;
|
|
4799
4800
|
}
|
|
4800
|
-
function _object_spread_props$
|
|
4801
|
+
function _object_spread_props$r(target, source) {
|
|
4801
4802
|
source = source != null ? source : {};
|
|
4802
4803
|
if (Object.getOwnPropertyDescriptors) {
|
|
4803
4804
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
4804
4805
|
} else {
|
|
4805
|
-
ownKeys$
|
|
4806
|
+
ownKeys$r(Object(source)).forEach(function(key) {
|
|
4806
4807
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
4807
4808
|
});
|
|
4808
4809
|
}
|
|
4809
4810
|
return target;
|
|
4810
4811
|
}
|
|
4811
4812
|
function _to_consumable_array$V(arr) {
|
|
4812
|
-
return _array_without_holes$V(arr) || _iterable_to_array$V(arr) || _unsupported_iterable_to_array
|
|
4813
|
+
return _array_without_holes$V(arr) || _iterable_to_array$V(arr) || _unsupported_iterable_to_array$$(arr) || _non_iterable_spread$V();
|
|
4813
4814
|
}
|
|
4814
|
-
function _unsupported_iterable_to_array
|
|
4815
|
+
function _unsupported_iterable_to_array$$(o, minLen) {
|
|
4815
4816
|
if (!o) return;
|
|
4816
|
-
if (typeof o === "string") return _array_like_to_array
|
|
4817
|
+
if (typeof o === "string") return _array_like_to_array$$(o, minLen);
|
|
4817
4818
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
4818
4819
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
4819
4820
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
4820
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array
|
|
4821
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$$(o, minLen);
|
|
4821
4822
|
}
|
|
4822
4823
|
/**
|
|
4823
4824
|
* The default OAuth/OIDC scopes requested by the CLI when none are configured.
|
|
@@ -5018,7 +5019,7 @@ function nonEmpty(value) {
|
|
|
5018
5019
|
if (refreshToken) {
|
|
5019
5020
|
var accessToken = nonEmpty(process.env["".concat(prefix, "_ACCESS_TOKEN")]);
|
|
5020
5021
|
var scope = nonEmpty(process.env["".concat(prefix, "_TOKEN_SCOPE")]);
|
|
5021
|
-
result = _object_spread_props$
|
|
5022
|
+
result = _object_spread_props$r(_object_spread$H({
|
|
5022
5023
|
accessToken: accessToken !== null && accessToken !== void 0 ? accessToken : '',
|
|
5023
5024
|
refreshToken: refreshToken,
|
|
5024
5025
|
// No reliable expiry is supplied via env, so force a refresh on first use (expiresAt 0 = expired).
|
|
@@ -5032,7 +5033,7 @@ function nonEmpty(value) {
|
|
|
5032
5033
|
return result;
|
|
5033
5034
|
}
|
|
5034
5035
|
|
|
5035
|
-
function asyncGeneratorStep$
|
|
5036
|
+
function asyncGeneratorStep$13(gen, resolve, reject, _next, _throw, key, arg) {
|
|
5036
5037
|
try {
|
|
5037
5038
|
var info = gen[key](arg);
|
|
5038
5039
|
var value = info.value;
|
|
@@ -5046,22 +5047,22 @@ function asyncGeneratorStep$14(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
5046
5047
|
Promise.resolve(value).then(_next, _throw);
|
|
5047
5048
|
}
|
|
5048
5049
|
}
|
|
5049
|
-
function _async_to_generator$
|
|
5050
|
+
function _async_to_generator$13(fn) {
|
|
5050
5051
|
return function() {
|
|
5051
5052
|
var self = this, args = arguments;
|
|
5052
5053
|
return new Promise(function(resolve, reject) {
|
|
5053
5054
|
var gen = fn.apply(self, args);
|
|
5054
5055
|
function _next(value) {
|
|
5055
|
-
asyncGeneratorStep$
|
|
5056
|
+
asyncGeneratorStep$13(gen, resolve, reject, _next, _throw, "next", value);
|
|
5056
5057
|
}
|
|
5057
5058
|
function _throw(err) {
|
|
5058
|
-
asyncGeneratorStep$
|
|
5059
|
+
asyncGeneratorStep$13(gen, resolve, reject, _next, _throw, "throw", err);
|
|
5059
5060
|
}
|
|
5060
5061
|
_next(undefined);
|
|
5061
5062
|
});
|
|
5062
5063
|
};
|
|
5063
5064
|
}
|
|
5064
|
-
function _ts_generator$
|
|
5065
|
+
function _ts_generator$13(thisArg, body) {
|
|
5065
5066
|
var f, y, t, _ = {
|
|
5066
5067
|
label: 0,
|
|
5067
5068
|
sent: function() {
|
|
@@ -5188,9 +5189,9 @@ function _ts_generator$14(thisArg, body) {
|
|
|
5188
5189
|
* @param input - Resolution inputs.
|
|
5189
5190
|
* @returns The resolved env triple.
|
|
5190
5191
|
*/ function resolveCliEnv(input) {
|
|
5191
|
-
return _async_to_generator$
|
|
5192
|
+
return _async_to_generator$13(function() {
|
|
5192
5193
|
var _ref, _input_envVarName, _ref1, _input_flagEnv, _config_envs, _findCliEnvDefault, config, envVarName, envName, stored, defaultEnv, merged, env;
|
|
5193
|
-
return _ts_generator$
|
|
5194
|
+
return _ts_generator$13(this, function(_state) {
|
|
5194
5195
|
switch(_state.label){
|
|
5195
5196
|
case 0:
|
|
5196
5197
|
return [
|
|
@@ -5229,9 +5230,9 @@ function _ts_generator$14(thisArg, body) {
|
|
|
5229
5230
|
})();
|
|
5230
5231
|
}
|
|
5231
5232
|
function resolveCliEnvOrThrow(input) {
|
|
5232
|
-
return _async_to_generator$
|
|
5233
|
+
return _async_to_generator$13(function() {
|
|
5233
5234
|
var _ref, config, envName, env;
|
|
5234
|
-
return _ts_generator$
|
|
5235
|
+
return _ts_generator$13(this, function(_state) {
|
|
5235
5236
|
switch(_state.label){
|
|
5236
5237
|
case 0:
|
|
5237
5238
|
return [
|
|
@@ -5326,7 +5327,7 @@ function resolveCliEnvOrThrow(input) {
|
|
|
5326
5327
|
}).hasExpired();
|
|
5327
5328
|
}
|
|
5328
5329
|
|
|
5329
|
-
function asyncGeneratorStep$
|
|
5330
|
+
function asyncGeneratorStep$12(gen, resolve, reject, _next, _throw, key, arg) {
|
|
5330
5331
|
try {
|
|
5331
5332
|
var info = gen[key](arg);
|
|
5332
5333
|
var value = info.value;
|
|
@@ -5340,22 +5341,22 @@ function asyncGeneratorStep$13(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
5340
5341
|
Promise.resolve(value).then(_next, _throw);
|
|
5341
5342
|
}
|
|
5342
5343
|
}
|
|
5343
|
-
function _async_to_generator$
|
|
5344
|
+
function _async_to_generator$12(fn) {
|
|
5344
5345
|
return function() {
|
|
5345
5346
|
var self = this, args = arguments;
|
|
5346
5347
|
return new Promise(function(resolve, reject) {
|
|
5347
5348
|
var gen = fn.apply(self, args);
|
|
5348
5349
|
function _next(value) {
|
|
5349
|
-
asyncGeneratorStep$
|
|
5350
|
+
asyncGeneratorStep$12(gen, resolve, reject, _next, _throw, "next", value);
|
|
5350
5351
|
}
|
|
5351
5352
|
function _throw(err) {
|
|
5352
|
-
asyncGeneratorStep$
|
|
5353
|
+
asyncGeneratorStep$12(gen, resolve, reject, _next, _throw, "throw", err);
|
|
5353
5354
|
}
|
|
5354
5355
|
_next(undefined);
|
|
5355
5356
|
});
|
|
5356
5357
|
};
|
|
5357
5358
|
}
|
|
5358
|
-
function _define_property$
|
|
5359
|
+
function _define_property$G(obj, key, value) {
|
|
5359
5360
|
if (key in obj) {
|
|
5360
5361
|
Object.defineProperty(obj, key, {
|
|
5361
5362
|
value: value,
|
|
@@ -5376,7 +5377,7 @@ function _instanceof$l(left, right) {
|
|
|
5376
5377
|
return left instanceof right;
|
|
5377
5378
|
}
|
|
5378
5379
|
}
|
|
5379
|
-
function _object_spread$
|
|
5380
|
+
function _object_spread$G(target) {
|
|
5380
5381
|
for(var i = 1; i < arguments.length; i++){
|
|
5381
5382
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
5382
5383
|
var ownKeys = Object.keys(source);
|
|
@@ -5386,12 +5387,31 @@ function _object_spread$F(target) {
|
|
|
5386
5387
|
}));
|
|
5387
5388
|
}
|
|
5388
5389
|
ownKeys.forEach(function(key) {
|
|
5389
|
-
_define_property$
|
|
5390
|
+
_define_property$G(target, key, source[key]);
|
|
5390
5391
|
});
|
|
5391
5392
|
}
|
|
5392
5393
|
return target;
|
|
5393
5394
|
}
|
|
5394
|
-
function
|
|
5395
|
+
function ownKeys$q(object, enumerableOnly) {
|
|
5396
|
+
var keys = Object.keys(object);
|
|
5397
|
+
if (Object.getOwnPropertySymbols) {
|
|
5398
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
5399
|
+
keys.push.apply(keys, symbols);
|
|
5400
|
+
}
|
|
5401
|
+
return keys;
|
|
5402
|
+
}
|
|
5403
|
+
function _object_spread_props$q(target, source) {
|
|
5404
|
+
source = source != null ? source : {};
|
|
5405
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
5406
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
5407
|
+
} else {
|
|
5408
|
+
ownKeys$q(Object(source)).forEach(function(key) {
|
|
5409
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
5410
|
+
});
|
|
5411
|
+
}
|
|
5412
|
+
return target;
|
|
5413
|
+
}
|
|
5414
|
+
function _ts_generator$12(thisArg, body) {
|
|
5395
5415
|
var f, y, t, _ = {
|
|
5396
5416
|
label: 0,
|
|
5397
5417
|
sent: function() {
|
|
@@ -5490,842 +5510,268 @@ function _ts_generator$13(thisArg, body) {
|
|
|
5490
5510
|
};
|
|
5491
5511
|
}
|
|
5492
5512
|
}
|
|
5513
|
+
// The CLI's fetch transport: the global `fetch` wrapped with verbose tracing + the configured
|
|
5514
|
+
// `--timeout`. A plain transport — it injects no `Authorization` header (public + confidential
|
|
5515
|
+
// clients authenticate via `code_verifier` / `client_secret`, not a bearer token).
|
|
5516
|
+
var cliOidcFetch = function cliOidcFetch(input, init) {
|
|
5517
|
+
return tracedFetch(undefined, input, init);
|
|
5518
|
+
};
|
|
5493
5519
|
/**
|
|
5494
|
-
*
|
|
5495
|
-
*
|
|
5496
|
-
*
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5520
|
+
* Maps each shared {@link OidcRelyingPartyErrorCode} back onto the CLI's historical error code +
|
|
5521
|
+
* suggestion, so refactoring the implementation onto the shared core does not change the
|
|
5522
|
+
* `{ ok: false, code, suggestion }` envelope users and scripts depend on.
|
|
5523
|
+
*/ var OIDC_ERROR_CODE_MAP = {
|
|
5524
|
+
DISCOVERY_FAILED: {
|
|
5525
|
+
code: 'OIDC_DISCOVERY_FAILED',
|
|
5526
|
+
suggestion: 'Verify the env oidcIssuer URL is reachable and serves /.well-known/openid-configuration.'
|
|
5527
|
+
},
|
|
5528
|
+
TOKEN_INVALID_GRANT: {
|
|
5529
|
+
code: 'TOKEN_INVALID_GRANT',
|
|
5530
|
+
suggestion: 'Re-run auth login to obtain a fresh code or refresh token.'
|
|
5531
|
+
},
|
|
5532
|
+
TOKEN_EXCHANGE_FAILED: {
|
|
5533
|
+
code: 'TOKEN_EXCHANGE_FAILED'
|
|
5534
|
+
},
|
|
5535
|
+
TOKEN_REVOCATION_FAILED: {
|
|
5536
|
+
code: 'TOKEN_REVOCATION_FAILED'
|
|
5537
|
+
},
|
|
5538
|
+
USERINFO_FAILED: {
|
|
5539
|
+
code: 'USERINFO_FAILED',
|
|
5540
|
+
suggestion: 'Try: <cli> auth login --env <name>'
|
|
5541
|
+
},
|
|
5542
|
+
SESSION_INFO_FAILED: {
|
|
5543
|
+
code: 'SESSION_INFO_FAILED'
|
|
5544
|
+
},
|
|
5545
|
+
AUTH_NO_CODE: {
|
|
5546
|
+
code: 'AUTH_NO_CODE'
|
|
5547
|
+
},
|
|
5548
|
+
AUTH_PROVIDER_ERROR: {
|
|
5549
|
+
code: 'AUTH_PROVIDER_ERROR'
|
|
5550
|
+
},
|
|
5551
|
+
AUTH_REDIRECT_PARSE_FAILED: {
|
|
5552
|
+
code: 'AUTH_REDIRECT_PARSE_FAILED'
|
|
5553
|
+
},
|
|
5554
|
+
INVALID_STATE: {
|
|
5555
|
+
code: 'AUTH_STATE_MISMATCH'
|
|
5556
|
+
},
|
|
5557
|
+
INVALID_SESSION_TTL: {
|
|
5558
|
+
code: 'AUTH_LOGIN_FOR_INVALID'
|
|
5521
5559
|
}
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5560
|
+
};
|
|
5561
|
+
/**
|
|
5562
|
+
* Converts an {@link OidcRelyingPartyError} thrown by the shared core into the CLI's {@link CliError}
|
|
5563
|
+
* (preserving message + mapped code + suggestion). Any other value is returned unchanged.
|
|
5564
|
+
*
|
|
5565
|
+
* @param error - The thrown value.
|
|
5566
|
+
* @returns A {@link CliError} for relying-party errors, otherwise the original value.
|
|
5567
|
+
*/ function oidcRelyingPartyErrorToCliError(error) {
|
|
5568
|
+
var result = error;
|
|
5569
|
+
if (_instanceof$l(error, OidcRelyingPartyError)) {
|
|
5570
|
+
var mapped = OIDC_ERROR_CODE_MAP[error.code];
|
|
5571
|
+
result = new CliError(_object_spread$G({
|
|
5572
|
+
message: error.message,
|
|
5573
|
+
code: mapped.code
|
|
5574
|
+
}, mapped.suggestion ? {
|
|
5575
|
+
suggestion: mapped.suggestion
|
|
5576
|
+
} : {}));
|
|
5527
5577
|
}
|
|
5528
|
-
return
|
|
5578
|
+
return result;
|
|
5529
5579
|
}
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
* @param input - The discovery request.
|
|
5535
|
-
* @param input.issuer - The OIDC issuer URL whose `.well-known/openid-configuration` is fetched first.
|
|
5536
|
-
* @param input.fallbackBaseUrl - Optional sibling base URL tried after the issuer-prefixed and origin-rooted candidates.
|
|
5537
|
-
* @returns The parsed {@link OidcDiscoveryMetadata}. Throws a {@link CliError} (`OIDC_DISCOVERY_FAILED`) when every candidate fails.
|
|
5538
|
-
*/ function discoverOidcMetadata(input) {
|
|
5539
|
-
return _async_to_generator$13(function() {
|
|
5540
|
-
var _ref, candidates, lastError, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, url, res, e, err;
|
|
5541
|
-
return _ts_generator$13(this, function(_state) {
|
|
5580
|
+
function withCliErrors(fn) {
|
|
5581
|
+
return _async_to_generator$12(function() {
|
|
5582
|
+
var e;
|
|
5583
|
+
return _ts_generator$12(this, function(_state) {
|
|
5542
5584
|
switch(_state.label){
|
|
5543
5585
|
case 0:
|
|
5544
|
-
candidates = buildOidcDiscoveryCandidates(input);
|
|
5545
|
-
_iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
5546
|
-
_state.label = 1;
|
|
5547
|
-
case 1:
|
|
5548
5586
|
_state.trys.push([
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
11,
|
|
5552
|
-
12
|
|
5553
|
-
]);
|
|
5554
|
-
_iterator = candidates[Symbol.iterator]();
|
|
5555
|
-
_state.label = 2;
|
|
5556
|
-
case 2:
|
|
5557
|
-
if (!!(_iteratorNormalCompletion = (_step = _iterator.next()).done)) return [
|
|
5558
|
-
3,
|
|
5559
|
-
9
|
|
5560
|
-
];
|
|
5561
|
-
url = _step.value;
|
|
5562
|
-
_state.label = 3;
|
|
5563
|
-
case 3:
|
|
5564
|
-
_state.trys.push([
|
|
5565
|
-
3,
|
|
5566
|
-
7,
|
|
5587
|
+
0,
|
|
5588
|
+
2,
|
|
5567
5589
|
,
|
|
5568
|
-
|
|
5590
|
+
3
|
|
5569
5591
|
]);
|
|
5570
5592
|
return [
|
|
5571
5593
|
4,
|
|
5572
|
-
|
|
5573
|
-
headers: {
|
|
5574
|
-
Accept: 'application/json'
|
|
5575
|
-
}
|
|
5576
|
-
})
|
|
5577
|
-
];
|
|
5578
|
-
case 4:
|
|
5579
|
-
res = _state.sent();
|
|
5580
|
-
if (!res.ok) return [
|
|
5581
|
-
3,
|
|
5582
|
-
6
|
|
5583
|
-
];
|
|
5584
|
-
return [
|
|
5585
|
-
4,
|
|
5586
|
-
res.json()
|
|
5594
|
+
fn()
|
|
5587
5595
|
];
|
|
5588
|
-
case
|
|
5596
|
+
case 1:
|
|
5589
5597
|
return [
|
|
5590
5598
|
2,
|
|
5591
5599
|
_state.sent()
|
|
5592
5600
|
];
|
|
5593
|
-
case
|
|
5594
|
-
lastError = new Error("OIDC discovery failed at ".concat(url, ": ").concat(res.status, " ").concat(res.statusText));
|
|
5595
|
-
return [
|
|
5596
|
-
3,
|
|
5597
|
-
8
|
|
5598
|
-
];
|
|
5599
|
-
case 7:
|
|
5601
|
+
case 2:
|
|
5600
5602
|
e = _state.sent();
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
3,
|
|
5604
|
-
8
|
|
5605
|
-
];
|
|
5606
|
-
case 8:
|
|
5607
|
-
_iteratorNormalCompletion = true;
|
|
5603
|
+
throw oidcRelyingPartyErrorToCliError(e);
|
|
5604
|
+
case 3:
|
|
5608
5605
|
return [
|
|
5609
|
-
3,
|
|
5610
5606
|
2
|
|
5611
5607
|
];
|
|
5612
|
-
case 9:
|
|
5613
|
-
return [
|
|
5614
|
-
3,
|
|
5615
|
-
12
|
|
5616
|
-
];
|
|
5617
|
-
case 10:
|
|
5618
|
-
err = _state.sent();
|
|
5619
|
-
_didIteratorError = true;
|
|
5620
|
-
_iteratorError = err;
|
|
5621
|
-
return [
|
|
5622
|
-
3,
|
|
5623
|
-
12
|
|
5624
|
-
];
|
|
5625
|
-
case 11:
|
|
5626
|
-
try {
|
|
5627
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
5628
|
-
_iterator.return();
|
|
5629
|
-
}
|
|
5630
|
-
} finally{
|
|
5631
|
-
if (_didIteratorError) {
|
|
5632
|
-
throw _iteratorError;
|
|
5633
|
-
}
|
|
5634
|
-
}
|
|
5635
|
-
return [
|
|
5636
|
-
7
|
|
5637
|
-
];
|
|
5638
|
-
case 12:
|
|
5639
|
-
throw new CliError({
|
|
5640
|
-
message: (_ref = lastError === null || lastError === void 0 ? void 0 : lastError.message) !== null && _ref !== void 0 ? _ref : "OIDC discovery failed for all candidates: ".concat(candidates.join(', ')),
|
|
5641
|
-
code: 'OIDC_DISCOVERY_FAILED',
|
|
5642
|
-
suggestion: 'Verify the env oidcIssuer URL is reachable and serves /.well-known/openid-configuration.'
|
|
5643
|
-
});
|
|
5644
5608
|
}
|
|
5645
5609
|
});
|
|
5646
5610
|
})();
|
|
5647
5611
|
}
|
|
5648
5612
|
/**
|
|
5649
|
-
*
|
|
5613
|
+
* Fetches the OIDC discovery document for the given issuer.
|
|
5650
5614
|
*
|
|
5651
|
-
*
|
|
5615
|
+
* @param input - The discovery request.
|
|
5616
|
+
* @returns The parsed {@link OidcDiscoveryMetadata}. Throws a {@link CliError} (`OIDC_DISCOVERY_FAILED`) when every candidate fails.
|
|
5617
|
+
*/ function discoverOidcMetadata(input) {
|
|
5618
|
+
return withCliErrors(function() {
|
|
5619
|
+
return discoverOidcMetadata$1(_object_spread_props$q(_object_spread$G({}, input), {
|
|
5620
|
+
fetch: cliOidcFetch
|
|
5621
|
+
}));
|
|
5622
|
+
});
|
|
5623
|
+
}
|
|
5624
|
+
/**
|
|
5625
|
+
* Exchanges an authorization code (from the redirect) for an access token + refresh token.
|
|
5652
5626
|
*
|
|
5653
5627
|
* @param input - The token exchange parameters.
|
|
5654
|
-
* @param input.tokenEndpoint - The OIDC token endpoint URL discovered from the issuer.
|
|
5655
|
-
* @param input.clientId - The OAuth client ID.
|
|
5656
|
-
* @param input.clientSecret - The OAuth client secret used for `client_secret_post` auth.
|
|
5657
|
-
* @param input.redirectUri - The redirect URI registered with the OAuth client (must match the value used when requesting the code).
|
|
5658
|
-
* @param input.code - The authorization code returned to the redirect URI.
|
|
5659
|
-
* @param input.codeVerifier - The PKCE code verifier originally paired with the code challenge in the authorization request.
|
|
5660
5628
|
* @returns The parsed {@link OidcTokenResponse} with access/refresh tokens.
|
|
5661
5629
|
*/ function exchangeAuthorizationCode(input) {
|
|
5662
|
-
return
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
client_id: input.clientId,
|
|
5668
|
-
client_secret: input.clientSecret,
|
|
5669
|
-
redirect_uri: input.redirectUri,
|
|
5670
|
-
code: input.code,
|
|
5671
|
-
code_verifier: input.codeVerifier
|
|
5672
|
-
});
|
|
5673
|
-
return [
|
|
5674
|
-
2,
|
|
5675
|
-
postTokenEndpoint({
|
|
5676
|
-
tokenEndpoint: input.tokenEndpoint,
|
|
5677
|
-
body: params
|
|
5678
|
-
})
|
|
5679
|
-
];
|
|
5680
|
-
});
|
|
5681
|
-
})();
|
|
5630
|
+
return withCliErrors(function() {
|
|
5631
|
+
return exchangeAuthorizationCode$1(_object_spread_props$q(_object_spread$G({}, input), {
|
|
5632
|
+
fetch: cliOidcFetch
|
|
5633
|
+
}));
|
|
5634
|
+
});
|
|
5682
5635
|
}
|
|
5683
5636
|
/**
|
|
5684
5637
|
* Exchanges a refresh token for a new access token (and possibly a rotated refresh token).
|
|
5685
5638
|
*
|
|
5686
5639
|
* @param input - The refresh request.
|
|
5687
|
-
* @param input.tokenEndpoint - The OIDC token endpoint URL discovered from the issuer.
|
|
5688
|
-
* @param input.clientId - The OAuth client ID.
|
|
5689
|
-
* @param input.clientSecret - The OAuth client secret used for `client_secret_post` auth.
|
|
5690
|
-
* @param input.refreshToken - The cached refresh token to redeem.
|
|
5691
5640
|
* @returns The parsed {@link OidcTokenResponse} with the refreshed access token.
|
|
5692
5641
|
*/ function refreshAccessToken(input) {
|
|
5693
|
-
return
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
client_id: input.clientId,
|
|
5699
|
-
client_secret: input.clientSecret,
|
|
5700
|
-
refresh_token: input.refreshToken
|
|
5701
|
-
});
|
|
5702
|
-
return [
|
|
5703
|
-
2,
|
|
5704
|
-
postTokenEndpoint({
|
|
5705
|
-
tokenEndpoint: input.tokenEndpoint,
|
|
5706
|
-
body: params
|
|
5707
|
-
})
|
|
5708
|
-
];
|
|
5709
|
-
});
|
|
5710
|
-
})();
|
|
5642
|
+
return withCliErrors(function() {
|
|
5643
|
+
return refreshAccessToken$1(_object_spread_props$q(_object_spread$G({}, input), {
|
|
5644
|
+
fetch: cliOidcFetch
|
|
5645
|
+
}));
|
|
5646
|
+
});
|
|
5711
5647
|
}
|
|
5712
5648
|
/**
|
|
5713
5649
|
* Revokes an access or refresh token at the OIDC revocation endpoint.
|
|
5714
5650
|
*
|
|
5715
5651
|
* @param input - The revocation request.
|
|
5716
|
-
* @param input.revocationEndpoint - The OIDC revocation endpoint URL.
|
|
5717
|
-
* @param input.clientId - The OAuth client ID used for `client_secret_post` auth.
|
|
5718
|
-
* @param input.clientSecret - The OAuth client secret used for `client_secret_post` auth.
|
|
5719
|
-
* @param input.token - The access or refresh token to revoke.
|
|
5720
|
-
* @param input.tokenTypeHint - Optional hint passed as `token_type_hint` (`access_token` or `refresh_token`).
|
|
5721
5652
|
* @returns Resolves when the server returns a non-error status. Throws a {@link CliError} (`TOKEN_REVOCATION_FAILED`) on error.
|
|
5722
5653
|
*/ function revokeToken(input) {
|
|
5723
|
-
return
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
params = new URLSearchParams(_object_spread$F({
|
|
5729
|
-
client_id: input.clientId,
|
|
5730
|
-
client_secret: input.clientSecret,
|
|
5731
|
-
token: input.token
|
|
5732
|
-
}, input.tokenTypeHint ? {
|
|
5733
|
-
token_type_hint: input.tokenTypeHint
|
|
5734
|
-
} : {}));
|
|
5735
|
-
return [
|
|
5736
|
-
4,
|
|
5737
|
-
tracedFetch(undefined, input.revocationEndpoint, {
|
|
5738
|
-
method: 'POST',
|
|
5739
|
-
headers: {
|
|
5740
|
-
'Content-Type': 'application/x-www-form-urlencoded',
|
|
5741
|
-
Accept: 'application/json'
|
|
5742
|
-
},
|
|
5743
|
-
body: params.toString()
|
|
5744
|
-
})
|
|
5745
|
-
];
|
|
5746
|
-
case 1:
|
|
5747
|
-
res = _state.sent();
|
|
5748
|
-
if (!res.ok) {
|
|
5749
|
-
throw new CliError({
|
|
5750
|
-
message: "Token revocation failed: ".concat(res.status, " ").concat(res.statusText),
|
|
5751
|
-
code: 'TOKEN_REVOCATION_FAILED'
|
|
5752
|
-
});
|
|
5753
|
-
}
|
|
5754
|
-
return [
|
|
5755
|
-
2
|
|
5756
|
-
];
|
|
5757
|
-
}
|
|
5758
|
-
});
|
|
5759
|
-
})();
|
|
5654
|
+
return withCliErrors(function() {
|
|
5655
|
+
return revokeToken$1(_object_spread_props$q(_object_spread$G({}, input), {
|
|
5656
|
+
fetch: cliOidcFetch
|
|
5657
|
+
}));
|
|
5658
|
+
});
|
|
5760
5659
|
}
|
|
5761
5660
|
/**
|
|
5762
5661
|
* Fetches the OIDC `userinfo` endpoint and returns the parsed claims object.
|
|
5763
5662
|
*
|
|
5764
5663
|
* @param input - The userinfo request.
|
|
5765
|
-
* @param input.userinfoEndpoint - The OIDC userinfo endpoint URL discovered from the issuer.
|
|
5766
|
-
* @param input.accessToken - The Bearer access token sent in the `Authorization` header.
|
|
5767
5664
|
* @returns The parsed userinfo claims. Throws a {@link CliError} (`USERINFO_FAILED`) on a non-OK response.
|
|
5768
5665
|
*/ function fetchUserInfo(input) {
|
|
5769
|
-
return
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
return [
|
|
5775
|
-
4,
|
|
5776
|
-
tracedFetch(undefined, input.userinfoEndpoint, {
|
|
5777
|
-
headers: {
|
|
5778
|
-
Authorization: "Bearer ".concat(input.accessToken),
|
|
5779
|
-
Accept: 'application/json'
|
|
5780
|
-
}
|
|
5781
|
-
})
|
|
5782
|
-
];
|
|
5783
|
-
case 1:
|
|
5784
|
-
res = _state.sent();
|
|
5785
|
-
if (!res.ok) {
|
|
5786
|
-
throw new CliError({
|
|
5787
|
-
message: "Userinfo request failed: ".concat(res.status, " ").concat(res.statusText),
|
|
5788
|
-
code: 'USERINFO_FAILED',
|
|
5789
|
-
suggestion: 'Try: <cli> auth login --env <name>'
|
|
5790
|
-
});
|
|
5791
|
-
}
|
|
5792
|
-
return [
|
|
5793
|
-
4,
|
|
5794
|
-
res.json()
|
|
5795
|
-
];
|
|
5796
|
-
case 2:
|
|
5797
|
-
return [
|
|
5798
|
-
2,
|
|
5799
|
-
_state.sent()
|
|
5800
|
-
];
|
|
5801
|
-
}
|
|
5802
|
-
});
|
|
5803
|
-
})();
|
|
5666
|
+
return withCliErrors(function() {
|
|
5667
|
+
return fetchUserInfo$1(_object_spread_props$q(_object_spread$G({}, input), {
|
|
5668
|
+
fetch: cliOidcFetch
|
|
5669
|
+
}));
|
|
5670
|
+
});
|
|
5804
5671
|
}
|
|
5805
5672
|
/**
|
|
5806
5673
|
* Fetches the dbx-components `GET /oidc/session` route and returns the parsed session lifetime metadata.
|
|
5807
5674
|
*
|
|
5808
|
-
* Mirrors {@link fetchUserInfo}, but reads the access token's baked-in session-lifetime claims
|
|
5809
|
-
* (`dbx_session_expires_at` / `dbx_rotation_disabled`) which userinfo does not echo.
|
|
5810
|
-
*
|
|
5811
5675
|
* @param input - The session request.
|
|
5812
|
-
* @param input.sessionEndpoint - The `GET /oidc/session` endpoint URL.
|
|
5813
|
-
* @param input.accessToken - The Bearer access token sent in the `Authorization` header.
|
|
5814
5676
|
* @returns The parsed {@link OidcSessionInfo}. Throws a {@link CliError} (`SESSION_INFO_FAILED`) on a non-OK response.
|
|
5815
5677
|
*/ function fetchSessionInfo(input) {
|
|
5816
|
-
return
|
|
5817
|
-
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
return [
|
|
5822
|
-
4,
|
|
5823
|
-
tracedFetch(undefined, input.sessionEndpoint, {
|
|
5824
|
-
headers: {
|
|
5825
|
-
Authorization: "Bearer ".concat(input.accessToken),
|
|
5826
|
-
Accept: 'application/json'
|
|
5827
|
-
}
|
|
5828
|
-
})
|
|
5829
|
-
];
|
|
5830
|
-
case 1:
|
|
5831
|
-
res = _state.sent();
|
|
5832
|
-
if (!res.ok) {
|
|
5833
|
-
throw new CliError({
|
|
5834
|
-
message: "Session info request failed: ".concat(res.status, " ").concat(res.statusText),
|
|
5835
|
-
code: 'SESSION_INFO_FAILED'
|
|
5836
|
-
});
|
|
5837
|
-
}
|
|
5838
|
-
return [
|
|
5839
|
-
4,
|
|
5840
|
-
res.json()
|
|
5841
|
-
];
|
|
5842
|
-
case 2:
|
|
5843
|
-
return [
|
|
5844
|
-
2,
|
|
5845
|
-
_state.sent()
|
|
5846
|
-
];
|
|
5847
|
-
}
|
|
5848
|
-
});
|
|
5849
|
-
})();
|
|
5850
|
-
}
|
|
5851
|
-
function postTokenEndpoint(input) {
|
|
5852
|
-
return _async_to_generator$13(function() {
|
|
5853
|
-
var res, body, _ref, _body_error_description, message;
|
|
5854
|
-
return _ts_generator$13(this, function(_state) {
|
|
5855
|
-
switch(_state.label){
|
|
5856
|
-
case 0:
|
|
5857
|
-
return [
|
|
5858
|
-
4,
|
|
5859
|
-
tracedFetch(undefined, input.tokenEndpoint, {
|
|
5860
|
-
method: 'POST',
|
|
5861
|
-
headers: {
|
|
5862
|
-
'Content-Type': 'application/x-www-form-urlencoded',
|
|
5863
|
-
Accept: 'application/json'
|
|
5864
|
-
},
|
|
5865
|
-
body: input.body.toString()
|
|
5866
|
-
})
|
|
5867
|
-
];
|
|
5868
|
-
case 1:
|
|
5869
|
-
res = _state.sent();
|
|
5870
|
-
return [
|
|
5871
|
-
4,
|
|
5872
|
-
res.json().catch(function() {
|
|
5873
|
-
return {};
|
|
5874
|
-
})
|
|
5875
|
-
];
|
|
5876
|
-
case 2:
|
|
5877
|
-
body = _state.sent();
|
|
5878
|
-
if (!res.ok || body.error) {
|
|
5879
|
-
message = (_ref = (_body_error_description = body.error_description) !== null && _body_error_description !== void 0 ? _body_error_description : body.error) !== null && _ref !== void 0 ? _ref : "".concat(res.status, " ").concat(res.statusText);
|
|
5880
|
-
throw new CliError({
|
|
5881
|
-
message: "OIDC token endpoint error: ".concat(message),
|
|
5882
|
-
code: body.error === 'invalid_grant' ? 'TOKEN_INVALID_GRANT' : 'TOKEN_EXCHANGE_FAILED',
|
|
5883
|
-
suggestion: body.error === 'invalid_grant' ? 'Re-run auth login to obtain a fresh code or refresh token.' : undefined
|
|
5884
|
-
});
|
|
5885
|
-
}
|
|
5886
|
-
if (!body.access_token) {
|
|
5887
|
-
throw new CliError({
|
|
5888
|
-
message: 'OIDC token endpoint returned no access_token.',
|
|
5889
|
-
code: 'TOKEN_EXCHANGE_FAILED'
|
|
5890
|
-
});
|
|
5891
|
-
}
|
|
5892
|
-
return [
|
|
5893
|
-
2,
|
|
5894
|
-
body
|
|
5895
|
-
];
|
|
5896
|
-
}
|
|
5897
|
-
});
|
|
5898
|
-
})();
|
|
5899
|
-
}
|
|
5900
|
-
function trimSlash(url) {
|
|
5901
|
-
return url.endsWith('/') ? url.slice(0, -1) : url;
|
|
5678
|
+
return withCliErrors(function() {
|
|
5679
|
+
return fetchSessionInfo$1(_object_spread_props$q(_object_spread$G({}, input), {
|
|
5680
|
+
fetch: cliOidcFetch
|
|
5681
|
+
}));
|
|
5682
|
+
});
|
|
5902
5683
|
}
|
|
5903
5684
|
|
|
5904
|
-
function
|
|
5905
|
-
if (
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
}
|
|
5912
|
-
function asyncGeneratorStep$12(gen, resolve, reject, _next, _throw, key, arg) {
|
|
5913
|
-
try {
|
|
5914
|
-
var info = gen[key](arg);
|
|
5915
|
-
var value = info.value;
|
|
5916
|
-
} catch (error) {
|
|
5917
|
-
reject(error);
|
|
5918
|
-
return;
|
|
5919
|
-
}
|
|
5920
|
-
if (info.done) {
|
|
5921
|
-
resolve(value);
|
|
5685
|
+
function _define_property$F(obj, key, value) {
|
|
5686
|
+
if (key in obj) {
|
|
5687
|
+
Object.defineProperty(obj, key, {
|
|
5688
|
+
value: value,
|
|
5689
|
+
enumerable: true,
|
|
5690
|
+
configurable: true,
|
|
5691
|
+
writable: true
|
|
5692
|
+
});
|
|
5922
5693
|
} else {
|
|
5923
|
-
|
|
5694
|
+
obj[key] = value;
|
|
5924
5695
|
}
|
|
5696
|
+
return obj;
|
|
5925
5697
|
}
|
|
5926
|
-
function
|
|
5927
|
-
|
|
5928
|
-
var
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
}
|
|
5934
|
-
function _throw(err) {
|
|
5935
|
-
asyncGeneratorStep$12(gen, resolve, reject, _next, _throw, "throw", err);
|
|
5936
|
-
}
|
|
5937
|
-
_next(undefined);
|
|
5938
|
-
});
|
|
5939
|
-
};
|
|
5940
|
-
}
|
|
5941
|
-
function _iterable_to_array_limit$f(arr, i) {
|
|
5942
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
5943
|
-
if (_i == null) return;
|
|
5944
|
-
var _arr = [];
|
|
5945
|
-
var _n = true;
|
|
5946
|
-
var _d = false;
|
|
5947
|
-
var _s, _e;
|
|
5948
|
-
try {
|
|
5949
|
-
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
5950
|
-
_arr.push(_s.value);
|
|
5951
|
-
if (i && _arr.length === i) break;
|
|
5952
|
-
}
|
|
5953
|
-
} catch (err) {
|
|
5954
|
-
_d = true;
|
|
5955
|
-
_e = err;
|
|
5956
|
-
} finally{
|
|
5957
|
-
try {
|
|
5958
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
5959
|
-
} finally{
|
|
5960
|
-
if (_d) throw _e;
|
|
5698
|
+
function _object_spread$F(target) {
|
|
5699
|
+
for(var i = 1; i < arguments.length; i++){
|
|
5700
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
5701
|
+
var ownKeys = Object.keys(source);
|
|
5702
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
5703
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
5704
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
5705
|
+
}));
|
|
5961
5706
|
}
|
|
5707
|
+
ownKeys.forEach(function(key) {
|
|
5708
|
+
_define_property$F(target, key, source[key]);
|
|
5709
|
+
});
|
|
5962
5710
|
}
|
|
5963
|
-
return
|
|
5964
|
-
}
|
|
5965
|
-
function _non_iterable_rest$f() {
|
|
5966
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5967
|
-
}
|
|
5968
|
-
function _sliced_to_array$f(arr, i) {
|
|
5969
|
-
return _array_with_holes$f(arr) || _iterable_to_array_limit$f(arr, i) || _unsupported_iterable_to_array$$(arr, i) || _non_iterable_rest$f();
|
|
5970
|
-
}
|
|
5971
|
-
function _unsupported_iterable_to_array$$(o, minLen) {
|
|
5972
|
-
if (!o) return;
|
|
5973
|
-
if (typeof o === "string") return _array_like_to_array$$(o, minLen);
|
|
5974
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
5975
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
5976
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
5977
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$$(o, minLen);
|
|
5711
|
+
return target;
|
|
5978
5712
|
}
|
|
5979
|
-
function
|
|
5980
|
-
var
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
return t[1];
|
|
5985
|
-
},
|
|
5986
|
-
trys: [],
|
|
5987
|
-
ops: []
|
|
5988
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
5989
|
-
return d(g, "next", {
|
|
5990
|
-
value: verb(0)
|
|
5991
|
-
}), d(g, "throw", {
|
|
5992
|
-
value: verb(1)
|
|
5993
|
-
}), d(g, "return", {
|
|
5994
|
-
value: verb(2)
|
|
5995
|
-
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
5996
|
-
value: function() {
|
|
5997
|
-
return this;
|
|
5998
|
-
}
|
|
5999
|
-
}), g;
|
|
6000
|
-
function verb(n) {
|
|
6001
|
-
return function(v) {
|
|
6002
|
-
return step([
|
|
6003
|
-
n,
|
|
6004
|
-
v
|
|
6005
|
-
]);
|
|
6006
|
-
};
|
|
5713
|
+
function ownKeys$p(object, enumerableOnly) {
|
|
5714
|
+
var keys = Object.keys(object);
|
|
5715
|
+
if (Object.getOwnPropertySymbols) {
|
|
5716
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
5717
|
+
keys.push.apply(keys, symbols);
|
|
6007
5718
|
}
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
case 1:
|
|
6019
|
-
t = op;
|
|
6020
|
-
break;
|
|
6021
|
-
case 4:
|
|
6022
|
-
_.label++;
|
|
6023
|
-
return {
|
|
6024
|
-
value: op[1],
|
|
6025
|
-
done: false
|
|
6026
|
-
};
|
|
6027
|
-
case 5:
|
|
6028
|
-
_.label++;
|
|
6029
|
-
y = op[1];
|
|
6030
|
-
op = [
|
|
6031
|
-
0
|
|
6032
|
-
];
|
|
6033
|
-
continue;
|
|
6034
|
-
case 7:
|
|
6035
|
-
op = _.ops.pop();
|
|
6036
|
-
_.trys.pop();
|
|
6037
|
-
continue;
|
|
6038
|
-
default:
|
|
6039
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
6040
|
-
_ = 0;
|
|
6041
|
-
continue;
|
|
6042
|
-
}
|
|
6043
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
6044
|
-
_.label = op[1];
|
|
6045
|
-
break;
|
|
6046
|
-
}
|
|
6047
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
6048
|
-
_.label = t[1];
|
|
6049
|
-
t = op;
|
|
6050
|
-
break;
|
|
6051
|
-
}
|
|
6052
|
-
if (t && _.label < t[2]) {
|
|
6053
|
-
_.label = t[2];
|
|
6054
|
-
_.ops.push(op);
|
|
6055
|
-
break;
|
|
6056
|
-
}
|
|
6057
|
-
if (t[2]) _.ops.pop();
|
|
6058
|
-
_.trys.pop();
|
|
6059
|
-
continue;
|
|
6060
|
-
}
|
|
6061
|
-
op = body.call(thisArg, _);
|
|
6062
|
-
} catch (e) {
|
|
6063
|
-
op = [
|
|
6064
|
-
6,
|
|
6065
|
-
e
|
|
6066
|
-
];
|
|
6067
|
-
y = 0;
|
|
6068
|
-
} finally{
|
|
6069
|
-
f = t = 0;
|
|
6070
|
-
}
|
|
6071
|
-
if (op[0] & 5) throw op[1];
|
|
6072
|
-
return {
|
|
6073
|
-
value: op[0] ? op[1] : void 0,
|
|
6074
|
-
done: true
|
|
6075
|
-
};
|
|
5719
|
+
return keys;
|
|
5720
|
+
}
|
|
5721
|
+
function _object_spread_props$p(target, source) {
|
|
5722
|
+
source = source != null ? source : {};
|
|
5723
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
5724
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
5725
|
+
} else {
|
|
5726
|
+
ownKeys$p(Object(source)).forEach(function(key) {
|
|
5727
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
5728
|
+
});
|
|
6076
5729
|
}
|
|
5730
|
+
return target;
|
|
6077
5731
|
}
|
|
6078
5732
|
/**
|
|
6079
5733
|
* Builds the authorization URL the user opens in a browser to start the PKCE flow.
|
|
6080
5734
|
*
|
|
6081
|
-
*
|
|
6082
|
-
*
|
|
6083
|
-
*
|
|
6084
|
-
* deployment all three resolve to the same origin and the rebase is a no-op; in a split-host
|
|
6085
|
-
* setup (frontend dev server proxying `/oidc/**` to the API) `appClientUrl` redirects the user
|
|
6086
|
-
* through the frontend. When none of the three is provided, the discovered endpoint is used
|
|
6087
|
-
* unchanged.
|
|
5735
|
+
* Thin CLI wrapper over the shared {@link buildAuthorizationUrlHelper}: defaults the scope to
|
|
5736
|
+
* {@link DEFAULT_CLI_OIDC_SCOPES} when none is supplied, and re-wraps the shared
|
|
5737
|
+
* {@link OidcRelyingPartyError} into the CLI's {@link CliError} (`AUTH_LOGIN_FOR_INVALID`).
|
|
6088
5738
|
*
|
|
6089
|
-
*
|
|
6090
|
-
* and redirect to the app login page with a `uid`. (Earlier versions targeted a convenience
|
|
6091
|
-
* `/oidc/login/client` redirect that forwarded query params to the app without creating an
|
|
6092
|
-
* interaction — that branch is gone.)
|
|
6093
|
-
*
|
|
6094
|
-
* @param input - The authorization URL inputs.
|
|
6095
|
-
* @param input.authorizationEndpoint - The authorization endpoint discovered from OIDC metadata.
|
|
6096
|
-
* @param input.appClientUrl - Optional client origin to rebase the authorization endpoint onto. Takes precedence over `oidcIssuer` and `apiBaseUrl`.
|
|
6097
|
-
* @param input.oidcIssuer - Optional OIDC issuer URL; falls back to its origin as the rebase target when `appClientUrl` is missing.
|
|
6098
|
-
* @param input.apiBaseUrl - Optional API base URL; falls back to its origin as the rebase target when neither `appClientUrl` nor `oidcIssuer` is set.
|
|
6099
|
-
* @param input.clientId - The OAuth client ID.
|
|
6100
|
-
* @param input.redirectUri - The redirect URI registered with the OAuth client.
|
|
6101
|
-
* @param input.scopes - Space-separated scope list. Defaults to {@link DEFAULT_CLI_OIDC_SCOPES}.
|
|
6102
|
-
* @param input.state - The opaque OAuth state token used for CSRF protection.
|
|
6103
|
-
* @param input.codeChallenge - The PKCE code challenge derived from the verifier.
|
|
5739
|
+
* @param input - The authorization URL inputs. When `scopes` is omitted, the CLI default is used.
|
|
6104
5740
|
* @returns The full authorization URL with all OAuth params merged in.
|
|
6105
5741
|
* @throws {CliError} When `requestedSessionTtlSeconds` is provided but is not a positive integer.
|
|
6106
5742
|
*
|
|
6107
5743
|
* @__NO_SIDE_EFFECTS__
|
|
6108
5744
|
*/ function buildAuthorizationUrl(input) {
|
|
6109
|
-
var _input_scopes;
|
|
6110
|
-
var resolvedScope = (_input_scopes = input.scopes) !== null && _input_scopes !== void 0 ? _input_scopes : DEFAULT_CLI_OIDC_SCOPES;
|
|
6111
|
-
var authParams = {
|
|
6112
|
-
response_type: 'code',
|
|
6113
|
-
client_id: input.clientId,
|
|
6114
|
-
redirect_uri: input.redirectUri,
|
|
6115
|
-
scope: resolvedScope,
|
|
6116
|
-
code_challenge: input.codeChallenge,
|
|
6117
|
-
code_challenge_method: 'S256',
|
|
6118
|
-
state: input.state
|
|
6119
|
-
};
|
|
6120
|
-
// oidc-provider's check_scope middleware silently strips `offline_access` unless the
|
|
6121
|
-
// auth request also includes `prompt=consent`. Auto-add it so refresh tokens are
|
|
6122
|
-
// actually issued whenever the CLI requests offline access.
|
|
6123
|
-
if (resolvedScope.split(/\s+/).includes('offline_access')) {
|
|
6124
|
-
authParams.prompt = 'consent';
|
|
6125
|
-
}
|
|
6126
|
-
if (input.requestedSessionTtlSeconds != null) {
|
|
6127
|
-
if (!Number.isInteger(input.requestedSessionTtlSeconds) || input.requestedSessionTtlSeconds <= 0) {
|
|
6128
|
-
throw new CliError({
|
|
6129
|
-
message: "requestedSessionTtlSeconds must be a positive integer (got ".concat(input.requestedSessionTtlSeconds, ")."),
|
|
6130
|
-
code: 'AUTH_LOGIN_FOR_INVALID'
|
|
6131
|
-
});
|
|
6132
|
-
}
|
|
6133
|
-
authParams.dbx_session_ttl = String(input.requestedSessionTtlSeconds);
|
|
6134
|
-
}
|
|
6135
|
-
var rebaseOrigin = resolveAuthorizationRebaseOrigin({
|
|
6136
|
-
appClientUrl: input.appClientUrl,
|
|
6137
|
-
oidcIssuer: input.oidcIssuer,
|
|
6138
|
-
apiBaseUrl: input.apiBaseUrl
|
|
6139
|
-
});
|
|
6140
|
-
var endpoint = rebaseOrigin ? rebaseUrlOrigin({
|
|
6141
|
-
url: input.authorizationEndpoint,
|
|
6142
|
-
originUrl: rebaseOrigin
|
|
6143
|
-
}) : input.authorizationEndpoint;
|
|
6144
|
-
// Merge into the existing query string (preserving any params already on the endpoint) so
|
|
6145
|
-
// a pre-baked endpoint like `/oidc/auth?source=cli` survives unchanged.
|
|
6146
|
-
var url = new URL(endpoint);
|
|
6147
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
6148
5745
|
try {
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
}
|
|
6153
|
-
} catch (
|
|
6154
|
-
|
|
6155
|
-
_iteratorError = err;
|
|
6156
|
-
} finally{
|
|
6157
|
-
try {
|
|
6158
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
6159
|
-
_iterator.return();
|
|
6160
|
-
}
|
|
6161
|
-
} finally{
|
|
6162
|
-
if (_didIteratorError) {
|
|
6163
|
-
throw _iteratorError;
|
|
6164
|
-
}
|
|
6165
|
-
}
|
|
6166
|
-
}
|
|
6167
|
-
return url.toString();
|
|
6168
|
-
}
|
|
6169
|
-
/**
|
|
6170
|
-
* Picks the origin used to rebase the discovered authorization endpoint, in priority order:
|
|
6171
|
-
* 1. `appClientUrl` (verbatim — the explicit override)
|
|
6172
|
-
* 2. `oidcIssuer` (parsed `origin`, e.g. `https://api.example.com/oidc` → `https://api.example.com`)
|
|
6173
|
-
* 3. `apiBaseUrl` (parsed `origin`, e.g. `https://api.example.com/api` → `https://api.example.com`)
|
|
6174
|
-
*
|
|
6175
|
-
* Returns `undefined` when none is set or every candidate fails to parse; the caller should then
|
|
6176
|
-
* use the discovered endpoint unchanged.
|
|
6177
|
-
*
|
|
6178
|
-
* @param input - The candidate URLs in priority order.
|
|
6179
|
-
* @returns The selected origin, or `undefined` when no candidate yields one.
|
|
6180
|
-
*/ function resolveAuthorizationRebaseOrigin(input) {
|
|
6181
|
-
var result;
|
|
6182
|
-
if (input.appClientUrl) {
|
|
6183
|
-
result = input.appClientUrl;
|
|
6184
|
-
} else {
|
|
6185
|
-
var _input_oidcIssuer;
|
|
6186
|
-
var fallbackSource = (_input_oidcIssuer = input.oidcIssuer) !== null && _input_oidcIssuer !== void 0 ? _input_oidcIssuer : input.apiBaseUrl;
|
|
6187
|
-
if (fallbackSource) {
|
|
6188
|
-
try {
|
|
6189
|
-
result = new URL(fallbackSource).origin;
|
|
6190
|
-
} catch (unused) {
|
|
6191
|
-
// Fall through with result undefined
|
|
6192
|
-
}
|
|
6193
|
-
}
|
|
6194
|
-
}
|
|
6195
|
-
return result;
|
|
6196
|
-
}
|
|
6197
|
-
/**
|
|
6198
|
-
* Returns `url` with its origin replaced by the origin of `originUrl`. The path and search of
|
|
6199
|
-
* `url` are preserved. When `originUrl` is empty/missing or either URL fails to parse, returns
|
|
6200
|
-
* `url` unchanged.
|
|
6201
|
-
*
|
|
6202
|
-
* @param input - The rebase inputs.
|
|
6203
|
-
* @param input.url - The URL whose path/search should be preserved.
|
|
6204
|
-
* @param input.originUrl - The origin to rebase `url` onto.
|
|
6205
|
-
* @returns The rebased URL string, or `input.url` unchanged when rebasing isn't possible.
|
|
6206
|
-
*/ function rebaseUrlOrigin(input) {
|
|
6207
|
-
var result = input.url;
|
|
6208
|
-
if (input.originUrl) {
|
|
6209
|
-
try {
|
|
6210
|
-
var parsedUrl = new URL(input.url);
|
|
6211
|
-
var parsedOrigin = new URL(input.originUrl);
|
|
6212
|
-
parsedUrl.protocol = parsedOrigin.protocol;
|
|
6213
|
-
parsedUrl.host = parsedOrigin.host;
|
|
6214
|
-
result = parsedUrl.toString();
|
|
6215
|
-
} catch (unused) {
|
|
6216
|
-
// Fall through with the original url unchanged
|
|
6217
|
-
}
|
|
6218
|
-
}
|
|
6219
|
-
return result;
|
|
6220
|
-
}
|
|
6221
|
-
/**
|
|
6222
|
-
* Generates a fresh PKCE code verifier and the matching SHA-256 code challenge.
|
|
6223
|
-
*
|
|
6224
|
-
* @returns A {@link PkceMaterial} pair consisting of the random `codeVerifier` and its derived `codeChallenge`.
|
|
6225
|
-
*/ function generatePkceMaterial() {
|
|
6226
|
-
return _async_to_generator$12(function() {
|
|
6227
|
-
var codeVerifier, codeChallenge;
|
|
6228
|
-
return _ts_generator$12(this, function(_state) {
|
|
6229
|
-
switch(_state.label){
|
|
6230
|
-
case 0:
|
|
6231
|
-
codeVerifier = generatePkceCodeVerifier();
|
|
6232
|
-
return [
|
|
6233
|
-
4,
|
|
6234
|
-
generatePkceCodeChallenge(codeVerifier)
|
|
6235
|
-
];
|
|
6236
|
-
case 1:
|
|
6237
|
-
codeChallenge = _state.sent();
|
|
6238
|
-
return [
|
|
6239
|
-
2,
|
|
6240
|
-
{
|
|
6241
|
-
codeVerifier: codeVerifier,
|
|
6242
|
-
codeChallenge: codeChallenge
|
|
6243
|
-
}
|
|
6244
|
-
];
|
|
6245
|
-
}
|
|
6246
|
-
});
|
|
6247
|
-
})();
|
|
6248
|
-
}
|
|
6249
|
-
/**
|
|
6250
|
-
* Generates a random URL-safe state value for the OAuth state parameter.
|
|
6251
|
-
*
|
|
6252
|
-
* @returns A 32-character hex string derived from 16 random bytes.
|
|
6253
|
-
*/ function generateOAuthState() {
|
|
6254
|
-
var bytes = new Uint8Array(16);
|
|
6255
|
-
crypto.getRandomValues(bytes);
|
|
6256
|
-
return Array.from(bytes, function(b) {
|
|
6257
|
-
return b.toString(16).padStart(2, '0');
|
|
6258
|
-
}).join('');
|
|
6259
|
-
}
|
|
6260
|
-
function parseRedirectUrlOrThrow(trimmed) {
|
|
6261
|
-
var url;
|
|
6262
|
-
try {
|
|
6263
|
-
// Native URL doesn't parse all urn: schemes — handle the urn:ietf paste case explicitly
|
|
6264
|
-
url = trimmed.startsWith('urn:') ? new URL("https://placeholder.invalid?".concat(trimmed.split('?').slice(1).join('?'))) : new URL(trimmed);
|
|
6265
|
-
} catch (unused) {
|
|
6266
|
-
throw new CliError({
|
|
6267
|
-
message: 'Could not parse redirect URL',
|
|
6268
|
-
code: 'AUTH_REDIRECT_PARSE_FAILED'
|
|
6269
|
-
});
|
|
6270
|
-
}
|
|
6271
|
-
return url;
|
|
6272
|
-
}
|
|
6273
|
-
function throwForUrlMissingCode(url) {
|
|
6274
|
-
var errorParam = url.searchParams.get('error');
|
|
6275
|
-
if (errorParam) {
|
|
6276
|
-
var errorDescription = url.searchParams.get('error_description');
|
|
6277
|
-
var descriptionSuffix = errorDescription ? " (".concat(errorDescription, ")") : '';
|
|
6278
|
-
throw new CliError({
|
|
6279
|
-
message: "Authorization server returned an error: ".concat(errorParam).concat(descriptionSuffix),
|
|
6280
|
-
code: 'AUTH_PROVIDER_ERROR'
|
|
6281
|
-
});
|
|
6282
|
-
}
|
|
6283
|
-
throw new CliError({
|
|
6284
|
-
message: 'No `code` parameter found in the pasted URL.',
|
|
6285
|
-
code: 'AUTH_NO_CODE'
|
|
6286
|
-
});
|
|
6287
|
-
}
|
|
6288
|
-
function parseUrlRedirect(trimmed, expectedState) {
|
|
6289
|
-
var _url_searchParams_get;
|
|
6290
|
-
var url = parseRedirectUrlOrThrow(trimmed);
|
|
6291
|
-
var code = url.searchParams.get('code');
|
|
6292
|
-
if (!code) {
|
|
6293
|
-
throwForUrlMissingCode(url);
|
|
6294
|
-
}
|
|
6295
|
-
var state = (_url_searchParams_get = url.searchParams.get('state')) !== null && _url_searchParams_get !== void 0 ? _url_searchParams_get : undefined;
|
|
6296
|
-
if (expectedState && state !== expectedState) {
|
|
6297
|
-
throw new CliError({
|
|
6298
|
-
message: 'OAuth state mismatch — possible CSRF or stale flow.',
|
|
6299
|
-
code: 'AUTH_STATE_MISMATCH'
|
|
6300
|
-
});
|
|
5746
|
+
var _input_scopes;
|
|
5747
|
+
return buildAuthorizationUrl$1(_object_spread_props$p(_object_spread$F({}, input), {
|
|
5748
|
+
scopes: (_input_scopes = input.scopes) !== null && _input_scopes !== void 0 ? _input_scopes : DEFAULT_CLI_OIDC_SCOPES
|
|
5749
|
+
}));
|
|
5750
|
+
} catch (e) {
|
|
5751
|
+
throw oidcRelyingPartyErrorToCliError(e);
|
|
6301
5752
|
}
|
|
6302
|
-
return {
|
|
6303
|
-
code: code,
|
|
6304
|
-
state: state
|
|
6305
|
-
};
|
|
6306
5753
|
}
|
|
6307
5754
|
/**
|
|
6308
5755
|
* Parses an authorization code out of a pasted redirect URL or a bare code string.
|
|
6309
5756
|
*
|
|
6310
|
-
*
|
|
5757
|
+
* Thin CLI wrapper over the shared {@link parseAuthorizationRedirect}: keeps the CLI's pasted-string
|
|
5758
|
+
* input shape and re-wraps the shared {@link OidcRelyingPartyError} into the CLI's {@link CliError}
|
|
5759
|
+
* (`AUTH_NO_CODE` / `AUTH_PROVIDER_ERROR` / `AUTH_REDIRECT_PARSE_FAILED` / `AUTH_STATE_MISMATCH`).
|
|
6311
5760
|
*
|
|
6312
5761
|
* @param input - The parse inputs.
|
|
6313
5762
|
* @param input.pasted - The redirect URL or bare authorization code pasted by the user.
|
|
6314
5763
|
* @param input.expectedState - Optional state value to assert against `state` when present in the URL.
|
|
6315
5764
|
* @returns The {@link ParsedRedirect} containing `code` and (when present) `state`.
|
|
6316
|
-
* @throws {CliError} When `pasted` is empty,
|
|
5765
|
+
* @throws {CliError} When `pasted` is empty, contains no `code`, or the `state` does not match.
|
|
6317
5766
|
*/ function parsePastedRedirect(input) {
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
code: 'AUTH_NO_CODE'
|
|
5767
|
+
try {
|
|
5768
|
+
return parseAuthorizationRedirect({
|
|
5769
|
+
url: input.pasted,
|
|
5770
|
+
expectedState: input.expectedState
|
|
6323
5771
|
});
|
|
5772
|
+
} catch (e) {
|
|
5773
|
+
throw oidcRelyingPartyErrorToCliError(e);
|
|
6324
5774
|
}
|
|
6325
|
-
var isUrl = trimmed.startsWith('http://') || trimmed.startsWith('https://') || trimmed.startsWith('urn:');
|
|
6326
|
-
return isUrl ? parseUrlRedirect(trimmed, input.expectedState) : {
|
|
6327
|
-
code: trimmed
|
|
6328
|
-
};
|
|
6329
5775
|
}
|
|
6330
5776
|
|
|
6331
5777
|
/**
|
|
@@ -59838,4 +59284,4 @@ function printPaginatedOutput(input) {
|
|
|
59838
59284
|
})();
|
|
59839
59285
|
}
|
|
59840
59286
|
|
|
59841
|
-
export { ACTIONS_SCAN_CONFIG_FILENAME, ACTION_ENTRY_ROLES, ACTION_ROLE_ORDER, ActionDirectiveEntry, ActionEntry, ActionInputEntry, ActionManifest, ActionOutputEntry, ActionStateEntry, ActionStoreEntry, ActionStoreMethodEntry, ActionStoreObservableEntry, ActionsScanConfig, ActionsScanSection, BUILTIN_AUTH_CLAIMS, BUILTIN_AUTH_ROLES, BUILTIN_AUTH_SCOPES, CALL_MODEL_API_PATH, CALL_PASSTHROUGH_COMMAND, CLI_EXIT_CODE_AUTH, CLI_EXIT_CODE_HANDLER, CORE_TOPICS, CORE_TOPICS_SET, CSS_UTILITIES_SCAN_CONFIG_FILENAME, CSS_UTILITY_ROLES, CSS_UTILITY_SCOPES, CliError, CssUtilitiesScanConfig, CssUtilitiesScanSection, CssUtilityDeclaration, CssUtilityEntry, CssUtilityManifest, DBX_ACTION_STATE_VALUES, DBX_DOCS_UI_EXAMPLES_SCAN_CONFIG_FILENAME, DBX_DOCS_UI_EXAMPLE_USE_KINDS, DEFAULT_ACTIONS_SCAN_OUT_PATH, DEFAULT_ACTION_COMMAND_NAME, DEFAULT_CLI_HTTP_TIMEOUT_MS, DEFAULT_CLI_OIDC_SCOPES, DEFAULT_CLI_REDIRECT_URI, DEFAULT_CLI_SECRET_PATTERNS, DEFAULT_CSS_UTILITIES_SCAN_OUT_PATH, DEFAULT_DBX_DOCS_UI_EXAMPLES_SCAN_OUT_PATH, DEFAULT_FILTERS_SCAN_OUT_PATH, DEFAULT_FORGE_FIELDS_SCAN_OUT_PATH, DEFAULT_MANIFEST_HELP_DATA_FORMAT, DEFAULT_MANIFEST_HELP_MODE, DEFAULT_MANIFEST_MODEL_COMMAND_NAME, DEFAULT_MODEL_DECODE_COMMAND_NAME, DEFAULT_MODEL_INFO_COMMAND_NAME, DEFAULT_MODEL_SNAPSHOT_FIELDS_SCAN_OUT_PATH, DEFAULT_PIPES_SCAN_OUT_PATH, DEFAULT_SCAN_OUT_PATH, DEFAULT_SPECIFIER_KEY, DEFAULT_UI_COMPONENTS_SCAN_OUT_PATH, DEFAULT_UTILS_SCAN_OUT_PATH, DOWNSTREAM_CLUSTERS, DUMP_MERGE_MODES, DUMP_OUTPUT_MODES, DbxDocsUiExampleEntry, DbxDocsUiExampleManifest, DbxDocsUiExampleUseEntry, DbxDocsUiExamplesScanConfig, DbxDocsUiExamplesScanSection, DbxMcpConfig, EMPTY_ACTION_REGISTRY, EMPTY_AUTH_REGISTRY, EMPTY_CSS_UTILITY_REGISTRY, EMPTY_DBX_DOCS_UI_EXAMPLES_REGISTRY, EMPTY_FILTER_REGISTRY, EMPTY_FORGE_FIELD_REGISTRY, EMPTY_MODEL_SNAPSHOT_FIELD_REGISTRY, EMPTY_PIPE_REGISTRY, EMPTY_SEMANTIC_TYPE_REGISTRY, EMPTY_TOKEN_REGISTRY, EMPTY_UI_COMPONENT_REGISTRY, EMPTY_UTIL_REGISTRY, ExtractedDbxDocsUiExampleEntrySchema, ExtractedEntrySchema, ExtractedForgeFieldEntrySchema, ExtractedUiEntrySchema, FILTERS_SCAN_CONFIG_FILENAME, FILTER_KINDS, FILTER_KIND_ORDER, FIREBASE_MODELS, FIREBASE_MODEL_GROUPS, FORGE_FIELDS_SCAN_CONFIG_FILENAME, FORGE_FIELD_ARRAY_OUTPUTS, FORGE_FIELD_COMPOSITE_SUFFIXES, FORGE_FIELD_TIERS, FORGE_FIELD_WRAPPER_PATTERNS, FORM_FIELDS, FORM_TIER_ORDER, FilterDirectiveEntry, FilterEntry, FilterInputEntry, FilterManifest, FilterPatternEntry, FiltersScanConfig, FiltersScanSection, ForgeFieldEntry, ForgeFieldManifest, ForgeFieldPropertyEntry, ForgeFieldsScanConfig, ForgeFieldsScanSection, GET_COMMAND, GET_MANY_COMMAND, MAX_MODEL_ACCESS_MULTI_READ_KEYS, MCP_CALL_TYPE_ABBREVIATIONS, MCP_MANIFEST_VERSION, MCP_TOOL_NAME_MAX_LENGTH, MCP_TOOL_NAME_WARN_LENGTH, MODEL_ARCHETYPES, MODEL_ARCHETYPE_ADDON_SLUGS, MODEL_ARCHETYPE_SYNC_MODES, MODEL_SNAPSHOT_FIELDS_SCAN_CONFIG_FILENAME, MODEL_SNAPSHOT_FIELD_KINDS, MODEL_WRITE_OIDC_SCOPES, MULTIPLE_PAGES_OUTPUT_MODES, ModelSnapshotFieldEntry, ModelSnapshotFieldManifest, ModelSnapshotFieldParamEntry, ModelSnapshotFieldsScanConfig, ModelSnapshotFieldsScanSection, PIPES_SCAN_CONFIG_FILENAME, PIPE_CATEGORIES, PIPE_CATEGORY_ORDER, PIPE_PURITIES, PROMPT_CANCELLED_ERROR_CODE, PipeArgEntry, PipeEntry, PipeManifest, PipesScanConfig, PipesScanSection, RESERVED_MODEL_FOLDERS, ROUTE_MANIFEST_VERSION, ROUTE_MODEL_LIST_TAG, ROUTE_MODEL_TAG, SCAN_CONFIG_FILENAME$1 as SCAN_CONFIG_FILENAME, SERVICE_TOKEN_REQUIRED_OIDC_SCOPES, STANDARD_GLOBAL_OPTION_NAMES, SemanticTypeEntry, SemanticTypeManifest, SemanticTypeScanConfig, TOKEN_ROLES, TOKEN_SOURCES, TokenDefaults, TokenEntry, TokenManifest, UI_COMPONENTS_SCAN_CONFIG_FILENAME, UI_COMPONENT_CATEGORIES, UI_COMPONENT_KINDS, UTILS_SCAN_CONFIG_FILENAME, UTIL_KINDS, UiComponentEntry, UiComponentInputEntry, UiComponentManifest, UiComponentOutputEntry, UiComponentsScanConfig, UiComponentsScanSection, UtilEntry, UtilManifest, UtilParamEntry, UtilsScanConfig, UtilsScanSection, WORKSPACE_AUTH_APPS, WORKSPACE_AUTH_CLAIMS, WORKSPACE_FACTORY_SCAN_EXCLUDE, WORKSPACE_FACTORY_SCAN_INCLUDE, abbreviateMcpCallType, applyEnvVarOverrides, buildActionCommands, buildActionsManifest, buildAuthorizationUrl, buildCliPaths, buildCssUtilitiesManifest, buildDbxDocsUiExamplesManifest, buildDisambiguatedMcpToolName, buildDispatcherCreditByName, buildDumpFilePath, buildErrorOutput, buildFiltersManifest, buildForgeFieldsManifest, buildManifest, buildManifestCommands, buildMcpToolName, buildModelDecodeCommand, buildModelInfoCommand, buildModelSnapshotFieldsManifest, buildOidcDiscoveryCandidates, buildPipesManifest, buildRouteManifest, buildRouteTree, buildScanProject, buildUiComponentsManifest, buildUtilsManifest, callModelOverHttp, clearDownstreamCatalogCache, collectClassPropertiesWithInheritance, computeRelativeSpecifiers, configureCliErrorMapper, configureCliSecretPatterns, configureOutputOptions, createActionCommand, createActionRegistry, createActionRegistryFromEntries, createAuthCommand, createAuthMiddleware, createAuthRegistryFromEntries, createCallModelCommand, createCli, createCliContext, createCliTokenCacheStore, createContextSlot, createCssUtilityRegistry, createCssUtilityRegistryFromEntries, createDbxDocsUiExamplesRegistry, createDbxDocsUiExamplesRegistryFromEntries, createDoctorCommand, createEnvCommand, createFilterRegistry, createFilterRegistryFromEntries, createForgeFieldRegistry, createForgeFieldRegistryFromEntries, createModelSnapshotFieldRegistry, createModelSnapshotFieldRegistryFromEntries, createOutputCommand, createOutputMiddleware, createPassthroughAuthMiddleware, createPipeRegistry, createPipeRegistryFromEntries, createSemanticTypeRegistry, createSemanticTypeRegistryFromEntries, createTokenRegistry, createTokenRegistryFromEntries, createUiComponentRegistry, createUiComponentRegistryFromEntries, createUtilRegistry, createUtilRegistryFromEntries, decodeFirestoreModelKey, defaultDoctorChecks, defaultGlobber, defaultReadFile, deriveOptionalFromName, detectDataHelpFormat, detectHelpMode, discoverDownstreamFirebasePackages, discoverDownstreamPackages, discoverOidcMetadata, dumpTimestamp, exchangeAuthorizationCode, expandModelKeys, extractActionEntries, extractAngularInputs, extractAngularOutputs, extractAuthEntries, extractComponentRouteModelTags, extractCssUtilityEntries, extractDbxDocsUiExampleEntries, extractEntries, extractFile, extractFilterEntries, extractForgeFieldEntries, extractModelSnapshotFieldEntries, extractModels, extractPipeEntries, extractUiEntries, extractUrlParamKeys, extractUtilEntries, fetchSessionInfo, fetchUserInfo, filterReadOnlyModelScopes, findAndLoadConfig, findCliEnvDefault, findCliModelManifestEntry, flattenList, generateOAuthState, generatePkceMaterial, getBundledManifestsDirectory, getCliContext, getCliEnvVarName, getCliTimeoutMs, getDefaultBundledActionManifestPaths, getDefaultBundledCssUtilityManifestPaths, getDefaultBundledDbxDocsUiExamplesManifestPaths, getDefaultBundledFilterManifestPaths, getDefaultBundledForgeFieldManifestPaths, getDefaultBundledManifestPaths, getDefaultBundledModelFirebaseIndexManifestPaths, getDefaultBundledModelSnapshotFieldManifestPaths, getDefaultBundledPipeManifestPaths, getDefaultBundledTokenManifestPaths, getDefaultBundledUiManifestPaths, getDefaultBundledUtilManifestPaths, getDownstreamCatalog, getFirebaseBucketKeyedByIdModels, getFirebaseDistrictKeyedByIdModels, getFirebaseExternalIdKeyedByIdModels, getFirebaseModel, getFirebaseModelByPrefix, getFirebaseModelGroup, getFirebaseModelGroups, getFirebaseModels, getFirebaseModelsByArchetype, getFirebasePrefixCatalog, getFirebaseRegionKeyedByIdModels, getFirebaseSubcollectionsOf, getFirebaseUserKeyedByIdModels, getFirebaseUserRelatedModels, getModelArchetypeBySlug, getModelArchetypesByAxisValue, getModelArchetypesByCollectionKind, getModelArchetypesBySyncMode, getModelOverHttp, getMultipleModelsOverHttp, getMultipleModelsOverHttpChunked, getOutputOptions, globToRegex, hasParamSegment, isCliEnvConfigComplete, isCliVerbose, isCoreTopic, isStdinSentinel, isTokenExpired, isVisibleProperty, iterateDbxCliCallModel, loadActionManifests, loadActionRegistry, loadAuthRegistry, loadCliConfig, loadCssUtilityRegistry, loadDbxDocsUiExamplesManifests, loadDbxDocsUiExamplesRegistry, loadFilterManifests, loadFilterRegistry, loadForgeFieldManifests, loadForgeFieldRegistry, loadModelFirebaseIndexManifests, loadModelFirebaseIndexRegistry, loadModelSnapshotFieldManifests, loadModelSnapshotFieldRegistry, loadPackageName, loadPipeManifests, loadPipeRegistry, loadRouteTree, loadScanSection, loadSemanticTypeManifests, loadSemanticTypeRegistry, loadTokenManifests, loadTokenRegistry, loadUiComponentManifests, loadUiComponentRegistry, loadUtilManifests, loadUtilRegistry, maskEnv, maskSecret, matchUrlAgainstEntries, mcpManifestKey, mergeCliConfig, mergeCliEnvWithDefault, mergeOutputConfig, normalizePathname, openStreamingDump, outputError, outputResult, packageNameToSlug, parseAnnotation, parseDeclarations$1 as parseDeclarations, parseFirestoreModelIdentityArgs, parseGetArgs, parseGetManyArgs, parsePastedRedirect, parseRouteModelTag, parseScanArgs, pickFields, promptLine, readAllStdin, readDirectiveDecorator, readEnvTokenEntry, readPropertyDescription, readSelector, readStdinTokens, readStringProperty, refreshAccessToken, renderDecodedKey, renderModelManifestEntry, renderModelManifestFields, renderModelManifestList, requireCliContext, resolveActiveEnvName, resolveCliEnv, resolveCliEnvOrThrow, resolveCliModel, resolveComponentSourceFromSources, resolveDemoClaimsPath, resolveExplicitFirebasePackages, resolveExtendsName, resolveModelArchetype, resolveOutputConfig, resolvePerModelGetKey, resolveRouteSources, revokeToken, runActionsScanCli, runCli, runCssUtilitiesScanCli, runDbxDocsUiExamplesScanCli, runFiltersScanCli, runForgeFieldsScanCli, runModelFirebaseIndexScanCli, runModelSnapshotFieldsScanCli, runPaginatedList, runPipesScanCli, runScanCli, runScanCliBase, runUiComponentsScanCli, runUtilsScanCli, sanitizeString, saveCliConfig, scanFactoryReferences, scoreCandidates, serializeActionManifest, serializeCssUtilityManifest, serializeDbxDocsUiExamplesManifest, serializeFilterManifest, serializeForgeFieldManifest, serializeManifest, serializeModelSnapshotFieldsManifest, serializePipeManifest, serializeUiComponentManifest, serializeUtilManifest, setCliContext, setCliTimeoutMs, setCliVerbose, splitListTagText$1 as splitListTagText, splitSegments, stripUrlQueryAndHash, toActionEntryInfo, toFilterEntryInfo, toFormFieldInfo, tracedFetch, tryMatchSegments, unwrapFenced, validateMcpToolName, verboseLog, withCallModelArgs, withEnv, withMultiplePages, withOutput, withServiceTokenScopes, wrapCommandHandler, wrapSyncCommandHandler };
|
|
59287
|
+
export { ACTIONS_SCAN_CONFIG_FILENAME, ACTION_ENTRY_ROLES, ACTION_ROLE_ORDER, ActionDirectiveEntry, ActionEntry, ActionInputEntry, ActionManifest, ActionOutputEntry, ActionStateEntry, ActionStoreEntry, ActionStoreMethodEntry, ActionStoreObservableEntry, ActionsScanConfig, ActionsScanSection, BUILTIN_AUTH_CLAIMS, BUILTIN_AUTH_ROLES, BUILTIN_AUTH_SCOPES, CALL_MODEL_API_PATH, CALL_PASSTHROUGH_COMMAND, CLI_EXIT_CODE_AUTH, CLI_EXIT_CODE_HANDLER, CORE_TOPICS, CORE_TOPICS_SET, CSS_UTILITIES_SCAN_CONFIG_FILENAME, CSS_UTILITY_ROLES, CSS_UTILITY_SCOPES, CliError, CssUtilitiesScanConfig, CssUtilitiesScanSection, CssUtilityDeclaration, CssUtilityEntry, CssUtilityManifest, DBX_ACTION_STATE_VALUES, DBX_DOCS_UI_EXAMPLES_SCAN_CONFIG_FILENAME, DBX_DOCS_UI_EXAMPLE_USE_KINDS, DEFAULT_ACTIONS_SCAN_OUT_PATH, DEFAULT_ACTION_COMMAND_NAME, DEFAULT_CLI_HTTP_TIMEOUT_MS, DEFAULT_CLI_OIDC_SCOPES, DEFAULT_CLI_REDIRECT_URI, DEFAULT_CLI_SECRET_PATTERNS, DEFAULT_CSS_UTILITIES_SCAN_OUT_PATH, DEFAULT_DBX_DOCS_UI_EXAMPLES_SCAN_OUT_PATH, DEFAULT_FILTERS_SCAN_OUT_PATH, DEFAULT_FORGE_FIELDS_SCAN_OUT_PATH, DEFAULT_MANIFEST_HELP_DATA_FORMAT, DEFAULT_MANIFEST_HELP_MODE, DEFAULT_MANIFEST_MODEL_COMMAND_NAME, DEFAULT_MODEL_DECODE_COMMAND_NAME, DEFAULT_MODEL_INFO_COMMAND_NAME, DEFAULT_MODEL_SNAPSHOT_FIELDS_SCAN_OUT_PATH, DEFAULT_PIPES_SCAN_OUT_PATH, DEFAULT_SCAN_OUT_PATH, DEFAULT_SPECIFIER_KEY, DEFAULT_UI_COMPONENTS_SCAN_OUT_PATH, DEFAULT_UTILS_SCAN_OUT_PATH, DOWNSTREAM_CLUSTERS, DUMP_MERGE_MODES, DUMP_OUTPUT_MODES, DbxDocsUiExampleEntry, DbxDocsUiExampleManifest, DbxDocsUiExampleUseEntry, DbxDocsUiExamplesScanConfig, DbxDocsUiExamplesScanSection, DbxMcpConfig, EMPTY_ACTION_REGISTRY, EMPTY_AUTH_REGISTRY, EMPTY_CSS_UTILITY_REGISTRY, EMPTY_DBX_DOCS_UI_EXAMPLES_REGISTRY, EMPTY_FILTER_REGISTRY, EMPTY_FORGE_FIELD_REGISTRY, EMPTY_MODEL_SNAPSHOT_FIELD_REGISTRY, EMPTY_PIPE_REGISTRY, EMPTY_SEMANTIC_TYPE_REGISTRY, EMPTY_TOKEN_REGISTRY, EMPTY_UI_COMPONENT_REGISTRY, EMPTY_UTIL_REGISTRY, ExtractedDbxDocsUiExampleEntrySchema, ExtractedEntrySchema, ExtractedForgeFieldEntrySchema, ExtractedUiEntrySchema, FILTERS_SCAN_CONFIG_FILENAME, FILTER_KINDS, FILTER_KIND_ORDER, FIREBASE_MODELS, FIREBASE_MODEL_GROUPS, FORGE_FIELDS_SCAN_CONFIG_FILENAME, FORGE_FIELD_ARRAY_OUTPUTS, FORGE_FIELD_COMPOSITE_SUFFIXES, FORGE_FIELD_TIERS, FORGE_FIELD_WRAPPER_PATTERNS, FORM_FIELDS, FORM_TIER_ORDER, FilterDirectiveEntry, FilterEntry, FilterInputEntry, FilterManifest, FilterPatternEntry, FiltersScanConfig, FiltersScanSection, ForgeFieldEntry, ForgeFieldManifest, ForgeFieldPropertyEntry, ForgeFieldsScanConfig, ForgeFieldsScanSection, GET_COMMAND, GET_MANY_COMMAND, MAX_MODEL_ACCESS_MULTI_READ_KEYS, MCP_CALL_TYPE_ABBREVIATIONS, MCP_MANIFEST_VERSION, MCP_TOOL_NAME_MAX_LENGTH, MCP_TOOL_NAME_WARN_LENGTH, MODEL_ARCHETYPES, MODEL_ARCHETYPE_ADDON_SLUGS, MODEL_ARCHETYPE_SYNC_MODES, MODEL_SNAPSHOT_FIELDS_SCAN_CONFIG_FILENAME, MODEL_SNAPSHOT_FIELD_KINDS, MODEL_WRITE_OIDC_SCOPES, MULTIPLE_PAGES_OUTPUT_MODES, ModelSnapshotFieldEntry, ModelSnapshotFieldManifest, ModelSnapshotFieldParamEntry, ModelSnapshotFieldsScanConfig, ModelSnapshotFieldsScanSection, PIPES_SCAN_CONFIG_FILENAME, PIPE_CATEGORIES, PIPE_CATEGORY_ORDER, PIPE_PURITIES, PROMPT_CANCELLED_ERROR_CODE, PipeArgEntry, PipeEntry, PipeManifest, PipesScanConfig, PipesScanSection, RESERVED_MODEL_FOLDERS, ROUTE_MANIFEST_VERSION, ROUTE_MODEL_LIST_TAG, ROUTE_MODEL_TAG, SCAN_CONFIG_FILENAME$1 as SCAN_CONFIG_FILENAME, SERVICE_TOKEN_REQUIRED_OIDC_SCOPES, STANDARD_GLOBAL_OPTION_NAMES, SemanticTypeEntry, SemanticTypeManifest, SemanticTypeScanConfig, TOKEN_ROLES, TOKEN_SOURCES, TokenDefaults, TokenEntry, TokenManifest, UI_COMPONENTS_SCAN_CONFIG_FILENAME, UI_COMPONENT_CATEGORIES, UI_COMPONENT_KINDS, UTILS_SCAN_CONFIG_FILENAME, UTIL_KINDS, UiComponentEntry, UiComponentInputEntry, UiComponentManifest, UiComponentOutputEntry, UiComponentsScanConfig, UiComponentsScanSection, UtilEntry, UtilManifest, UtilParamEntry, UtilsScanConfig, UtilsScanSection, WORKSPACE_AUTH_APPS, WORKSPACE_AUTH_CLAIMS, WORKSPACE_FACTORY_SCAN_EXCLUDE, WORKSPACE_FACTORY_SCAN_INCLUDE, abbreviateMcpCallType, applyEnvVarOverrides, buildActionCommands, buildActionsManifest, buildAuthorizationUrl, buildCliPaths, buildCssUtilitiesManifest, buildDbxDocsUiExamplesManifest, buildDisambiguatedMcpToolName, buildDispatcherCreditByName, buildDumpFilePath, buildErrorOutput, buildFiltersManifest, buildForgeFieldsManifest, buildManifest, buildManifestCommands, buildMcpToolName, buildModelDecodeCommand, buildModelInfoCommand, buildModelSnapshotFieldsManifest, buildPipesManifest, buildRouteManifest, buildRouteTree, buildScanProject, buildUiComponentsManifest, buildUtilsManifest, callModelOverHttp, clearDownstreamCatalogCache, collectClassPropertiesWithInheritance, computeRelativeSpecifiers, configureCliErrorMapper, configureCliSecretPatterns, configureOutputOptions, createActionCommand, createActionRegistry, createActionRegistryFromEntries, createAuthCommand, createAuthMiddleware, createAuthRegistryFromEntries, createCallModelCommand, createCli, createCliContext, createCliTokenCacheStore, createContextSlot, createCssUtilityRegistry, createCssUtilityRegistryFromEntries, createDbxDocsUiExamplesRegistry, createDbxDocsUiExamplesRegistryFromEntries, createDoctorCommand, createEnvCommand, createFilterRegistry, createFilterRegistryFromEntries, createForgeFieldRegistry, createForgeFieldRegistryFromEntries, createModelSnapshotFieldRegistry, createModelSnapshotFieldRegistryFromEntries, createOutputCommand, createOutputMiddleware, createPassthroughAuthMiddleware, createPipeRegistry, createPipeRegistryFromEntries, createSemanticTypeRegistry, createSemanticTypeRegistryFromEntries, createTokenRegistry, createTokenRegistryFromEntries, createUiComponentRegistry, createUiComponentRegistryFromEntries, createUtilRegistry, createUtilRegistryFromEntries, decodeFirestoreModelKey, defaultDoctorChecks, defaultGlobber, defaultReadFile, deriveOptionalFromName, detectDataHelpFormat, detectHelpMode, discoverDownstreamFirebasePackages, discoverDownstreamPackages, discoverOidcMetadata, dumpTimestamp, exchangeAuthorizationCode, expandModelKeys, extractActionEntries, extractAngularInputs, extractAngularOutputs, extractAuthEntries, extractComponentRouteModelTags, extractCssUtilityEntries, extractDbxDocsUiExampleEntries, extractEntries, extractFile, extractFilterEntries, extractForgeFieldEntries, extractModelSnapshotFieldEntries, extractModels, extractPipeEntries, extractUiEntries, extractUrlParamKeys, extractUtilEntries, fetchSessionInfo, fetchUserInfo, filterReadOnlyModelScopes, findAndLoadConfig, findCliEnvDefault, findCliModelManifestEntry, flattenList, getBundledManifestsDirectory, getCliContext, getCliEnvVarName, getCliTimeoutMs, getDefaultBundledActionManifestPaths, getDefaultBundledCssUtilityManifestPaths, getDefaultBundledDbxDocsUiExamplesManifestPaths, getDefaultBundledFilterManifestPaths, getDefaultBundledForgeFieldManifestPaths, getDefaultBundledManifestPaths, getDefaultBundledModelFirebaseIndexManifestPaths, getDefaultBundledModelSnapshotFieldManifestPaths, getDefaultBundledPipeManifestPaths, getDefaultBundledTokenManifestPaths, getDefaultBundledUiManifestPaths, getDefaultBundledUtilManifestPaths, getDownstreamCatalog, getFirebaseBucketKeyedByIdModels, getFirebaseDistrictKeyedByIdModels, getFirebaseExternalIdKeyedByIdModels, getFirebaseModel, getFirebaseModelByPrefix, getFirebaseModelGroup, getFirebaseModelGroups, getFirebaseModels, getFirebaseModelsByArchetype, getFirebasePrefixCatalog, getFirebaseRegionKeyedByIdModels, getFirebaseSubcollectionsOf, getFirebaseUserKeyedByIdModels, getFirebaseUserRelatedModels, getModelArchetypeBySlug, getModelArchetypesByAxisValue, getModelArchetypesByCollectionKind, getModelArchetypesBySyncMode, getModelOverHttp, getMultipleModelsOverHttp, getMultipleModelsOverHttpChunked, getOutputOptions, globToRegex, hasParamSegment, isCliEnvConfigComplete, isCliVerbose, isCoreTopic, isStdinSentinel, isTokenExpired, isVisibleProperty, iterateDbxCliCallModel, loadActionManifests, loadActionRegistry, loadAuthRegistry, loadCliConfig, loadCssUtilityRegistry, loadDbxDocsUiExamplesManifests, loadDbxDocsUiExamplesRegistry, loadFilterManifests, loadFilterRegistry, loadForgeFieldManifests, loadForgeFieldRegistry, loadModelFirebaseIndexManifests, loadModelFirebaseIndexRegistry, loadModelSnapshotFieldManifests, loadModelSnapshotFieldRegistry, loadPackageName, loadPipeManifests, loadPipeRegistry, loadRouteTree, loadScanSection, loadSemanticTypeManifests, loadSemanticTypeRegistry, loadTokenManifests, loadTokenRegistry, loadUiComponentManifests, loadUiComponentRegistry, loadUtilManifests, loadUtilRegistry, maskEnv, maskSecret, matchUrlAgainstEntries, mcpManifestKey, mergeCliConfig, mergeCliEnvWithDefault, mergeOutputConfig, normalizePathname, oidcRelyingPartyErrorToCliError, openStreamingDump, outputError, outputResult, packageNameToSlug, parseAnnotation, parseDeclarations$1 as parseDeclarations, parseFirestoreModelIdentityArgs, parseGetArgs, parseGetManyArgs, parsePastedRedirect, parseRouteModelTag, parseScanArgs, pickFields, promptLine, readAllStdin, readDirectiveDecorator, readEnvTokenEntry, readPropertyDescription, readSelector, readStdinTokens, readStringProperty, refreshAccessToken, renderDecodedKey, renderModelManifestEntry, renderModelManifestFields, renderModelManifestList, requireCliContext, resolveActiveEnvName, resolveCliEnv, resolveCliEnvOrThrow, resolveCliModel, resolveComponentSourceFromSources, resolveDemoClaimsPath, resolveExplicitFirebasePackages, resolveExtendsName, resolveModelArchetype, resolveOutputConfig, resolvePerModelGetKey, resolveRouteSources, revokeToken, runActionsScanCli, runCli, runCssUtilitiesScanCli, runDbxDocsUiExamplesScanCli, runFiltersScanCli, runForgeFieldsScanCli, runModelFirebaseIndexScanCli, runModelSnapshotFieldsScanCli, runPaginatedList, runPipesScanCli, runScanCli, runScanCliBase, runUiComponentsScanCli, runUtilsScanCli, sanitizeString, saveCliConfig, scanFactoryReferences, scoreCandidates, serializeActionManifest, serializeCssUtilityManifest, serializeDbxDocsUiExamplesManifest, serializeFilterManifest, serializeForgeFieldManifest, serializeManifest, serializeModelSnapshotFieldsManifest, serializePipeManifest, serializeUiComponentManifest, serializeUtilManifest, setCliContext, setCliTimeoutMs, setCliVerbose, splitListTagText$1 as splitListTagText, splitSegments, stripUrlQueryAndHash, toActionEntryInfo, toFilterEntryInfo, toFormFieldInfo, tracedFetch, tryMatchSegments, unwrapFenced, validateMcpToolName, verboseLog, withCallModelArgs, withEnv, withMultiplePages, withOutput, withServiceTokenScopes, wrapCommandHandler, wrapSyncCommandHandler };
|