@dereekb/dbx-cli 13.42.0 → 13.43.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/package.json +3 -3
- package/firebase-api-manifest/main.js +21 -3
- package/firebase-api-manifest/package.json +3 -3
- package/firestore-query-manifest/main.js +8 -6
- package/firestore-query-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.esm.js +1625 -441
- package/lint-cache/package.json +2 -2
- package/manifest-extract/package.json +2 -2
- package/model-test/package.json +2 -2
- package/package.json +6 -6
- package/route/package.json +7 -7
- package/src/lib/doctor/build-drift.check.d.ts +21 -0
- package/src/lib/doctor/doctor.command.factory.d.ts +21 -2
- package/src/lib/doctor/firestore-session.check.d.ts +7 -1
- package/src/lib/doctor/index.d.ts +1 -0
- package/src/lib/firestore/firestore.sdk-identity.d.ts +193 -0
- package/src/lib/firestore/index.d.ts +1 -0
- package/src/lib/manifest/types.d.ts +21 -0
- package/src/lib/mcp-scan/manifest/css-utilities-schema.d.ts +2 -2
- package/src/lib/runner/build-stamp.d.ts +138 -0
- package/src/lib/runner/index.d.ts +1 -0
- package/src/lib/runner/run.d.ts +13 -0
- package/test/package.json +9 -9
- package/validate/index.js +5 -0
- package/validate/package.json +3 -3
package/index.esm.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, writeFileSync, readFileSync, statSync, appendFileSync } from 'node:fs';
|
|
2
|
-
import { join, resolve, sep, basename, relative, posix,
|
|
2
|
+
import { join, dirname, resolve, sep, basename, relative, posix, isAbsolute } from 'node:path';
|
|
3
3
|
import { clientFirebaseFirestoreContextFactory, makeFirestoreCollectionGroup, addOrReplaceLimitInConstraints, 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 { createRequire } from 'node:module';
|
|
6
|
+
import { Firestore, getFirestore, connectFirestoreEmulator } from 'firebase/firestore';
|
|
5
7
|
import { getApps, initializeApp, deleteApp } from 'firebase/app';
|
|
6
8
|
import { initializeAppCheck, CustomProvider } from 'firebase/app-check';
|
|
7
9
|
import { signInWithCustomToken, getAuth, connectAuthEmulator } from 'firebase/auth';
|
|
8
|
-
import { getFirestore, connectFirestoreEmulator } from 'firebase/firestore';
|
|
9
10
|
import { expirationDetails, performAsyncTasks, compareStrings, OidcRelyingPartyError, buildAuthorizationUrl as buildAuthorizationUrl$1, parseAuthorizationRedirect, noop, generateOAuthState, generatePkceMaterial, MS_IN_SECOND, buildOidcDiscoveryCandidates, unique, AUTH_TOS_SIGNED_ROLE, AUTH_ONBOARDED_ROLE, AUTH_ADMIN_ROLE, AUTH_USER_ROLE } from '@dereekb/util';
|
|
10
11
|
import { createMemoizedJsonFileAsyncKeyedValueCache, readJsonFile, writeJsonFile } from '@dereekb/nestjs';
|
|
11
12
|
import { durationDataToMilliseconds, parseDurationString } from '@dereekb/date';
|
|
@@ -22,13 +23,13 @@ import { fileURLToPath } from 'node:url';
|
|
|
22
23
|
import { format, resolveConfig } from 'prettier';
|
|
23
24
|
import { normalize, join as join$1, dirname as dirname$1 } from 'node:path/posix';
|
|
24
25
|
|
|
25
|
-
function _array_like_to_array$
|
|
26
|
+
function _array_like_to_array$19(arr, len) {
|
|
26
27
|
if (len == null || len > arr.length) len = arr.length;
|
|
27
28
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
28
29
|
return arr2;
|
|
29
30
|
}
|
|
30
31
|
function _array_without_holes$_(arr) {
|
|
31
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
32
|
+
if (Array.isArray(arr)) return _array_like_to_array$19(arr);
|
|
32
33
|
}
|
|
33
34
|
function _assert_this_initialized(self) {
|
|
34
35
|
if (self === void 0) {
|
|
@@ -36,7 +37,7 @@ function _assert_this_initialized(self) {
|
|
|
36
37
|
}
|
|
37
38
|
return self;
|
|
38
39
|
}
|
|
39
|
-
function asyncGeneratorStep$
|
|
40
|
+
function asyncGeneratorStep$1r(gen, resolve, reject, _next, _throw, key, arg) {
|
|
40
41
|
try {
|
|
41
42
|
var info = gen[key](arg);
|
|
42
43
|
var value = info.value;
|
|
@@ -50,16 +51,16 @@ function asyncGeneratorStep$1q(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
50
51
|
Promise.resolve(value).then(_next, _throw);
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
|
-
function _async_to_generator$
|
|
54
|
+
function _async_to_generator$1r(fn) {
|
|
54
55
|
return function() {
|
|
55
56
|
var self = this, args = arguments;
|
|
56
57
|
return new Promise(function(resolve, reject) {
|
|
57
58
|
var gen = fn.apply(self, args);
|
|
58
59
|
function _next(value) {
|
|
59
|
-
asyncGeneratorStep$
|
|
60
|
+
asyncGeneratorStep$1r(gen, resolve, reject, _next, _throw, "next", value);
|
|
60
61
|
}
|
|
61
62
|
function _throw(err) {
|
|
62
|
-
asyncGeneratorStep$
|
|
63
|
+
asyncGeneratorStep$1r(gen, resolve, reject, _next, _throw, "throw", err);
|
|
63
64
|
}
|
|
64
65
|
_next(undefined);
|
|
65
66
|
});
|
|
@@ -91,7 +92,7 @@ function _construct(Parent, args, Class) {
|
|
|
91
92
|
}
|
|
92
93
|
return _construct.apply(null, arguments);
|
|
93
94
|
}
|
|
94
|
-
function _define_property$
|
|
95
|
+
function _define_property$_(obj, key, value) {
|
|
95
96
|
if (key in obj) {
|
|
96
97
|
Object.defineProperty(obj, key, {
|
|
97
98
|
value: value,
|
|
@@ -123,7 +124,7 @@ function _inherits(subClass, superClass) {
|
|
|
123
124
|
});
|
|
124
125
|
if (superClass) _set_prototype_of(subClass, superClass);
|
|
125
126
|
}
|
|
126
|
-
function _instanceof$
|
|
127
|
+
function _instanceof$v(left, right) {
|
|
127
128
|
"@swc/helpers - instanceof";
|
|
128
129
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
129
130
|
return !!right[Symbol.hasInstance](left);
|
|
@@ -140,7 +141,7 @@ function _iterable_to_array$_(iter) {
|
|
|
140
141
|
function _non_iterable_spread$_() {
|
|
141
142
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
142
143
|
}
|
|
143
|
-
function _object_spread$
|
|
144
|
+
function _object_spread$_(target) {
|
|
144
145
|
for(var i = 1; i < arguments.length; i++){
|
|
145
146
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
146
147
|
var ownKeys = Object.keys(source);
|
|
@@ -150,12 +151,12 @@ function _object_spread$X(target) {
|
|
|
150
151
|
}));
|
|
151
152
|
}
|
|
152
153
|
ownKeys.forEach(function(key) {
|
|
153
|
-
_define_property$
|
|
154
|
+
_define_property$_(target, key, source[key]);
|
|
154
155
|
});
|
|
155
156
|
}
|
|
156
157
|
return target;
|
|
157
158
|
}
|
|
158
|
-
function ownKeys$
|
|
159
|
+
function ownKeys$H(object, enumerableOnly) {
|
|
159
160
|
var keys = Object.keys(object);
|
|
160
161
|
if (Object.getOwnPropertySymbols) {
|
|
161
162
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -163,19 +164,19 @@ function ownKeys$F(object, enumerableOnly) {
|
|
|
163
164
|
}
|
|
164
165
|
return keys;
|
|
165
166
|
}
|
|
166
|
-
function _object_spread_props$
|
|
167
|
+
function _object_spread_props$H(target, source) {
|
|
167
168
|
source = source != null ? source : {};
|
|
168
169
|
if (Object.getOwnPropertyDescriptors) {
|
|
169
170
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
170
171
|
} else {
|
|
171
|
-
ownKeys$
|
|
172
|
+
ownKeys$H(Object(source)).forEach(function(key) {
|
|
172
173
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
173
174
|
});
|
|
174
175
|
}
|
|
175
176
|
return target;
|
|
176
177
|
}
|
|
177
178
|
function _possible_constructor_return(self, call) {
|
|
178
|
-
if (call && (_type_of$
|
|
179
|
+
if (call && (_type_of$6(call) === "object" || typeof call === "function")) {
|
|
179
180
|
return call;
|
|
180
181
|
}
|
|
181
182
|
return _assert_this_initialized(self);
|
|
@@ -188,19 +189,19 @@ function _set_prototype_of(o, p) {
|
|
|
188
189
|
return _set_prototype_of(o, p);
|
|
189
190
|
}
|
|
190
191
|
function _to_consumable_array$_(arr) {
|
|
191
|
-
return _array_without_holes$_(arr) || _iterable_to_array$_(arr) || _unsupported_iterable_to_array$
|
|
192
|
+
return _array_without_holes$_(arr) || _iterable_to_array$_(arr) || _unsupported_iterable_to_array$19(arr) || _non_iterable_spread$_();
|
|
192
193
|
}
|
|
193
|
-
function _type_of$
|
|
194
|
+
function _type_of$6(obj) {
|
|
194
195
|
"@swc/helpers - typeof";
|
|
195
196
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
196
197
|
}
|
|
197
|
-
function _unsupported_iterable_to_array$
|
|
198
|
+
function _unsupported_iterable_to_array$19(o, minLen) {
|
|
198
199
|
if (!o) return;
|
|
199
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
200
|
+
if (typeof o === "string") return _array_like_to_array$19(o, minLen);
|
|
200
201
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
201
202
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
202
203
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
203
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
204
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$19(o, minLen);
|
|
204
205
|
}
|
|
205
206
|
function _wrap_native_super(Class) {
|
|
206
207
|
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
@@ -236,7 +237,7 @@ function _is_native_reflect_construct() {
|
|
|
236
237
|
return !!result;
|
|
237
238
|
})();
|
|
238
239
|
}
|
|
239
|
-
function _ts_generator$
|
|
240
|
+
function _ts_generator$1r(thisArg, body) {
|
|
240
241
|
var f, y, t, _ = {
|
|
241
242
|
label: 0,
|
|
242
243
|
sent: function() {
|
|
@@ -420,10 +421,10 @@ var _timeoutMs = DEFAULT_CLI_HTTP_TIMEOUT_MS;
|
|
|
420
421
|
* @param init - The RequestInit. Any existing `signal` is preserved; we only attach our own when no signal was supplied.
|
|
421
422
|
* @returns The fetch Response.
|
|
422
423
|
*/ function tracedFetch(fetcher, input, init) {
|
|
423
|
-
return _async_to_generator$
|
|
424
|
+
return _async_to_generator$1r(function() {
|
|
424
425
|
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.
|
|
425
426
|
_timeoutHandle_unref, localController, e;
|
|
426
|
-
return _ts_generator$
|
|
427
|
+
return _ts_generator$1r(this, function(_state) {
|
|
427
428
|
switch(_state.label){
|
|
428
429
|
case 0:
|
|
429
430
|
fetchImpl = fetcher !== null && fetcher !== void 0 ? fetcher : fetch;
|
|
@@ -431,7 +432,7 @@ var _timeoutMs = DEFAULT_CLI_HTTP_TIMEOUT_MS;
|
|
|
431
432
|
method = (_ref = init === null || init === void 0 ? void 0 : init.method) !== null && _ref !== void 0 ? _ref : 'GET';
|
|
432
433
|
if (typeof input === 'string') {
|
|
433
434
|
url = input;
|
|
434
|
-
} else if (_instanceof$
|
|
435
|
+
} else if (_instanceof$v(input, URL)) {
|
|
435
436
|
url = input.toString();
|
|
436
437
|
} else {
|
|
437
438
|
url = input.url;
|
|
@@ -445,7 +446,7 @@ var _timeoutMs = DEFAULT_CLI_HTTP_TIMEOUT_MS;
|
|
|
445
446
|
return localController.abort();
|
|
446
447
|
}, timeoutMs);
|
|
447
448
|
(_timeoutHandle_unref = timeoutHandle.unref) === null || _timeoutHandle_unref === void 0 ? void 0 : _timeoutHandle_unref.call(timeoutHandle);
|
|
448
|
-
finalInit = _object_spread_props$
|
|
449
|
+
finalInit = _object_spread_props$H(_object_spread$_({}, init), {
|
|
449
450
|
signal: localController.signal
|
|
450
451
|
});
|
|
451
452
|
}
|
|
@@ -609,7 +610,7 @@ function dumpResponse(data, meta) {
|
|
|
609
610
|
if (!filePath) {
|
|
610
611
|
return;
|
|
611
612
|
}
|
|
612
|
-
var content = _object_spread$
|
|
613
|
+
var content = _object_spread$_({
|
|
613
614
|
ok: true,
|
|
614
615
|
data: data
|
|
615
616
|
}, meta ? {
|
|
@@ -632,7 +633,7 @@ function dumpResponse(data, meta) {
|
|
|
632
633
|
result = data.map(function(item) {
|
|
633
634
|
return pickFromObject(item, fields);
|
|
634
635
|
});
|
|
635
|
-
} else if (data != null && (typeof data === "undefined" ? "undefined" : _type_of$
|
|
636
|
+
} else if (data != null && (typeof data === "undefined" ? "undefined" : _type_of$6(data)) === 'object') {
|
|
636
637
|
result = pickFromObject(data, fields);
|
|
637
638
|
} else {
|
|
638
639
|
result = data;
|
|
@@ -641,7 +642,7 @@ function dumpResponse(data, meta) {
|
|
|
641
642
|
}
|
|
642
643
|
function pickFromObject(obj, fields) {
|
|
643
644
|
var result;
|
|
644
|
-
if (obj == null || (typeof obj === "undefined" ? "undefined" : _type_of$
|
|
645
|
+
if (obj == null || (typeof obj === "undefined" ? "undefined" : _type_of$6(obj)) !== 'object') {
|
|
645
646
|
result = obj;
|
|
646
647
|
} else {
|
|
647
648
|
var picked = {};
|
|
@@ -686,7 +687,7 @@ function stringifyEnvelope(value) {
|
|
|
686
687
|
*/ function outputResult(data, meta) {
|
|
687
688
|
dumpResponse(data, meta);
|
|
688
689
|
var outputData = _outputOptions.pick ? pickFields(data, _outputOptions.pick) : data;
|
|
689
|
-
var output = _object_spread$
|
|
690
|
+
var output = _object_spread$_({
|
|
690
691
|
ok: true,
|
|
691
692
|
data: outputData
|
|
692
693
|
}, meta ? {
|
|
@@ -715,7 +716,7 @@ function stringifyEnvelope(value) {
|
|
|
715
716
|
var _this;
|
|
716
717
|
_this = _call_super(this, CliError, [
|
|
717
718
|
input.message
|
|
718
|
-
]), _define_property$
|
|
719
|
+
]), _define_property$_(_this, "code", void 0), _define_property$_(_this, "suggestion", void 0);
|
|
719
720
|
_this.name = 'CliError';
|
|
720
721
|
_this.code = input.code;
|
|
721
722
|
_this.suggestion = input.suggestion;
|
|
@@ -742,15 +743,15 @@ function stringifyEnvelope(value) {
|
|
|
742
743
|
var result;
|
|
743
744
|
if (mapped) {
|
|
744
745
|
result = mapped;
|
|
745
|
-
} else if (_instanceof$
|
|
746
|
-
result = _object_spread$
|
|
746
|
+
} else if (_instanceof$v(error, CliError)) {
|
|
747
|
+
result = _object_spread$_({
|
|
747
748
|
ok: false,
|
|
748
749
|
error: sanitizeString(error.message),
|
|
749
750
|
code: error.code
|
|
750
751
|
}, error.suggestion ? {
|
|
751
752
|
suggestion: error.suggestion
|
|
752
753
|
} : {});
|
|
753
|
-
} else if (_instanceof$
|
|
754
|
+
} else if (_instanceof$v(error, Error)) {
|
|
754
755
|
result = {
|
|
755
756
|
ok: false,
|
|
756
757
|
error: sanitizeString(error.message),
|
|
@@ -766,15 +767,15 @@ function stringifyEnvelope(value) {
|
|
|
766
767
|
return result;
|
|
767
768
|
}
|
|
768
769
|
|
|
769
|
-
function _array_like_to_array$
|
|
770
|
+
function _array_like_to_array$18(arr, len) {
|
|
770
771
|
if (len == null || len > arr.length) len = arr.length;
|
|
771
772
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
772
773
|
return arr2;
|
|
773
774
|
}
|
|
774
775
|
function _array_without_holes$Z(arr) {
|
|
775
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
776
|
+
if (Array.isArray(arr)) return _array_like_to_array$18(arr);
|
|
776
777
|
}
|
|
777
|
-
function asyncGeneratorStep$
|
|
778
|
+
function asyncGeneratorStep$1q(gen, resolve, reject, _next, _throw, key, arg) {
|
|
778
779
|
try {
|
|
779
780
|
var info = gen[key](arg);
|
|
780
781
|
var value = info.value;
|
|
@@ -788,22 +789,22 @@ function asyncGeneratorStep$1p(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
788
789
|
Promise.resolve(value).then(_next, _throw);
|
|
789
790
|
}
|
|
790
791
|
}
|
|
791
|
-
function _async_to_generator$
|
|
792
|
+
function _async_to_generator$1q(fn) {
|
|
792
793
|
return function() {
|
|
793
794
|
var self = this, args = arguments;
|
|
794
795
|
return new Promise(function(resolve, reject) {
|
|
795
796
|
var gen = fn.apply(self, args);
|
|
796
797
|
function _next(value) {
|
|
797
|
-
asyncGeneratorStep$
|
|
798
|
+
asyncGeneratorStep$1q(gen, resolve, reject, _next, _throw, "next", value);
|
|
798
799
|
}
|
|
799
800
|
function _throw(err) {
|
|
800
|
-
asyncGeneratorStep$
|
|
801
|
+
asyncGeneratorStep$1q(gen, resolve, reject, _next, _throw, "throw", err);
|
|
801
802
|
}
|
|
802
803
|
_next(undefined);
|
|
803
804
|
});
|
|
804
805
|
};
|
|
805
806
|
}
|
|
806
|
-
function _define_property$
|
|
807
|
+
function _define_property$Z(obj, key, value) {
|
|
807
808
|
if (key in obj) {
|
|
808
809
|
Object.defineProperty(obj, key, {
|
|
809
810
|
value: value,
|
|
@@ -822,7 +823,7 @@ function _iterable_to_array$Z(iter) {
|
|
|
822
823
|
function _non_iterable_spread$Z() {
|
|
823
824
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
824
825
|
}
|
|
825
|
-
function _object_spread$
|
|
826
|
+
function _object_spread$Z(target) {
|
|
826
827
|
for(var i = 1; i < arguments.length; i++){
|
|
827
828
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
828
829
|
var ownKeys = Object.keys(source);
|
|
@@ -832,12 +833,12 @@ function _object_spread$W(target) {
|
|
|
832
833
|
}));
|
|
833
834
|
}
|
|
834
835
|
ownKeys.forEach(function(key) {
|
|
835
|
-
_define_property$
|
|
836
|
+
_define_property$Z(target, key, source[key]);
|
|
836
837
|
});
|
|
837
838
|
}
|
|
838
839
|
return target;
|
|
839
840
|
}
|
|
840
|
-
function ownKeys$
|
|
841
|
+
function ownKeys$G(object, enumerableOnly) {
|
|
841
842
|
var keys = Object.keys(object);
|
|
842
843
|
if (Object.getOwnPropertySymbols) {
|
|
843
844
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -845,33 +846,33 @@ function ownKeys$E(object, enumerableOnly) {
|
|
|
845
846
|
}
|
|
846
847
|
return keys;
|
|
847
848
|
}
|
|
848
|
-
function _object_spread_props$
|
|
849
|
+
function _object_spread_props$G(target, source) {
|
|
849
850
|
source = source != null ? source : {};
|
|
850
851
|
if (Object.getOwnPropertyDescriptors) {
|
|
851
852
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
852
853
|
} else {
|
|
853
|
-
ownKeys$
|
|
854
|
+
ownKeys$G(Object(source)).forEach(function(key) {
|
|
854
855
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
855
856
|
});
|
|
856
857
|
}
|
|
857
858
|
return target;
|
|
858
859
|
}
|
|
859
860
|
function _to_consumable_array$Z(arr) {
|
|
860
|
-
return _array_without_holes$Z(arr) || _iterable_to_array$Z(arr) || _unsupported_iterable_to_array$
|
|
861
|
+
return _array_without_holes$Z(arr) || _iterable_to_array$Z(arr) || _unsupported_iterable_to_array$18(arr) || _non_iterable_spread$Z();
|
|
861
862
|
}
|
|
862
|
-
function _type_of$
|
|
863
|
+
function _type_of$5(obj) {
|
|
863
864
|
"@swc/helpers - typeof";
|
|
864
865
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
865
866
|
}
|
|
866
|
-
function _unsupported_iterable_to_array$
|
|
867
|
+
function _unsupported_iterable_to_array$18(o, minLen) {
|
|
867
868
|
if (!o) return;
|
|
868
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
869
|
+
if (typeof o === "string") return _array_like_to_array$18(o, minLen);
|
|
869
870
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
870
871
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
871
872
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
872
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
873
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$18(o, minLen);
|
|
873
874
|
}
|
|
874
|
-
function _ts_generator$
|
|
875
|
+
function _ts_generator$1q(thisArg, body) {
|
|
875
876
|
var f, y, t, _ = {
|
|
876
877
|
label: 0,
|
|
877
878
|
sent: function() {
|
|
@@ -983,9 +984,9 @@ var MAX_MODEL_ACCESS_MULTI_READ_KEYS = 50;
|
|
|
983
984
|
* @param input - The call envelope describing the API target, access token, model params, and optional fetch override.
|
|
984
985
|
* @returns The parsed JSON response body cast to `R`.
|
|
985
986
|
*/ function callModelOverHttp(input) {
|
|
986
|
-
return _async_to_generator$
|
|
987
|
+
return _async_to_generator$1q(function() {
|
|
987
988
|
var _input_params_call;
|
|
988
|
-
return _ts_generator$
|
|
989
|
+
return _ts_generator$1q(this, function(_state) {
|
|
989
990
|
return [
|
|
990
991
|
2,
|
|
991
992
|
requestJson({
|
|
@@ -1013,8 +1014,8 @@ var MAX_MODEL_ACCESS_MULTI_READ_KEYS = 50;
|
|
|
1013
1014
|
* @param input - The request envelope describing the API target, access token, model + key, and optional fetch override.
|
|
1014
1015
|
* @returns The parsed `{ key, data }` envelope.
|
|
1015
1016
|
*/ function getModelOverHttp(input) {
|
|
1016
|
-
return _async_to_generator$
|
|
1017
|
-
return _ts_generator$
|
|
1017
|
+
return _async_to_generator$1q(function() {
|
|
1018
|
+
return _ts_generator$1q(this, function(_state) {
|
|
1018
1019
|
return [
|
|
1019
1020
|
2,
|
|
1020
1021
|
requestJson({
|
|
@@ -1042,8 +1043,8 @@ var MAX_MODEL_ACCESS_MULTI_READ_KEYS = 50;
|
|
|
1042
1043
|
* @param input - The request envelope describing the API target, access token, model, keys, and optional fetch override.
|
|
1043
1044
|
* @returns The parsed `{ results, errors }` envelope.
|
|
1044
1045
|
*/ function getMultipleModelsOverHttp(input) {
|
|
1045
|
-
return _async_to_generator$
|
|
1046
|
-
return _ts_generator$
|
|
1046
|
+
return _async_to_generator$1q(function() {
|
|
1047
|
+
return _ts_generator$1q(this, function(_state) {
|
|
1047
1048
|
if (input.keys.length === 0) {
|
|
1048
1049
|
throw new CliError({
|
|
1049
1050
|
message: 'get-many requires at least one key.',
|
|
@@ -1081,9 +1082,9 @@ var MAX_MODEL_ACCESS_MULTI_READ_KEYS = 50;
|
|
|
1081
1082
|
* @param input - Same shape as {@link GetMultipleModelsOverHttpInput} but without the 50-key cap.
|
|
1082
1083
|
* @returns The merged `{ results, errors }` envelope across all chunks.
|
|
1083
1084
|
*/ function getMultipleModelsOverHttpChunked(input) {
|
|
1084
|
-
return _async_to_generator$
|
|
1085
|
+
return _async_to_generator$1q(function() {
|
|
1085
1086
|
var chunks, i, mergedResults, mergedErrors, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, chunk, _mergedResults, _mergedErrors, batch, err;
|
|
1086
|
-
return _ts_generator$
|
|
1087
|
+
return _ts_generator$1q(this, function(_state) {
|
|
1087
1088
|
switch(_state.label){
|
|
1088
1089
|
case 0:
|
|
1089
1090
|
if (input.keys.length === 0) {
|
|
@@ -1117,7 +1118,7 @@ var MAX_MODEL_ACCESS_MULTI_READ_KEYS = 50;
|
|
|
1117
1118
|
chunk = _step.value;
|
|
1118
1119
|
return [
|
|
1119
1120
|
4,
|
|
1120
|
-
getMultipleModelsOverHttp(_object_spread_props$
|
|
1121
|
+
getMultipleModelsOverHttp(_object_spread_props$G(_object_spread$Z({}, input), {
|
|
1121
1122
|
keys: chunk
|
|
1122
1123
|
}))
|
|
1123
1124
|
];
|
|
@@ -1171,15 +1172,15 @@ var MAX_MODEL_ACCESS_MULTI_READ_KEYS = 50;
|
|
|
1171
1172
|
})();
|
|
1172
1173
|
}
|
|
1173
1174
|
function requestJson(input) {
|
|
1174
|
-
return _async_to_generator$
|
|
1175
|
+
return _async_to_generator$1q(function() {
|
|
1175
1176
|
var hasJsonBody, init, res, _ref, ok, body, fallbackMessage;
|
|
1176
|
-
return _ts_generator$
|
|
1177
|
+
return _ts_generator$1q(this, function(_state) {
|
|
1177
1178
|
switch(_state.label){
|
|
1178
1179
|
case 0:
|
|
1179
1180
|
hasJsonBody = input.jsonBody !== undefined;
|
|
1180
|
-
init = _object_spread$
|
|
1181
|
+
init = _object_spread$Z({
|
|
1181
1182
|
method: input.method,
|
|
1182
|
-
headers: _object_spread$
|
|
1183
|
+
headers: _object_spread$Z({
|
|
1183
1184
|
Accept: 'application/json',
|
|
1184
1185
|
Authorization: "Bearer ".concat(input.accessToken)
|
|
1185
1186
|
}, hasJsonBody ? {
|
|
@@ -1216,9 +1217,9 @@ function requestJson(input) {
|
|
|
1216
1217
|
})();
|
|
1217
1218
|
}
|
|
1218
1219
|
function readJsonResponse(res) {
|
|
1219
|
-
return _async_to_generator$
|
|
1220
|
+
return _async_to_generator$1q(function() {
|
|
1220
1221
|
var text, body;
|
|
1221
|
-
return _ts_generator$
|
|
1222
|
+
return _ts_generator$1q(this, function(_state) {
|
|
1222
1223
|
switch(_state.label){
|
|
1223
1224
|
case 0:
|
|
1224
1225
|
return [
|
|
@@ -1247,7 +1248,7 @@ function readJsonResponse(res) {
|
|
|
1247
1248
|
})();
|
|
1248
1249
|
}
|
|
1249
1250
|
function extractMessage$1(body, fallback, res) {
|
|
1250
|
-
var bodyMessage = (typeof body === "undefined" ? "undefined" : _type_of$
|
|
1251
|
+
var bodyMessage = (typeof body === "undefined" ? "undefined" : _type_of$5(body)) === 'object' && body && 'message' in body ? body.message : undefined;
|
|
1251
1252
|
var messageString = typeof bodyMessage === 'string' ? bodyMessage : undefined;
|
|
1252
1253
|
return messageString !== null && messageString !== void 0 ? messageString : fallback || "".concat(res.status, " ").concat(res.statusText);
|
|
1253
1254
|
}
|
|
@@ -1274,15 +1275,297 @@ function trimSlash$1(url) {
|
|
|
1274
1275
|
return url.endsWith('/') ? url.slice(0, -1) : url;
|
|
1275
1276
|
}
|
|
1276
1277
|
|
|
1277
|
-
function
|
|
1278
|
+
function _define_property$Y(obj, key, value) {
|
|
1279
|
+
if (key in obj) {
|
|
1280
|
+
Object.defineProperty(obj, key, {
|
|
1281
|
+
value: value,
|
|
1282
|
+
enumerable: true,
|
|
1283
|
+
configurable: true,
|
|
1284
|
+
writable: true
|
|
1285
|
+
});
|
|
1286
|
+
} else {
|
|
1287
|
+
obj[key] = value;
|
|
1288
|
+
}
|
|
1289
|
+
return obj;
|
|
1290
|
+
}
|
|
1291
|
+
function _instanceof$u(left, right) {
|
|
1292
|
+
"@swc/helpers - instanceof";
|
|
1293
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
1294
|
+
return !!right[Symbol.hasInstance](left);
|
|
1295
|
+
} else {
|
|
1296
|
+
return left instanceof right;
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
function _object_spread$Y(target) {
|
|
1300
|
+
for(var i = 1; i < arguments.length; i++){
|
|
1301
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
1302
|
+
var ownKeys = Object.keys(source);
|
|
1303
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
1304
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
1305
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
1306
|
+
}));
|
|
1307
|
+
}
|
|
1308
|
+
ownKeys.forEach(function(key) {
|
|
1309
|
+
_define_property$Y(target, key, source[key]);
|
|
1310
|
+
});
|
|
1311
|
+
}
|
|
1312
|
+
return target;
|
|
1313
|
+
}
|
|
1314
|
+
function ownKeys$F(object, enumerableOnly) {
|
|
1315
|
+
var keys = Object.keys(object);
|
|
1316
|
+
if (Object.getOwnPropertySymbols) {
|
|
1317
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
1318
|
+
keys.push.apply(keys, symbols);
|
|
1319
|
+
}
|
|
1320
|
+
return keys;
|
|
1321
|
+
}
|
|
1322
|
+
function _object_spread_props$F(target, source) {
|
|
1323
|
+
source = source != null ? source : {};
|
|
1324
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
1325
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
1326
|
+
} else {
|
|
1327
|
+
ownKeys$F(Object(source)).forEach(function(key) {
|
|
1328
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
1329
|
+
});
|
|
1330
|
+
}
|
|
1331
|
+
return target;
|
|
1332
|
+
}
|
|
1333
|
+
/**
|
|
1334
|
+
* The `drivers.firestoreDriverIdentifier` a client-SDK `FirestoreContext` reports.
|
|
1335
|
+
*
|
|
1336
|
+
* `clientFirebaseFirestoreContextFactory` stamps this; the server's
|
|
1337
|
+
* `googleCloudFirestoreContextFactory` stamps `@google-cloud/firestore` instead. Comparing against
|
|
1338
|
+
* it is how {@link inspectCliFirestoreSdkIdentity} tells an admin-SDK context handed to the CLI apart
|
|
1339
|
+
* from a genuinely broken client one.
|
|
1340
|
+
*/ var CLI_CLIENT_FIRESTORE_DRIVER_IDENTIFIER = '@firebase/firestore';
|
|
1341
|
+
/**
|
|
1342
|
+
* The doctor `detail.stage` reported when the session's Firestore handle is not a usable client-SDK
|
|
1343
|
+
* `Firestore`.
|
|
1344
|
+
*
|
|
1345
|
+
* A distinct stage from `rules-protected-read` on purpose: the read never ran, so reporting it under
|
|
1346
|
+
* the read's stage is what made this failure look like a rules/App Check problem.
|
|
1347
|
+
*/ var FIRESTORE_SDK_IDENTITY_STAGE = 'firestore-sdk-identity';
|
|
1348
|
+
/**
|
|
1349
|
+
* `CliError` code for a Firestore handle the client SDK does not recognize as its own.
|
|
1350
|
+
*/ var FIRESTORE_SDK_INSTANCE_MISMATCH_CODE = 'FIRESTORE_SDK_INSTANCE_MISMATCH';
|
|
1351
|
+
/**
|
|
1352
|
+
* Checks that a session's Firestore handle is one THIS copy of the client SDK will accept, and
|
|
1353
|
+
* reports where every consumer resolved the SDK from.
|
|
1354
|
+
*
|
|
1355
|
+
* Exists because `collection()` refuses any non-`Firestore` first argument with one message —
|
|
1356
|
+
* `Expected first argument to collection() to be a CollectionReference, a DocumentReference or
|
|
1357
|
+
* FirebaseFirestore` — that names neither the model, nor the collection, nor which of the three
|
|
1358
|
+
* distinct causes ({@link CliFirestoreSdkIdentityProblem}) produced it. Every downstream CLI built on
|
|
1359
|
+
* `@dereekb/dbx-cli` shares that hazard, so the diagnosis belongs here rather than in an app.
|
|
1360
|
+
*
|
|
1361
|
+
* The `instanceof` test is the load-bearing one and it is deliberately NOT structural: an identity
|
|
1362
|
+
* check across the package boundary is the only thing that can detect a duplicated
|
|
1363
|
+
* `@firebase/firestore`, which is exactly what a structural check would hide. (Contrast
|
|
1364
|
+
* `firestore.error.ts`, which narrows a thrown `FirebaseError` structurally — there the goal is to
|
|
1365
|
+
* classify an error even when copies differ, so the tradeoff runs the other way.)
|
|
1366
|
+
*
|
|
1367
|
+
* @param input - The session's `firestoreContext`, when one was built.
|
|
1368
|
+
* @returns The provenance + brand-check report.
|
|
1369
|
+
*/ function inspectCliFirestoreSdkIdentity(input) {
|
|
1370
|
+
var _input_firestoreContext, _input_firestoreContext_drivers, _input_firestoreContext1;
|
|
1371
|
+
var firestore = (_input_firestoreContext = input.firestoreContext) === null || _input_firestoreContext === void 0 ? void 0 : _input_firestoreContext.firestore;
|
|
1372
|
+
var driverIdentifier = (_input_firestoreContext1 = input.firestoreContext) === null || _input_firestoreContext1 === void 0 ? void 0 : (_input_firestoreContext_drivers = _input_firestoreContext1.drivers) === null || _input_firestoreContext_drivers === void 0 ? void 0 : _input_firestoreContext_drivers.firestoreDriverIdentifier;
|
|
1373
|
+
var firestoreDriverIdentifier = typeof driverIdentifier === 'string' ? driverIdentifier : undefined;
|
|
1374
|
+
var firestorePresent = firestore != null;
|
|
1375
|
+
var firestoreIsSdkInstance = _instanceof$u(firestore, Firestore);
|
|
1376
|
+
var firestoreConstructor = firestoreConstructorName(firestore);
|
|
1377
|
+
var modules = resolveCliFirestoreSdkModules();
|
|
1378
|
+
var sdkDuplicated = modules.sdkFromDbxCli.packageDir != null && modules.sdkFromDbxFirebase.packageDir != null && modules.sdkFromDbxCli.packageDir !== modules.sdkFromDbxFirebase.packageDir;
|
|
1379
|
+
var problem;
|
|
1380
|
+
if (!firestorePresent) {
|
|
1381
|
+
problem = 'no-firestore-handle';
|
|
1382
|
+
} else if (firestoreDriverIdentifier != null && firestoreDriverIdentifier !== CLI_CLIENT_FIRESTORE_DRIVER_IDENTIFIER) {
|
|
1383
|
+
problem = 'unexpected-driver';
|
|
1384
|
+
} else if (!firestoreIsSdkInstance) {
|
|
1385
|
+
problem = sdkDuplicated ? 'duplicated-firestore-sdk' : 'foreign-firestore-instance';
|
|
1386
|
+
}
|
|
1387
|
+
return _object_spread_props$F(_object_spread$Y(_object_spread_props$F(_object_spread$Y({
|
|
1388
|
+
ok: problem == null
|
|
1389
|
+
}, problem == null ? {} : {
|
|
1390
|
+
problem: problem
|
|
1391
|
+
}), {
|
|
1392
|
+
firestorePresent: firestorePresent,
|
|
1393
|
+
firestoreIsSdkInstance: firestoreIsSdkInstance
|
|
1394
|
+
}), firestoreConstructor == null ? {} : {
|
|
1395
|
+
firestoreConstructor: firestoreConstructor
|
|
1396
|
+
}, firestoreDriverIdentifier == null ? {} : {
|
|
1397
|
+
firestoreDriverIdentifier: firestoreDriverIdentifier
|
|
1398
|
+
}, modules), {
|
|
1399
|
+
sdkDuplicated: sdkDuplicated
|
|
1400
|
+
});
|
|
1401
|
+
}
|
|
1402
|
+
/**
|
|
1403
|
+
* The actionable next step for a failed {@link inspectCliFirestoreSdkIdentity}, keyed on which
|
|
1404
|
+
* problem was found.
|
|
1405
|
+
*
|
|
1406
|
+
* Each branch names the fix rather than the symptom — a raw SDK sentence sends an operator looking at
|
|
1407
|
+
* security rules and App Check, neither of which is ever the cause here.
|
|
1408
|
+
*
|
|
1409
|
+
* @param report - The report to describe.
|
|
1410
|
+
* @returns The suggestion, or `undefined` when the report passed.
|
|
1411
|
+
*
|
|
1412
|
+
* @__NO_SIDE_EFFECTS__
|
|
1413
|
+
*/ function cliFirestoreSdkIdentitySuggestion(report) {
|
|
1414
|
+
var result;
|
|
1415
|
+
switch(report.problem){
|
|
1416
|
+
case 'no-firestore-handle':
|
|
1417
|
+
result = 'The session produced no Firestore handle, so every collection reference built from it fails. This is a wiring fault, not a rules or App Check fault — re-run with `--verbose` to see the handshake, and verify the CLI resolves ONE `@dereekb/firebase`.';
|
|
1418
|
+
break;
|
|
1419
|
+
case 'unexpected-driver':
|
|
1420
|
+
result = 'The `FirestoreContext` reports driver "'.concat(report.firestoreDriverIdentifier, '", not "').concat(CLI_CLIENT_FIRESTORE_DRIVER_IDENTIFIER, "\". An admin-SDK context reached the client-SDK read path — build the CLI's context with `clientFirebaseFirestoreContextFactory`, not `googleCloudFirestoreContextFactory`.");
|
|
1421
|
+
break;
|
|
1422
|
+
case 'duplicated-firestore-sdk':
|
|
1423
|
+
result = "Two copies of `@firebase/firestore` are loaded — `@dereekb/dbx-cli` resolves ".concat(report.sdkFromDbxCli.packageDir, ", `@dereekb/firebase` resolves ").concat(report.sdkFromDbxFirebase.packageDir, " — so the handle one minted fails the other's brand check. Dedupe the install (`npm ls @firebase/firestore`) and rebuild the CLI.");
|
|
1424
|
+
break;
|
|
1425
|
+
case 'foreign-firestore-instance':
|
|
1426
|
+
var _report_firestoreConstructor;
|
|
1427
|
+
result = "The session's handle (`".concat((_report_firestoreConstructor = report.firestoreConstructor) !== null && _report_firestoreConstructor !== void 0 ? _report_firestoreConstructor : 'unknown', "`) is not an instance of the loaded SDK's `Firestore`, and only one copy of `@firebase/firestore` is installed. The likeliest cause is a STALE CLI artifact running against a newer `@dereekb/*` in `node_modules` — rebuild the CLI, then re-run `doctor`.");
|
|
1428
|
+
break;
|
|
1429
|
+
default:
|
|
1430
|
+
result = undefined;
|
|
1431
|
+
break;
|
|
1432
|
+
}
|
|
1433
|
+
return result;
|
|
1434
|
+
}
|
|
1435
|
+
/**
|
|
1436
|
+
* `CliError` code for a collection/document reference the SDK refused to build for a reason the
|
|
1437
|
+
* wiring identity check cannot explain — a bad `--parent`, or an app collection whose own
|
|
1438
|
+
* construction is broken.
|
|
1439
|
+
*/ var FIRESTORE_COLLECTION_UNRESOLVABLE_CODE = 'FIRESTORE_COLLECTION_UNRESOLVABLE';
|
|
1440
|
+
/**
|
|
1441
|
+
* Re-raises a reference-construction failure as a `CliError` that names WHAT was being built and, when
|
|
1442
|
+
* the SDK handle is at fault, WHY.
|
|
1443
|
+
*
|
|
1444
|
+
* The failure this replaces is the least readable in the direct-Firestore path: `collection()` and
|
|
1445
|
+
* `doc()` reject a bad first argument with a message that names neither the model, the collection, the
|
|
1446
|
+
* `--parent`, nor the handle — and every one of those is known at the call site. A `CliError` already
|
|
1447
|
+
* raised upstream (an unknown model type, a malformed `--parent`) is passed through untouched, so this
|
|
1448
|
+
* can be applied unconditionally in a `catch`.
|
|
1449
|
+
*
|
|
1450
|
+
* @param input - The thrown value plus everything the call site knows about the reference it was building.
|
|
1451
|
+
* @returns The `CliError` to throw, or the original `CliError` when the failure was already named.
|
|
1452
|
+
*/ function cliFirestoreWiringError(input) {
|
|
1453
|
+
var error = input.error, operation = input.operation, modelType = input.modelType, collectionName = input.collectionName, parentKey = input.parentKey, firestoreContext = input.firestoreContext;
|
|
1454
|
+
var result;
|
|
1455
|
+
if (_instanceof$u(error, CliError)) {
|
|
1456
|
+
result = error;
|
|
1457
|
+
} else {
|
|
1458
|
+
var _cliFirestoreSdkIdentitySuggestion, _report_firestoreDriverIdentifier, _report_sdkFromDbxCli_version, _report_sdkFromDbxCli_packageDir;
|
|
1459
|
+
var facts = [
|
|
1460
|
+
modelType == null ? undefined : 'model "'.concat(modelType, '"'),
|
|
1461
|
+
collectionName == null ? undefined : 'collection "'.concat(collectionName, '"'),
|
|
1462
|
+
parentKey == null ? 'no --parent' : '--parent "'.concat(parentKey, '"')
|
|
1463
|
+
].filter(function(x) {
|
|
1464
|
+
return x != null;
|
|
1465
|
+
});
|
|
1466
|
+
var report = inspectCliFirestoreSdkIdentity({
|
|
1467
|
+
firestoreContext: firestoreContext
|
|
1468
|
+
});
|
|
1469
|
+
var message = "Could not ".concat(operation, " (").concat(facts.join(', '), "): ").concat(_instanceof$u(error, Error) ? error.message : String(error));
|
|
1470
|
+
result = new CliError({
|
|
1471
|
+
message: message,
|
|
1472
|
+
code: report.ok ? FIRESTORE_COLLECTION_UNRESOLVABLE_CODE : FIRESTORE_SDK_INSTANCE_MISMATCH_CODE,
|
|
1473
|
+
suggestion: (_cliFirestoreSdkIdentitySuggestion = cliFirestoreSdkIdentitySuggestion(report)) !== null && _cliFirestoreSdkIdentitySuggestion !== void 0 ? _cliFirestoreSdkIdentitySuggestion : 'The Firestore handle itself checked out (driver "'.concat((_report_firestoreDriverIdentifier = report.firestoreDriverIdentifier) !== null && _report_firestoreDriverIdentifier !== void 0 ? _report_firestoreDriverIdentifier : 'unknown', '", @firebase/firestore ').concat((_report_sdkFromDbxCli_version = report.sdkFromDbxCli.version) !== null && _report_sdkFromDbxCli_version !== void 0 ? _report_sdkFromDbxCli_version : 'unknown', " at ").concat((_report_sdkFromDbxCli_packageDir = report.sdkFromDbxCli.packageDir) !== null && _report_sdkFromDbxCli_packageDir !== void 0 ? _report_sdkFromDbxCli_packageDir : 'unknown', "), so the rejected argument is the path, not the SDK. Check the --parent key and the app's collection factory for this model.")
|
|
1474
|
+
});
|
|
1475
|
+
}
|
|
1476
|
+
return result;
|
|
1477
|
+
}
|
|
1478
|
+
/**
|
|
1479
|
+
* The handle's constructor name, when it has one.
|
|
1480
|
+
*
|
|
1481
|
+
* @param firestore - The candidate handle.
|
|
1482
|
+
* @returns The constructor name, or `undefined`.
|
|
1483
|
+
*/ function firestoreConstructorName(firestore) {
|
|
1484
|
+
var _firestore_constructor;
|
|
1485
|
+
var name = firestore == null ? undefined : (_firestore_constructor = firestore.constructor) === null || _firestore_constructor === void 0 ? void 0 : _firestore_constructor.name;
|
|
1486
|
+
return typeof name === 'string' ? name : undefined;
|
|
1487
|
+
}
|
|
1488
|
+
/**
|
|
1489
|
+
* Resolves `@firebase/firestore` from both this package and `@dereekb/firebase`, plus the `firebase`
|
|
1490
|
+
* umbrella version.
|
|
1491
|
+
*
|
|
1492
|
+
* `createRequire` rather than `import.meta.resolve` because the resolution has to be performed
|
|
1493
|
+
* relative to ANOTHER package's location (`@dereekb/firebase`'s entry file) to answer the question
|
|
1494
|
+
* that matters — whether the two consumers see the same copy.
|
|
1495
|
+
*
|
|
1496
|
+
* @returns The two module identities and the umbrella version, each degrading to an `error` field
|
|
1497
|
+
* rather than throwing: this runs inside a diagnostic, and a failed resolution is itself a finding.
|
|
1498
|
+
*/ function resolveCliFirestoreSdkModules() {
|
|
1499
|
+
var requireFromDbxCli = createRequire(import.meta.url);
|
|
1500
|
+
var sdkFromDbxCli = resolveFirestoreSdkIdentity(requireFromDbxCli);
|
|
1501
|
+
var sdkFromDbxFirebase;
|
|
1502
|
+
try {
|
|
1503
|
+
sdkFromDbxFirebase = resolveFirestoreSdkIdentity(createRequire(requireFromDbxCli.resolve('@dereekb/firebase')));
|
|
1504
|
+
} catch (e) {
|
|
1505
|
+
sdkFromDbxFirebase = {
|
|
1506
|
+
error: _instanceof$u(e, Error) ? e.message : String(e)
|
|
1507
|
+
};
|
|
1508
|
+
}
|
|
1509
|
+
var firebaseVersion;
|
|
1510
|
+
try {
|
|
1511
|
+
firebaseVersion = readPackageVersion(requireFromDbxCli, 'firebase/package.json');
|
|
1512
|
+
} catch (unused) {
|
|
1513
|
+
// the umbrella version is context for the report, not a finding on its own
|
|
1514
|
+
firebaseVersion = undefined;
|
|
1515
|
+
}
|
|
1516
|
+
return _object_spread$Y({
|
|
1517
|
+
sdkFromDbxCli: sdkFromDbxCli,
|
|
1518
|
+
sdkFromDbxFirebase: sdkFromDbxFirebase
|
|
1519
|
+
}, firebaseVersion == null ? {} : {
|
|
1520
|
+
firebaseVersion: firebaseVersion
|
|
1521
|
+
});
|
|
1522
|
+
}
|
|
1523
|
+
/**
|
|
1524
|
+
* Resolves `@firebase/firestore`'s package directory + version through one `require`.
|
|
1525
|
+
*
|
|
1526
|
+
* Resolves `package.json` rather than the package entry because the entry differs per export
|
|
1527
|
+
* condition (`index.node.cjs.js` vs `index.node.mjs`), which would report two copies where there is
|
|
1528
|
+
* one. The `package.json` path is condition-independent, so its directory is a stable identity.
|
|
1529
|
+
*
|
|
1530
|
+
* @param resolver - The `require` to resolve through.
|
|
1531
|
+
* @returns The module identity, with `error` set when resolution failed.
|
|
1532
|
+
*/ function resolveFirestoreSdkIdentity(resolver) {
|
|
1533
|
+
var result;
|
|
1534
|
+
try {
|
|
1535
|
+
var packageJsonPath = resolver.resolve('@firebase/firestore/package.json');
|
|
1536
|
+
var version = readPackageVersion(resolver, '@firebase/firestore/package.json');
|
|
1537
|
+
result = _object_spread$Y({
|
|
1538
|
+
packageDir: dirname(packageJsonPath)
|
|
1539
|
+
}, version == null ? {} : {
|
|
1540
|
+
version: version
|
|
1541
|
+
});
|
|
1542
|
+
} catch (e) {
|
|
1543
|
+
result = {
|
|
1544
|
+
error: _instanceof$u(e, Error) ? e.message : String(e)
|
|
1545
|
+
};
|
|
1546
|
+
}
|
|
1547
|
+
return result;
|
|
1548
|
+
}
|
|
1549
|
+
/**
|
|
1550
|
+
* Reads a resolvable `package.json`'s `version`.
|
|
1551
|
+
*
|
|
1552
|
+
* @param resolver - The `require` to load through.
|
|
1553
|
+
* @param specifier - The `package.json` specifier.
|
|
1554
|
+
* @returns The version string, or `undefined` when absent.
|
|
1555
|
+
*/ function readPackageVersion(resolver, specifier) {
|
|
1556
|
+
var contents = resolver(specifier);
|
|
1557
|
+
return typeof contents.version === 'string' ? contents.version : undefined;
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
function _array_like_to_array$17(arr, len) {
|
|
1278
1561
|
if (len == null || len > arr.length) len = arr.length;
|
|
1279
1562
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
1280
1563
|
return arr2;
|
|
1281
1564
|
}
|
|
1282
1565
|
function _array_without_holes$Y(arr) {
|
|
1283
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
1566
|
+
if (Array.isArray(arr)) return _array_like_to_array$17(arr);
|
|
1284
1567
|
}
|
|
1285
|
-
function asyncGeneratorStep$
|
|
1568
|
+
function asyncGeneratorStep$1p(gen, resolve, reject, _next, _throw, key, arg) {
|
|
1286
1569
|
try {
|
|
1287
1570
|
var info = gen[key](arg);
|
|
1288
1571
|
var value = info.value;
|
|
@@ -1296,16 +1579,16 @@ function asyncGeneratorStep$1o(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
1296
1579
|
Promise.resolve(value).then(_next, _throw);
|
|
1297
1580
|
}
|
|
1298
1581
|
}
|
|
1299
|
-
function _async_to_generator$
|
|
1582
|
+
function _async_to_generator$1p(fn) {
|
|
1300
1583
|
return function() {
|
|
1301
1584
|
var self = this, args = arguments;
|
|
1302
1585
|
return new Promise(function(resolve, reject) {
|
|
1303
1586
|
var gen = fn.apply(self, args);
|
|
1304
1587
|
function _next(value) {
|
|
1305
|
-
asyncGeneratorStep$
|
|
1588
|
+
asyncGeneratorStep$1p(gen, resolve, reject, _next, _throw, "next", value);
|
|
1306
1589
|
}
|
|
1307
1590
|
function _throw(err) {
|
|
1308
|
-
asyncGeneratorStep$
|
|
1591
|
+
asyncGeneratorStep$1p(gen, resolve, reject, _next, _throw, "throw", err);
|
|
1309
1592
|
}
|
|
1310
1593
|
_next(undefined);
|
|
1311
1594
|
});
|
|
@@ -1318,17 +1601,17 @@ function _non_iterable_spread$Y() {
|
|
|
1318
1601
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1319
1602
|
}
|
|
1320
1603
|
function _to_consumable_array$Y(arr) {
|
|
1321
|
-
return _array_without_holes$Y(arr) || _iterable_to_array$Y(arr) || _unsupported_iterable_to_array$
|
|
1604
|
+
return _array_without_holes$Y(arr) || _iterable_to_array$Y(arr) || _unsupported_iterable_to_array$17(arr) || _non_iterable_spread$Y();
|
|
1322
1605
|
}
|
|
1323
|
-
function _unsupported_iterable_to_array$
|
|
1606
|
+
function _unsupported_iterable_to_array$17(o, minLen) {
|
|
1324
1607
|
if (!o) return;
|
|
1325
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
1608
|
+
if (typeof o === "string") return _array_like_to_array$17(o, minLen);
|
|
1326
1609
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1327
1610
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1328
1611
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
1329
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
1612
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$17(o, minLen);
|
|
1330
1613
|
}
|
|
1331
|
-
function _ts_generator$
|
|
1614
|
+
function _ts_generator$1p(thisArg, body) {
|
|
1332
1615
|
var f, y, t, _ = {
|
|
1333
1616
|
label: 0,
|
|
1334
1617
|
sent: function() {
|
|
@@ -1469,9 +1752,9 @@ function _ts_generator$1o(thisArg, body) {
|
|
|
1469
1752
|
* @returns The session-bound {@link CliFirestoreModels}.
|
|
1470
1753
|
* @throws {CliError} When the CLI was not configured with a `firestore` binding, or the session cannot be opened.
|
|
1471
1754
|
*/ function requireCliFirestoreModels(context) {
|
|
1472
|
-
return _async_to_generator$
|
|
1755
|
+
return _async_to_generator$1p(function() {
|
|
1473
1756
|
var getFirestoreModels;
|
|
1474
|
-
return _ts_generator$
|
|
1757
|
+
return _ts_generator$1p(this, function(_state) {
|
|
1475
1758
|
getFirestoreModels = context.getFirestoreModels;
|
|
1476
1759
|
if (!getFirestoreModels) {
|
|
1477
1760
|
throw new CliError({
|
|
@@ -1501,7 +1784,7 @@ function _ts_generator$1o(thisArg, body) {
|
|
|
1501
1784
|
* @__NO_SIDE_EFFECTS__
|
|
1502
1785
|
*/ function createCliFirestoreModels(input) {
|
|
1503
1786
|
var binding = input.binding, session = input.session;
|
|
1504
|
-
var collections =
|
|
1787
|
+
var collections = buildCliFirestoreCollections(input);
|
|
1505
1788
|
var collectionNameCache = new Map();
|
|
1506
1789
|
// the one cast this generic buys: TypeScript cannot check an implementation against
|
|
1507
1790
|
// `CliFirestoreModelServiceForType<Y, K>` — a conditional type it cannot resolve while `Y` is still
|
|
@@ -1539,6 +1822,33 @@ function _ts_generator$1o(thisArg, body) {
|
|
|
1539
1822
|
}
|
|
1540
1823
|
};
|
|
1541
1824
|
}
|
|
1825
|
+
/**
|
|
1826
|
+
* Builds the app's collections object against the session's `FirestoreContext`.
|
|
1827
|
+
*
|
|
1828
|
+
* The FIRST place a broken session handle is used, and — before this — the place it failed most
|
|
1829
|
+
* opaquely: `make<App>FirestoreCollections` builds every collection eagerly, so a `firestoreContext`
|
|
1830
|
+
* whose `firestore` is not a client-SDK `Firestore` fails here with the SDK's own
|
|
1831
|
+
* `Expected first argument to collection() to be …` and no indication that a CLI wiring/version
|
|
1832
|
+
* problem, rather than the app's collections, is at fault. Every direct-Firestore command routes
|
|
1833
|
+
* through here, so naming it once covers `firestore-get`, `firestore-query`, and every action.
|
|
1834
|
+
*
|
|
1835
|
+
* @param input - The binding and the open session.
|
|
1836
|
+
* @returns The app's collections object.
|
|
1837
|
+
* @throws {CliError} When the collections cannot be built against the session's context.
|
|
1838
|
+
*/ function buildCliFirestoreCollections(input) {
|
|
1839
|
+
var binding = input.binding, session = input.session;
|
|
1840
|
+
var result;
|
|
1841
|
+
try {
|
|
1842
|
+
result = binding.collections(session.firestoreContext);
|
|
1843
|
+
} catch (e) {
|
|
1844
|
+
throw cliFirestoreWiringError({
|
|
1845
|
+
error: e,
|
|
1846
|
+
operation: "build the app's Firestore collections from the session context",
|
|
1847
|
+
firestoreContext: session.firestoreContext
|
|
1848
|
+
});
|
|
1849
|
+
}
|
|
1850
|
+
return result;
|
|
1851
|
+
}
|
|
1542
1852
|
/**
|
|
1543
1853
|
* Resolves a short collection name to its registered model type, memoizing every identity it sees on
|
|
1544
1854
|
* the way so a second lookup is free.
|
|
@@ -1605,7 +1915,7 @@ function tryReadCollectionIdentity(binding, collections, modelType) {
|
|
|
1605
1915
|
return result;
|
|
1606
1916
|
}
|
|
1607
1917
|
|
|
1608
|
-
function asyncGeneratorStep$
|
|
1918
|
+
function asyncGeneratorStep$1o(gen, resolve, reject, _next, _throw, key, arg) {
|
|
1609
1919
|
try {
|
|
1610
1920
|
var info = gen[key](arg);
|
|
1611
1921
|
var value = info.value;
|
|
@@ -1619,26 +1929,26 @@ function asyncGeneratorStep$1n(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
1619
1929
|
Promise.resolve(value).then(_next, _throw);
|
|
1620
1930
|
}
|
|
1621
1931
|
}
|
|
1622
|
-
function _async_to_generator$
|
|
1932
|
+
function _async_to_generator$1o(fn) {
|
|
1623
1933
|
return function() {
|
|
1624
1934
|
var self = this, args = arguments;
|
|
1625
1935
|
return new Promise(function(resolve, reject) {
|
|
1626
1936
|
var gen = fn.apply(self, args);
|
|
1627
1937
|
function _next(value) {
|
|
1628
|
-
asyncGeneratorStep$
|
|
1938
|
+
asyncGeneratorStep$1o(gen, resolve, reject, _next, _throw, "next", value);
|
|
1629
1939
|
}
|
|
1630
1940
|
function _throw(err) {
|
|
1631
|
-
asyncGeneratorStep$
|
|
1941
|
+
asyncGeneratorStep$1o(gen, resolve, reject, _next, _throw, "throw", err);
|
|
1632
1942
|
}
|
|
1633
1943
|
_next(undefined);
|
|
1634
1944
|
});
|
|
1635
1945
|
};
|
|
1636
1946
|
}
|
|
1637
|
-
function _type_of$
|
|
1947
|
+
function _type_of$4(obj) {
|
|
1638
1948
|
"@swc/helpers - typeof";
|
|
1639
1949
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
1640
1950
|
}
|
|
1641
|
-
function _ts_generator$
|
|
1951
|
+
function _ts_generator$1o(thisArg, body) {
|
|
1642
1952
|
var f, y, t, _ = {
|
|
1643
1953
|
label: 0,
|
|
1644
1954
|
sent: function() {
|
|
@@ -1754,9 +2064,9 @@ function _ts_generator$1n(thisArg, body) {
|
|
|
1754
2064
|
* @returns The parsed {@link CliFirestoreSession}.
|
|
1755
2065
|
* @throws {CliError} When the endpoint answers non-2xx or returns an unusable body.
|
|
1756
2066
|
*/ function fetchFirestoreSession(input) {
|
|
1757
|
-
return _async_to_generator$
|
|
2067
|
+
return _async_to_generator$1o(function() {
|
|
1758
2068
|
var url, res, text, body, session;
|
|
1759
|
-
return _ts_generator$
|
|
2069
|
+
return _ts_generator$1o(this, function(_state) {
|
|
1760
2070
|
switch(_state.label){
|
|
1761
2071
|
case 0:
|
|
1762
2072
|
url = "".concat(trimSlash(input.apiBaseUrl)).concat(FIRESTORE_SESSION_API_PATH);
|
|
@@ -1809,7 +2119,7 @@ function _ts_generator$1n(thisArg, body) {
|
|
|
1809
2119
|
})();
|
|
1810
2120
|
}
|
|
1811
2121
|
function extractMessage(body, fallback, res) {
|
|
1812
|
-
var bodyMessage = (typeof body === "undefined" ? "undefined" : _type_of$
|
|
2122
|
+
var bodyMessage = (typeof body === "undefined" ? "undefined" : _type_of$4(body)) === 'object' && body && 'message' in body ? body.message : undefined;
|
|
1813
2123
|
var messageString = typeof bodyMessage === 'string' ? bodyMessage : undefined;
|
|
1814
2124
|
return messageString !== null && messageString !== void 0 ? messageString : fallback || "".concat(res.status, " ").concat(res.statusText);
|
|
1815
2125
|
}
|
|
@@ -1832,7 +2142,7 @@ function trimSlash(url) {
|
|
|
1832
2142
|
return url.endsWith('/') ? url.slice(0, -1) : url;
|
|
1833
2143
|
}
|
|
1834
2144
|
|
|
1835
|
-
function _define_property$
|
|
2145
|
+
function _define_property$X(obj, key, value) {
|
|
1836
2146
|
if (key in obj) {
|
|
1837
2147
|
Object.defineProperty(obj, key, {
|
|
1838
2148
|
value: value,
|
|
@@ -1845,7 +2155,7 @@ function _define_property$V(obj, key, value) {
|
|
|
1845
2155
|
}
|
|
1846
2156
|
return obj;
|
|
1847
2157
|
}
|
|
1848
|
-
function _object_spread$
|
|
2158
|
+
function _object_spread$X(target) {
|
|
1849
2159
|
for(var i = 1; i < arguments.length; i++){
|
|
1850
2160
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
1851
2161
|
var ownKeys = Object.keys(source);
|
|
@@ -1855,12 +2165,12 @@ function _object_spread$V(target) {
|
|
|
1855
2165
|
}));
|
|
1856
2166
|
}
|
|
1857
2167
|
ownKeys.forEach(function(key) {
|
|
1858
|
-
_define_property$
|
|
2168
|
+
_define_property$X(target, key, source[key]);
|
|
1859
2169
|
});
|
|
1860
2170
|
}
|
|
1861
2171
|
return target;
|
|
1862
2172
|
}
|
|
1863
|
-
function ownKeys$
|
|
2173
|
+
function ownKeys$E(object, enumerableOnly) {
|
|
1864
2174
|
var keys = Object.keys(object);
|
|
1865
2175
|
if (Object.getOwnPropertySymbols) {
|
|
1866
2176
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -1868,12 +2178,12 @@ function ownKeys$D(object, enumerableOnly) {
|
|
|
1868
2178
|
}
|
|
1869
2179
|
return keys;
|
|
1870
2180
|
}
|
|
1871
|
-
function _object_spread_props$
|
|
2181
|
+
function _object_spread_props$E(target, source) {
|
|
1872
2182
|
source = source != null ? source : {};
|
|
1873
2183
|
if (Object.getOwnPropertyDescriptors) {
|
|
1874
2184
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
1875
2185
|
} else {
|
|
1876
|
-
ownKeys$
|
|
2186
|
+
ownKeys$E(Object(source)).forEach(function(key) {
|
|
1877
2187
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
1878
2188
|
});
|
|
1879
2189
|
}
|
|
@@ -2010,7 +2320,7 @@ function _object_spread_props$D(target, source) {
|
|
|
2010
2320
|
if (env || defaultEnv) {
|
|
2011
2321
|
var _nonEmpty, _nonEmpty1, _nonEmpty2, _nonEmpty3;
|
|
2012
2322
|
var emulators = mergeCliFirebaseEmulatorsConfig(env === null || env === void 0 ? void 0 : env.emulators, defaultEnv === null || defaultEnv === void 0 ? void 0 : defaultEnv.emulators);
|
|
2013
|
-
result = _object_spread$
|
|
2323
|
+
result = _object_spread$X({
|
|
2014
2324
|
apiKey: (_nonEmpty = nonEmpty(env === null || env === void 0 ? void 0 : env.apiKey)) !== null && _nonEmpty !== void 0 ? _nonEmpty : nonEmpty(defaultEnv === null || defaultEnv === void 0 ? void 0 : defaultEnv.apiKey),
|
|
2015
2325
|
authDomain: (_nonEmpty1 = nonEmpty(env === null || env === void 0 ? void 0 : env.authDomain)) !== null && _nonEmpty1 !== void 0 ? _nonEmpty1 : nonEmpty(defaultEnv === null || defaultEnv === void 0 ? void 0 : defaultEnv.authDomain),
|
|
2016
2326
|
projectId: (_nonEmpty2 = nonEmpty(env === null || env === void 0 ? void 0 : env.projectId)) !== null && _nonEmpty2 !== void 0 ? _nonEmpty2 : nonEmpty(defaultEnv === null || defaultEnv === void 0 ? void 0 : defaultEnv.projectId),
|
|
@@ -2105,7 +2415,7 @@ function nonEmpty(value) {
|
|
|
2105
2415
|
} else {
|
|
2106
2416
|
var _ref, _ref1;
|
|
2107
2417
|
var _input_env, _input_env1, _input_env2, _input_env3, _input_env4, _input_env5, _input_env6, _input_env7, _input_env8;
|
|
2108
|
-
var firebase = mergeCliFirebaseConfig(_object_spread$
|
|
2418
|
+
var firebase = mergeCliFirebaseConfig(_object_spread$X({
|
|
2109
2419
|
apiKey: firebaseApiKey,
|
|
2110
2420
|
authDomain: firebaseAuthDomain,
|
|
2111
2421
|
projectId: firebaseProjectId,
|
|
@@ -2117,7 +2427,7 @@ function nonEmpty(value) {
|
|
|
2117
2427
|
firestorePort: firebaseFirestoreEmulatorPort
|
|
2118
2428
|
}
|
|
2119
2429
|
} : undefined), (_input_env = input.env) === null || _input_env === void 0 ? void 0 : _input_env.firebase);
|
|
2120
|
-
result = _object_spread$
|
|
2430
|
+
result = _object_spread$X({
|
|
2121
2431
|
apiBaseUrl: (_ref = apiBaseUrl !== null && apiBaseUrl !== void 0 ? apiBaseUrl : (_input_env1 = input.env) === null || _input_env1 === void 0 ? void 0 : _input_env1.apiBaseUrl) !== null && _ref !== void 0 ? _ref : '',
|
|
2122
2432
|
oidcIssuer: (_ref1 = oidcIssuer !== null && oidcIssuer !== void 0 ? oidcIssuer : (_input_env2 = input.env) === null || _input_env2 === void 0 ? void 0 : _input_env2.oidcIssuer) !== null && _ref1 !== void 0 ? _ref1 : '',
|
|
2123
2433
|
appClientUrl: appClientUrl !== null && appClientUrl !== void 0 ? appClientUrl : (_input_env3 = input.env) === null || _input_env3 === void 0 ? void 0 : _input_env3.appClientUrl,
|
|
@@ -2166,7 +2476,7 @@ function parsePort(value) {
|
|
|
2166
2476
|
if (refreshToken) {
|
|
2167
2477
|
var accessToken = nonEmpty(process.env["".concat(prefix, "_ACCESS_TOKEN")]);
|
|
2168
2478
|
var scope = nonEmpty(process.env["".concat(prefix, "_TOKEN_SCOPE")]);
|
|
2169
|
-
result = _object_spread_props$
|
|
2479
|
+
result = _object_spread_props$E(_object_spread$X({
|
|
2170
2480
|
accessToken: accessToken !== null && accessToken !== void 0 ? accessToken : '',
|
|
2171
2481
|
refreshToken: refreshToken,
|
|
2172
2482
|
// No reliable expiry is supplied via env, so force a refresh on first use (expiresAt 0 = expired).
|
|
@@ -2239,7 +2549,7 @@ function parsePort(value) {
|
|
|
2239
2549
|
}).hasExpired();
|
|
2240
2550
|
}
|
|
2241
2551
|
|
|
2242
|
-
function asyncGeneratorStep$
|
|
2552
|
+
function asyncGeneratorStep$1n(gen, resolve, reject, _next, _throw, key, arg) {
|
|
2243
2553
|
try {
|
|
2244
2554
|
var info = gen[key](arg);
|
|
2245
2555
|
var value = info.value;
|
|
@@ -2253,22 +2563,22 @@ function asyncGeneratorStep$1m(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
2253
2563
|
Promise.resolve(value).then(_next, _throw);
|
|
2254
2564
|
}
|
|
2255
2565
|
}
|
|
2256
|
-
function _async_to_generator$
|
|
2566
|
+
function _async_to_generator$1n(fn) {
|
|
2257
2567
|
return function() {
|
|
2258
2568
|
var self = this, args = arguments;
|
|
2259
2569
|
return new Promise(function(resolve, reject) {
|
|
2260
2570
|
var gen = fn.apply(self, args);
|
|
2261
2571
|
function _next(value) {
|
|
2262
|
-
asyncGeneratorStep$
|
|
2572
|
+
asyncGeneratorStep$1n(gen, resolve, reject, _next, _throw, "next", value);
|
|
2263
2573
|
}
|
|
2264
2574
|
function _throw(err) {
|
|
2265
|
-
asyncGeneratorStep$
|
|
2575
|
+
asyncGeneratorStep$1n(gen, resolve, reject, _next, _throw, "throw", err);
|
|
2266
2576
|
}
|
|
2267
2577
|
_next(undefined);
|
|
2268
2578
|
});
|
|
2269
2579
|
};
|
|
2270
2580
|
}
|
|
2271
|
-
function _define_property$
|
|
2581
|
+
function _define_property$W(obj, key, value) {
|
|
2272
2582
|
if (key in obj) {
|
|
2273
2583
|
Object.defineProperty(obj, key, {
|
|
2274
2584
|
value: value,
|
|
@@ -2289,7 +2599,7 @@ function _instanceof$t(left, right) {
|
|
|
2289
2599
|
return left instanceof right;
|
|
2290
2600
|
}
|
|
2291
2601
|
}
|
|
2292
|
-
function _object_spread$
|
|
2602
|
+
function _object_spread$W(target) {
|
|
2293
2603
|
for(var i = 1; i < arguments.length; i++){
|
|
2294
2604
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
2295
2605
|
var ownKeys = Object.keys(source);
|
|
@@ -2299,12 +2609,12 @@ function _object_spread$U(target) {
|
|
|
2299
2609
|
}));
|
|
2300
2610
|
}
|
|
2301
2611
|
ownKeys.forEach(function(key) {
|
|
2302
|
-
_define_property$
|
|
2612
|
+
_define_property$W(target, key, source[key]);
|
|
2303
2613
|
});
|
|
2304
2614
|
}
|
|
2305
2615
|
return target;
|
|
2306
2616
|
}
|
|
2307
|
-
function ownKeys$
|
|
2617
|
+
function ownKeys$D(object, enumerableOnly) {
|
|
2308
2618
|
var keys = Object.keys(object);
|
|
2309
2619
|
if (Object.getOwnPropertySymbols) {
|
|
2310
2620
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -2312,18 +2622,18 @@ function ownKeys$C(object, enumerableOnly) {
|
|
|
2312
2622
|
}
|
|
2313
2623
|
return keys;
|
|
2314
2624
|
}
|
|
2315
|
-
function _object_spread_props$
|
|
2625
|
+
function _object_spread_props$D(target, source) {
|
|
2316
2626
|
source = source != null ? source : {};
|
|
2317
2627
|
if (Object.getOwnPropertyDescriptors) {
|
|
2318
2628
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
2319
2629
|
} else {
|
|
2320
|
-
ownKeys$
|
|
2630
|
+
ownKeys$D(Object(source)).forEach(function(key) {
|
|
2321
2631
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
2322
2632
|
});
|
|
2323
2633
|
}
|
|
2324
2634
|
return target;
|
|
2325
2635
|
}
|
|
2326
|
-
function _ts_generator$
|
|
2636
|
+
function _ts_generator$1n(thisArg, body) {
|
|
2327
2637
|
var f, y, t, _ = {
|
|
2328
2638
|
label: 0,
|
|
2329
2639
|
sent: function() {
|
|
@@ -2464,9 +2774,9 @@ function _ts_generator$1m(thisArg, body) {
|
|
|
2464
2774
|
* @returns The live {@link CliFirestoreSessionContext}.
|
|
2465
2775
|
* @throws {CliError} When the env lacks Firebase client config, or any step of the handshake fails.
|
|
2466
2776
|
*/ function createCliFirestoreSessionContext(input) {
|
|
2467
|
-
return _async_to_generator$
|
|
2777
|
+
return _async_to_generator$1n(function() {
|
|
2468
2778
|
var _ref, _getApps_find, _firebase_emulators, _firebase_emulators1, _firebase_emulators2, cliName, envName, env, accessToken, fetcher, sessionCache, _input_refreshSession, refreshSession, firebase, cached, _tmp, liveCached, fromCache, session, _tmp1, appName, app, useEmulators, appCheckToken, expireTimeMillis, emulatorHost, auth, firestore, e;
|
|
2469
|
-
return _ts_generator$
|
|
2779
|
+
return _ts_generator$1n(this, function(_state) {
|
|
2470
2780
|
switch(_state.label){
|
|
2471
2781
|
case 0:
|
|
2472
2782
|
cliName = input.cliName, envName = input.envName, env = input.env, accessToken = input.accessToken, fetcher = input.fetcher, sessionCache = input.sessionCache, _input_refreshSession = input.refreshSession, refreshSession = _input_refreshSession === void 0 ? false : _input_refreshSession;
|
|
@@ -2559,8 +2869,8 @@ function _ts_generator$1m(thisArg, body) {
|
|
|
2559
2869
|
initializeAppCheck(app, {
|
|
2560
2870
|
provider: new CustomProvider({
|
|
2561
2871
|
getToken: function getToken() {
|
|
2562
|
-
return _async_to_generator$
|
|
2563
|
-
return _ts_generator$
|
|
2872
|
+
return _async_to_generator$1n(function() {
|
|
2873
|
+
return _ts_generator$1n(this, function(_state) {
|
|
2564
2874
|
return [
|
|
2565
2875
|
2,
|
|
2566
2876
|
{
|
|
@@ -2619,7 +2929,7 @@ function _ts_generator$1m(thisArg, body) {
|
|
|
2619
2929
|
_state.sent();
|
|
2620
2930
|
return [
|
|
2621
2931
|
2,
|
|
2622
|
-
createCliFirestoreSessionContext(_object_spread_props$
|
|
2932
|
+
createCliFirestoreSessionContext(_object_spread_props$D(_object_spread$W({}, input), {
|
|
2623
2933
|
refreshSession: true
|
|
2624
2934
|
}))
|
|
2625
2935
|
];
|
|
@@ -2662,8 +2972,8 @@ function _ts_generator$1m(thisArg, body) {
|
|
|
2662
2972
|
*
|
|
2663
2973
|
* @param session - The session context to close.
|
|
2664
2974
|
*/ function closeCliFirestoreSessionContext(session) {
|
|
2665
|
-
return _async_to_generator$
|
|
2666
|
-
return _ts_generator$
|
|
2975
|
+
return _async_to_generator$1n(function() {
|
|
2976
|
+
return _ts_generator$1n(this, function(_state) {
|
|
2667
2977
|
switch(_state.label){
|
|
2668
2978
|
case 0:
|
|
2669
2979
|
return [
|
|
@@ -2684,8 +2994,8 @@ function _ts_generator$1m(thisArg, body) {
|
|
|
2684
2994
|
*
|
|
2685
2995
|
* @param app - The app to delete.
|
|
2686
2996
|
*/ function closeCliFirebaseApp(app) {
|
|
2687
|
-
return _async_to_generator$
|
|
2688
|
-
return _ts_generator$
|
|
2997
|
+
return _async_to_generator$1n(function() {
|
|
2998
|
+
return _ts_generator$1n(this, function(_state) {
|
|
2689
2999
|
switch(_state.label){
|
|
2690
3000
|
case 0:
|
|
2691
3001
|
_state.trys.push([
|
|
@@ -2743,9 +3053,9 @@ function _ts_generator$1m(thisArg, body) {
|
|
|
2743
3053
|
* consumers in the same process are left alone.
|
|
2744
3054
|
* @returns Resolves once every matching app has been deleted.
|
|
2745
3055
|
*/ function closeAllCliFirebaseApps(input) {
|
|
2746
|
-
return _async_to_generator$
|
|
3056
|
+
return _async_to_generator$1n(function() {
|
|
2747
3057
|
var prefix, apps;
|
|
2748
|
-
return _ts_generator$
|
|
3058
|
+
return _ts_generator$1n(this, function(_state) {
|
|
2749
3059
|
switch(_state.label){
|
|
2750
3060
|
case 0:
|
|
2751
3061
|
// every env this process opened a session for, which is normally exactly one
|
|
@@ -2818,7 +3128,7 @@ function _ts_generator$1m(thisArg, body) {
|
|
|
2818
3128
|
};
|
|
2819
3129
|
}
|
|
2820
3130
|
|
|
2821
|
-
function asyncGeneratorStep$
|
|
3131
|
+
function asyncGeneratorStep$1m(gen, resolve, reject, _next, _throw, key, arg) {
|
|
2822
3132
|
try {
|
|
2823
3133
|
var info = gen[key](arg);
|
|
2824
3134
|
var value = info.value;
|
|
@@ -2832,22 +3142,22 @@ function asyncGeneratorStep$1l(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
2832
3142
|
Promise.resolve(value).then(_next, _throw);
|
|
2833
3143
|
}
|
|
2834
3144
|
}
|
|
2835
|
-
function _async_to_generator$
|
|
3145
|
+
function _async_to_generator$1m(fn) {
|
|
2836
3146
|
return function() {
|
|
2837
3147
|
var self = this, args = arguments;
|
|
2838
3148
|
return new Promise(function(resolve, reject) {
|
|
2839
3149
|
var gen = fn.apply(self, args);
|
|
2840
3150
|
function _next(value) {
|
|
2841
|
-
asyncGeneratorStep$
|
|
3151
|
+
asyncGeneratorStep$1m(gen, resolve, reject, _next, _throw, "next", value);
|
|
2842
3152
|
}
|
|
2843
3153
|
function _throw(err) {
|
|
2844
|
-
asyncGeneratorStep$
|
|
3154
|
+
asyncGeneratorStep$1m(gen, resolve, reject, _next, _throw, "throw", err);
|
|
2845
3155
|
}
|
|
2846
3156
|
_next(undefined);
|
|
2847
3157
|
});
|
|
2848
3158
|
};
|
|
2849
3159
|
}
|
|
2850
|
-
function _ts_generator$
|
|
3160
|
+
function _ts_generator$1m(thisArg, body) {
|
|
2851
3161
|
var f, y, t, _ = {
|
|
2852
3162
|
label: 0,
|
|
2853
3163
|
sent: function() {
|
|
@@ -2959,9 +3269,9 @@ function _ts_generator$1l(thisArg, body) {
|
|
|
2959
3269
|
* @returns The opened (and memoized) direct-Firestore session.
|
|
2960
3270
|
* @throws {CliError} When the context does not support direct-Firestore sessions.
|
|
2961
3271
|
*/ function requireCliFirestoreSession(context) {
|
|
2962
|
-
return _async_to_generator$
|
|
3272
|
+
return _async_to_generator$1m(function() {
|
|
2963
3273
|
var getFirestoreSession;
|
|
2964
|
-
return _ts_generator$
|
|
3274
|
+
return _ts_generator$1m(this, function(_state) {
|
|
2965
3275
|
getFirestoreSession = context.getFirestoreSession;
|
|
2966
3276
|
if (!getFirestoreSession) {
|
|
2967
3277
|
throw new CliError({
|
|
@@ -2988,8 +3298,8 @@ function _ts_generator$1l(thisArg, body) {
|
|
|
2988
3298
|
* @returns The client `FirestoreContext` an app's collections factory consumes.
|
|
2989
3299
|
* @throws {CliError} When the context does not support direct-Firestore sessions.
|
|
2990
3300
|
*/ function requireCliFirestoreContext(context) {
|
|
2991
|
-
return _async_to_generator$
|
|
2992
|
-
return _ts_generator$
|
|
3301
|
+
return _async_to_generator$1m(function() {
|
|
3302
|
+
return _ts_generator$1m(this, function(_state) {
|
|
2993
3303
|
switch(_state.label){
|
|
2994
3304
|
case 0:
|
|
2995
3305
|
return [
|
|
@@ -3086,9 +3396,9 @@ var getCliContext = _cliContextSlot.get;
|
|
|
3086
3396
|
return getFirestoreModelsForBinding(firestore);
|
|
3087
3397
|
};
|
|
3088
3398
|
function closeFirestoreSession() {
|
|
3089
|
-
return _async_to_generator$
|
|
3399
|
+
return _async_to_generator$1m(function() {
|
|
3090
3400
|
var opened, session;
|
|
3091
|
-
return _ts_generator$
|
|
3401
|
+
return _ts_generator$1m(this, function(_state) {
|
|
3092
3402
|
switch(_state.label){
|
|
3093
3403
|
case 0:
|
|
3094
3404
|
opened = firestoreSession;
|
|
@@ -3167,7 +3477,7 @@ var getCliContext = _cliContextSlot.get;
|
|
|
3167
3477
|
};
|
|
3168
3478
|
}
|
|
3169
3479
|
|
|
3170
|
-
function asyncGeneratorStep$
|
|
3480
|
+
function asyncGeneratorStep$1l(gen, resolve, reject, _next, _throw, key, arg) {
|
|
3171
3481
|
try {
|
|
3172
3482
|
var info = gen[key](arg);
|
|
3173
3483
|
var value = info.value;
|
|
@@ -3181,22 +3491,22 @@ function asyncGeneratorStep$1k(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
3181
3491
|
Promise.resolve(value).then(_next, _throw);
|
|
3182
3492
|
}
|
|
3183
3493
|
}
|
|
3184
|
-
function _async_to_generator$
|
|
3494
|
+
function _async_to_generator$1l(fn) {
|
|
3185
3495
|
return function() {
|
|
3186
3496
|
var self = this, args = arguments;
|
|
3187
3497
|
return new Promise(function(resolve, reject) {
|
|
3188
3498
|
var gen = fn.apply(self, args);
|
|
3189
3499
|
function _next(value) {
|
|
3190
|
-
asyncGeneratorStep$
|
|
3500
|
+
asyncGeneratorStep$1l(gen, resolve, reject, _next, _throw, "next", value);
|
|
3191
3501
|
}
|
|
3192
3502
|
function _throw(err) {
|
|
3193
|
-
asyncGeneratorStep$
|
|
3503
|
+
asyncGeneratorStep$1l(gen, resolve, reject, _next, _throw, "throw", err);
|
|
3194
3504
|
}
|
|
3195
3505
|
_next(undefined);
|
|
3196
3506
|
});
|
|
3197
3507
|
};
|
|
3198
3508
|
}
|
|
3199
|
-
function _ts_generator$
|
|
3509
|
+
function _ts_generator$1l(thisArg, body) {
|
|
3200
3510
|
var f, y, t, _ = {
|
|
3201
3511
|
label: 0,
|
|
3202
3512
|
sent: function() {
|
|
@@ -3309,9 +3619,9 @@ function _ts_generator$1k(thisArg, body) {
|
|
|
3309
3619
|
*/ function wrapCommandHandler(handler) {
|
|
3310
3620
|
var exitCode = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : CLI_EXIT_CODE_HANDLER;
|
|
3311
3621
|
return function(argv) {
|
|
3312
|
-
return _async_to_generator$
|
|
3622
|
+
return _async_to_generator$1l(function() {
|
|
3313
3623
|
var e;
|
|
3314
|
-
return _ts_generator$
|
|
3624
|
+
return _ts_generator$1l(this, function(_state) {
|
|
3315
3625
|
switch(_state.label){
|
|
3316
3626
|
case 0:
|
|
3317
3627
|
_state.trys.push([
|
|
@@ -3372,7 +3682,7 @@ function _ts_generator$1k(thisArg, body) {
|
|
|
3372
3682
|
};
|
|
3373
3683
|
}
|
|
3374
3684
|
|
|
3375
|
-
function asyncGeneratorStep$
|
|
3685
|
+
function asyncGeneratorStep$1k(gen, resolve, reject, _next, _throw, key, arg) {
|
|
3376
3686
|
try {
|
|
3377
3687
|
var info = gen[key](arg);
|
|
3378
3688
|
var value = info.value;
|
|
@@ -3386,22 +3696,22 @@ function asyncGeneratorStep$1j(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
3386
3696
|
Promise.resolve(value).then(_next, _throw);
|
|
3387
3697
|
}
|
|
3388
3698
|
}
|
|
3389
|
-
function _async_to_generator$
|
|
3699
|
+
function _async_to_generator$1k(fn) {
|
|
3390
3700
|
return function() {
|
|
3391
3701
|
var self = this, args = arguments;
|
|
3392
3702
|
return new Promise(function(resolve, reject) {
|
|
3393
3703
|
var gen = fn.apply(self, args);
|
|
3394
3704
|
function _next(value) {
|
|
3395
|
-
asyncGeneratorStep$
|
|
3705
|
+
asyncGeneratorStep$1k(gen, resolve, reject, _next, _throw, "next", value);
|
|
3396
3706
|
}
|
|
3397
3707
|
function _throw(err) {
|
|
3398
|
-
asyncGeneratorStep$
|
|
3708
|
+
asyncGeneratorStep$1k(gen, resolve, reject, _next, _throw, "throw", err);
|
|
3399
3709
|
}
|
|
3400
3710
|
_next(undefined);
|
|
3401
3711
|
});
|
|
3402
3712
|
};
|
|
3403
3713
|
}
|
|
3404
|
-
function _ts_generator$
|
|
3714
|
+
function _ts_generator$1k(thisArg, body) {
|
|
3405
3715
|
var f, y, t, _ = {
|
|
3406
3716
|
label: 0,
|
|
3407
3717
|
sent: function() {
|
|
@@ -3521,9 +3831,9 @@ function _ts_generator$1j(thisArg, body) {
|
|
|
3521
3831
|
return spec.helpEpilogue ? built.epilogue(spec.helpEpilogue) : built;
|
|
3522
3832
|
},
|
|
3523
3833
|
handler: wrapCommandHandler(function(argv) {
|
|
3524
|
-
return _async_to_generator$
|
|
3834
|
+
return _async_to_generator$1k(function() {
|
|
3525
3835
|
var context, result;
|
|
3526
|
-
return _ts_generator$
|
|
3836
|
+
return _ts_generator$1k(this, function(_state) {
|
|
3527
3837
|
switch(_state.label){
|
|
3528
3838
|
case 0:
|
|
3529
3839
|
context = requireCliContext();
|
|
@@ -3547,15 +3857,15 @@ function _ts_generator$1j(thisArg, body) {
|
|
|
3547
3857
|
};
|
|
3548
3858
|
}
|
|
3549
3859
|
|
|
3550
|
-
function _array_like_to_array$
|
|
3860
|
+
function _array_like_to_array$16(arr, len) {
|
|
3551
3861
|
if (len == null || len > arr.length) len = arr.length;
|
|
3552
3862
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
3553
3863
|
return arr2;
|
|
3554
3864
|
}
|
|
3555
|
-
function _array_with_holes$
|
|
3865
|
+
function _array_with_holes$m(arr) {
|
|
3556
3866
|
if (Array.isArray(arr)) return arr;
|
|
3557
3867
|
}
|
|
3558
|
-
function _iterable_to_array_limit$
|
|
3868
|
+
function _iterable_to_array_limit$m(arr, i) {
|
|
3559
3869
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
3560
3870
|
if (_i == null) return;
|
|
3561
3871
|
var _arr = [];
|
|
@@ -3579,19 +3889,19 @@ function _iterable_to_array_limit$l(arr, i) {
|
|
|
3579
3889
|
}
|
|
3580
3890
|
return _arr;
|
|
3581
3891
|
}
|
|
3582
|
-
function _non_iterable_rest$
|
|
3892
|
+
function _non_iterable_rest$m() {
|
|
3583
3893
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
3584
3894
|
}
|
|
3585
|
-
function _sliced_to_array$
|
|
3586
|
-
return _array_with_holes$
|
|
3895
|
+
function _sliced_to_array$m(arr, i) {
|
|
3896
|
+
return _array_with_holes$m(arr) || _iterable_to_array_limit$m(arr, i) || _unsupported_iterable_to_array$16(arr, i) || _non_iterable_rest$m();
|
|
3587
3897
|
}
|
|
3588
|
-
function _unsupported_iterable_to_array$
|
|
3898
|
+
function _unsupported_iterable_to_array$16(o, minLen) {
|
|
3589
3899
|
if (!o) return;
|
|
3590
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
3900
|
+
if (typeof o === "string") return _array_like_to_array$16(o, minLen);
|
|
3591
3901
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
3592
3902
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
3593
3903
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
3594
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
3904
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$16(o, minLen);
|
|
3595
3905
|
}
|
|
3596
3906
|
/**
|
|
3597
3907
|
* Default name of the parent command that groups all registered action specs.
|
|
@@ -3647,7 +3957,7 @@ function _unsupported_iterable_to_array$15(o, minLen) {
|
|
|
3647
3957
|
}
|
|
3648
3958
|
}
|
|
3649
3959
|
var sortedModels = Array.from(byModel.entries()).sort(function(param, param1) {
|
|
3650
|
-
var _param = _sliced_to_array$
|
|
3960
|
+
var _param = _sliced_to_array$m(param, 1), a = _param[0], _param1 = _sliced_to_array$m(param1, 1), b = _param1[0];
|
|
3651
3961
|
return a.localeCompare(b);
|
|
3652
3962
|
});
|
|
3653
3963
|
result = [
|
|
@@ -3678,7 +3988,7 @@ function _unsupported_iterable_to_array$15(o, minLen) {
|
|
|
3678
3988
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
3679
3989
|
try {
|
|
3680
3990
|
var _loop = function() {
|
|
3681
|
-
var _step_value = _sliced_to_array$
|
|
3991
|
+
var _step_value = _sliced_to_array$m(_step1.value, 2), model = _step_value[0], modelSpecs = _step_value[1];
|
|
3682
3992
|
yargs.command({
|
|
3683
3993
|
command: "".concat(model, " <action>"),
|
|
3684
3994
|
describe: "Composite actions scoped to model '".concat(model, "' (").concat(modelSpecs.length, ")."),
|
|
@@ -3736,18 +4046,18 @@ function _unsupported_iterable_to_array$15(o, minLen) {
|
|
|
3736
4046
|
return result;
|
|
3737
4047
|
}
|
|
3738
4048
|
|
|
3739
|
-
function _array_like_to_array$
|
|
4049
|
+
function _array_like_to_array$15(arr, len) {
|
|
3740
4050
|
if (len == null || len > arr.length) len = arr.length;
|
|
3741
4051
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
3742
4052
|
return arr2;
|
|
3743
4053
|
}
|
|
3744
|
-
function _array_with_holes$
|
|
4054
|
+
function _array_with_holes$l(arr) {
|
|
3745
4055
|
if (Array.isArray(arr)) return arr;
|
|
3746
4056
|
}
|
|
3747
4057
|
function _array_without_holes$X(arr) {
|
|
3748
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
4058
|
+
if (Array.isArray(arr)) return _array_like_to_array$15(arr);
|
|
3749
4059
|
}
|
|
3750
|
-
function asyncGeneratorStep$
|
|
4060
|
+
function asyncGeneratorStep$1j(gen, resolve, reject, _next, _throw, key, arg) {
|
|
3751
4061
|
try {
|
|
3752
4062
|
var info = gen[key](arg);
|
|
3753
4063
|
var value = info.value;
|
|
@@ -3761,22 +4071,22 @@ function asyncGeneratorStep$1i(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
3761
4071
|
Promise.resolve(value).then(_next, _throw);
|
|
3762
4072
|
}
|
|
3763
4073
|
}
|
|
3764
|
-
function _async_to_generator$
|
|
4074
|
+
function _async_to_generator$1j(fn) {
|
|
3765
4075
|
return function() {
|
|
3766
4076
|
var self = this, args = arguments;
|
|
3767
4077
|
return new Promise(function(resolve, reject) {
|
|
3768
4078
|
var gen = fn.apply(self, args);
|
|
3769
4079
|
function _next(value) {
|
|
3770
|
-
asyncGeneratorStep$
|
|
4080
|
+
asyncGeneratorStep$1j(gen, resolve, reject, _next, _throw, "next", value);
|
|
3771
4081
|
}
|
|
3772
4082
|
function _throw(err) {
|
|
3773
|
-
asyncGeneratorStep$
|
|
4083
|
+
asyncGeneratorStep$1j(gen, resolve, reject, _next, _throw, "throw", err);
|
|
3774
4084
|
}
|
|
3775
4085
|
_next(undefined);
|
|
3776
4086
|
});
|
|
3777
4087
|
};
|
|
3778
4088
|
}
|
|
3779
|
-
function _define_property$
|
|
4089
|
+
function _define_property$V(obj, key, value) {
|
|
3780
4090
|
if (key in obj) {
|
|
3781
4091
|
Object.defineProperty(obj, key, {
|
|
3782
4092
|
value: value,
|
|
@@ -3792,7 +4102,7 @@ function _define_property$T(obj, key, value) {
|
|
|
3792
4102
|
function _iterable_to_array$X(iter) {
|
|
3793
4103
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
3794
4104
|
}
|
|
3795
|
-
function _iterable_to_array_limit$
|
|
4105
|
+
function _iterable_to_array_limit$l(arr, i) {
|
|
3796
4106
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
3797
4107
|
if (_i == null) return;
|
|
3798
4108
|
var _arr = [];
|
|
@@ -3816,13 +4126,13 @@ function _iterable_to_array_limit$k(arr, i) {
|
|
|
3816
4126
|
}
|
|
3817
4127
|
return _arr;
|
|
3818
4128
|
}
|
|
3819
|
-
function _non_iterable_rest$
|
|
4129
|
+
function _non_iterable_rest$l() {
|
|
3820
4130
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
3821
4131
|
}
|
|
3822
4132
|
function _non_iterable_spread$X() {
|
|
3823
4133
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
3824
4134
|
}
|
|
3825
|
-
function _object_spread$
|
|
4135
|
+
function _object_spread$V(target) {
|
|
3826
4136
|
for(var i = 1; i < arguments.length; i++){
|
|
3827
4137
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
3828
4138
|
var ownKeys = Object.keys(source);
|
|
@@ -3832,12 +4142,12 @@ function _object_spread$T(target) {
|
|
|
3832
4142
|
}));
|
|
3833
4143
|
}
|
|
3834
4144
|
ownKeys.forEach(function(key) {
|
|
3835
|
-
_define_property$
|
|
4145
|
+
_define_property$V(target, key, source[key]);
|
|
3836
4146
|
});
|
|
3837
4147
|
}
|
|
3838
4148
|
return target;
|
|
3839
4149
|
}
|
|
3840
|
-
function ownKeys$
|
|
4150
|
+
function ownKeys$C(object, enumerableOnly) {
|
|
3841
4151
|
var keys = Object.keys(object);
|
|
3842
4152
|
if (Object.getOwnPropertySymbols) {
|
|
3843
4153
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -3845,32 +4155,32 @@ function ownKeys$B(object, enumerableOnly) {
|
|
|
3845
4155
|
}
|
|
3846
4156
|
return keys;
|
|
3847
4157
|
}
|
|
3848
|
-
function _object_spread_props$
|
|
4158
|
+
function _object_spread_props$C(target, source) {
|
|
3849
4159
|
source = source != null ? source : {};
|
|
3850
4160
|
if (Object.getOwnPropertyDescriptors) {
|
|
3851
4161
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
3852
4162
|
} else {
|
|
3853
|
-
ownKeys$
|
|
4163
|
+
ownKeys$C(Object(source)).forEach(function(key) {
|
|
3854
4164
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
3855
4165
|
});
|
|
3856
4166
|
}
|
|
3857
4167
|
return target;
|
|
3858
4168
|
}
|
|
3859
|
-
function _sliced_to_array$
|
|
3860
|
-
return _array_with_holes$
|
|
4169
|
+
function _sliced_to_array$l(arr, i) {
|
|
4170
|
+
return _array_with_holes$l(arr) || _iterable_to_array_limit$l(arr, i) || _unsupported_iterable_to_array$15(arr, i) || _non_iterable_rest$l();
|
|
3861
4171
|
}
|
|
3862
4172
|
function _to_consumable_array$X(arr) {
|
|
3863
|
-
return _array_without_holes$X(arr) || _iterable_to_array$X(arr) || _unsupported_iterable_to_array$
|
|
4173
|
+
return _array_without_holes$X(arr) || _iterable_to_array$X(arr) || _unsupported_iterable_to_array$15(arr) || _non_iterable_spread$X();
|
|
3864
4174
|
}
|
|
3865
|
-
function _unsupported_iterable_to_array$
|
|
4175
|
+
function _unsupported_iterable_to_array$15(o, minLen) {
|
|
3866
4176
|
if (!o) return;
|
|
3867
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
4177
|
+
if (typeof o === "string") return _array_like_to_array$15(o, minLen);
|
|
3868
4178
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
3869
4179
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
3870
4180
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
3871
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
4181
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$15(o, minLen);
|
|
3872
4182
|
}
|
|
3873
|
-
function _ts_generator$
|
|
4183
|
+
function _ts_generator$1j(thisArg, body) {
|
|
3874
4184
|
var f, y, t, _ = {
|
|
3875
4185
|
label: 0,
|
|
3876
4186
|
sent: function() {
|
|
@@ -3984,7 +4294,7 @@ var _defaultResponseAdapter = {
|
|
|
3984
4294
|
}
|
|
3985
4295
|
};
|
|
3986
4296
|
function _defaultBuildRequestData(params, state, limit) {
|
|
3987
|
-
var base = _object_spread$
|
|
4297
|
+
var base = _object_spread$V({}, params);
|
|
3988
4298
|
if (state.cursorDocumentKey != null) {
|
|
3989
4299
|
base['cursorDocumentKey'] = state.cursorDocumentKey;
|
|
3990
4300
|
}
|
|
@@ -3994,9 +4304,9 @@ function _defaultBuildRequestData(params, state, limit) {
|
|
|
3994
4304
|
return base;
|
|
3995
4305
|
}
|
|
3996
4306
|
function _runItemTasks(input) {
|
|
3997
|
-
return _async_to_generator$
|
|
4307
|
+
return _async_to_generator$1j(function() {
|
|
3998
4308
|
var context, items, keys, pageIndex, iterateItem, itemPerformTasksConfig, maxParallelPerPage, indexed, taskConfig, performResult;
|
|
3999
|
-
return _ts_generator$
|
|
4309
|
+
return _ts_generator$1j(this, function(_state) {
|
|
4000
4310
|
switch(_state.label){
|
|
4001
4311
|
case 0:
|
|
4002
4312
|
context = input.context, items = input.items, keys = input.keys, pageIndex = input.pageIndex, iterateItem = input.iterateItem, itemPerformTasksConfig = input.itemPerformTasksConfig, maxParallelPerPage = input.maxParallelPerPage;
|
|
@@ -4008,7 +4318,7 @@ function _runItemTasks(input) {
|
|
|
4008
4318
|
itemIndex: itemIndex
|
|
4009
4319
|
};
|
|
4010
4320
|
});
|
|
4011
|
-
taskConfig = _object_spread_props$
|
|
4321
|
+
taskConfig = _object_spread_props$C(_object_spread$V({
|
|
4012
4322
|
sequential: true,
|
|
4013
4323
|
throwError: true
|
|
4014
4324
|
}, itemPerformTasksConfig), {
|
|
@@ -4032,7 +4342,7 @@ function _runItemTasks(input) {
|
|
|
4032
4342
|
return [
|
|
4033
4343
|
2,
|
|
4034
4344
|
performResult.results.map(function(param) {
|
|
4035
|
-
var _param = _sliced_to_array$
|
|
4345
|
+
var _param = _sliced_to_array$l(param, 2), output = _param[1];
|
|
4036
4346
|
return output;
|
|
4037
4347
|
})
|
|
4038
4348
|
];
|
|
@@ -4041,9 +4351,9 @@ function _runItemTasks(input) {
|
|
|
4041
4351
|
})();
|
|
4042
4352
|
}
|
|
4043
4353
|
function _processPage(input) {
|
|
4044
|
-
return _async_to_generator$
|
|
4354
|
+
return _async_to_generator$1j(function() {
|
|
4045
4355
|
var context, raw, pageIndex, responseAdapter, iterateItem, iteratePage, itemPerformTasksConfig, maxParallelPerPage, items, keys, nextCursorDocumentKey, hasMore, itemResults, _tmp, pageResult, _tmp1, output;
|
|
4046
|
-
return _ts_generator$
|
|
4356
|
+
return _ts_generator$1j(this, function(_state) {
|
|
4047
4357
|
switch(_state.label){
|
|
4048
4358
|
case 0:
|
|
4049
4359
|
context = input.context, raw = input.raw, pageIndex = input.pageIndex, responseAdapter = input.responseAdapter, iterateItem = input.iterateItem, iteratePage = input.iteratePage, itemPerformTasksConfig = input.itemPerformTasksConfig, maxParallelPerPage = input.maxParallelPerPage;
|
|
@@ -4183,9 +4493,9 @@ function _evaluateLoopExit(input) {
|
|
|
4183
4493
|
* });
|
|
4184
4494
|
* ```
|
|
4185
4495
|
*/ function iterateDbxCliCallModel(config) {
|
|
4186
|
-
return _async_to_generator$
|
|
4496
|
+
return _async_to_generator$1j(function() {
|
|
4187
4497
|
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;
|
|
4188
|
-
return _ts_generator$
|
|
4498
|
+
return _ts_generator$1j(this, function(_state) {
|
|
4189
4499
|
switch(_state.label){
|
|
4190
4500
|
case 0:
|
|
4191
4501
|
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;
|
|
@@ -4265,7 +4575,7 @@ function _evaluateLoopExit(input) {
|
|
|
4265
4575
|
1
|
|
4266
4576
|
];
|
|
4267
4577
|
case 4:
|
|
4268
|
-
result = _object_spread$
|
|
4578
|
+
result = _object_spread$V({
|
|
4269
4579
|
totalPages: pageIndex,
|
|
4270
4580
|
totalItems: totalItems,
|
|
4271
4581
|
hitLimit: hitLimit,
|
|
@@ -4286,7 +4596,7 @@ function _evaluateLoopExit(input) {
|
|
|
4286
4596
|
})();
|
|
4287
4597
|
}
|
|
4288
4598
|
|
|
4289
|
-
function asyncGeneratorStep$
|
|
4599
|
+
function asyncGeneratorStep$1i(gen, resolve, reject, _next, _throw, key, arg) {
|
|
4290
4600
|
try {
|
|
4291
4601
|
var info = gen[key](arg);
|
|
4292
4602
|
var value = info.value;
|
|
@@ -4300,22 +4610,22 @@ function asyncGeneratorStep$1h(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
4300
4610
|
Promise.resolve(value).then(_next, _throw);
|
|
4301
4611
|
}
|
|
4302
4612
|
}
|
|
4303
|
-
function _async_to_generator$
|
|
4613
|
+
function _async_to_generator$1i(fn) {
|
|
4304
4614
|
return function() {
|
|
4305
4615
|
var self = this, args = arguments;
|
|
4306
4616
|
return new Promise(function(resolve, reject) {
|
|
4307
4617
|
var gen = fn.apply(self, args);
|
|
4308
4618
|
function _next(value) {
|
|
4309
|
-
asyncGeneratorStep$
|
|
4619
|
+
asyncGeneratorStep$1i(gen, resolve, reject, _next, _throw, "next", value);
|
|
4310
4620
|
}
|
|
4311
4621
|
function _throw(err) {
|
|
4312
|
-
asyncGeneratorStep$
|
|
4622
|
+
asyncGeneratorStep$1i(gen, resolve, reject, _next, _throw, "throw", err);
|
|
4313
4623
|
}
|
|
4314
4624
|
_next(undefined);
|
|
4315
4625
|
});
|
|
4316
4626
|
};
|
|
4317
4627
|
}
|
|
4318
|
-
function _define_property$
|
|
4628
|
+
function _define_property$U(obj, key, value) {
|
|
4319
4629
|
if (key in obj) {
|
|
4320
4630
|
Object.defineProperty(obj, key, {
|
|
4321
4631
|
value: value,
|
|
@@ -4328,7 +4638,7 @@ function _define_property$S(obj, key, value) {
|
|
|
4328
4638
|
}
|
|
4329
4639
|
return obj;
|
|
4330
4640
|
}
|
|
4331
|
-
function _object_spread$
|
|
4641
|
+
function _object_spread$U(target) {
|
|
4332
4642
|
for(var i = 1; i < arguments.length; i++){
|
|
4333
4643
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
4334
4644
|
var ownKeys = Object.keys(source);
|
|
@@ -4338,12 +4648,12 @@ function _object_spread$S(target) {
|
|
|
4338
4648
|
}));
|
|
4339
4649
|
}
|
|
4340
4650
|
ownKeys.forEach(function(key) {
|
|
4341
|
-
_define_property$
|
|
4651
|
+
_define_property$U(target, key, source[key]);
|
|
4342
4652
|
});
|
|
4343
4653
|
}
|
|
4344
4654
|
return target;
|
|
4345
4655
|
}
|
|
4346
|
-
function ownKeys$
|
|
4656
|
+
function ownKeys$B(object, enumerableOnly) {
|
|
4347
4657
|
var keys = Object.keys(object);
|
|
4348
4658
|
if (Object.getOwnPropertySymbols) {
|
|
4349
4659
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -4351,18 +4661,18 @@ function ownKeys$A(object, enumerableOnly) {
|
|
|
4351
4661
|
}
|
|
4352
4662
|
return keys;
|
|
4353
4663
|
}
|
|
4354
|
-
function _object_spread_props$
|
|
4664
|
+
function _object_spread_props$B(target, source) {
|
|
4355
4665
|
source = source != null ? source : {};
|
|
4356
4666
|
if (Object.getOwnPropertyDescriptors) {
|
|
4357
4667
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
4358
4668
|
} else {
|
|
4359
|
-
ownKeys$
|
|
4669
|
+
ownKeys$B(Object(source)).forEach(function(key) {
|
|
4360
4670
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
4361
4671
|
});
|
|
4362
4672
|
}
|
|
4363
4673
|
return target;
|
|
4364
4674
|
}
|
|
4365
|
-
function _ts_generator$
|
|
4675
|
+
function _ts_generator$1i(thisArg, body) {
|
|
4366
4676
|
var f, y, t, _ = {
|
|
4367
4677
|
label: 0,
|
|
4368
4678
|
sent: function() {
|
|
@@ -4478,14 +4788,14 @@ function _ts_generator$1h(thisArg, body) {
|
|
|
4478
4788
|
return spec.builder ? spec.builder(yargs) : yargs;
|
|
4479
4789
|
},
|
|
4480
4790
|
handler: wrapCommandHandler(function(argv) {
|
|
4481
|
-
return _async_to_generator$
|
|
4791
|
+
return _async_to_generator$1i(function() {
|
|
4482
4792
|
var context, data, params, result;
|
|
4483
|
-
return _ts_generator$
|
|
4793
|
+
return _ts_generator$1i(this, function(_state) {
|
|
4484
4794
|
switch(_state.label){
|
|
4485
4795
|
case 0:
|
|
4486
4796
|
context = requireCliContext();
|
|
4487
4797
|
data = spec.buildParams(argv);
|
|
4488
|
-
params = _object_spread_props$
|
|
4798
|
+
params = _object_spread_props$B(_object_spread$U({
|
|
4489
4799
|
modelType: spec.model,
|
|
4490
4800
|
call: spec.verb
|
|
4491
4801
|
}, spec.specifier == null ? {} : {
|
|
@@ -4665,7 +4975,7 @@ function AsyncFromSyncIterator$4(s) {
|
|
|
4665
4975
|
}
|
|
4666
4976
|
}, new AsyncFromSyncIterator$4(s);
|
|
4667
4977
|
}
|
|
4668
|
-
function asyncGeneratorStep$
|
|
4978
|
+
function asyncGeneratorStep$1h(gen, resolve, reject, _next, _throw, key, arg) {
|
|
4669
4979
|
try {
|
|
4670
4980
|
var info = gen[key](arg);
|
|
4671
4981
|
var value = info.value;
|
|
@@ -4679,22 +4989,22 @@ function asyncGeneratorStep$1g(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
4679
4989
|
Promise.resolve(value).then(_next, _throw);
|
|
4680
4990
|
}
|
|
4681
4991
|
}
|
|
4682
|
-
function _async_to_generator$
|
|
4992
|
+
function _async_to_generator$1h(fn) {
|
|
4683
4993
|
return function() {
|
|
4684
4994
|
var self = this, args = arguments;
|
|
4685
4995
|
return new Promise(function(resolve, reject) {
|
|
4686
4996
|
var gen = fn.apply(self, args);
|
|
4687
4997
|
function _next(value) {
|
|
4688
|
-
asyncGeneratorStep$
|
|
4998
|
+
asyncGeneratorStep$1h(gen, resolve, reject, _next, _throw, "next", value);
|
|
4689
4999
|
}
|
|
4690
5000
|
function _throw(err) {
|
|
4691
|
-
asyncGeneratorStep$
|
|
5001
|
+
asyncGeneratorStep$1h(gen, resolve, reject, _next, _throw, "throw", err);
|
|
4692
5002
|
}
|
|
4693
5003
|
_next(undefined);
|
|
4694
5004
|
});
|
|
4695
5005
|
};
|
|
4696
5006
|
}
|
|
4697
|
-
function _ts_generator$
|
|
5007
|
+
function _ts_generator$1h(thisArg, body) {
|
|
4698
5008
|
var f, y, t, _ = {
|
|
4699
5009
|
label: 0,
|
|
4700
5010
|
sent: function() {
|
|
@@ -4857,9 +5167,9 @@ function _ts_generator$1g(thisArg, body) {
|
|
|
4857
5167
|
* @returns The UTF-8 decoded stdin contents.
|
|
4858
5168
|
* @throws {CliError} When stdin is a TTY, with `code: 'STDIN_NOT_PIPED'`.
|
|
4859
5169
|
*/ function readAllStdin() {
|
|
4860
|
-
return _async_to_generator$
|
|
5170
|
+
return _async_to_generator$1h(function() {
|
|
4861
5171
|
var chunks, _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, chunk, err;
|
|
4862
|
-
return _ts_generator$
|
|
5172
|
+
return _ts_generator$1h(this, function(_state) {
|
|
4863
5173
|
switch(_state.label){
|
|
4864
5174
|
case 0:
|
|
4865
5175
|
if (process.stdin.isTTY) {
|
|
@@ -4963,9 +5273,9 @@ function _ts_generator$1g(thisArg, body) {
|
|
|
4963
5273
|
*
|
|
4964
5274
|
* @returns The tokens parsed from stdin.
|
|
4965
5275
|
*/ function readStdinTokens() {
|
|
4966
|
-
return _async_to_generator$
|
|
5276
|
+
return _async_to_generator$1h(function() {
|
|
4967
5277
|
var raw;
|
|
4968
|
-
return _ts_generator$
|
|
5278
|
+
return _ts_generator$1h(this, function(_state) {
|
|
4969
5279
|
switch(_state.label){
|
|
4970
5280
|
case 0:
|
|
4971
5281
|
return [
|
|
@@ -4985,7 +5295,7 @@ function _ts_generator$1g(thisArg, body) {
|
|
|
4985
5295
|
})();
|
|
4986
5296
|
}
|
|
4987
5297
|
|
|
4988
|
-
function asyncGeneratorStep$
|
|
5298
|
+
function asyncGeneratorStep$1g(gen, resolve, reject, _next, _throw, key, arg) {
|
|
4989
5299
|
try {
|
|
4990
5300
|
var info = gen[key](arg);
|
|
4991
5301
|
var value = info.value;
|
|
@@ -4999,22 +5309,22 @@ function asyncGeneratorStep$1f(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
4999
5309
|
Promise.resolve(value).then(_next, _throw);
|
|
5000
5310
|
}
|
|
5001
5311
|
}
|
|
5002
|
-
function _async_to_generator$
|
|
5312
|
+
function _async_to_generator$1g(fn) {
|
|
5003
5313
|
return function() {
|
|
5004
5314
|
var self = this, args = arguments;
|
|
5005
5315
|
return new Promise(function(resolve, reject) {
|
|
5006
5316
|
var gen = fn.apply(self, args);
|
|
5007
5317
|
function _next(value) {
|
|
5008
|
-
asyncGeneratorStep$
|
|
5318
|
+
asyncGeneratorStep$1g(gen, resolve, reject, _next, _throw, "next", value);
|
|
5009
5319
|
}
|
|
5010
5320
|
function _throw(err) {
|
|
5011
|
-
asyncGeneratorStep$
|
|
5321
|
+
asyncGeneratorStep$1g(gen, resolve, reject, _next, _throw, "throw", err);
|
|
5012
5322
|
}
|
|
5013
5323
|
_next(undefined);
|
|
5014
5324
|
});
|
|
5015
5325
|
};
|
|
5016
5326
|
}
|
|
5017
|
-
function _define_property$
|
|
5327
|
+
function _define_property$T(obj, key, value) {
|
|
5018
5328
|
if (key in obj) {
|
|
5019
5329
|
Object.defineProperty(obj, key, {
|
|
5020
5330
|
value: value,
|
|
@@ -5035,7 +5345,7 @@ function _instanceof$s(left, right) {
|
|
|
5035
5345
|
return left instanceof right;
|
|
5036
5346
|
}
|
|
5037
5347
|
}
|
|
5038
|
-
function _object_spread$
|
|
5348
|
+
function _object_spread$T(target) {
|
|
5039
5349
|
for(var i = 1; i < arguments.length; i++){
|
|
5040
5350
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
5041
5351
|
var ownKeys = Object.keys(source);
|
|
@@ -5045,12 +5355,12 @@ function _object_spread$R(target) {
|
|
|
5045
5355
|
}));
|
|
5046
5356
|
}
|
|
5047
5357
|
ownKeys.forEach(function(key) {
|
|
5048
|
-
_define_property$
|
|
5358
|
+
_define_property$T(target, key, source[key]);
|
|
5049
5359
|
});
|
|
5050
5360
|
}
|
|
5051
5361
|
return target;
|
|
5052
5362
|
}
|
|
5053
|
-
function ownKeys$
|
|
5363
|
+
function ownKeys$A(object, enumerableOnly) {
|
|
5054
5364
|
var keys = Object.keys(object);
|
|
5055
5365
|
if (Object.getOwnPropertySymbols) {
|
|
5056
5366
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -5058,18 +5368,18 @@ function ownKeys$z(object, enumerableOnly) {
|
|
|
5058
5368
|
}
|
|
5059
5369
|
return keys;
|
|
5060
5370
|
}
|
|
5061
|
-
function _object_spread_props$
|
|
5371
|
+
function _object_spread_props$A(target, source) {
|
|
5062
5372
|
source = source != null ? source : {};
|
|
5063
5373
|
if (Object.getOwnPropertyDescriptors) {
|
|
5064
5374
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
5065
5375
|
} else {
|
|
5066
|
-
ownKeys$
|
|
5376
|
+
ownKeys$A(Object(source)).forEach(function(key) {
|
|
5067
5377
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
5068
5378
|
});
|
|
5069
5379
|
}
|
|
5070
5380
|
return target;
|
|
5071
5381
|
}
|
|
5072
|
-
function _ts_generator$
|
|
5382
|
+
function _ts_generator$1g(thisArg, body) {
|
|
5073
5383
|
var f, y, t, _ = {
|
|
5074
5384
|
label: 0,
|
|
5075
5385
|
sent: function() {
|
|
@@ -5180,9 +5490,9 @@ function _ts_generator$1f(thisArg, body) {
|
|
|
5180
5490
|
return withCallModelArgs(yargs);
|
|
5181
5491
|
},
|
|
5182
5492
|
handler: wrapCommandHandler(function(argv) {
|
|
5183
|
-
return _async_to_generator$
|
|
5493
|
+
return _async_to_generator$1g(function() {
|
|
5184
5494
|
var context, data, rawData, _tmp, params, result;
|
|
5185
|
-
return _ts_generator$
|
|
5495
|
+
return _ts_generator$1g(this, function(_state) {
|
|
5186
5496
|
switch(_state.label){
|
|
5187
5497
|
case 0:
|
|
5188
5498
|
context = requireCliContext();
|
|
@@ -5222,7 +5532,7 @@ function _ts_generator$1f(thisArg, body) {
|
|
|
5222
5532
|
});
|
|
5223
5533
|
}
|
|
5224
5534
|
}
|
|
5225
|
-
params = _object_spread_props$
|
|
5535
|
+
params = _object_spread_props$A(_object_spread$T({
|
|
5226
5536
|
modelType: argv.model,
|
|
5227
5537
|
call: argv.verb
|
|
5228
5538
|
}, argv.specifier == null ? {} : {
|
|
@@ -5246,12 +5556,12 @@ function _ts_generator$1f(thisArg, body) {
|
|
|
5246
5556
|
})
|
|
5247
5557
|
};
|
|
5248
5558
|
|
|
5249
|
-
function _array_like_to_array$
|
|
5559
|
+
function _array_like_to_array$14(arr, len) {
|
|
5250
5560
|
if (len == null || len > arr.length) len = arr.length;
|
|
5251
5561
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
5252
5562
|
return arr2;
|
|
5253
5563
|
}
|
|
5254
|
-
function _array_with_holes$
|
|
5564
|
+
function _array_with_holes$k(arr) {
|
|
5255
5565
|
if (Array.isArray(arr)) return arr;
|
|
5256
5566
|
}
|
|
5257
5567
|
function _instanceof$r(left, right) {
|
|
@@ -5262,7 +5572,7 @@ function _instanceof$r(left, right) {
|
|
|
5262
5572
|
return left instanceof right;
|
|
5263
5573
|
}
|
|
5264
5574
|
}
|
|
5265
|
-
function _iterable_to_array_limit$
|
|
5575
|
+
function _iterable_to_array_limit$k(arr, i) {
|
|
5266
5576
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
5267
5577
|
if (_i == null) return;
|
|
5268
5578
|
var _arr = [];
|
|
@@ -5286,23 +5596,23 @@ function _iterable_to_array_limit$j(arr, i) {
|
|
|
5286
5596
|
}
|
|
5287
5597
|
return _arr;
|
|
5288
5598
|
}
|
|
5289
|
-
function _non_iterable_rest$
|
|
5599
|
+
function _non_iterable_rest$k() {
|
|
5290
5600
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5291
5601
|
}
|
|
5292
|
-
function _sliced_to_array$
|
|
5293
|
-
return _array_with_holes$
|
|
5602
|
+
function _sliced_to_array$k(arr, i) {
|
|
5603
|
+
return _array_with_holes$k(arr) || _iterable_to_array_limit$k(arr, i) || _unsupported_iterable_to_array$14(arr, i) || _non_iterable_rest$k();
|
|
5294
5604
|
}
|
|
5295
|
-
function _type_of$
|
|
5605
|
+
function _type_of$3(obj) {
|
|
5296
5606
|
"@swc/helpers - typeof";
|
|
5297
5607
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
5298
5608
|
}
|
|
5299
|
-
function _unsupported_iterable_to_array$
|
|
5609
|
+
function _unsupported_iterable_to_array$14(o, minLen) {
|
|
5300
5610
|
if (!o) return;
|
|
5301
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
5611
|
+
if (typeof o === "string") return _array_like_to_array$14(o, minLen);
|
|
5302
5612
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
5303
5613
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
5304
5614
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
5305
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
5615
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$14(o, minLen);
|
|
5306
5616
|
}
|
|
5307
5617
|
/**
|
|
5308
5618
|
* Resolves the manifest entry for `modelType`. Lookup tries
|
|
@@ -5395,7 +5705,7 @@ function rewriteWithFields(value, fields) {
|
|
|
5395
5705
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
5396
5706
|
try {
|
|
5397
5707
|
for(var _iterator1 = Object.entries(value)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
5398
|
-
var _step_value = _sliced_to_array$
|
|
5708
|
+
var _step_value = _sliced_to_array$k(_step1.value, 2), key = _step_value[0], raw = _step_value[1];
|
|
5399
5709
|
var field1 = fieldByName.get(key);
|
|
5400
5710
|
if (field1) {
|
|
5401
5711
|
var longKey = field1.longName.length > 0 ? field1.longName : key;
|
|
@@ -5442,7 +5752,7 @@ function rewriteFieldValue(value, field) {
|
|
|
5442
5752
|
}
|
|
5443
5753
|
function isPlainObject(value) {
|
|
5444
5754
|
var result;
|
|
5445
|
-
if (value === null || (typeof value === "undefined" ? "undefined" : _type_of$
|
|
5755
|
+
if (value === null || (typeof value === "undefined" ? "undefined" : _type_of$3(value)) !== 'object') {
|
|
5446
5756
|
result = false;
|
|
5447
5757
|
} else if (Array.isArray(value) || _instanceof$r(value, Date)) {
|
|
5448
5758
|
result = false;
|
|
@@ -5455,13 +5765,13 @@ function isPlainObject(value) {
|
|
|
5455
5765
|
return result;
|
|
5456
5766
|
}
|
|
5457
5767
|
|
|
5458
|
-
function _array_like_to_array$
|
|
5768
|
+
function _array_like_to_array$13(arr, len) {
|
|
5459
5769
|
if (len == null || len > arr.length) len = arr.length;
|
|
5460
5770
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
5461
5771
|
return arr2;
|
|
5462
5772
|
}
|
|
5463
5773
|
function _array_without_holes$W(arr) {
|
|
5464
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
5774
|
+
if (Array.isArray(arr)) return _array_like_to_array$13(arr);
|
|
5465
5775
|
}
|
|
5466
5776
|
function _iterable_to_array$W(iter) {
|
|
5467
5777
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
@@ -5470,15 +5780,15 @@ function _non_iterable_spread$W() {
|
|
|
5470
5780
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5471
5781
|
}
|
|
5472
5782
|
function _to_consumable_array$W(arr) {
|
|
5473
|
-
return _array_without_holes$W(arr) || _iterable_to_array$W(arr) || _unsupported_iterable_to_array$
|
|
5783
|
+
return _array_without_holes$W(arr) || _iterable_to_array$W(arr) || _unsupported_iterable_to_array$13(arr) || _non_iterable_spread$W();
|
|
5474
5784
|
}
|
|
5475
|
-
function _unsupported_iterable_to_array$
|
|
5785
|
+
function _unsupported_iterable_to_array$13(o, minLen) {
|
|
5476
5786
|
if (!o) return;
|
|
5477
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
5787
|
+
if (typeof o === "string") return _array_like_to_array$13(o, minLen);
|
|
5478
5788
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
5479
5789
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
5480
5790
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
5481
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
5791
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$13(o, minLen);
|
|
5482
5792
|
}
|
|
5483
5793
|
/**
|
|
5484
5794
|
* Default command name for the model-decode command. Top-level so it stays
|
|
@@ -5647,21 +5957,21 @@ function renderAncestorLine(ancestor) {
|
|
|
5647
5957
|
return ancestor.modelName ? "- ".concat(ancestor.modelName, " — prefix ").concat(ancestor.prefix, ", id ").concat(ancestor.id) : "- <unknown> — prefix ".concat(ancestor.prefix, ", id ").concat(ancestor.id);
|
|
5648
5958
|
}
|
|
5649
5959
|
|
|
5650
|
-
function _array_like_to_array$
|
|
5960
|
+
function _array_like_to_array$12(arr, len) {
|
|
5651
5961
|
if (len == null || len > arr.length) len = arr.length;
|
|
5652
5962
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
5653
5963
|
return arr2;
|
|
5654
5964
|
}
|
|
5655
|
-
function _array_with_holes$
|
|
5965
|
+
function _array_with_holes$j(arr) {
|
|
5656
5966
|
if (Array.isArray(arr)) return arr;
|
|
5657
5967
|
}
|
|
5658
5968
|
function _array_without_holes$V(arr) {
|
|
5659
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
5969
|
+
if (Array.isArray(arr)) return _array_like_to_array$12(arr);
|
|
5660
5970
|
}
|
|
5661
5971
|
function _iterable_to_array$V(iter) {
|
|
5662
5972
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
5663
5973
|
}
|
|
5664
|
-
function _iterable_to_array_limit$
|
|
5974
|
+
function _iterable_to_array_limit$j(arr, i) {
|
|
5665
5975
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
5666
5976
|
if (_i == null) return;
|
|
5667
5977
|
var _arr = [];
|
|
@@ -5685,25 +5995,25 @@ function _iterable_to_array_limit$i(arr, i) {
|
|
|
5685
5995
|
}
|
|
5686
5996
|
return _arr;
|
|
5687
5997
|
}
|
|
5688
|
-
function _non_iterable_rest$
|
|
5998
|
+
function _non_iterable_rest$j() {
|
|
5689
5999
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5690
6000
|
}
|
|
5691
6001
|
function _non_iterable_spread$V() {
|
|
5692
6002
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5693
6003
|
}
|
|
5694
|
-
function _sliced_to_array$
|
|
5695
|
-
return _array_with_holes$
|
|
6004
|
+
function _sliced_to_array$j(arr, i) {
|
|
6005
|
+
return _array_with_holes$j(arr) || _iterable_to_array_limit$j(arr, i) || _unsupported_iterable_to_array$12(arr, i) || _non_iterable_rest$j();
|
|
5696
6006
|
}
|
|
5697
6007
|
function _to_consumable_array$V(arr) {
|
|
5698
|
-
return _array_without_holes$V(arr) || _iterable_to_array$V(arr) || _unsupported_iterable_to_array$
|
|
6008
|
+
return _array_without_holes$V(arr) || _iterable_to_array$V(arr) || _unsupported_iterable_to_array$12(arr) || _non_iterable_spread$V();
|
|
5699
6009
|
}
|
|
5700
|
-
function _unsupported_iterable_to_array$
|
|
6010
|
+
function _unsupported_iterable_to_array$12(o, minLen) {
|
|
5701
6011
|
if (!o) return;
|
|
5702
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
6012
|
+
if (typeof o === "string") return _array_like_to_array$12(o, minLen);
|
|
5703
6013
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
5704
6014
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
5705
6015
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
5706
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
6016
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$12(o, minLen);
|
|
5707
6017
|
}
|
|
5708
6018
|
/**
|
|
5709
6019
|
* Parses the positionals for the top-level `get <modelOrKey> [key]` command into a
|
|
@@ -5874,7 +6184,7 @@ function inferModelTypeFromKeys(keys, manifest) {
|
|
|
5874
6184
|
code: 'INVALID_ARGUMENT'
|
|
5875
6185
|
});
|
|
5876
6186
|
}
|
|
5877
|
-
var _decodedTypes = _sliced_to_array$
|
|
6187
|
+
var _decodedTypes = _sliced_to_array$j(decodedTypes, 1), modelType = _decodedTypes[0];
|
|
5878
6188
|
return {
|
|
5879
6189
|
modelType: modelType,
|
|
5880
6190
|
keys: keys
|
|
@@ -5887,18 +6197,18 @@ function manifestPrefixList(manifest) {
|
|
|
5887
6197
|
return prefixes.join(', ');
|
|
5888
6198
|
}
|
|
5889
6199
|
|
|
5890
|
-
function _array_like_to_array$
|
|
6200
|
+
function _array_like_to_array$11(arr, len) {
|
|
5891
6201
|
if (len == null || len > arr.length) len = arr.length;
|
|
5892
6202
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
5893
6203
|
return arr2;
|
|
5894
6204
|
}
|
|
5895
|
-
function _array_with_holes$
|
|
6205
|
+
function _array_with_holes$i(arr) {
|
|
5896
6206
|
if (Array.isArray(arr)) return arr;
|
|
5897
6207
|
}
|
|
5898
6208
|
function _array_without_holes$U(arr) {
|
|
5899
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
6209
|
+
if (Array.isArray(arr)) return _array_like_to_array$11(arr);
|
|
5900
6210
|
}
|
|
5901
|
-
function asyncGeneratorStep$
|
|
6211
|
+
function asyncGeneratorStep$1f(gen, resolve, reject, _next, _throw, key, arg) {
|
|
5902
6212
|
try {
|
|
5903
6213
|
var info = gen[key](arg);
|
|
5904
6214
|
var value = info.value;
|
|
@@ -5912,22 +6222,22 @@ function asyncGeneratorStep$1e(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
5912
6222
|
Promise.resolve(value).then(_next, _throw);
|
|
5913
6223
|
}
|
|
5914
6224
|
}
|
|
5915
|
-
function _async_to_generator$
|
|
6225
|
+
function _async_to_generator$1f(fn) {
|
|
5916
6226
|
return function() {
|
|
5917
6227
|
var self = this, args = arguments;
|
|
5918
6228
|
return new Promise(function(resolve, reject) {
|
|
5919
6229
|
var gen = fn.apply(self, args);
|
|
5920
6230
|
function _next(value) {
|
|
5921
|
-
asyncGeneratorStep$
|
|
6231
|
+
asyncGeneratorStep$1f(gen, resolve, reject, _next, _throw, "next", value);
|
|
5922
6232
|
}
|
|
5923
6233
|
function _throw(err) {
|
|
5924
|
-
asyncGeneratorStep$
|
|
6234
|
+
asyncGeneratorStep$1f(gen, resolve, reject, _next, _throw, "throw", err);
|
|
5925
6235
|
}
|
|
5926
6236
|
_next(undefined);
|
|
5927
6237
|
});
|
|
5928
6238
|
};
|
|
5929
6239
|
}
|
|
5930
|
-
function _define_property$
|
|
6240
|
+
function _define_property$S(obj, key, value) {
|
|
5931
6241
|
if (key in obj) {
|
|
5932
6242
|
Object.defineProperty(obj, key, {
|
|
5933
6243
|
value: value,
|
|
@@ -5951,7 +6261,7 @@ function _instanceof$q(left, right) {
|
|
|
5951
6261
|
function _iterable_to_array$U(iter) {
|
|
5952
6262
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
5953
6263
|
}
|
|
5954
|
-
function _iterable_to_array_limit$
|
|
6264
|
+
function _iterable_to_array_limit$i(arr, i) {
|
|
5955
6265
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
5956
6266
|
if (_i == null) return;
|
|
5957
6267
|
var _arr = [];
|
|
@@ -5975,13 +6285,13 @@ function _iterable_to_array_limit$h(arr, i) {
|
|
|
5975
6285
|
}
|
|
5976
6286
|
return _arr;
|
|
5977
6287
|
}
|
|
5978
|
-
function _non_iterable_rest$
|
|
6288
|
+
function _non_iterable_rest$i() {
|
|
5979
6289
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5980
6290
|
}
|
|
5981
6291
|
function _non_iterable_spread$U() {
|
|
5982
6292
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5983
6293
|
}
|
|
5984
|
-
function _object_spread$
|
|
6294
|
+
function _object_spread$S(target) {
|
|
5985
6295
|
for(var i = 1; i < arguments.length; i++){
|
|
5986
6296
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
5987
6297
|
var ownKeys = Object.keys(source);
|
|
@@ -5991,26 +6301,26 @@ function _object_spread$Q(target) {
|
|
|
5991
6301
|
}));
|
|
5992
6302
|
}
|
|
5993
6303
|
ownKeys.forEach(function(key) {
|
|
5994
|
-
_define_property$
|
|
6304
|
+
_define_property$S(target, key, source[key]);
|
|
5995
6305
|
});
|
|
5996
6306
|
}
|
|
5997
6307
|
return target;
|
|
5998
6308
|
}
|
|
5999
|
-
function _sliced_to_array$
|
|
6000
|
-
return _array_with_holes$
|
|
6309
|
+
function _sliced_to_array$i(arr, i) {
|
|
6310
|
+
return _array_with_holes$i(arr) || _iterable_to_array_limit$i(arr, i) || _unsupported_iterable_to_array$11(arr, i) || _non_iterable_rest$i();
|
|
6001
6311
|
}
|
|
6002
6312
|
function _to_consumable_array$U(arr) {
|
|
6003
|
-
return _array_without_holes$U(arr) || _iterable_to_array$U(arr) || _unsupported_iterable_to_array$
|
|
6313
|
+
return _array_without_holes$U(arr) || _iterable_to_array$U(arr) || _unsupported_iterable_to_array$11(arr) || _non_iterable_spread$U();
|
|
6004
6314
|
}
|
|
6005
|
-
function _unsupported_iterable_to_array$
|
|
6315
|
+
function _unsupported_iterable_to_array$11(o, minLen) {
|
|
6006
6316
|
if (!o) return;
|
|
6007
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
6317
|
+
if (typeof o === "string") return _array_like_to_array$11(o, minLen);
|
|
6008
6318
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
6009
6319
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
6010
6320
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
6011
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
6321
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$11(o, minLen);
|
|
6012
6322
|
}
|
|
6013
|
-
function _ts_generator$
|
|
6323
|
+
function _ts_generator$1f(thisArg, body) {
|
|
6014
6324
|
var f, y, t, _ = {
|
|
6015
6325
|
label: 0,
|
|
6016
6326
|
sent: function() {
|
|
@@ -6204,9 +6514,9 @@ function _ts_generator$1e(thisArg, body) {
|
|
|
6204
6514
|
* @returns The resolved source, carrying the opened models view when it is `firestore`.
|
|
6205
6515
|
* @throws {CliError} `MODEL_IS_SERVER_ONLY` for a server-only model, or the session's own error when `--via firestore` was demanded and the session could not open.
|
|
6206
6516
|
*/ function resolveCliReadSource(input) {
|
|
6207
|
-
return _async_to_generator$
|
|
6517
|
+
return _async_to_generator$1f(function() {
|
|
6208
6518
|
var context, via, modelType, result, _tmp;
|
|
6209
|
-
return _ts_generator$
|
|
6519
|
+
return _ts_generator$1f(this, function(_state) {
|
|
6210
6520
|
switch(_state.label){
|
|
6211
6521
|
case 0:
|
|
6212
6522
|
context = input.context, via = input.via, modelType = input.modelType;
|
|
@@ -6303,9 +6613,9 @@ function _ts_generator$1e(thisArg, body) {
|
|
|
6303
6613
|
* @param via - The requested via, carried onto the result.
|
|
6304
6614
|
* @returns The resolved source.
|
|
6305
6615
|
*/ function resolveAutoReadSource(context, via) {
|
|
6306
|
-
return _async_to_generator$
|
|
6616
|
+
return _async_to_generator$1f(function() {
|
|
6307
6617
|
var result, _tmp, e, code, message;
|
|
6308
|
-
return _ts_generator$
|
|
6618
|
+
return _ts_generator$1f(this, function(_state) {
|
|
6309
6619
|
switch(_state.label){
|
|
6310
6620
|
case 0:
|
|
6311
6621
|
_state.trys.push([
|
|
@@ -6358,9 +6668,9 @@ function _ts_generator$1e(thisArg, body) {
|
|
|
6358
6668
|
})();
|
|
6359
6669
|
}
|
|
6360
6670
|
function requireModels(context) {
|
|
6361
|
-
return _async_to_generator$
|
|
6671
|
+
return _async_to_generator$1f(function() {
|
|
6362
6672
|
var getFirestoreModels;
|
|
6363
|
-
return _ts_generator$
|
|
6673
|
+
return _ts_generator$1f(this, function(_state) {
|
|
6364
6674
|
getFirestoreModels = context.getFirestoreModels;
|
|
6365
6675
|
if (getFirestoreModels == null) {
|
|
6366
6676
|
throw new CliError({
|
|
@@ -6384,7 +6694,7 @@ function requireModels(context) {
|
|
|
6384
6694
|
*
|
|
6385
6695
|
* @__NO_SIDE_EFFECTS__
|
|
6386
6696
|
*/ function cliReadResultMeta(source) {
|
|
6387
|
-
return _object_spread$
|
|
6697
|
+
return _object_spread$S({
|
|
6388
6698
|
source: source.source,
|
|
6389
6699
|
via: source.via,
|
|
6390
6700
|
reason: source.reason
|
|
@@ -6408,9 +6718,9 @@ function requireModels(context) {
|
|
|
6408
6718
|
* @returns `{ key, data }`, with `data: null` when the document does not exist.
|
|
6409
6719
|
* @throws {CliError} When the key does not match the model's path shape.
|
|
6410
6720
|
*/ function getModelOverFirestore(input) {
|
|
6411
|
-
return _async_to_generator$
|
|
6721
|
+
return _async_to_generator$1f(function() {
|
|
6412
6722
|
var models, modelType, key, service, data, _ref, e;
|
|
6413
|
-
return _ts_generator$
|
|
6723
|
+
return _ts_generator$1f(this, function(_state) {
|
|
6414
6724
|
switch(_state.label){
|
|
6415
6725
|
case 0:
|
|
6416
6726
|
models = input.models, modelType = input.modelType, key = input.key;
|
|
@@ -6469,9 +6779,9 @@ function requireModels(context) {
|
|
|
6469
6779
|
* @returns `{ results, errors }`, key order preserved within each partition.
|
|
6470
6780
|
* @throws {CliError} `INVALID_ARGUMENT` when `modelType` is not a registered model.
|
|
6471
6781
|
*/ function getMultipleModelsOverFirestore(input) {
|
|
6472
|
-
return _async_to_generator$
|
|
6782
|
+
return _async_to_generator$1f(function() {
|
|
6473
6783
|
var models, modelType, keys, service, taskResult;
|
|
6474
|
-
return _ts_generator$
|
|
6784
|
+
return _ts_generator$1f(this, function(_state) {
|
|
6475
6785
|
switch(_state.label){
|
|
6476
6786
|
case 0:
|
|
6477
6787
|
models = input.models, modelType = input.modelType, keys = input.keys;
|
|
@@ -6482,9 +6792,9 @@ function requireModels(context) {
|
|
|
6482
6792
|
return [
|
|
6483
6793
|
4,
|
|
6484
6794
|
performAsyncTasks(_to_consumable_array$U(keys), function(key) {
|
|
6485
|
-
return _async_to_generator$
|
|
6795
|
+
return _async_to_generator$1f(function() {
|
|
6486
6796
|
var _ref;
|
|
6487
|
-
return _ts_generator$
|
|
6797
|
+
return _ts_generator$1f(this, function(_state) {
|
|
6488
6798
|
switch(_state.label){
|
|
6489
6799
|
case 0:
|
|
6490
6800
|
return [
|
|
@@ -6518,14 +6828,14 @@ function requireModels(context) {
|
|
|
6518
6828
|
2,
|
|
6519
6829
|
{
|
|
6520
6830
|
results: taskResult.results.map(function(param) {
|
|
6521
|
-
var _param = _sliced_to_array$
|
|
6831
|
+
var _param = _sliced_to_array$i(param, 2), key = _param[0], data = _param[1];
|
|
6522
6832
|
return {
|
|
6523
6833
|
key: key,
|
|
6524
6834
|
data: data
|
|
6525
6835
|
};
|
|
6526
6836
|
}),
|
|
6527
6837
|
errors: taskResult.errors.map(function(param) {
|
|
6528
|
-
var _param = _sliced_to_array$
|
|
6838
|
+
var _param = _sliced_to_array$i(param, 2), key = _param[0], error = _param[1];
|
|
6529
6839
|
return asCliReadErrorEntry(error, modelType, key);
|
|
6530
6840
|
})
|
|
6531
6841
|
}
|
|
@@ -6543,7 +6853,7 @@ function requireModels(context) {
|
|
|
6543
6853
|
* @returns The error entry for the `errors` partition.
|
|
6544
6854
|
*/ function asCliReadErrorEntry(error, modelType, key) {
|
|
6545
6855
|
var mapped = asKeyShapeError(error, modelType, key);
|
|
6546
|
-
return _object_spread$
|
|
6856
|
+
return _object_spread$S({
|
|
6547
6857
|
key: key,
|
|
6548
6858
|
error: mapped.message
|
|
6549
6859
|
}, _instanceof$q(mapped, CliError) ? {
|
|
@@ -6575,7 +6885,7 @@ function requireModels(context) {
|
|
|
6575
6885
|
return result;
|
|
6576
6886
|
}
|
|
6577
6887
|
|
|
6578
|
-
function asyncGeneratorStep$
|
|
6888
|
+
function asyncGeneratorStep$1e(gen, resolve, reject, _next, _throw, key, arg) {
|
|
6579
6889
|
try {
|
|
6580
6890
|
var info = gen[key](arg);
|
|
6581
6891
|
var value = info.value;
|
|
@@ -6589,22 +6899,22 @@ function asyncGeneratorStep$1d(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
6589
6899
|
Promise.resolve(value).then(_next, _throw);
|
|
6590
6900
|
}
|
|
6591
6901
|
}
|
|
6592
|
-
function _async_to_generator$
|
|
6902
|
+
function _async_to_generator$1e(fn) {
|
|
6593
6903
|
return function() {
|
|
6594
6904
|
var self = this, args = arguments;
|
|
6595
6905
|
return new Promise(function(resolve, reject) {
|
|
6596
6906
|
var gen = fn.apply(self, args);
|
|
6597
6907
|
function _next(value) {
|
|
6598
|
-
asyncGeneratorStep$
|
|
6908
|
+
asyncGeneratorStep$1e(gen, resolve, reject, _next, _throw, "next", value);
|
|
6599
6909
|
}
|
|
6600
6910
|
function _throw(err) {
|
|
6601
|
-
asyncGeneratorStep$
|
|
6911
|
+
asyncGeneratorStep$1e(gen, resolve, reject, _next, _throw, "throw", err);
|
|
6602
6912
|
}
|
|
6603
6913
|
_next(undefined);
|
|
6604
6914
|
});
|
|
6605
6915
|
};
|
|
6606
6916
|
}
|
|
6607
|
-
function _ts_generator$
|
|
6917
|
+
function _ts_generator$1e(thisArg, body) {
|
|
6608
6918
|
var f, y, t, _ = {
|
|
6609
6919
|
label: 0,
|
|
6610
6920
|
sent: function() {
|
|
@@ -6757,9 +7067,9 @@ function _ts_generator$1d(thisArg, body) {
|
|
|
6757
7067
|
}));
|
|
6758
7068
|
},
|
|
6759
7069
|
handler: wrapCommandHandler(function(argv) {
|
|
6760
|
-
return _async_to_generator$
|
|
7070
|
+
return _async_to_generator$1e(function() {
|
|
6761
7071
|
var context, _parseGetArgs, modelType, key, resolved, result, _tmp;
|
|
6762
|
-
return _ts_generator$
|
|
7072
|
+
return _ts_generator$1e(this, function(_state) {
|
|
6763
7073
|
switch(_state.label){
|
|
6764
7074
|
case 0:
|
|
6765
7075
|
context = requireCliContext();
|
|
@@ -6816,7 +7126,7 @@ function _ts_generator$1d(thisArg, body) {
|
|
|
6816
7126
|
})
|
|
6817
7127
|
};
|
|
6818
7128
|
|
|
6819
|
-
function asyncGeneratorStep$
|
|
7129
|
+
function asyncGeneratorStep$1d(gen, resolve, reject, _next, _throw, key, arg) {
|
|
6820
7130
|
try {
|
|
6821
7131
|
var info = gen[key](arg);
|
|
6822
7132
|
var value = info.value;
|
|
@@ -6830,22 +7140,22 @@ function asyncGeneratorStep$1c(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
6830
7140
|
Promise.resolve(value).then(_next, _throw);
|
|
6831
7141
|
}
|
|
6832
7142
|
}
|
|
6833
|
-
function _async_to_generator$
|
|
7143
|
+
function _async_to_generator$1d(fn) {
|
|
6834
7144
|
return function() {
|
|
6835
7145
|
var self = this, args = arguments;
|
|
6836
7146
|
return new Promise(function(resolve, reject) {
|
|
6837
7147
|
var gen = fn.apply(self, args);
|
|
6838
7148
|
function _next(value) {
|
|
6839
|
-
asyncGeneratorStep$
|
|
7149
|
+
asyncGeneratorStep$1d(gen, resolve, reject, _next, _throw, "next", value);
|
|
6840
7150
|
}
|
|
6841
7151
|
function _throw(err) {
|
|
6842
|
-
asyncGeneratorStep$
|
|
7152
|
+
asyncGeneratorStep$1d(gen, resolve, reject, _next, _throw, "throw", err);
|
|
6843
7153
|
}
|
|
6844
7154
|
_next(undefined);
|
|
6845
7155
|
});
|
|
6846
7156
|
};
|
|
6847
7157
|
}
|
|
6848
|
-
function _ts_generator$
|
|
7158
|
+
function _ts_generator$1d(thisArg, body) {
|
|
6849
7159
|
var f, y, t, _ = {
|
|
6850
7160
|
label: 0,
|
|
6851
7161
|
sent: function() {
|
|
@@ -6981,9 +7291,9 @@ function _ts_generator$1c(thisArg, body) {
|
|
|
6981
7291
|
}).epilogue(CLI_READ_VIA_EPILOGUE);
|
|
6982
7292
|
},
|
|
6983
7293
|
handler: wrapCommandHandler(function(argv) {
|
|
6984
|
-
return _async_to_generator$
|
|
7294
|
+
return _async_to_generator$1d(function() {
|
|
6985
7295
|
var context, firstArg, rest, resolvedFirst, resolvedRest, stdinKeys, _parseGetManyArgs, modelType, keys, resolved, result, _tmp;
|
|
6986
|
-
return _ts_generator$
|
|
7296
|
+
return _ts_generator$1d(this, function(_state) {
|
|
6987
7297
|
switch(_state.label){
|
|
6988
7298
|
case 0:
|
|
6989
7299
|
context = requireCliContext();
|
|
@@ -7058,7 +7368,7 @@ function _ts_generator$1c(thisArg, body) {
|
|
|
7058
7368
|
})
|
|
7059
7369
|
};
|
|
7060
7370
|
|
|
7061
|
-
function asyncGeneratorStep$
|
|
7371
|
+
function asyncGeneratorStep$1c(gen, resolve, reject, _next, _throw, key, arg) {
|
|
7062
7372
|
try {
|
|
7063
7373
|
var info = gen[key](arg);
|
|
7064
7374
|
var value = info.value;
|
|
@@ -7072,22 +7382,22 @@ function asyncGeneratorStep$1b(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
7072
7382
|
Promise.resolve(value).then(_next, _throw);
|
|
7073
7383
|
}
|
|
7074
7384
|
}
|
|
7075
|
-
function _async_to_generator$
|
|
7385
|
+
function _async_to_generator$1c(fn) {
|
|
7076
7386
|
return function() {
|
|
7077
7387
|
var self = this, args = arguments;
|
|
7078
7388
|
return new Promise(function(resolve, reject) {
|
|
7079
7389
|
var gen = fn.apply(self, args);
|
|
7080
7390
|
function _next(value) {
|
|
7081
|
-
asyncGeneratorStep$
|
|
7391
|
+
asyncGeneratorStep$1c(gen, resolve, reject, _next, _throw, "next", value);
|
|
7082
7392
|
}
|
|
7083
7393
|
function _throw(err) {
|
|
7084
|
-
asyncGeneratorStep$
|
|
7394
|
+
asyncGeneratorStep$1c(gen, resolve, reject, _next, _throw, "throw", err);
|
|
7085
7395
|
}
|
|
7086
7396
|
_next(undefined);
|
|
7087
7397
|
});
|
|
7088
7398
|
};
|
|
7089
7399
|
}
|
|
7090
|
-
function _define_property$
|
|
7400
|
+
function _define_property$R(obj, key, value) {
|
|
7091
7401
|
if (key in obj) {
|
|
7092
7402
|
Object.defineProperty(obj, key, {
|
|
7093
7403
|
value: value,
|
|
@@ -7100,7 +7410,7 @@ function _define_property$P(obj, key, value) {
|
|
|
7100
7410
|
}
|
|
7101
7411
|
return obj;
|
|
7102
7412
|
}
|
|
7103
|
-
function _object_spread$
|
|
7413
|
+
function _object_spread$R(target) {
|
|
7104
7414
|
for(var i = 1; i < arguments.length; i++){
|
|
7105
7415
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
7106
7416
|
var ownKeys = Object.keys(source);
|
|
@@ -7110,12 +7420,12 @@ function _object_spread$P(target) {
|
|
|
7110
7420
|
}));
|
|
7111
7421
|
}
|
|
7112
7422
|
ownKeys.forEach(function(key) {
|
|
7113
|
-
_define_property$
|
|
7423
|
+
_define_property$R(target, key, source[key]);
|
|
7114
7424
|
});
|
|
7115
7425
|
}
|
|
7116
7426
|
return target;
|
|
7117
7427
|
}
|
|
7118
|
-
function _ts_generator$
|
|
7428
|
+
function _ts_generator$1c(thisArg, body) {
|
|
7119
7429
|
var f, y, t, _ = {
|
|
7120
7430
|
label: 0,
|
|
7121
7431
|
sent: function() {
|
|
@@ -7274,9 +7584,9 @@ function _ts_generator$1b(thisArg, body) {
|
|
|
7274
7584
|
* @param input.updates - The partial {@link CliConfig} to merge on top of the existing on-disk config.
|
|
7275
7585
|
* @returns The merged {@link CliConfig} that was just written.
|
|
7276
7586
|
*/ function mergeCliConfig(input) {
|
|
7277
|
-
return _async_to_generator$
|
|
7587
|
+
return _async_to_generator$1c(function() {
|
|
7278
7588
|
var _ref, _input_updates_activeEnv, existing, merged;
|
|
7279
|
-
return _ts_generator$
|
|
7589
|
+
return _ts_generator$1c(this, function(_state) {
|
|
7280
7590
|
switch(_state.label){
|
|
7281
7591
|
case 0:
|
|
7282
7592
|
return [
|
|
@@ -7289,7 +7599,7 @@ function _ts_generator$1b(thisArg, body) {
|
|
|
7289
7599
|
existing = (_ref = _state.sent()) !== null && _ref !== void 0 ? _ref : {};
|
|
7290
7600
|
merged = {
|
|
7291
7601
|
activeEnv: (_input_updates_activeEnv = input.updates.activeEnv) !== null && _input_updates_activeEnv !== void 0 ? _input_updates_activeEnv : existing.activeEnv,
|
|
7292
|
-
envs: input.updates.envs ? _object_spread$
|
|
7602
|
+
envs: input.updates.envs ? _object_spread$R({}, existing.envs, input.updates.envs) : existing.envs,
|
|
7293
7603
|
output: input.updates.output === undefined ? existing.output : mergeOutputConfig(existing.output, input.updates.output)
|
|
7294
7604
|
};
|
|
7295
7605
|
return [
|
|
@@ -7331,12 +7641,12 @@ function mergeOutputCommandsConfig(existing, updates) {
|
|
|
7331
7641
|
var result;
|
|
7332
7642
|
if ('commands' in updates) {
|
|
7333
7643
|
if (updates.commands) {
|
|
7334
|
-
var merged = _object_spread$
|
|
7644
|
+
var merged = _object_spread$R({}, existing);
|
|
7335
7645
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
7336
7646
|
try {
|
|
7337
7647
|
for(var _iterator = Object.keys(updates.commands)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
7338
7648
|
var key = _step.value;
|
|
7339
|
-
merged[key] = _object_spread$
|
|
7649
|
+
merged[key] = _object_spread$R({}, existing === null || existing === void 0 ? void 0 : existing[key], updates.commands[key]);
|
|
7340
7650
|
}
|
|
7341
7651
|
} catch (err) {
|
|
7342
7652
|
_didIteratorError = true;
|
|
@@ -7401,7 +7711,7 @@ function mergeOutputCommandsConfig(existing, updates) {
|
|
|
7401
7711
|
return result;
|
|
7402
7712
|
}
|
|
7403
7713
|
|
|
7404
|
-
function asyncGeneratorStep$
|
|
7714
|
+
function asyncGeneratorStep$1b(gen, resolve, reject, _next, _throw, key, arg) {
|
|
7405
7715
|
try {
|
|
7406
7716
|
var info = gen[key](arg);
|
|
7407
7717
|
var value = info.value;
|
|
@@ -7415,22 +7725,22 @@ function asyncGeneratorStep$1a(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
7415
7725
|
Promise.resolve(value).then(_next, _throw);
|
|
7416
7726
|
}
|
|
7417
7727
|
}
|
|
7418
|
-
function _async_to_generator$
|
|
7728
|
+
function _async_to_generator$1b(fn) {
|
|
7419
7729
|
return function() {
|
|
7420
7730
|
var self = this, args = arguments;
|
|
7421
7731
|
return new Promise(function(resolve, reject) {
|
|
7422
7732
|
var gen = fn.apply(self, args);
|
|
7423
7733
|
function _next(value) {
|
|
7424
|
-
asyncGeneratorStep$
|
|
7734
|
+
asyncGeneratorStep$1b(gen, resolve, reject, _next, _throw, "next", value);
|
|
7425
7735
|
}
|
|
7426
7736
|
function _throw(err) {
|
|
7427
|
-
asyncGeneratorStep$
|
|
7737
|
+
asyncGeneratorStep$1b(gen, resolve, reject, _next, _throw, "throw", err);
|
|
7428
7738
|
}
|
|
7429
7739
|
_next(undefined);
|
|
7430
7740
|
});
|
|
7431
7741
|
};
|
|
7432
7742
|
}
|
|
7433
|
-
function _ts_generator$
|
|
7743
|
+
function _ts_generator$1b(thisArg, body) {
|
|
7434
7744
|
var f, y, t, _ = {
|
|
7435
7745
|
label: 0,
|
|
7436
7746
|
sent: function() {
|
|
@@ -7557,9 +7867,9 @@ function _ts_generator$1a(thisArg, body) {
|
|
|
7557
7867
|
* @param input - Resolution inputs.
|
|
7558
7868
|
* @returns The resolved env triple.
|
|
7559
7869
|
*/ function resolveCliEnv(input) {
|
|
7560
|
-
return _async_to_generator$
|
|
7870
|
+
return _async_to_generator$1b(function() {
|
|
7561
7871
|
var _ref, _input_envVarName, _ref1, _input_flagEnv, _config_envs, _findCliEnvDefault, config, envVarName, envName, stored, defaultEnv, merged, env;
|
|
7562
|
-
return _ts_generator$
|
|
7872
|
+
return _ts_generator$1b(this, function(_state) {
|
|
7563
7873
|
switch(_state.label){
|
|
7564
7874
|
case 0:
|
|
7565
7875
|
return [
|
|
@@ -7598,9 +7908,9 @@ function _ts_generator$1a(thisArg, body) {
|
|
|
7598
7908
|
})();
|
|
7599
7909
|
}
|
|
7600
7910
|
function resolveCliEnvOrThrow(input) {
|
|
7601
|
-
return _async_to_generator$
|
|
7911
|
+
return _async_to_generator$1b(function() {
|
|
7602
7912
|
var _ref, config, envName, env;
|
|
7603
|
-
return _ts_generator$
|
|
7913
|
+
return _ts_generator$1b(this, function(_state) {
|
|
7604
7914
|
switch(_state.label){
|
|
7605
7915
|
case 0:
|
|
7606
7916
|
return [
|
|
@@ -7697,7 +8007,7 @@ function resolveCliEnvOrThrow(input) {
|
|
|
7697
8007
|
}).hasExpired();
|
|
7698
8008
|
}
|
|
7699
8009
|
|
|
7700
|
-
function asyncGeneratorStep$
|
|
8010
|
+
function asyncGeneratorStep$1a(gen, resolve, reject, _next, _throw, key, arg) {
|
|
7701
8011
|
try {
|
|
7702
8012
|
var info = gen[key](arg);
|
|
7703
8013
|
var value = info.value;
|
|
@@ -7711,22 +8021,22 @@ function asyncGeneratorStep$19(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
7711
8021
|
Promise.resolve(value).then(_next, _throw);
|
|
7712
8022
|
}
|
|
7713
8023
|
}
|
|
7714
|
-
function _async_to_generator$
|
|
8024
|
+
function _async_to_generator$1a(fn) {
|
|
7715
8025
|
return function() {
|
|
7716
8026
|
var self = this, args = arguments;
|
|
7717
8027
|
return new Promise(function(resolve, reject) {
|
|
7718
8028
|
var gen = fn.apply(self, args);
|
|
7719
8029
|
function _next(value) {
|
|
7720
|
-
asyncGeneratorStep$
|
|
8030
|
+
asyncGeneratorStep$1a(gen, resolve, reject, _next, _throw, "next", value);
|
|
7721
8031
|
}
|
|
7722
8032
|
function _throw(err) {
|
|
7723
|
-
asyncGeneratorStep$
|
|
8033
|
+
asyncGeneratorStep$1a(gen, resolve, reject, _next, _throw, "throw", err);
|
|
7724
8034
|
}
|
|
7725
8035
|
_next(undefined);
|
|
7726
8036
|
});
|
|
7727
8037
|
};
|
|
7728
8038
|
}
|
|
7729
|
-
function _define_property$
|
|
8039
|
+
function _define_property$Q(obj, key, value) {
|
|
7730
8040
|
if (key in obj) {
|
|
7731
8041
|
Object.defineProperty(obj, key, {
|
|
7732
8042
|
value: value,
|
|
@@ -7747,7 +8057,7 @@ function _instanceof$p(left, right) {
|
|
|
7747
8057
|
return left instanceof right;
|
|
7748
8058
|
}
|
|
7749
8059
|
}
|
|
7750
|
-
function _object_spread$
|
|
8060
|
+
function _object_spread$Q(target) {
|
|
7751
8061
|
for(var i = 1; i < arguments.length; i++){
|
|
7752
8062
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
7753
8063
|
var ownKeys = Object.keys(source);
|
|
@@ -7757,12 +8067,12 @@ function _object_spread$O(target) {
|
|
|
7757
8067
|
}));
|
|
7758
8068
|
}
|
|
7759
8069
|
ownKeys.forEach(function(key) {
|
|
7760
|
-
_define_property$
|
|
8070
|
+
_define_property$Q(target, key, source[key]);
|
|
7761
8071
|
});
|
|
7762
8072
|
}
|
|
7763
8073
|
return target;
|
|
7764
8074
|
}
|
|
7765
|
-
function ownKeys$
|
|
8075
|
+
function ownKeys$z(object, enumerableOnly) {
|
|
7766
8076
|
var keys = Object.keys(object);
|
|
7767
8077
|
if (Object.getOwnPropertySymbols) {
|
|
7768
8078
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -7770,18 +8080,18 @@ function ownKeys$y(object, enumerableOnly) {
|
|
|
7770
8080
|
}
|
|
7771
8081
|
return keys;
|
|
7772
8082
|
}
|
|
7773
|
-
function _object_spread_props$
|
|
8083
|
+
function _object_spread_props$z(target, source) {
|
|
7774
8084
|
source = source != null ? source : {};
|
|
7775
8085
|
if (Object.getOwnPropertyDescriptors) {
|
|
7776
8086
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
7777
8087
|
} else {
|
|
7778
|
-
ownKeys$
|
|
8088
|
+
ownKeys$z(Object(source)).forEach(function(key) {
|
|
7779
8089
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
7780
8090
|
});
|
|
7781
8091
|
}
|
|
7782
8092
|
return target;
|
|
7783
8093
|
}
|
|
7784
|
-
function _ts_generator$
|
|
8094
|
+
function _ts_generator$1a(thisArg, body) {
|
|
7785
8095
|
var f, y, t, _ = {
|
|
7786
8096
|
label: 0,
|
|
7787
8097
|
sent: function() {
|
|
@@ -7938,7 +8248,7 @@ var cliOidcFetch = function cliOidcFetch(input, init) {
|
|
|
7938
8248
|
var result = error;
|
|
7939
8249
|
if (_instanceof$p(error, OidcRelyingPartyError)) {
|
|
7940
8250
|
var mapped = OIDC_ERROR_CODE_MAP[error.code];
|
|
7941
|
-
result = new CliError(_object_spread$
|
|
8251
|
+
result = new CliError(_object_spread$Q({
|
|
7942
8252
|
message: error.message,
|
|
7943
8253
|
code: mapped.code
|
|
7944
8254
|
}, mapped.suggestion ? {
|
|
@@ -7948,9 +8258,9 @@ var cliOidcFetch = function cliOidcFetch(input, init) {
|
|
|
7948
8258
|
return result;
|
|
7949
8259
|
}
|
|
7950
8260
|
function withCliErrors(fn) {
|
|
7951
|
-
return _async_to_generator$
|
|
8261
|
+
return _async_to_generator$1a(function() {
|
|
7952
8262
|
var e;
|
|
7953
|
-
return _ts_generator$
|
|
8263
|
+
return _ts_generator$1a(this, function(_state) {
|
|
7954
8264
|
switch(_state.label){
|
|
7955
8265
|
case 0:
|
|
7956
8266
|
_state.trys.push([
|
|
@@ -7986,7 +8296,7 @@ function withCliErrors(fn) {
|
|
|
7986
8296
|
* @returns The parsed {@link OidcDiscoveryMetadata}. Throws a {@link CliError} (`OIDC_DISCOVERY_FAILED`) when every candidate fails.
|
|
7987
8297
|
*/ function discoverOidcMetadata(input) {
|
|
7988
8298
|
return withCliErrors(function() {
|
|
7989
|
-
return discoverOidcMetadata$1(_object_spread_props$
|
|
8299
|
+
return discoverOidcMetadata$1(_object_spread_props$z(_object_spread$Q({}, input), {
|
|
7990
8300
|
fetch: cliOidcFetch
|
|
7991
8301
|
}));
|
|
7992
8302
|
});
|
|
@@ -7998,7 +8308,7 @@ function withCliErrors(fn) {
|
|
|
7998
8308
|
* @returns The parsed {@link OidcTokenResponse} with access/refresh tokens.
|
|
7999
8309
|
*/ function exchangeAuthorizationCode(input) {
|
|
8000
8310
|
return withCliErrors(function() {
|
|
8001
|
-
return exchangeAuthorizationCode$1(_object_spread_props$
|
|
8311
|
+
return exchangeAuthorizationCode$1(_object_spread_props$z(_object_spread$Q({}, input), {
|
|
8002
8312
|
fetch: cliOidcFetch
|
|
8003
8313
|
}));
|
|
8004
8314
|
});
|
|
@@ -8010,7 +8320,7 @@ function withCliErrors(fn) {
|
|
|
8010
8320
|
* @returns The parsed {@link OidcTokenResponse} with the refreshed access token.
|
|
8011
8321
|
*/ function refreshAccessToken(input) {
|
|
8012
8322
|
return withCliErrors(function() {
|
|
8013
|
-
return refreshAccessToken$1(_object_spread_props$
|
|
8323
|
+
return refreshAccessToken$1(_object_spread_props$z(_object_spread$Q({}, input), {
|
|
8014
8324
|
fetch: cliOidcFetch
|
|
8015
8325
|
}));
|
|
8016
8326
|
});
|
|
@@ -8022,7 +8332,7 @@ function withCliErrors(fn) {
|
|
|
8022
8332
|
* @returns Resolves when the server returns a non-error status. Throws a {@link CliError} (`TOKEN_REVOCATION_FAILED`) on error.
|
|
8023
8333
|
*/ function revokeToken(input) {
|
|
8024
8334
|
return withCliErrors(function() {
|
|
8025
|
-
return revokeToken$1(_object_spread_props$
|
|
8335
|
+
return revokeToken$1(_object_spread_props$z(_object_spread$Q({}, input), {
|
|
8026
8336
|
fetch: cliOidcFetch
|
|
8027
8337
|
}));
|
|
8028
8338
|
});
|
|
@@ -8034,7 +8344,7 @@ function withCliErrors(fn) {
|
|
|
8034
8344
|
* @returns The parsed userinfo claims. Throws a {@link CliError} (`USERINFO_FAILED`) on a non-OK response.
|
|
8035
8345
|
*/ function fetchUserInfo(input) {
|
|
8036
8346
|
return withCliErrors(function() {
|
|
8037
|
-
return fetchUserInfo$1(_object_spread_props$
|
|
8347
|
+
return fetchUserInfo$1(_object_spread_props$z(_object_spread$Q({}, input), {
|
|
8038
8348
|
fetch: cliOidcFetch
|
|
8039
8349
|
}));
|
|
8040
8350
|
});
|
|
@@ -8046,13 +8356,13 @@ function withCliErrors(fn) {
|
|
|
8046
8356
|
* @returns The parsed {@link OidcSessionInfo}. Throws a {@link CliError} (`SESSION_INFO_FAILED`) on a non-OK response.
|
|
8047
8357
|
*/ function fetchSessionInfo(input) {
|
|
8048
8358
|
return withCliErrors(function() {
|
|
8049
|
-
return fetchSessionInfo$1(_object_spread_props$
|
|
8359
|
+
return fetchSessionInfo$1(_object_spread_props$z(_object_spread$Q({}, input), {
|
|
8050
8360
|
fetch: cliOidcFetch
|
|
8051
8361
|
}));
|
|
8052
8362
|
});
|
|
8053
8363
|
}
|
|
8054
8364
|
|
|
8055
|
-
function _define_property$
|
|
8365
|
+
function _define_property$P(obj, key, value) {
|
|
8056
8366
|
if (key in obj) {
|
|
8057
8367
|
Object.defineProperty(obj, key, {
|
|
8058
8368
|
value: value,
|
|
@@ -8065,7 +8375,7 @@ function _define_property$N(obj, key, value) {
|
|
|
8065
8375
|
}
|
|
8066
8376
|
return obj;
|
|
8067
8377
|
}
|
|
8068
|
-
function _object_spread$
|
|
8378
|
+
function _object_spread$P(target) {
|
|
8069
8379
|
for(var i = 1; i < arguments.length; i++){
|
|
8070
8380
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
8071
8381
|
var ownKeys = Object.keys(source);
|
|
@@ -8075,12 +8385,12 @@ function _object_spread$N(target) {
|
|
|
8075
8385
|
}));
|
|
8076
8386
|
}
|
|
8077
8387
|
ownKeys.forEach(function(key) {
|
|
8078
|
-
_define_property$
|
|
8388
|
+
_define_property$P(target, key, source[key]);
|
|
8079
8389
|
});
|
|
8080
8390
|
}
|
|
8081
8391
|
return target;
|
|
8082
8392
|
}
|
|
8083
|
-
function ownKeys$
|
|
8393
|
+
function ownKeys$y(object, enumerableOnly) {
|
|
8084
8394
|
var keys = Object.keys(object);
|
|
8085
8395
|
if (Object.getOwnPropertySymbols) {
|
|
8086
8396
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -8088,12 +8398,12 @@ function ownKeys$x(object, enumerableOnly) {
|
|
|
8088
8398
|
}
|
|
8089
8399
|
return keys;
|
|
8090
8400
|
}
|
|
8091
|
-
function _object_spread_props$
|
|
8401
|
+
function _object_spread_props$y(target, source) {
|
|
8092
8402
|
source = source != null ? source : {};
|
|
8093
8403
|
if (Object.getOwnPropertyDescriptors) {
|
|
8094
8404
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
8095
8405
|
} else {
|
|
8096
|
-
ownKeys$
|
|
8406
|
+
ownKeys$y(Object(source)).forEach(function(key) {
|
|
8097
8407
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
8098
8408
|
});
|
|
8099
8409
|
}
|
|
@@ -8114,7 +8424,7 @@ function _object_spread_props$x(target, source) {
|
|
|
8114
8424
|
*/ function buildAuthorizationUrl(input) {
|
|
8115
8425
|
try {
|
|
8116
8426
|
var _input_scopes;
|
|
8117
|
-
return buildAuthorizationUrl$1(_object_spread_props$
|
|
8427
|
+
return buildAuthorizationUrl$1(_object_spread_props$y(_object_spread$P({}, input), {
|
|
8118
8428
|
scopes: (_input_scopes = input.scopes) !== null && _input_scopes !== void 0 ? _input_scopes : DEFAULT_CLI_OIDC_SCOPES
|
|
8119
8429
|
}));
|
|
8120
8430
|
} catch (e) {
|
|
@@ -8247,7 +8557,7 @@ var KEY_DEL = ''; // DEL
|
|
|
8247
8557
|
return result;
|
|
8248
8558
|
}
|
|
8249
8559
|
|
|
8250
|
-
function asyncGeneratorStep$
|
|
8560
|
+
function asyncGeneratorStep$19(gen, resolve, reject, _next, _throw, key, arg) {
|
|
8251
8561
|
try {
|
|
8252
8562
|
var info = gen[key](arg);
|
|
8253
8563
|
var value = info.value;
|
|
@@ -8261,22 +8571,22 @@ function asyncGeneratorStep$18(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
8261
8571
|
Promise.resolve(value).then(_next, _throw);
|
|
8262
8572
|
}
|
|
8263
8573
|
}
|
|
8264
|
-
function _async_to_generator$
|
|
8574
|
+
function _async_to_generator$19(fn) {
|
|
8265
8575
|
return function() {
|
|
8266
8576
|
var self = this, args = arguments;
|
|
8267
8577
|
return new Promise(function(resolve, reject) {
|
|
8268
8578
|
var gen = fn.apply(self, args);
|
|
8269
8579
|
function _next(value) {
|
|
8270
|
-
asyncGeneratorStep$
|
|
8580
|
+
asyncGeneratorStep$19(gen, resolve, reject, _next, _throw, "next", value);
|
|
8271
8581
|
}
|
|
8272
8582
|
function _throw(err) {
|
|
8273
|
-
asyncGeneratorStep$
|
|
8583
|
+
asyncGeneratorStep$19(gen, resolve, reject, _next, _throw, "throw", err);
|
|
8274
8584
|
}
|
|
8275
8585
|
_next(undefined);
|
|
8276
8586
|
});
|
|
8277
8587
|
};
|
|
8278
8588
|
}
|
|
8279
|
-
function _define_property$
|
|
8589
|
+
function _define_property$O(obj, key, value) {
|
|
8280
8590
|
if (key in obj) {
|
|
8281
8591
|
Object.defineProperty(obj, key, {
|
|
8282
8592
|
value: value,
|
|
@@ -8289,7 +8599,7 @@ function _define_property$M(obj, key, value) {
|
|
|
8289
8599
|
}
|
|
8290
8600
|
return obj;
|
|
8291
8601
|
}
|
|
8292
|
-
function _object_spread$
|
|
8602
|
+
function _object_spread$O(target) {
|
|
8293
8603
|
for(var i = 1; i < arguments.length; i++){
|
|
8294
8604
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
8295
8605
|
var ownKeys = Object.keys(source);
|
|
@@ -8299,12 +8609,12 @@ function _object_spread$M(target) {
|
|
|
8299
8609
|
}));
|
|
8300
8610
|
}
|
|
8301
8611
|
ownKeys.forEach(function(key) {
|
|
8302
|
-
_define_property$
|
|
8612
|
+
_define_property$O(target, key, source[key]);
|
|
8303
8613
|
});
|
|
8304
8614
|
}
|
|
8305
8615
|
return target;
|
|
8306
8616
|
}
|
|
8307
|
-
function ownKeys$
|
|
8617
|
+
function ownKeys$x(object, enumerableOnly) {
|
|
8308
8618
|
var keys = Object.keys(object);
|
|
8309
8619
|
if (Object.getOwnPropertySymbols) {
|
|
8310
8620
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -8312,18 +8622,18 @@ function ownKeys$w(object, enumerableOnly) {
|
|
|
8312
8622
|
}
|
|
8313
8623
|
return keys;
|
|
8314
8624
|
}
|
|
8315
|
-
function _object_spread_props$
|
|
8625
|
+
function _object_spread_props$x(target, source) {
|
|
8316
8626
|
source = source != null ? source : {};
|
|
8317
8627
|
if (Object.getOwnPropertyDescriptors) {
|
|
8318
8628
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
8319
8629
|
} else {
|
|
8320
|
-
ownKeys$
|
|
8630
|
+
ownKeys$x(Object(source)).forEach(function(key) {
|
|
8321
8631
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
8322
8632
|
});
|
|
8323
8633
|
}
|
|
8324
8634
|
return target;
|
|
8325
8635
|
}
|
|
8326
|
-
function _ts_generator$
|
|
8636
|
+
function _ts_generator$19(thisArg, body) {
|
|
8327
8637
|
var f, y, t, _ = {
|
|
8328
8638
|
label: 0,
|
|
8329
8639
|
sent: function() {
|
|
@@ -8423,9 +8733,9 @@ function _ts_generator$18(thisArg, body) {
|
|
|
8423
8733
|
}
|
|
8424
8734
|
}
|
|
8425
8735
|
function resolveAuthSetupPrompt(input) {
|
|
8426
|
-
return _async_to_generator$
|
|
8736
|
+
return _async_to_generator$19(function() {
|
|
8427
8737
|
var argvValue, existingValue, prompt, mask, result, answer;
|
|
8428
|
-
return _ts_generator$
|
|
8738
|
+
return _ts_generator$19(this, function(_state) {
|
|
8429
8739
|
switch(_state.label){
|
|
8430
8740
|
case 0:
|
|
8431
8741
|
argvValue = input.argvValue, existingValue = input.existingValue, prompt = input.prompt, mask = input.mask;
|
|
@@ -8486,9 +8796,9 @@ function resolveAuthSetupPrompt(input) {
|
|
|
8486
8796
|
* @param input.accessToken - The Bearer access token.
|
|
8487
8797
|
* @returns The {@link OidcSessionInfo}, or `undefined` on any failure.
|
|
8488
8798
|
*/ function loadSessionInfoSafely(input) {
|
|
8489
|
-
return _async_to_generator$
|
|
8799
|
+
return _async_to_generator$19(function() {
|
|
8490
8800
|
var result;
|
|
8491
|
-
return _ts_generator$
|
|
8801
|
+
return _ts_generator$19(this, function(_state) {
|
|
8492
8802
|
switch(_state.label){
|
|
8493
8803
|
case 0:
|
|
8494
8804
|
_state.trys.push([
|
|
@@ -8537,9 +8847,9 @@ function resolveAuthSetupPrompt(input) {
|
|
|
8537
8847
|
* @param input.accessToken - The Bearer access token.
|
|
8538
8848
|
* @returns The parsed claims, or `undefined` on any failure.
|
|
8539
8849
|
*/ function loadUserInfoSafely(input) {
|
|
8540
|
-
return _async_to_generator$
|
|
8850
|
+
return _async_to_generator$19(function() {
|
|
8541
8851
|
var result;
|
|
8542
|
-
return _ts_generator$
|
|
8852
|
+
return _ts_generator$19(this, function(_state) {
|
|
8543
8853
|
switch(_state.label){
|
|
8544
8854
|
case 0:
|
|
8545
8855
|
_state.trys.push([
|
|
@@ -8656,9 +8966,9 @@ function resolveAuthSetupPrompt(input) {
|
|
|
8656
8966
|
});
|
|
8657
8967
|
},
|
|
8658
8968
|
handler: wrapCommandHandler(function(argv) {
|
|
8659
|
-
return _async_to_generator$
|
|
8969
|
+
return _async_to_generator$19(function() {
|
|
8660
8970
|
var _ref, _ref1, _argv_env, _ref2, _ref3, _argv_appClientUrl, _ref4, _ref5, _argv_scopes, _config_envs, _findCliEnvDefault, config, envName, stored, defaultEnv, existing, apiBaseUrl, oidcIssuer, appClientUrl, clientId, clientSecret, redirectUri, scopes, nextEnv, merged;
|
|
8661
|
-
return _ts_generator$
|
|
8971
|
+
return _ts_generator$19(this, function(_state) {
|
|
8662
8972
|
switch(_state.label){
|
|
8663
8973
|
case 0:
|
|
8664
8974
|
return [
|
|
@@ -8744,7 +9054,7 @@ function resolveAuthSetupPrompt(input) {
|
|
|
8744
9054
|
code: 'AUTH_SETUP_INCOMPLETE'
|
|
8745
9055
|
});
|
|
8746
9056
|
}
|
|
8747
|
-
nextEnv = _object_spread$
|
|
9057
|
+
nextEnv = _object_spread$O({
|
|
8748
9058
|
apiBaseUrl: apiBaseUrl,
|
|
8749
9059
|
oidcIssuer: oidcIssuer,
|
|
8750
9060
|
clientId: clientId,
|
|
@@ -8760,8 +9070,8 @@ function resolveAuthSetupPrompt(input) {
|
|
|
8760
9070
|
mergeCliConfig({
|
|
8761
9071
|
configFilePath: paths.configFilePath,
|
|
8762
9072
|
configDir: paths.configDir,
|
|
8763
|
-
updates: _object_spread$
|
|
8764
|
-
envs: _define_property$
|
|
9073
|
+
updates: _object_spread$O({
|
|
9074
|
+
envs: _define_property$O({}, envName, nextEnv)
|
|
8765
9075
|
}, argv.setActive ? {
|
|
8766
9076
|
activeEnv: envName
|
|
8767
9077
|
} : {})
|
|
@@ -8810,9 +9120,9 @@ function resolveAuthSetupPrompt(input) {
|
|
|
8810
9120
|
});
|
|
8811
9121
|
},
|
|
8812
9122
|
handler: wrapCommandHandler(function(argv) {
|
|
8813
|
-
return _async_to_generator$
|
|
9123
|
+
return _async_to_generator$19(function() {
|
|
8814
9124
|
var _argv_code, _tokenResponse_expires_in, _ref, _ref1, envName, env, meta, _ref2, codeVerifier, codeChallenge, state, requestedScopes, requestedSessionTtlSeconds, ms, url, pasted, _tmp, code, tokenResponse, expiresAt, sessionInfo, sessionExpiresAt, rotationDisabled, entry, sessionSummary;
|
|
8815
|
-
return _ts_generator$
|
|
9125
|
+
return _ts_generator$19(this, function(_state) {
|
|
8816
9126
|
switch(_state.label){
|
|
8817
9127
|
case 0:
|
|
8818
9128
|
return [
|
|
@@ -8926,7 +9236,7 @@ function resolveAuthSetupPrompt(input) {
|
|
|
8926
9236
|
sessionInfo = _state.sent();
|
|
8927
9237
|
sessionExpiresAt = (_ref = sessionInfo === null || sessionInfo === void 0 ? void 0 : sessionInfo.expiresAt) !== null && _ref !== void 0 ? _ref : undefined;
|
|
8928
9238
|
rotationDisabled = sessionInfo === null || sessionInfo === void 0 ? void 0 : sessionInfo.rotationDisabled;
|
|
8929
|
-
entry = _object_spread$
|
|
9239
|
+
entry = _object_spread$O({
|
|
8930
9240
|
accessToken: tokenResponse.access_token,
|
|
8931
9241
|
refreshToken: tokenResponse.refresh_token,
|
|
8932
9242
|
idToken: tokenResponse.id_token,
|
|
@@ -8983,9 +9293,9 @@ function resolveAuthSetupPrompt(input) {
|
|
|
8983
9293
|
});
|
|
8984
9294
|
},
|
|
8985
9295
|
handler: wrapCommandHandler(function(argv) {
|
|
8986
|
-
return _async_to_generator$
|
|
9296
|
+
return _async_to_generator$19(function() {
|
|
8987
9297
|
var _ref, envName, env, entry, meta;
|
|
8988
|
-
return _ts_generator$
|
|
9298
|
+
return _ts_generator$19(this, function(_state) {
|
|
8989
9299
|
switch(_state.label){
|
|
8990
9300
|
case 0:
|
|
8991
9301
|
return [
|
|
@@ -9090,9 +9400,9 @@ function resolveAuthSetupPrompt(input) {
|
|
|
9090
9400
|
return withEnv(yargs);
|
|
9091
9401
|
},
|
|
9092
9402
|
handler: wrapCommandHandler(function(argv) {
|
|
9093
|
-
return _async_to_generator$
|
|
9403
|
+
return _async_to_generator$19(function() {
|
|
9094
9404
|
var _ref, envName, env, entry, _ref1, _ref2, expired, sessionInfo, sessionExpiresAt, rotationDisabled, session, meta, userinfoEndpoint, claims, _tmp;
|
|
9095
|
-
return _ts_generator$
|
|
9405
|
+
return _ts_generator$19(this, function(_state) {
|
|
9096
9406
|
switch(_state.label){
|
|
9097
9407
|
case 0:
|
|
9098
9408
|
return [
|
|
@@ -9206,9 +9516,9 @@ function resolveAuthSetupPrompt(input) {
|
|
|
9206
9516
|
return withEnv(yargs);
|
|
9207
9517
|
},
|
|
9208
9518
|
handler: wrapCommandHandler(function(argv) {
|
|
9209
|
-
return _async_to_generator$
|
|
9519
|
+
return _async_to_generator$19(function() {
|
|
9210
9520
|
var _ref, envName, env, entry;
|
|
9211
|
-
return _ts_generator$
|
|
9521
|
+
return _ts_generator$19(this, function(_state) {
|
|
9212
9522
|
switch(_state.label){
|
|
9213
9523
|
case 0:
|
|
9214
9524
|
return [
|
|
@@ -9263,9 +9573,9 @@ function resolveAuthSetupPrompt(input) {
|
|
|
9263
9573
|
return withEnv(yargs);
|
|
9264
9574
|
},
|
|
9265
9575
|
handler: wrapCommandHandler(function(argv) {
|
|
9266
|
-
return _async_to_generator$
|
|
9576
|
+
return _async_to_generator$19(function() {
|
|
9267
9577
|
var _refreshed_expires_in, _refreshed_refresh_token, _refreshed_token_type, _refreshed_scope, _ref, envName, env, entry, meta, refreshed, expiresAt;
|
|
9268
|
-
return _ts_generator$
|
|
9578
|
+
return _ts_generator$19(this, function(_state) {
|
|
9269
9579
|
switch(_state.label){
|
|
9270
9580
|
case 0:
|
|
9271
9581
|
return [
|
|
@@ -9316,7 +9626,7 @@ function resolveAuthSetupPrompt(input) {
|
|
|
9316
9626
|
expiresAt = Date.now() + ((_refreshed_expires_in = refreshed.expires_in) !== null && _refreshed_expires_in !== void 0 ? _refreshed_expires_in : 0) * 1000;
|
|
9317
9627
|
return [
|
|
9318
9628
|
4,
|
|
9319
|
-
tokens.set(envName, _object_spread_props$
|
|
9629
|
+
tokens.set(envName, _object_spread_props$x(_object_spread$O({}, entry), {
|
|
9320
9630
|
accessToken: refreshed.access_token,
|
|
9321
9631
|
refreshToken: (_refreshed_refresh_token = refreshed.refresh_token) !== null && _refreshed_refresh_token !== void 0 ? _refreshed_refresh_token : entry.refreshToken,
|
|
9322
9632
|
tokenType: (_refreshed_token_type = refreshed.token_type) !== null && _refreshed_token_type !== void 0 ? _refreshed_token_type : entry.tokenType,
|
|
@@ -9349,6 +9659,525 @@ function resolveAuthSetupPrompt(input) {
|
|
|
9349
9659
|
};
|
|
9350
9660
|
}
|
|
9351
9661
|
|
|
9662
|
+
function _array_like_to_array$10(arr, len) {
|
|
9663
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
9664
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
9665
|
+
return arr2;
|
|
9666
|
+
}
|
|
9667
|
+
function _array_with_holes$h(arr) {
|
|
9668
|
+
if (Array.isArray(arr)) return arr;
|
|
9669
|
+
}
|
|
9670
|
+
function _define_property$N(obj, key, value) {
|
|
9671
|
+
if (key in obj) {
|
|
9672
|
+
Object.defineProperty(obj, key, {
|
|
9673
|
+
value: value,
|
|
9674
|
+
enumerable: true,
|
|
9675
|
+
configurable: true,
|
|
9676
|
+
writable: true
|
|
9677
|
+
});
|
|
9678
|
+
} else {
|
|
9679
|
+
obj[key] = value;
|
|
9680
|
+
}
|
|
9681
|
+
return obj;
|
|
9682
|
+
}
|
|
9683
|
+
function _iterable_to_array_limit$h(arr, i) {
|
|
9684
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
9685
|
+
if (_i == null) return;
|
|
9686
|
+
var _arr = [];
|
|
9687
|
+
var _n = true;
|
|
9688
|
+
var _d = false;
|
|
9689
|
+
var _s, _e;
|
|
9690
|
+
try {
|
|
9691
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
9692
|
+
_arr.push(_s.value);
|
|
9693
|
+
if (i && _arr.length === i) break;
|
|
9694
|
+
}
|
|
9695
|
+
} catch (err) {
|
|
9696
|
+
_d = true;
|
|
9697
|
+
_e = err;
|
|
9698
|
+
} finally{
|
|
9699
|
+
try {
|
|
9700
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
9701
|
+
} finally{
|
|
9702
|
+
if (_d) throw _e;
|
|
9703
|
+
}
|
|
9704
|
+
}
|
|
9705
|
+
return _arr;
|
|
9706
|
+
}
|
|
9707
|
+
function _non_iterable_rest$h() {
|
|
9708
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
9709
|
+
}
|
|
9710
|
+
function _object_spread$N(target) {
|
|
9711
|
+
for(var i = 1; i < arguments.length; i++){
|
|
9712
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
9713
|
+
var ownKeys = Object.keys(source);
|
|
9714
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
9715
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
9716
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
9717
|
+
}));
|
|
9718
|
+
}
|
|
9719
|
+
ownKeys.forEach(function(key) {
|
|
9720
|
+
_define_property$N(target, key, source[key]);
|
|
9721
|
+
});
|
|
9722
|
+
}
|
|
9723
|
+
return target;
|
|
9724
|
+
}
|
|
9725
|
+
function ownKeys$w(object, enumerableOnly) {
|
|
9726
|
+
var keys = Object.keys(object);
|
|
9727
|
+
if (Object.getOwnPropertySymbols) {
|
|
9728
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
9729
|
+
keys.push.apply(keys, symbols);
|
|
9730
|
+
}
|
|
9731
|
+
return keys;
|
|
9732
|
+
}
|
|
9733
|
+
function _object_spread_props$w(target, source) {
|
|
9734
|
+
source = source != null ? source : {};
|
|
9735
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
9736
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
9737
|
+
} else {
|
|
9738
|
+
ownKeys$w(Object(source)).forEach(function(key) {
|
|
9739
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
9740
|
+
});
|
|
9741
|
+
}
|
|
9742
|
+
return target;
|
|
9743
|
+
}
|
|
9744
|
+
function _sliced_to_array$h(arr, i) {
|
|
9745
|
+
return _array_with_holes$h(arr) || _iterable_to_array_limit$h(arr, i) || _unsupported_iterable_to_array$10(arr, i) || _non_iterable_rest$h();
|
|
9746
|
+
}
|
|
9747
|
+
function _type_of$2(obj) {
|
|
9748
|
+
"@swc/helpers - typeof";
|
|
9749
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
9750
|
+
}
|
|
9751
|
+
function _unsupported_iterable_to_array$10(o, minLen) {
|
|
9752
|
+
if (!o) return;
|
|
9753
|
+
if (typeof o === "string") return _array_like_to_array$10(o, minLen);
|
|
9754
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
9755
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
9756
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
9757
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$10(o, minLen);
|
|
9758
|
+
}
|
|
9759
|
+
/**
|
|
9760
|
+
* The `@dereekb/*` package prefix the drift check compares. Only framework packages are checked —
|
|
9761
|
+
* a third-party range like `firebase: ^12.12.1` is deliberately out of scope.
|
|
9762
|
+
*/ var CLI_FRAMEWORK_PACKAGE_PREFIX = '@dereekb/';
|
|
9763
|
+
/**
|
|
9764
|
+
* Matches a declared dependency range that pins ONE exact version (`13.42.0`), which is the only
|
|
9765
|
+
* shape a build stamp can be read off. A range (`^13.42.0`, `~13.42`, `*`, a workspace or file
|
|
9766
|
+
* specifier) is skipped rather than guessed at.
|
|
9767
|
+
*/ var EXACT_VERSION_RANGE = /^\d+\.\d+\.\d+(?:-[\w.]+)?$/;
|
|
9768
|
+
/**
|
|
9769
|
+
* Compares the `@dereekb/*` versions the running artifact was BUILT against with the versions
|
|
9770
|
+
* resolved from `node_modules` now.
|
|
9771
|
+
*
|
|
9772
|
+
* This is the check whose absence turns a routine `@dereekb/*` bump into an unreadable runtime
|
|
9773
|
+
* failure. A CLI built with `thirdParty: false` inlines its app code and resolves the framework at
|
|
9774
|
+
* RUN time, so the artifact is only valid against the tree it was compiled against — and nothing
|
|
9775
|
+
* else in the toolchain notices when that stops being true. The symptom is arbitrary: an SDK
|
|
9776
|
+
* assertion, a missing manifest field, a silently-empty result.
|
|
9777
|
+
*
|
|
9778
|
+
* Deliberately conservative. Only exact-pinned `@dereekb/*` versions are compared, and every way the
|
|
9779
|
+
* comparison can fail to apply produces `ok: true` with a {@link CliBuildDriftUndeterminedReason} —
|
|
9780
|
+
* a check that cried wolf on every source-run CLI would be turned off, and then it would be useless
|
|
9781
|
+
* on the day it mattered.
|
|
9782
|
+
*
|
|
9783
|
+
* @param input - The entry path, the manifest generator stamp, and the test seams.
|
|
9784
|
+
* @returns The drift verdict.
|
|
9785
|
+
*/ function inspectCliBuildDrift() {
|
|
9786
|
+
var input = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
9787
|
+
var _input_entryPath, _input_resolveVersion, _input_artifactPackage, _ref;
|
|
9788
|
+
var manifestGeneratorVersion = input.manifestGeneratorVersion;
|
|
9789
|
+
var entryPath = (_input_entryPath = input.entryPath) !== null && _input_entryPath !== void 0 ? _input_entryPath : process.argv[1];
|
|
9790
|
+
var resolveVersion = (_input_resolveVersion = input.resolveVersion) !== null && _input_resolveVersion !== void 0 ? _input_resolveVersion : resolveInstalledPackageVersion;
|
|
9791
|
+
var artifactPackage = (_input_artifactPackage = input.artifactPackage) !== null && _input_artifactPackage !== void 0 ? _input_artifactPackage : entryPath == null ? undefined : readCliArtifactPackage(entryPath);
|
|
9792
|
+
var resolvedDbxCliVersion = resolveVersion('@dereekb/dbx-cli');
|
|
9793
|
+
var manifestGeneratorDrift = manifestGeneratorVersion != null && resolvedDbxCliVersion != null && manifestGeneratorVersion !== resolvedDbxCliVersion;
|
|
9794
|
+
var declared = (_ref = artifactPackage === null || artifactPackage === void 0 ? void 0 : artifactPackage.frameworkVersions) !== null && _ref !== void 0 ? _ref : {};
|
|
9795
|
+
var drift = [];
|
|
9796
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
9797
|
+
try {
|
|
9798
|
+
for(var _iterator = Object.entries(declared)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
9799
|
+
var _step_value = _sliced_to_array$h(_step.value, 2), packageName = _step_value[0], builtAgainst = _step_value[1];
|
|
9800
|
+
var resolved = resolveVersion(packageName);
|
|
9801
|
+
if (resolved !== builtAgainst) {
|
|
9802
|
+
drift.push(_object_spread$N({
|
|
9803
|
+
packageName: packageName,
|
|
9804
|
+
builtAgainst: builtAgainst
|
|
9805
|
+
}, resolved == null ? {} : {
|
|
9806
|
+
resolved: resolved
|
|
9807
|
+
}));
|
|
9808
|
+
}
|
|
9809
|
+
}
|
|
9810
|
+
} catch (err) {
|
|
9811
|
+
_didIteratorError = true;
|
|
9812
|
+
_iteratorError = err;
|
|
9813
|
+
} finally{
|
|
9814
|
+
try {
|
|
9815
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
9816
|
+
_iterator.return();
|
|
9817
|
+
}
|
|
9818
|
+
} finally{
|
|
9819
|
+
if (_didIteratorError) {
|
|
9820
|
+
throw _iteratorError;
|
|
9821
|
+
}
|
|
9822
|
+
}
|
|
9823
|
+
}
|
|
9824
|
+
var checked = Object.keys(declared).length;
|
|
9825
|
+
var noneResolvable = checked > 0 && drift.length === checked && drift.every(function(x) {
|
|
9826
|
+
return x.resolved == null;
|
|
9827
|
+
});
|
|
9828
|
+
var reason;
|
|
9829
|
+
if (entryPath == null) {
|
|
9830
|
+
reason = 'no-entry-path';
|
|
9831
|
+
} else if (artifactPackage == null) {
|
|
9832
|
+
reason = 'no-artifact-package';
|
|
9833
|
+
} else if (checked === 0) {
|
|
9834
|
+
reason = 'no-framework-versions-declared';
|
|
9835
|
+
} else if (noneResolvable) {
|
|
9836
|
+
reason = 'framework-not-resolvable';
|
|
9837
|
+
}
|
|
9838
|
+
return _object_spread_props$w(_object_spread$N(_object_spread_props$w(_object_spread$N({
|
|
9839
|
+
ok: (drift.length === 0 || noneResolvable) && !manifestGeneratorDrift
|
|
9840
|
+
}, reason == null ? {} : {
|
|
9841
|
+
reason: reason
|
|
9842
|
+
}, artifactPackage == null ? {} : _object_spread$N({
|
|
9843
|
+
artifactPackagePath: artifactPackage.path
|
|
9844
|
+
}, artifactPackage.version == null ? {} : {
|
|
9845
|
+
artifactVersion: artifactPackage.version
|
|
9846
|
+
})), {
|
|
9847
|
+
checked: checked,
|
|
9848
|
+
drift: drift
|
|
9849
|
+
}), manifestGeneratorVersion == null ? {} : {
|
|
9850
|
+
manifestGeneratorVersion: manifestGeneratorVersion
|
|
9851
|
+
}, resolvedDbxCliVersion == null ? {} : {
|
|
9852
|
+
resolvedDbxCliVersion: resolvedDbxCliVersion
|
|
9853
|
+
}), {
|
|
9854
|
+
manifestGeneratorDrift: manifestGeneratorDrift
|
|
9855
|
+
});
|
|
9856
|
+
}
|
|
9857
|
+
/**
|
|
9858
|
+
* Renders a {@link CliBuildDriftReport} as one operator-facing line, for `--version` and for a
|
|
9859
|
+
* doctor suggestion.
|
|
9860
|
+
*
|
|
9861
|
+
* @param report - The report to describe.
|
|
9862
|
+
* @returns The description, or `undefined` when there is nothing to say.
|
|
9863
|
+
*
|
|
9864
|
+
* @__NO_SIDE_EFFECTS__
|
|
9865
|
+
*/ function cliBuildDriftDescription(report) {
|
|
9866
|
+
var parts = [];
|
|
9867
|
+
if (report.drift.length > 0 && report.reason !== 'framework-not-resolvable') {
|
|
9868
|
+
var builtAgainst = report.drift.map(function(x) {
|
|
9869
|
+
return "".concat(x.packageName, "@").concat(x.builtAgainst);
|
|
9870
|
+
}).join(', ');
|
|
9871
|
+
var installed = report.drift.map(function(x) {
|
|
9872
|
+
var _x_resolved;
|
|
9873
|
+
return "".concat(x.packageName, "@").concat((_x_resolved = x.resolved) !== null && _x_resolved !== void 0 ? _x_resolved : 'not installed');
|
|
9874
|
+
}).join(', ');
|
|
9875
|
+
var verb = report.drift.length === 1 ? 'is' : 'are';
|
|
9876
|
+
parts.push("built against ".concat(builtAgainst, " but ").concat(installed, " ").concat(verb, " installed"));
|
|
9877
|
+
}
|
|
9878
|
+
if (report.manifestGeneratorDrift) {
|
|
9879
|
+
parts.push("generated manifests were emitted by @dereekb/dbx-cli@".concat(report.manifestGeneratorVersion, " but @dereekb/dbx-cli@").concat(report.resolvedDbxCliVersion, " is running them"));
|
|
9880
|
+
}
|
|
9881
|
+
return parts.length === 0 ? undefined : "STALE BUILD: this CLI was ".concat(parts.join('; '), ". Rebuild it — a `thirdParty: false` artifact resolves @dereekb/* at run time, so a version bump alone does not update it.");
|
|
9882
|
+
}
|
|
9883
|
+
/**
|
|
9884
|
+
* Finds and parses the artifact `package.json` nearest the executed entry file.
|
|
9885
|
+
*
|
|
9886
|
+
* @param entryPath - The executed entry file (`process.argv[1]`).
|
|
9887
|
+
* @returns The parsed stamp, or `undefined` when none could be read.
|
|
9888
|
+
*/ function readCliArtifactPackage(entryPath) {
|
|
9889
|
+
var packageJsonPath = findNearestPackageJson(entryPath);
|
|
9890
|
+
var result;
|
|
9891
|
+
if (packageJsonPath != null) {
|
|
9892
|
+
try {
|
|
9893
|
+
var contents = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
|
|
9894
|
+
result = _object_spread_props$w(_object_spread$N({
|
|
9895
|
+
path: packageJsonPath
|
|
9896
|
+
}, typeof contents.name === 'string' ? {
|
|
9897
|
+
name: contents.name
|
|
9898
|
+
} : {}, typeof contents.version === 'string' ? {
|
|
9899
|
+
version: contents.version
|
|
9900
|
+
} : {}), {
|
|
9901
|
+
// peers first so a `dependencies` entry wins on a conflict: an app that pins a framework
|
|
9902
|
+
// package as a real dependency is the more specific declaration
|
|
9903
|
+
frameworkVersions: _object_spread$N({}, exactFrameworkVersions(contents.peerDependencies), exactFrameworkVersions(contents.dependencies))
|
|
9904
|
+
});
|
|
9905
|
+
} catch (unused) {
|
|
9906
|
+
// an unparsable or unreadable artifact package.json is indistinguishable from an absent one
|
|
9907
|
+
result = undefined;
|
|
9908
|
+
}
|
|
9909
|
+
}
|
|
9910
|
+
return result;
|
|
9911
|
+
}
|
|
9912
|
+
/**
|
|
9913
|
+
* The exact-pinned `@dereekb/*` entries of one dependency map.
|
|
9914
|
+
*
|
|
9915
|
+
* @param dependencies - A `package.json` dependency map, or any non-object value.
|
|
9916
|
+
* @returns Package name → exact version, for framework packages pinned to one version.
|
|
9917
|
+
*/ function exactFrameworkVersions(dependencies) {
|
|
9918
|
+
var result = {};
|
|
9919
|
+
if (dependencies != null && (typeof dependencies === "undefined" ? "undefined" : _type_of$2(dependencies)) === 'object') {
|
|
9920
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
9921
|
+
try {
|
|
9922
|
+
for(var _iterator = Object.entries(dependencies)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
9923
|
+
var _step_value = _sliced_to_array$h(_step.value, 2), packageName = _step_value[0], range = _step_value[1];
|
|
9924
|
+
if (packageName.startsWith(CLI_FRAMEWORK_PACKAGE_PREFIX) && typeof range === 'string' && EXACT_VERSION_RANGE.test(range)) {
|
|
9925
|
+
result[packageName] = range;
|
|
9926
|
+
}
|
|
9927
|
+
}
|
|
9928
|
+
} catch (err) {
|
|
9929
|
+
_didIteratorError = true;
|
|
9930
|
+
_iteratorError = err;
|
|
9931
|
+
} finally{
|
|
9932
|
+
try {
|
|
9933
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
9934
|
+
_iterator.return();
|
|
9935
|
+
}
|
|
9936
|
+
} finally{
|
|
9937
|
+
if (_didIteratorError) {
|
|
9938
|
+
throw _iteratorError;
|
|
9939
|
+
}
|
|
9940
|
+
}
|
|
9941
|
+
}
|
|
9942
|
+
}
|
|
9943
|
+
return result;
|
|
9944
|
+
}
|
|
9945
|
+
/**
|
|
9946
|
+
* Walks up from a file to the nearest directory holding a `package.json`.
|
|
9947
|
+
*
|
|
9948
|
+
* @param startPath - The file to start from.
|
|
9949
|
+
* @returns The `package.json` path, or `undefined` when the filesystem root is reached first.
|
|
9950
|
+
*/ function findNearestPackageJson(startPath) {
|
|
9951
|
+
var dir = dirname(resolve(startPath));
|
|
9952
|
+
var result;
|
|
9953
|
+
var searching = true;
|
|
9954
|
+
while(searching){
|
|
9955
|
+
var candidate = resolve(dir, 'package.json');
|
|
9956
|
+
if (existsSync(candidate)) {
|
|
9957
|
+
result = candidate;
|
|
9958
|
+
searching = false;
|
|
9959
|
+
} else {
|
|
9960
|
+
var parent = dirname(dir);
|
|
9961
|
+
searching = parent !== dir;
|
|
9962
|
+
dir = parent;
|
|
9963
|
+
}
|
|
9964
|
+
}
|
|
9965
|
+
return result;
|
|
9966
|
+
}
|
|
9967
|
+
/**
|
|
9968
|
+
* Reads a package's installed version by resolving its `package.json` from THIS module's location —
|
|
9969
|
+
* the same resolution the CLI's own imports go through, so the answer is the version actually loaded.
|
|
9970
|
+
*
|
|
9971
|
+
* @param packageName - The package to resolve.
|
|
9972
|
+
* @returns The installed version, or `undefined` when it cannot be resolved.
|
|
9973
|
+
*/ function resolveInstalledPackageVersion(packageName) {
|
|
9974
|
+
var result;
|
|
9975
|
+
try {
|
|
9976
|
+
var contents = createRequire(import.meta.url)("".concat(packageName, "/package.json"));
|
|
9977
|
+
result = typeof contents.version === 'string' ? contents.version : undefined;
|
|
9978
|
+
} catch (unused) {
|
|
9979
|
+
// a framework package the artifact declares but that is not installed shows up as drift with
|
|
9980
|
+
// `resolved: undefined`, which is the honest answer
|
|
9981
|
+
result = undefined;
|
|
9982
|
+
}
|
|
9983
|
+
return result;
|
|
9984
|
+
}
|
|
9985
|
+
|
|
9986
|
+
function asyncGeneratorStep$18(gen, resolve, reject, _next, _throw, key, arg) {
|
|
9987
|
+
try {
|
|
9988
|
+
var info = gen[key](arg);
|
|
9989
|
+
var value = info.value;
|
|
9990
|
+
} catch (error) {
|
|
9991
|
+
reject(error);
|
|
9992
|
+
return;
|
|
9993
|
+
}
|
|
9994
|
+
if (info.done) {
|
|
9995
|
+
resolve(value);
|
|
9996
|
+
} else {
|
|
9997
|
+
Promise.resolve(value).then(_next, _throw);
|
|
9998
|
+
}
|
|
9999
|
+
}
|
|
10000
|
+
function _async_to_generator$18(fn) {
|
|
10001
|
+
return function() {
|
|
10002
|
+
var self = this, args = arguments;
|
|
10003
|
+
return new Promise(function(resolve, reject) {
|
|
10004
|
+
var gen = fn.apply(self, args);
|
|
10005
|
+
function _next(value) {
|
|
10006
|
+
asyncGeneratorStep$18(gen, resolve, reject, _next, _throw, "next", value);
|
|
10007
|
+
}
|
|
10008
|
+
function _throw(err) {
|
|
10009
|
+
asyncGeneratorStep$18(gen, resolve, reject, _next, _throw, "throw", err);
|
|
10010
|
+
}
|
|
10011
|
+
_next(undefined);
|
|
10012
|
+
});
|
|
10013
|
+
};
|
|
10014
|
+
}
|
|
10015
|
+
function _define_property$M(obj, key, value) {
|
|
10016
|
+
if (key in obj) {
|
|
10017
|
+
Object.defineProperty(obj, key, {
|
|
10018
|
+
value: value,
|
|
10019
|
+
enumerable: true,
|
|
10020
|
+
configurable: true,
|
|
10021
|
+
writable: true
|
|
10022
|
+
});
|
|
10023
|
+
} else {
|
|
10024
|
+
obj[key] = value;
|
|
10025
|
+
}
|
|
10026
|
+
return obj;
|
|
10027
|
+
}
|
|
10028
|
+
function _object_spread$M(target) {
|
|
10029
|
+
for(var i = 1; i < arguments.length; i++){
|
|
10030
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
10031
|
+
var ownKeys = Object.keys(source);
|
|
10032
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
10033
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
10034
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
10035
|
+
}));
|
|
10036
|
+
}
|
|
10037
|
+
ownKeys.forEach(function(key) {
|
|
10038
|
+
_define_property$M(target, key, source[key]);
|
|
10039
|
+
});
|
|
10040
|
+
}
|
|
10041
|
+
return target;
|
|
10042
|
+
}
|
|
10043
|
+
function _ts_generator$18(thisArg, body) {
|
|
10044
|
+
var f, y, t, _ = {
|
|
10045
|
+
label: 0,
|
|
10046
|
+
sent: function() {
|
|
10047
|
+
if (t[0] & 1) throw t[1];
|
|
10048
|
+
return t[1];
|
|
10049
|
+
},
|
|
10050
|
+
trys: [],
|
|
10051
|
+
ops: []
|
|
10052
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
10053
|
+
return d(g, "next", {
|
|
10054
|
+
value: verb(0)
|
|
10055
|
+
}), d(g, "throw", {
|
|
10056
|
+
value: verb(1)
|
|
10057
|
+
}), d(g, "return", {
|
|
10058
|
+
value: verb(2)
|
|
10059
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
10060
|
+
value: function() {
|
|
10061
|
+
return this;
|
|
10062
|
+
}
|
|
10063
|
+
}), g;
|
|
10064
|
+
function verb(n) {
|
|
10065
|
+
return function(v) {
|
|
10066
|
+
return step([
|
|
10067
|
+
n,
|
|
10068
|
+
v
|
|
10069
|
+
]);
|
|
10070
|
+
};
|
|
10071
|
+
}
|
|
10072
|
+
function step(op) {
|
|
10073
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
10074
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
10075
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
10076
|
+
if (y = 0, t) op = [
|
|
10077
|
+
op[0] & 2,
|
|
10078
|
+
t.value
|
|
10079
|
+
];
|
|
10080
|
+
switch(op[0]){
|
|
10081
|
+
case 0:
|
|
10082
|
+
case 1:
|
|
10083
|
+
t = op;
|
|
10084
|
+
break;
|
|
10085
|
+
case 4:
|
|
10086
|
+
_.label++;
|
|
10087
|
+
return {
|
|
10088
|
+
value: op[1],
|
|
10089
|
+
done: false
|
|
10090
|
+
};
|
|
10091
|
+
case 5:
|
|
10092
|
+
_.label++;
|
|
10093
|
+
y = op[1];
|
|
10094
|
+
op = [
|
|
10095
|
+
0
|
|
10096
|
+
];
|
|
10097
|
+
continue;
|
|
10098
|
+
case 7:
|
|
10099
|
+
op = _.ops.pop();
|
|
10100
|
+
_.trys.pop();
|
|
10101
|
+
continue;
|
|
10102
|
+
default:
|
|
10103
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
10104
|
+
_ = 0;
|
|
10105
|
+
continue;
|
|
10106
|
+
}
|
|
10107
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
10108
|
+
_.label = op[1];
|
|
10109
|
+
break;
|
|
10110
|
+
}
|
|
10111
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
10112
|
+
_.label = t[1];
|
|
10113
|
+
t = op;
|
|
10114
|
+
break;
|
|
10115
|
+
}
|
|
10116
|
+
if (t && _.label < t[2]) {
|
|
10117
|
+
_.label = t[2];
|
|
10118
|
+
_.ops.push(op);
|
|
10119
|
+
break;
|
|
10120
|
+
}
|
|
10121
|
+
if (t[2]) _.ops.pop();
|
|
10122
|
+
_.trys.pop();
|
|
10123
|
+
continue;
|
|
10124
|
+
}
|
|
10125
|
+
op = body.call(thisArg, _);
|
|
10126
|
+
} catch (e) {
|
|
10127
|
+
op = [
|
|
10128
|
+
6,
|
|
10129
|
+
e
|
|
10130
|
+
];
|
|
10131
|
+
y = 0;
|
|
10132
|
+
} finally{
|
|
10133
|
+
f = t = 0;
|
|
10134
|
+
}
|
|
10135
|
+
if (op[0] & 5) throw op[1];
|
|
10136
|
+
return {
|
|
10137
|
+
value: op[0] ? op[1] : void 0,
|
|
10138
|
+
done: true
|
|
10139
|
+
};
|
|
10140
|
+
}
|
|
10141
|
+
}
|
|
10142
|
+
/**
|
|
10143
|
+
* Name reported by the check {@link createCliBuildDriftDoctorCheck} builds.
|
|
10144
|
+
*/ var BUILD_DRIFT_DOCTOR_CHECK_NAME = 'cli-build-not-stale';
|
|
10145
|
+
/**
|
|
10146
|
+
* Builds the doctor check that compares the running artifact against the `@dereekb/*` tree resolved
|
|
10147
|
+
* at run time.
|
|
10148
|
+
*
|
|
10149
|
+
* Runs FIRST in the default check list, ahead of every network hop, because a stale artifact
|
|
10150
|
+
* invalidates the answers those hops give: they exercise the framework that is loaded now, not the
|
|
10151
|
+
* one the bundle was compiled against, so a green `token-refresh-round-trip` next to a red read is
|
|
10152
|
+
* exactly the misleading report this check exists to pre-empt.
|
|
10153
|
+
*
|
|
10154
|
+
* @param input - Optional overrides forwarded to {@link inspectCliBuildDrift}; apps normally pass only
|
|
10155
|
+
* `manifestGeneratorVersion`.
|
|
10156
|
+
* @returns The {@link DoctorCheck}.
|
|
10157
|
+
* @__NO_SIDE_EFFECTS__
|
|
10158
|
+
*/ function createCliBuildDriftDoctorCheck() {
|
|
10159
|
+
var input = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
10160
|
+
return function() {
|
|
10161
|
+
return _async_to_generator$18(function() {
|
|
10162
|
+
var report, description;
|
|
10163
|
+
return _ts_generator$18(this, function(_state) {
|
|
10164
|
+
report = inspectCliBuildDrift(input);
|
|
10165
|
+
description = cliBuildDriftDescription(report);
|
|
10166
|
+
return [
|
|
10167
|
+
2,
|
|
10168
|
+
_object_spread$M({
|
|
10169
|
+
name: BUILD_DRIFT_DOCTOR_CHECK_NAME,
|
|
10170
|
+
ok: report.ok,
|
|
10171
|
+
detail: report
|
|
10172
|
+
}, description == null ? {} : {
|
|
10173
|
+
suggestion: description
|
|
10174
|
+
})
|
|
10175
|
+
];
|
|
10176
|
+
});
|
|
10177
|
+
})();
|
|
10178
|
+
};
|
|
10179
|
+
}
|
|
10180
|
+
|
|
9352
10181
|
function _array_like_to_array$$(arr, len) {
|
|
9353
10182
|
if (len == null || len > arr.length) len = arr.length;
|
|
9354
10183
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -9539,11 +10368,17 @@ function _ts_generator$17(thisArg, body) {
|
|
|
9539
10368
|
}
|
|
9540
10369
|
}
|
|
9541
10370
|
/**
|
|
9542
|
-
* Built-in checks: config file present, active env resolved, OIDC discovery, token
|
|
10371
|
+
* Built-in checks: build not stale, config file present, active env resolved, OIDC discovery, token
|
|
10372
|
+
* refresh, API reachability.
|
|
9543
10373
|
*
|
|
10374
|
+
* @param input - Optional configuration for the built-in checks.
|
|
9544
10375
|
* @returns The default {@link DoctorCheck} list, in execution order.
|
|
9545
10376
|
*/ function defaultDoctorChecks() {
|
|
10377
|
+
var input = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
9546
10378
|
return [
|
|
10379
|
+
createCliBuildDriftDoctorCheck(_object_spread$L({}, input.manifestGeneratorVersion == null ? {} : {
|
|
10380
|
+
manifestGeneratorVersion: input.manifestGeneratorVersion
|
|
10381
|
+
})),
|
|
9547
10382
|
function(param) {
|
|
9548
10383
|
var config = param.config;
|
|
9549
10384
|
return _async_to_generator$17(function() {
|
|
@@ -9921,12 +10756,15 @@ function _ts_generator$17(thisArg, body) {
|
|
|
9921
10756
|
* @param input.cliName - The CLI's binary name.
|
|
9922
10757
|
* @param input.checks - Additional checks to append after the default check list.
|
|
9923
10758
|
* @param input.defaultEnvs - Built-in env presets merged underneath the user's stored env when names match.
|
|
10759
|
+
* @param input.manifestGeneratorVersion - The generator version stamped into the app's generated manifests.
|
|
9924
10760
|
* @returns A yargs `CommandModule` exposing the `doctor` command.
|
|
9925
10761
|
* @__NO_SIDE_EFFECTS__
|
|
9926
10762
|
*/ function createDoctorCommand(input) {
|
|
9927
10763
|
var _input_checks;
|
|
9928
10764
|
var cliName = input.cliName;
|
|
9929
|
-
var checks = _to_consumable_array$T(defaultDoctorChecks(
|
|
10765
|
+
var checks = _to_consumable_array$T(defaultDoctorChecks(_object_spread$L({}, input.manifestGeneratorVersion == null ? {} : {
|
|
10766
|
+
manifestGeneratorVersion: input.manifestGeneratorVersion
|
|
10767
|
+
}))).concat(_to_consumable_array$T((_input_checks = input.checks) !== null && _input_checks !== void 0 ? _input_checks : []));
|
|
9930
10768
|
var defaultEnvs = input.defaultEnvs;
|
|
9931
10769
|
var paths = buildCliPaths({
|
|
9932
10770
|
cliName: cliName
|
|
@@ -10579,7 +11417,13 @@ function _ts_generator$16(thisArg, body) {
|
|
|
10579
11417
|
* 3. `GET /session/firestore` is reachable and mints a custom token (+ an App Check token when the
|
|
10580
11418
|
* API is configured with a web `appId`);
|
|
10581
11419
|
* 4. `signInWithCustomToken` succeeds against the configured project;
|
|
10582
|
-
* 5. the
|
|
11420
|
+
* 5. the session's Firestore handle is one the loaded client SDK accepts (`inspectCliFirestoreSdkIdentity`),
|
|
11421
|
+
* reported as `stage: 'firestore-sdk-identity'`. Sits between the sign-in and the read because it
|
|
11422
|
+
* is the hop whose failure otherwise MASQUERADES as the read's: the handshake returns a uid, and
|
|
11423
|
+
* the read then dies on the SDK's `Expected first argument to collection() to be …` — a message
|
|
11424
|
+
* that names neither the model nor the handle, and sends the operator to rules and App Check
|
|
11425
|
+
* instead of to a duplicated SDK or a stale artifact;
|
|
11426
|
+
* 6. the app-supplied {@link FirestoreSessionDoctorProbe} performs one rules-protected read.
|
|
10583
11427
|
*
|
|
10584
11428
|
* Doctor checks run PRE-AUTH — `DoctorCheckInput` is only `{ cliName, envName, env, config }`, with no
|
|
10585
11429
|
* token and no `CliContext` — so this loads credentials itself via `buildCliPaths` +
|
|
@@ -10718,7 +11562,7 @@ function _ts_generator$16(thisArg, body) {
|
|
|
10718
11562
|
}
|
|
10719
11563
|
function runFirestoreSessionProbe(input) {
|
|
10720
11564
|
return _async_to_generator$16(function() {
|
|
10721
|
-
var cliName, envName, env, accessToken, probe, probeName, usingEmulators, context, handshakeError, e, result, appCheckUsed, baseDetail, probeResult, e1;
|
|
11565
|
+
var cliName, envName, env, accessToken, probe, probeName, usingEmulators, context, handshakeError, e, result, appCheckUsed, sdkIdentity, baseDetail, probeResult, e1;
|
|
10722
11566
|
return _ts_generator$16(this, function(_state) {
|
|
10723
11567
|
switch(_state.label){
|
|
10724
11568
|
case 0:
|
|
@@ -10757,9 +11601,17 @@ function runFirestoreSessionProbe(input) {
|
|
|
10757
11601
|
case 4:
|
|
10758
11602
|
if (!context) return [
|
|
10759
11603
|
3,
|
|
10760
|
-
|
|
11604
|
+
12
|
|
10761
11605
|
];
|
|
10762
11606
|
appCheckUsed = Boolean(context.session.appCheckToken) && !usingEmulators;
|
|
11607
|
+
// Runs BEFORE the probe on purpose. The handshake can succeed — a uid and an expiry come back —
|
|
11608
|
+
// and the read still fail at the point the session's Firestore handle becomes a collection
|
|
11609
|
+
// reference, which is a wiring/version fault the read's own error cannot describe. Reported even
|
|
11610
|
+
// when it passes, because the module provenance is what rules the duplicated-SDK hypothesis in or
|
|
11611
|
+
// out without an investigation.
|
|
11612
|
+
sdkIdentity = inspectCliFirestoreSdkIdentity({
|
|
11613
|
+
firestoreContext: context.firestoreContext
|
|
11614
|
+
});
|
|
10763
11615
|
baseDetail = {
|
|
10764
11616
|
uid: context.session.uid,
|
|
10765
11617
|
expiresAt: context.session.expiresAt,
|
|
@@ -10768,25 +11620,47 @@ function runFirestoreSessionProbe(input) {
|
|
|
10768
11620
|
usingEmulators: usingEmulators,
|
|
10769
11621
|
// the on-disk session cache is invisible from the outside — a cache hit means this run paid no
|
|
10770
11622
|
// `GET /session/firestore`, which is the difference between a fast read and a slow one
|
|
10771
|
-
sessionFromCache: context.fromCache
|
|
11623
|
+
sessionFromCache: context.fromCache,
|
|
11624
|
+
sdkIdentity: sdkIdentity
|
|
10772
11625
|
};
|
|
10773
|
-
if (
|
|
11626
|
+
if (!!sdkIdentity.ok) return [
|
|
10774
11627
|
3,
|
|
10775
|
-
|
|
11628
|
+
5
|
|
11629
|
+
];
|
|
11630
|
+
result = {
|
|
11631
|
+
name: FIRESTORE_SESSION_DOCTOR_CHECK_NAME,
|
|
11632
|
+
ok: false,
|
|
11633
|
+
detail: _object_spread_props$u(_object_spread$J({}, baseDetail), {
|
|
11634
|
+
stage: FIRESTORE_SDK_IDENTITY_STAGE,
|
|
11635
|
+
code: FIRESTORE_SDK_INSTANCE_MISMATCH_CODE,
|
|
11636
|
+
probe: 'not-attempted'
|
|
11637
|
+
}),
|
|
11638
|
+
// non-null: `cliFirestoreSdkIdentitySuggestion` returns a string for every `problem`, and
|
|
11639
|
+
// `ok: false` guarantees one is set
|
|
11640
|
+
suggestion: cliFirestoreSdkIdentitySuggestion(sdkIdentity)
|
|
11641
|
+
};
|
|
11642
|
+
return [
|
|
11643
|
+
3,
|
|
11644
|
+
11
|
|
10776
11645
|
];
|
|
10777
|
-
_state.label = 5;
|
|
10778
11646
|
case 5:
|
|
11647
|
+
if (!probe) return [
|
|
11648
|
+
3,
|
|
11649
|
+
10
|
|
11650
|
+
];
|
|
11651
|
+
_state.label = 6;
|
|
11652
|
+
case 6:
|
|
10779
11653
|
_state.trys.push([
|
|
10780
|
-
|
|
10781
|
-
|
|
11654
|
+
6,
|
|
11655
|
+
8,
|
|
10782
11656
|
,
|
|
10783
|
-
|
|
11657
|
+
9
|
|
10784
11658
|
]);
|
|
10785
11659
|
return [
|
|
10786
11660
|
4,
|
|
10787
11661
|
probe(context)
|
|
10788
11662
|
];
|
|
10789
|
-
case
|
|
11663
|
+
case 7:
|
|
10790
11664
|
probeResult = _state.sent();
|
|
10791
11665
|
result = {
|
|
10792
11666
|
name: FIRESTORE_SESSION_DOCTOR_CHECK_NAME,
|
|
@@ -10798,9 +11672,9 @@ function runFirestoreSessionProbe(input) {
|
|
|
10798
11672
|
};
|
|
10799
11673
|
return [
|
|
10800
11674
|
3,
|
|
10801
|
-
|
|
11675
|
+
9
|
|
10802
11676
|
];
|
|
10803
|
-
case
|
|
11677
|
+
case 8:
|
|
10804
11678
|
e1 = _state.sent();
|
|
10805
11679
|
result = {
|
|
10806
11680
|
name: FIRESTORE_SESSION_DOCTOR_CHECK_NAME,
|
|
@@ -10814,14 +11688,14 @@ function runFirestoreSessionProbe(input) {
|
|
|
10814
11688
|
};
|
|
10815
11689
|
return [
|
|
10816
11690
|
3,
|
|
10817
|
-
|
|
11691
|
+
9
|
|
10818
11692
|
];
|
|
10819
|
-
case
|
|
11693
|
+
case 9:
|
|
10820
11694
|
return [
|
|
10821
11695
|
3,
|
|
10822
|
-
|
|
11696
|
+
11
|
|
10823
11697
|
];
|
|
10824
|
-
case
|
|
11698
|
+
case 10:
|
|
10825
11699
|
result = {
|
|
10826
11700
|
name: FIRESTORE_SESSION_DOCTOR_CHECK_NAME,
|
|
10827
11701
|
ok: true,
|
|
@@ -10830,13 +11704,13 @@ function runFirestoreSessionProbe(input) {
|
|
|
10830
11704
|
}),
|
|
10831
11705
|
suggestion: 'Signed in, but no rules-protected read was attempted. Pass a `probe` to `createFirestoreSessionDoctorCheck` so the check can prove App Check is accepted and rules pass.'
|
|
10832
11706
|
};
|
|
10833
|
-
_state.label =
|
|
10834
|
-
case
|
|
11707
|
+
_state.label = 11;
|
|
11708
|
+
case 11:
|
|
10835
11709
|
return [
|
|
10836
11710
|
3,
|
|
10837
|
-
|
|
11711
|
+
13
|
|
10838
11712
|
];
|
|
10839
|
-
case
|
|
11713
|
+
case 12:
|
|
10840
11714
|
result = {
|
|
10841
11715
|
name: FIRESTORE_SESSION_DOCTOR_CHECK_NAME,
|
|
10842
11716
|
ok: false,
|
|
@@ -10846,20 +11720,20 @@ function runFirestoreSessionProbe(input) {
|
|
|
10846
11720
|
},
|
|
10847
11721
|
suggestion: "The API must register the firebase-server session module and list '/api/session' in the OIDC `protectedPaths`, and the logged-in user must be an admin holding the `session.firestore` scope. Re-run `".concat(cliName, " auth login --env ").concat(envName, "` if the scope is newly added.")
|
|
10848
11722
|
};
|
|
10849
|
-
_state.label =
|
|
10850
|
-
case
|
|
11723
|
+
_state.label = 13;
|
|
11724
|
+
case 13:
|
|
10851
11725
|
if (!context) return [
|
|
10852
11726
|
3,
|
|
10853
|
-
|
|
11727
|
+
15
|
|
10854
11728
|
];
|
|
10855
11729
|
return [
|
|
10856
11730
|
4,
|
|
10857
11731
|
closeCliFirestoreSessionContext(context)
|
|
10858
11732
|
];
|
|
10859
|
-
case 13:
|
|
10860
|
-
_state.sent();
|
|
10861
|
-
_state.label = 14;
|
|
10862
11733
|
case 14:
|
|
11734
|
+
_state.sent();
|
|
11735
|
+
_state.label = 15;
|
|
11736
|
+
case 15:
|
|
10863
11737
|
return [
|
|
10864
11738
|
2,
|
|
10865
11739
|
result
|
|
@@ -12417,7 +13291,6 @@ function _object_spread_props$r(target, source) {
|
|
|
12417
13291
|
* @returns The collection to query.
|
|
12418
13292
|
* @throws {CliError} When `--parent` is missing where required, supplied where rejected, or the registered collection cannot be scoped.
|
|
12419
13293
|
*/ function cliFirestoreCollectionForQuery(input) {
|
|
12420
|
-
var _models_binding_collectionForModel, _models_binding;
|
|
12421
13294
|
var models = input.models, modelType = input.modelType, scope = input.scope, isNested = input.isNested, parentKey = input.parentKey, parentPaths = input.parentPaths;
|
|
12422
13295
|
if (parentKey != null && !isNested) {
|
|
12423
13296
|
throw new CliError({
|
|
@@ -12441,21 +13314,37 @@ function _object_spread_props$r(target, source) {
|
|
|
12441
13314
|
parentPaths: parentPaths
|
|
12442
13315
|
}));
|
|
12443
13316
|
}
|
|
12444
|
-
var override = (_models_binding_collectionForModel = (_models_binding = models.binding).collectionForModel) === null || _models_binding_collectionForModel === void 0 ? void 0 : _models_binding_collectionForModel.call(_models_binding, {
|
|
12445
|
-
collections: models.collections,
|
|
12446
|
-
modelType: modelType,
|
|
12447
|
-
parentKey: parentKey
|
|
12448
|
-
});
|
|
12449
13317
|
var result;
|
|
12450
|
-
|
|
12451
|
-
|
|
12452
|
-
|
|
12453
|
-
|
|
13318
|
+
// the SDK rejects a bad handle or path with a message naming none of `modelType` / `parentKey` /
|
|
13319
|
+
// the collection — all of which are known right here. `cliFirestoreWiringError` passes an
|
|
13320
|
+
// already-named `CliError` (unknown model type, malformed `--parent`) through untouched.
|
|
13321
|
+
try {
|
|
13322
|
+
var _models_binding_collectionForModel, _models_binding;
|
|
13323
|
+
var override = (_models_binding_collectionForModel = (_models_binding = models.binding).collectionForModel) === null || _models_binding_collectionForModel === void 0 ? void 0 : _models_binding_collectionForModel.call(_models_binding, {
|
|
13324
|
+
collections: models.collections,
|
|
12454
13325
|
modelType: modelType,
|
|
12455
13326
|
parentKey: parentKey
|
|
12456
13327
|
});
|
|
12457
|
-
|
|
12458
|
-
|
|
13328
|
+
if (override == null) {
|
|
13329
|
+
var registered = models.serviceFor(modelType).getFirestoreCollection();
|
|
13330
|
+
result = parentKey == null ? registered : scopeCollectionToParent({
|
|
13331
|
+
registered: registered,
|
|
13332
|
+
modelType: modelType,
|
|
13333
|
+
parentKey: parentKey
|
|
13334
|
+
});
|
|
13335
|
+
} else {
|
|
13336
|
+
result = override;
|
|
13337
|
+
}
|
|
13338
|
+
} catch (e) {
|
|
13339
|
+
throw cliFirestoreWiringError(_object_spread_props$r(_object_spread$G({
|
|
13340
|
+
error: e,
|
|
13341
|
+
operation: 'resolve the Firestore collection for this query',
|
|
13342
|
+
modelType: modelType
|
|
13343
|
+
}, parentKey === undefined ? {} : {
|
|
13344
|
+
parentKey: parentKey
|
|
13345
|
+
}), {
|
|
13346
|
+
firestoreContext: models.session.firestoreContext
|
|
13347
|
+
}));
|
|
12459
13348
|
}
|
|
12460
13349
|
return result;
|
|
12461
13350
|
}
|
|
@@ -12543,16 +13432,33 @@ function _object_spread_props$r(target, source) {
|
|
|
12543
13432
|
* @param group - The registered collection group.
|
|
12544
13433
|
* @param parentKey - The parent document key.
|
|
12545
13434
|
* @returns A group scoped to that parent.
|
|
13435
|
+
* @throws {CliError} When the SDK refuses the parent reference or the scoped subcollection.
|
|
12546
13436
|
*/ function scopeCollectionGroupToParent(group, parentKey) {
|
|
12547
13437
|
var registered = group;
|
|
12548
13438
|
var collectionName = registered.modelIdentity.collectionName;
|
|
12549
13439
|
var firestoreContext = registered.firestoreContext;
|
|
12550
|
-
var
|
|
12551
|
-
//
|
|
12552
|
-
//
|
|
12553
|
-
|
|
12554
|
-
|
|
12555
|
-
|
|
13440
|
+
var result;
|
|
13441
|
+
// `docAtPath` and `subcollection` are the two calls in the direct-Firestore path that hand a raw
|
|
13442
|
+
// Firestore handle / parent ref to the SDK, so they are where a bad handle first surfaces — and
|
|
13443
|
+
// this is the only frame that knows the collection name it was building.
|
|
13444
|
+
try {
|
|
13445
|
+
var parentRef = firestoreContext.drivers.firestoreAccessorDriver.docAtPath(firestoreContext.firestore, parentKey);
|
|
13446
|
+
// The spread is REQUIRED, not stylistic: `makeFirestoreCollectionGroup` mutates `config.cache`, so
|
|
13447
|
+
// reusing the object would rewrite the registered group's cache in place.
|
|
13448
|
+
result = makeFirestoreCollectionGroup(_object_spread_props$r(_object_spread$G({}, group.config), {
|
|
13449
|
+
queryLike: firestoreContext.subcollection(parentRef, collectionName)
|
|
13450
|
+
}));
|
|
13451
|
+
} catch (e) {
|
|
13452
|
+
throw cliFirestoreWiringError({
|
|
13453
|
+
error: e,
|
|
13454
|
+
operation: 'scope the collection group to one parent document',
|
|
13455
|
+
modelType: registered.modelIdentity.modelType,
|
|
13456
|
+
collectionName: collectionName,
|
|
13457
|
+
parentKey: parentKey,
|
|
13458
|
+
firestoreContext: firestoreContext
|
|
13459
|
+
});
|
|
13460
|
+
}
|
|
13461
|
+
return result;
|
|
12556
13462
|
}
|
|
12557
13463
|
|
|
12558
13464
|
function _array_like_to_array$Y(arr, len) {
|
|
@@ -15697,6 +16603,8 @@ function _ts_generator$Y(thisArg, body) {
|
|
|
15697
16603
|
* if {@link CreateCliInput.modelManifest} is provided.
|
|
15698
16604
|
* @param input.firestore - The app-supplied direct-Firestore binding; enables `firestore-get` / `firestore-query`.
|
|
15699
16605
|
* @param input.firestoreQueryManifest - The generated Firestore query catalog; enables `firestore-queries`.
|
|
16606
|
+
* @param input.manifestGeneratorVersion - The `@dereekb/dbx-cli` version that emitted the app's generated
|
|
16607
|
+
* manifests, for the built-in `cli-build-not-stale` doctor check.
|
|
15700
16608
|
* @param input.setup - App hook run once before the command's handler; a throw aborts the command.
|
|
15701
16609
|
* @param input.teardown - App hook run once after the parser settles, before the Firestore session closes.
|
|
15702
16610
|
* Only {@link runCli} runs it — a caller that drives `createCli().parse()` itself owns its own teardown.
|
|
@@ -15715,11 +16623,13 @@ function _ts_generator$Y(thisArg, body) {
|
|
|
15715
16623
|
cliName: cliName,
|
|
15716
16624
|
defaultEnvs: defaultEnvs
|
|
15717
16625
|
}),
|
|
15718
|
-
createDoctorCommand({
|
|
16626
|
+
createDoctorCommand(_object_spread$A({
|
|
15719
16627
|
cliName: cliName,
|
|
15720
16628
|
checks: input.doctorChecks,
|
|
15721
16629
|
defaultEnvs: defaultEnvs
|
|
15722
|
-
}
|
|
16630
|
+
}, input.manifestGeneratorVersion == null ? {} : {
|
|
16631
|
+
manifestGeneratorVersion: input.manifestGeneratorVersion
|
|
16632
|
+
})),
|
|
15723
16633
|
createOutputCommand({
|
|
15724
16634
|
cliName: cliName
|
|
15725
16635
|
})
|
|
@@ -15846,7 +16756,17 @@ function _ts_generator$Y(thisArg, body) {
|
|
|
15846
16756
|
if (input.version == null) {
|
|
15847
16757
|
parser = parser.version(false);
|
|
15848
16758
|
} else {
|
|
15849
|
-
|
|
16759
|
+
// Computed only when `--version` was actually asked for. `.version()` takes a plain string, so the
|
|
16760
|
+
// drift line has to be baked in at parser-construction time — and paying a handful of `package.json`
|
|
16761
|
+
// reads on EVERY invocation to render a line almost nobody asks for is not worth it. `doctor`'s
|
|
16762
|
+
// `cli-build-not-stale` check is the always-on surface; this is the one an operator sees first when
|
|
16763
|
+
// a command misbehaves, without having to know `doctor` exists.
|
|
16764
|
+
parser = parser.version(cliVersionOutput(_object_spread$A({
|
|
16765
|
+
version: input.version,
|
|
16766
|
+
rawArgv: rawArgv
|
|
16767
|
+
}, input.manifestGeneratorVersion == null ? {} : {
|
|
16768
|
+
manifestGeneratorVersion: input.manifestGeneratorVersion
|
|
16769
|
+
})));
|
|
15850
16770
|
}
|
|
15851
16771
|
if (input.completionCommandName !== false) {
|
|
15852
16772
|
var _input_completionCommandName;
|
|
@@ -15854,6 +16774,24 @@ function _ts_generator$Y(thisArg, body) {
|
|
|
15854
16774
|
}
|
|
15855
16775
|
return parser;
|
|
15856
16776
|
}
|
|
16777
|
+
/**
|
|
16778
|
+
* The string `--version` prints: the app's version, plus a `STALE BUILD:` line when the running
|
|
16779
|
+
* artifact does not match the `@dereekb/*` tree resolved at run time.
|
|
16780
|
+
*
|
|
16781
|
+
* @param input - The app version, the raw argv, and the optional manifest generator stamp.
|
|
16782
|
+
* @returns The version output.
|
|
16783
|
+
*/ function cliVersionOutput(input) {
|
|
16784
|
+
var version = input.version, rawArgv = input.rawArgv, manifestGeneratorVersion = input.manifestGeneratorVersion;
|
|
16785
|
+
var wantsVersion = rawArgv.includes('--version') || rawArgv.includes('-V');
|
|
16786
|
+
var result = version;
|
|
16787
|
+
if (wantsVersion) {
|
|
16788
|
+
var drift = cliBuildDriftDescription(inspectCliBuildDrift(_object_spread$A({}, manifestGeneratorVersion == null ? {} : {
|
|
16789
|
+
manifestGeneratorVersion: manifestGeneratorVersion
|
|
16790
|
+
})));
|
|
16791
|
+
result = drift == null ? version : "".concat(version, "\n").concat(drift);
|
|
16792
|
+
}
|
|
16793
|
+
return result;
|
|
16794
|
+
}
|
|
15857
16795
|
/**
|
|
15858
16796
|
* Convenience helper for app `index.ts` entrypoints — wraps `createCli().parse()` in a try/catch
|
|
15859
16797
|
* that emits a structured error envelope and exits 1 on uncaught failures.
|
|
@@ -22696,6 +23634,237 @@ var FIREBASE_MODELS = [
|
|
|
22696
23634
|
'root-entity'
|
|
22697
23635
|
]
|
|
22698
23636
|
},
|
|
23637
|
+
{
|
|
23638
|
+
name: 'FormSpace',
|
|
23639
|
+
identityConst: 'formSpaceIdentity',
|
|
23640
|
+
modelType: 'formSpace',
|
|
23641
|
+
collectionPrefix: 'fsp',
|
|
23642
|
+
sourcePackage: '@dereekb/firebase',
|
|
23643
|
+
sourceFile: 'packages/firebase/src/lib/model/formspace/formspace.ts',
|
|
23644
|
+
fields: [
|
|
23645
|
+
{
|
|
23646
|
+
name: 't',
|
|
23647
|
+
longName: 'formSpaceType',
|
|
23648
|
+
converter: 'firestoreString<FormSpaceType>()',
|
|
23649
|
+
tsType: 'FormSpaceType',
|
|
23650
|
+
optional: false,
|
|
23651
|
+
description: 'The kind of form this space holds, resolving its upload restrictions, expiration policy, and the server-side handler its submission is dispatched to.'
|
|
23652
|
+
},
|
|
23653
|
+
{
|
|
23654
|
+
name: 'n',
|
|
23655
|
+
longName: 'displayName',
|
|
23656
|
+
converter: 'optionalFirestoreString()',
|
|
23657
|
+
tsType: 'Maybe<string>',
|
|
23658
|
+
optional: true,
|
|
23659
|
+
description: "Display name of the space, for the owner's own list of in-progress forms."
|
|
23660
|
+
},
|
|
23661
|
+
{
|
|
23662
|
+
name: 's',
|
|
23663
|
+
longName: 'state',
|
|
23664
|
+
converter: 'firestoreEnum<FormSpaceState>({ default: FormSpaceState.DRAFT })',
|
|
23665
|
+
tsType: 'FormSpaceState',
|
|
23666
|
+
optional: false,
|
|
23667
|
+
description: 'Lifecycle state. Only DRAFT is editable.',
|
|
23668
|
+
enumRef: 'FormSpaceState'
|
|
23669
|
+
},
|
|
23670
|
+
{
|
|
23671
|
+
name: 'ps',
|
|
23672
|
+
longName: 'processingState',
|
|
23673
|
+
converter: 'firestoreEnum<FormSpaceProcessingState>({ default: FormSpaceProcessingState.INIT_OR_NONE })',
|
|
23674
|
+
tsType: 'FormSpaceProcessingState',
|
|
23675
|
+
optional: false,
|
|
23676
|
+
description: 'Processing state of the submission.',
|
|
23677
|
+
enumRef: 'FormSpaceProcessingState'
|
|
23678
|
+
},
|
|
23679
|
+
{
|
|
23680
|
+
name: 'd',
|
|
23681
|
+
longName: 'data',
|
|
23682
|
+
converter: 'optionalFirestorePassthroughJsonField<FormSpaceData>({ dontStoreIfEmpty: true })',
|
|
23683
|
+
tsType: 'Maybe<T>',
|
|
23684
|
+
optional: true,
|
|
23685
|
+
description: "The form's own values, stored as pass-through JSON."
|
|
23686
|
+
},
|
|
23687
|
+
{
|
|
23688
|
+
name: 'u',
|
|
23689
|
+
longName: 'userId',
|
|
23690
|
+
converter: 'firestoreUID()',
|
|
23691
|
+
tsType: 'FirebaseAuthUserId',
|
|
23692
|
+
optional: false,
|
|
23693
|
+
description: 'The user the space belongs to. Set at creation and never changed.'
|
|
23694
|
+
},
|
|
23695
|
+
{
|
|
23696
|
+
name: 'o',
|
|
23697
|
+
longName: 'ownerKey',
|
|
23698
|
+
converter: 'optionalFirestoreString()',
|
|
23699
|
+
tsType: 'Maybe<FirebaseAuthOwnershipKey>',
|
|
23700
|
+
optional: true,
|
|
23701
|
+
description: 'Ownership key, if applicable. Drives read access in the security rules.'
|
|
23702
|
+
},
|
|
23703
|
+
{
|
|
23704
|
+
name: 'm',
|
|
23705
|
+
longName: 'targetModelKey',
|
|
23706
|
+
converter: 'optionalFirestoreString()',
|
|
23707
|
+
tsType: 'Maybe<FirestoreModelKey>',
|
|
23708
|
+
optional: true,
|
|
23709
|
+
description: 'Key of the model this space was opened against, when it was opened against one.'
|
|
23710
|
+
},
|
|
23711
|
+
{
|
|
23712
|
+
name: 'uc',
|
|
23713
|
+
longName: 'uploadCount',
|
|
23714
|
+
converter: 'firestoreNumber({ default: 0 })',
|
|
23715
|
+
tsType: 'number',
|
|
23716
|
+
optional: false,
|
|
23717
|
+
description: 'Monotonic count of uploads this space has ACCEPTED over its whole lifetime.'
|
|
23718
|
+
},
|
|
23719
|
+
{
|
|
23720
|
+
name: 'fi',
|
|
23721
|
+
longName: 'nextFileIndex',
|
|
23722
|
+
converter: 'firestoreNumber({ default: 0 })',
|
|
23723
|
+
tsType: 'number',
|
|
23724
|
+
optional: false,
|
|
23725
|
+
description: "The next index a file's permanent storage path is keyed by."
|
|
23726
|
+
},
|
|
23727
|
+
{
|
|
23728
|
+
name: 'f',
|
|
23729
|
+
longName: 'files',
|
|
23730
|
+
converter: 'firestoreObjectArray({ objectField: formSpaceFileSubObject })',
|
|
23731
|
+
tsType: 'FormSpaceFile[]',
|
|
23732
|
+
optional: false,
|
|
23733
|
+
description: 'Every file the space currently holds, across every slot.'
|
|
23734
|
+
},
|
|
23735
|
+
{
|
|
23736
|
+
name: 'pn',
|
|
23737
|
+
longName: 'processingNotificationKey',
|
|
23738
|
+
converter: 'optionalFirestoreString()',
|
|
23739
|
+
tsType: 'Maybe<NotificationKey>',
|
|
23740
|
+
optional: true,
|
|
23741
|
+
description: "The NotificationTask key processing this space's submission."
|
|
23742
|
+
},
|
|
23743
|
+
{
|
|
23744
|
+
name: 'pat',
|
|
23745
|
+
longName: 'processingAt',
|
|
23746
|
+
converter: 'optionalFirestoreDate()',
|
|
23747
|
+
tsType: 'Maybe<Date>',
|
|
23748
|
+
optional: true,
|
|
23749
|
+
description: 'The date `ps` was last moved to PROCESSING. Used to detect a stuck task.'
|
|
23750
|
+
},
|
|
23751
|
+
{
|
|
23752
|
+
name: 'cat',
|
|
23753
|
+
longName: 'createdAt',
|
|
23754
|
+
converter: 'firestoreDate({ saveDefaultAsNow: true })',
|
|
23755
|
+
tsType: 'Date',
|
|
23756
|
+
optional: false,
|
|
23757
|
+
description: 'Created at date.'
|
|
23758
|
+
},
|
|
23759
|
+
{
|
|
23760
|
+
name: 'uat',
|
|
23761
|
+
longName: 'updatedAt',
|
|
23762
|
+
converter: 'firestoreDate({ saveDefaultAsNow: true })',
|
|
23763
|
+
tsType: 'Date',
|
|
23764
|
+
optional: false,
|
|
23765
|
+
description: 'Updated at date. Moves on every content change.'
|
|
23766
|
+
},
|
|
23767
|
+
{
|
|
23768
|
+
name: 'sat',
|
|
23769
|
+
longName: 'submittedAt',
|
|
23770
|
+
converter: 'optionalFirestoreDate()',
|
|
23771
|
+
tsType: 'Maybe<Date>',
|
|
23772
|
+
optional: true,
|
|
23773
|
+
description: 'The date the space was submitted, if it was. Its presence IS the lock.'
|
|
23774
|
+
},
|
|
23775
|
+
{
|
|
23776
|
+
name: 'cpat',
|
|
23777
|
+
longName: 'completedAt',
|
|
23778
|
+
converter: 'optionalFirestoreDate()',
|
|
23779
|
+
tsType: 'Maybe<Date>',
|
|
23780
|
+
optional: true,
|
|
23781
|
+
description: 'The date processing of the submission concluded, if it has.'
|
|
23782
|
+
},
|
|
23783
|
+
{
|
|
23784
|
+
name: 'eat',
|
|
23785
|
+
longName: 'expiresAt',
|
|
23786
|
+
converter: 'optionalFirestoreDate()',
|
|
23787
|
+
tsType: 'Maybe<Date>',
|
|
23788
|
+
optional: true,
|
|
23789
|
+
description: 'The date this space becomes eligible for the expiration sweep, if it expires at all.'
|
|
23790
|
+
}
|
|
23791
|
+
],
|
|
23792
|
+
enums: [
|
|
23793
|
+
{
|
|
23794
|
+
name: 'FormSpaceState',
|
|
23795
|
+
values: [
|
|
23796
|
+
{
|
|
23797
|
+
name: 'DRAFT',
|
|
23798
|
+
value: 0
|
|
23799
|
+
},
|
|
23800
|
+
{
|
|
23801
|
+
name: 'SUBMITTED',
|
|
23802
|
+
value: 1
|
|
23803
|
+
},
|
|
23804
|
+
{
|
|
23805
|
+
name: 'EXPIRED',
|
|
23806
|
+
value: 2
|
|
23807
|
+
},
|
|
23808
|
+
{
|
|
23809
|
+
name: 'ARCHIVED',
|
|
23810
|
+
value: 3
|
|
23811
|
+
}
|
|
23812
|
+
],
|
|
23813
|
+
description: 'Lifecycle state of a {@link FormSpace}.'
|
|
23814
|
+
},
|
|
23815
|
+
{
|
|
23816
|
+
name: 'FormSpaceProcessingState',
|
|
23817
|
+
values: [
|
|
23818
|
+
{
|
|
23819
|
+
name: 'INIT_OR_NONE',
|
|
23820
|
+
value: 0
|
|
23821
|
+
},
|
|
23822
|
+
{
|
|
23823
|
+
name: 'QUEUED_FOR_PROCESSING',
|
|
23824
|
+
value: 1
|
|
23825
|
+
},
|
|
23826
|
+
{
|
|
23827
|
+
name: 'PROCESSING',
|
|
23828
|
+
value: 2
|
|
23829
|
+
},
|
|
23830
|
+
{
|
|
23831
|
+
name: 'FAILED',
|
|
23832
|
+
value: 3
|
|
23833
|
+
},
|
|
23834
|
+
{
|
|
23835
|
+
name: 'SUCCESS',
|
|
23836
|
+
value: 4
|
|
23837
|
+
},
|
|
23838
|
+
{
|
|
23839
|
+
name: 'DO_NOT_PROCESS',
|
|
23840
|
+
value: 5
|
|
23841
|
+
}
|
|
23842
|
+
],
|
|
23843
|
+
description: 'Processing state of a submitted {@link FormSpace}.'
|
|
23844
|
+
}
|
|
23845
|
+
],
|
|
23846
|
+
detectionHints: [
|
|
23847
|
+
't',
|
|
23848
|
+
'n',
|
|
23849
|
+
'ps',
|
|
23850
|
+
'm',
|
|
23851
|
+
'uc',
|
|
23852
|
+
'f',
|
|
23853
|
+
'pn',
|
|
23854
|
+
'pat',
|
|
23855
|
+
'uat',
|
|
23856
|
+
'sat',
|
|
23857
|
+
'cpat',
|
|
23858
|
+
'eat'
|
|
23859
|
+
],
|
|
23860
|
+
description: 'A type-registered container for a client-side form: its in-progress JSON, its uploads, and its submission state.',
|
|
23861
|
+
modelGroup: 'FormSpace',
|
|
23862
|
+
collectionKind: 'root',
|
|
23863
|
+
archetypes: [
|
|
23864
|
+
'root-entity',
|
|
23865
|
+
'state-machine-item'
|
|
23866
|
+
]
|
|
23867
|
+
},
|
|
22699
23868
|
{
|
|
22700
23869
|
name: 'NotificationBox',
|
|
22701
23870
|
identityConst: 'notificationBoxIdentity',
|
|
@@ -23918,6 +25087,16 @@ var FIREBASE_MODEL_GROUPS = [
|
|
|
23918
25087
|
'Calendar'
|
|
23919
25088
|
]
|
|
23920
25089
|
},
|
|
25090
|
+
{
|
|
25091
|
+
name: 'FormSpace',
|
|
25092
|
+
containerName: 'FormSpaceFirestoreCollections',
|
|
25093
|
+
sourcePackage: '@dereekb/firebase',
|
|
25094
|
+
sourceFile: 'packages/firebase/src/lib/model/formspace/formspace.ts',
|
|
25095
|
+
description: 'Abstract base providing access to the FormSpace Firestore collection.',
|
|
25096
|
+
modelNames: [
|
|
25097
|
+
'FormSpace'
|
|
25098
|
+
]
|
|
25099
|
+
},
|
|
23921
25100
|
{
|
|
23922
25101
|
name: 'Notification',
|
|
23923
25102
|
containerName: 'NotificationFirestoreCollections',
|
|
@@ -24007,6 +25186,11 @@ var FIREBASE_MODEL_GROUPS = [
|
|
|
24007
25186
|
reason: 'StorageFile is a canonical group from `@dereekb/firebase` with a richer layout than the base 5 files (group, upload, file, etc.); downstream projects extend rather than redeclare it.',
|
|
24008
25187
|
recommendedTool: 'dbx_storagefile_m_validate_folder'
|
|
24009
25188
|
},
|
|
25189
|
+
{
|
|
25190
|
+
name: 'formspace',
|
|
25191
|
+
reason: 'FormSpace is a canonical group from `@dereekb/firebase` with a richer layout than the base 5 files (type, upload, task, util, etc.); a downstream project only registers its own types and does not redeclare the model.',
|
|
25192
|
+
recommendedTool: 'dbx_model_validate_folder'
|
|
25193
|
+
},
|
|
24010
25194
|
{
|
|
24011
25195
|
name: 'calendar',
|
|
24012
25196
|
reason: 'Calendar is a canonical group from `@dereekb/firebase` with a richer layout than the base 5 files (type, expand, ics, processing, etc.); downstream projects extend rather than redeclare it.',
|
|
@@ -66054,4 +67238,4 @@ function printPaginatedOutput(input) {
|
|
|
66054
67238
|
})();
|
|
66055
67239
|
}
|
|
66056
67240
|
|
|
66057
|
-
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, CLI_FIRESTORE_SESSION_EXPIRY_BUFFER_MS, CLI_FIRESTORE_SESSION_MAX_CACHE_MS, CLI_READ_VIA_EPILOGUE, CLI_READ_VIA_VALUES, 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_FIREBASE_EMULATOR_HOST, DEFAULT_CLI_HTTP_TIMEOUT_MS, DEFAULT_CLI_OIDC_SCOPES, DEFAULT_CLI_READ_VIA, 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_FIRESTORE_GET_COMMAND_NAME, DEFAULT_FIRESTORE_QUERIES_COMMAND_NAME, DEFAULT_FIRESTORE_QUERY_COMMAND_NAME, 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, FIRESTORE_QUERY_PARENT_REQUIRED_CODE, FIRESTORE_QUERY_UNAVAILABLE_CODE, FIRESTORE_SESSION_API_PATH, FIRESTORE_SESSION_DOCTOR_CHECK_NAME, 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_IS_SERVER_ONLY_CODE, 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, STDIN_NOT_PIPED_ERROR_CODE, 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, appendCliErrorMapper, applyEnvVarOverrides, assertCliFirestoreQueryCanRun, assertCliFirestoreQueryParentKey, assertCliModelIsNotServerOnly, buildActionCommands, buildActionsManifest, buildAuthorizationUrl, buildCliPaths, buildCssUtilitiesManifest, buildDbxDocsUiExamplesManifest, buildDisambiguatedMcpToolName, buildDispatcherCreditByName, buildDumpFilePath, buildErrorOutput, buildFiltersManifest, buildFirestoreGetCommand, buildFirestoreQueriesCommand, buildFirestoreQueryCommand, buildFirestoreSessionDoctorReadRouting, buildForgeFieldsManifest, buildManifest, buildManifestCommands, buildMcpToolName, buildModelDecodeCommand, buildModelInfoCommand, buildModelSnapshotFieldsManifest, buildPipesManifest, buildRouteManifest, buildRouteTree, buildScanProject, buildUiComponentsManifest, buildUtilsManifest, callModelOverHttp, clearDownstreamCatalogCache, cliFirebaseAppName, cliFirebaseEmulatorsInUse, cliFirestoreAccessorFactory, cliFirestoreBinding, cliFirestoreCollectionForQuery, cliFirestoreErrorMapper, cliFirestoreQueryConstraints, cliFirestoreQueryMode, cliFirestoreQueryModeForRules, cliFirestoreSessionEntryExpiresAt, cliLifecycleRunner, cliReadResultMeta, closeAllCliFirebaseApps, closeCliFirestoreSessionContext, coerceCliReadVia, collectClassPropertiesWithInheritance, computeRelativeSpecifiers, configureCliErrorMapper, configureCliSecretPatterns, configureOutputOptions, createActionCommand, createActionRegistry, createActionRegistryFromEntries, createAuthCommand, createAuthMiddleware, createAuthRegistryFromEntries, createCallModelCommand, createCli, createCliContext, createCliFirestoreModels, createCliFirestoreQueryRegistry, createCliFirestoreSessionCacheStore, createCliFirestoreSessionContext, createCliTokenCacheStore, createContextSlot, createCssUtilityRegistry, createCssUtilityRegistryFromEntries, createDbxDocsUiExamplesRegistry, createDbxDocsUiExamplesRegistryFromEntries, createDoctorCommand, createEnvCommand, createFilterRegistry, createFilterRegistryFromEntries, createFirestoreSessionDoctorCheck, createForgeFieldRegistry, createForgeFieldRegistryFromEntries, createModelSnapshotFieldRegistry, createModelSnapshotFieldRegistryFromEntries, createOutputCommand, createOutputMiddleware, createPassthroughAuthMiddleware, createPipeRegistry, createPipeRegistryFromEntries, createSemanticTypeRegistry, createSemanticTypeRegistryFromEntries, createTokenRegistry, createTokenRegistryFromEntries, createUiComponentRegistry, createUiComponentRegistryFromEntries, createUtilRegistry, createUtilRegistryFromEntries, decodeFirestoreModelKey, defaultDoctorChecks, defaultGlobber, defaultReadFile, deriveOptionalFromName, describeCliFirestoreQueryMode, 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, fetchFirestoreSession, fetchSessionInfo, fetchUserInfo, filterCliFirestoreQueries, filterReadOnlyModelScopes, findAndLoadConfig, findCliEnvDefault, findCliModelManifestEntry, flattenList, formatGeneratedTs, 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, getModelOverFirestore, getModelOverHttp, getMultipleModelsOverFirestore, getMultipleModelsOverHttp, getMultipleModelsOverHttpChunked, getOutputOptions, globToRegex, hasParamSegment, indentLines$1 as indentLines, isCliEnvConfigComplete, isCliFirebaseConfigComplete, isCliFirestoreQueryInvocable, isCliFirestoreSessionExpired, isCliVerbose, isCoreTopic, isExportedFromPackage, isStdinPositionalSentinel, 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, mergeCliFirebaseConfig, 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, renderCliFirestoreQueryEntry, renderCliFirestoreQueryList, renderDecodedKey, renderGroupedImportLines, renderModelManifestEntry, renderModelManifestFields, renderModelManifestList, renderTable, requireCliContext, requireCliFirestoreContext, requireCliFirestoreModels, requireCliFirestoreSession, resolveActiveEnvName, resolveCliEnv, resolveCliEnvOrThrow, resolveCliFirestoreQueryArgs, resolveCliFirestoreQueryEntry, resolveCliModel, resolveCliReadSource, resolveComponentSourceFromSources, resolveDemoClaimsPath, resolveExplicitFirebasePackages, resolveExtendsName, resolveModelArchetype, resolveOutputConfig, resolvePerModelGetKey, resolveRouteSources, revokeToken, runActionsScanCli, runCli, runCliFirestoreQuery, 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, setCliRawArgv, setCliTimeoutMs, setCliVerbose, splitListTagText$1 as splitListTagText, splitSegments, stripUrlQueryAndHash, toActionEntryInfo, toFilterEntryInfo, toFormFieldInfo, tracedFetch, truncate, tryMatchSegments, unwrapFenced, validateMcpToolName, verboseLog, withCallModelArgs, withEnv, withMultiplePages, withOutput, withServiceTokenScopes, wrapCommandHandler, wrapSyncCommandHandler, writeGeneratedTsFile };
|
|
67241
|
+
export { ACTIONS_SCAN_CONFIG_FILENAME, ACTION_ENTRY_ROLES, ACTION_ROLE_ORDER, ActionDirectiveEntry, ActionEntry, ActionInputEntry, ActionManifest, ActionOutputEntry, ActionStateEntry, ActionStoreEntry, ActionStoreMethodEntry, ActionStoreObservableEntry, ActionsScanConfig, ActionsScanSection, BUILD_DRIFT_DOCTOR_CHECK_NAME, BUILTIN_AUTH_CLAIMS, BUILTIN_AUTH_ROLES, BUILTIN_AUTH_SCOPES, CALL_MODEL_API_PATH, CALL_PASSTHROUGH_COMMAND, CLI_CLIENT_FIRESTORE_DRIVER_IDENTIFIER, CLI_EXIT_CODE_AUTH, CLI_EXIT_CODE_HANDLER, CLI_FIRESTORE_SESSION_EXPIRY_BUFFER_MS, CLI_FIRESTORE_SESSION_MAX_CACHE_MS, CLI_FRAMEWORK_PACKAGE_PREFIX, CLI_READ_VIA_EPILOGUE, CLI_READ_VIA_VALUES, 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_FIREBASE_EMULATOR_HOST, DEFAULT_CLI_HTTP_TIMEOUT_MS, DEFAULT_CLI_OIDC_SCOPES, DEFAULT_CLI_READ_VIA, 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_FIRESTORE_GET_COMMAND_NAME, DEFAULT_FIRESTORE_QUERIES_COMMAND_NAME, DEFAULT_FIRESTORE_QUERY_COMMAND_NAME, 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, FIRESTORE_COLLECTION_UNRESOLVABLE_CODE, FIRESTORE_QUERY_PARENT_REQUIRED_CODE, FIRESTORE_QUERY_UNAVAILABLE_CODE, FIRESTORE_SDK_IDENTITY_STAGE, FIRESTORE_SDK_INSTANCE_MISMATCH_CODE, FIRESTORE_SESSION_API_PATH, FIRESTORE_SESSION_DOCTOR_CHECK_NAME, 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_IS_SERVER_ONLY_CODE, 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, STDIN_NOT_PIPED_ERROR_CODE, 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, appendCliErrorMapper, applyEnvVarOverrides, assertCliFirestoreQueryCanRun, assertCliFirestoreQueryParentKey, assertCliModelIsNotServerOnly, buildActionCommands, buildActionsManifest, buildAuthorizationUrl, buildCliPaths, buildCssUtilitiesManifest, buildDbxDocsUiExamplesManifest, buildDisambiguatedMcpToolName, buildDispatcherCreditByName, buildDumpFilePath, buildErrorOutput, buildFiltersManifest, buildFirestoreGetCommand, buildFirestoreQueriesCommand, buildFirestoreQueryCommand, buildFirestoreSessionDoctorReadRouting, buildForgeFieldsManifest, buildManifest, buildManifestCommands, buildMcpToolName, buildModelDecodeCommand, buildModelInfoCommand, buildModelSnapshotFieldsManifest, buildPipesManifest, buildRouteManifest, buildRouteTree, buildScanProject, buildUiComponentsManifest, buildUtilsManifest, callModelOverHttp, clearDownstreamCatalogCache, cliBuildDriftDescription, cliFirebaseAppName, cliFirebaseEmulatorsInUse, cliFirestoreAccessorFactory, cliFirestoreBinding, cliFirestoreCollectionForQuery, cliFirestoreErrorMapper, cliFirestoreQueryConstraints, cliFirestoreQueryMode, cliFirestoreQueryModeForRules, cliFirestoreSdkIdentitySuggestion, cliFirestoreSessionEntryExpiresAt, cliFirestoreWiringError, cliLifecycleRunner, cliReadResultMeta, closeAllCliFirebaseApps, closeCliFirestoreSessionContext, coerceCliReadVia, collectClassPropertiesWithInheritance, computeRelativeSpecifiers, configureCliErrorMapper, configureCliSecretPatterns, configureOutputOptions, createActionCommand, createActionRegistry, createActionRegistryFromEntries, createAuthCommand, createAuthMiddleware, createAuthRegistryFromEntries, createCallModelCommand, createCli, createCliBuildDriftDoctorCheck, createCliContext, createCliFirestoreModels, createCliFirestoreQueryRegistry, createCliFirestoreSessionCacheStore, createCliFirestoreSessionContext, createCliTokenCacheStore, createContextSlot, createCssUtilityRegistry, createCssUtilityRegistryFromEntries, createDbxDocsUiExamplesRegistry, createDbxDocsUiExamplesRegistryFromEntries, createDoctorCommand, createEnvCommand, createFilterRegistry, createFilterRegistryFromEntries, createFirestoreSessionDoctorCheck, createForgeFieldRegistry, createForgeFieldRegistryFromEntries, createModelSnapshotFieldRegistry, createModelSnapshotFieldRegistryFromEntries, createOutputCommand, createOutputMiddleware, createPassthroughAuthMiddleware, createPipeRegistry, createPipeRegistryFromEntries, createSemanticTypeRegistry, createSemanticTypeRegistryFromEntries, createTokenRegistry, createTokenRegistryFromEntries, createUiComponentRegistry, createUiComponentRegistryFromEntries, createUtilRegistry, createUtilRegistryFromEntries, decodeFirestoreModelKey, defaultDoctorChecks, defaultGlobber, defaultReadFile, deriveOptionalFromName, describeCliFirestoreQueryMode, 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, fetchFirestoreSession, fetchSessionInfo, fetchUserInfo, filterCliFirestoreQueries, filterReadOnlyModelScopes, findAndLoadConfig, findCliEnvDefault, findCliModelManifestEntry, flattenList, formatGeneratedTs, 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, getModelOverFirestore, getModelOverHttp, getMultipleModelsOverFirestore, getMultipleModelsOverHttp, getMultipleModelsOverHttpChunked, getOutputOptions, globToRegex, hasParamSegment, indentLines$1 as indentLines, inspectCliBuildDrift, inspectCliFirestoreSdkIdentity, isCliEnvConfigComplete, isCliFirebaseConfigComplete, isCliFirestoreQueryInvocable, isCliFirestoreSessionExpired, isCliVerbose, isCoreTopic, isExportedFromPackage, isStdinPositionalSentinel, 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, mergeCliFirebaseConfig, mergeOutputConfig, normalizePathname, oidcRelyingPartyErrorToCliError, openStreamingDump, outputError, outputResult, packageNameToSlug, parseAnnotation, parseDeclarations$1 as parseDeclarations, parseFirestoreModelIdentityArgs, parseGetArgs, parseGetManyArgs, parsePastedRedirect, parseRouteModelTag, parseScanArgs, pickFields, promptLine, readAllStdin, readCliArtifactPackage, readDirectiveDecorator, readEnvTokenEntry, readPropertyDescription, readSelector, readStdinTokens, readStringProperty, refreshAccessToken, renderCliFirestoreQueryEntry, renderCliFirestoreQueryList, renderDecodedKey, renderGroupedImportLines, renderModelManifestEntry, renderModelManifestFields, renderModelManifestList, renderTable, requireCliContext, requireCliFirestoreContext, requireCliFirestoreModels, requireCliFirestoreSession, resolveActiveEnvName, resolveCliEnv, resolveCliEnvOrThrow, resolveCliFirestoreQueryArgs, resolveCliFirestoreQueryEntry, resolveCliModel, resolveCliReadSource, resolveComponentSourceFromSources, resolveDemoClaimsPath, resolveExplicitFirebasePackages, resolveExtendsName, resolveModelArchetype, resolveOutputConfig, resolvePerModelGetKey, resolveRouteSources, revokeToken, runActionsScanCli, runCli, runCliFirestoreQuery, 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, setCliRawArgv, setCliTimeoutMs, setCliVerbose, splitListTagText$1 as splitListTagText, splitSegments, stripUrlQueryAndHash, toActionEntryInfo, toFilterEntryInfo, toFormFieldInfo, tracedFetch, truncate, tryMatchSegments, unwrapFenced, validateMcpToolName, verboseLog, withCallModelArgs, withEnv, withMultiplePages, withOutput, withServiceTokenScopes, wrapCommandHandler, wrapSyncCommandHandler, writeGeneratedTsFile };
|