@react-native-firebase/app-check 23.7.0 → 23.8.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/dist/commonjs/ReactNativeFirebaseAppCheckProvider.js +19 -0
- package/dist/commonjs/ReactNativeFirebaseAppCheckProvider.js.map +1 -0
- package/dist/commonjs/index.js +38 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/modular.js +124 -0
- package/dist/commonjs/modular.js.map +1 -0
- package/dist/commonjs/namespaced.js +212 -0
- package/dist/commonjs/namespaced.js.map +1 -0
- package/dist/commonjs/package.json +1 -0
- package/dist/commonjs/types/appcheck.js +93 -0
- package/dist/commonjs/types/appcheck.js.map +1 -0
- package/dist/commonjs/version.js +9 -0
- package/dist/commonjs/version.js.map +1 -0
- package/dist/commonjs/web/RNFBAppCheckModule.android.js +9 -0
- package/dist/commonjs/web/RNFBAppCheckModule.android.js.map +2 -0
- package/dist/commonjs/web/RNFBAppCheckModule.ios.js +9 -0
- package/dist/commonjs/web/RNFBAppCheckModule.ios.js.map +2 -0
- package/dist/commonjs/web/RNFBAppCheckModule.js +97 -0
- package/dist/commonjs/web/RNFBAppCheckModule.js.map +1 -0
- package/dist/module/ReactNativeFirebaseAppCheckProvider.js +14 -0
- package/dist/module/ReactNativeFirebaseAppCheckProvider.js.map +1 -0
- package/{ios/RNFBAppCheck/RNFBAppCheckModule.h → dist/module/index.js} +10 -12
- package/dist/module/index.js.map +1 -0
- package/dist/module/modular.js +110 -0
- package/dist/module/modular.js.map +1 -0
- package/{lib/index.js → dist/module/namespaced.js} +50 -80
- package/dist/module/namespaced.js.map +1 -0
- package/dist/module/package.json +1 -0
- package/dist/module/types/appcheck.js +89 -0
- package/dist/module/types/appcheck.js.map +1 -0
- package/dist/module/version.js +5 -0
- package/dist/module/version.js.map +1 -0
- package/dist/module/web/RNFBAppCheckModule.android.js +5 -0
- package/dist/module/web/RNFBAppCheckModule.android.js.map +2 -0
- package/dist/module/web/RNFBAppCheckModule.ios.js +5 -0
- package/dist/module/web/RNFBAppCheckModule.ios.js.map +2 -0
- package/dist/module/web/RNFBAppCheckModule.js +88 -0
- package/dist/module/web/RNFBAppCheckModule.js.map +1 -0
- package/dist/typescript/commonjs/lib/ReactNativeFirebaseAppCheckProvider.d.ts +8 -0
- package/dist/typescript/commonjs/lib/ReactNativeFirebaseAppCheckProvider.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/index.d.ts +5 -0
- package/dist/typescript/commonjs/lib/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/modular.d.ts +57 -0
- package/dist/typescript/commonjs/lib/modular.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/namespaced.d.ts +17 -0
- package/dist/typescript/commonjs/lib/namespaced.d.ts.map +1 -0
- package/{lib/index.d.ts → dist/typescript/commonjs/lib/types/appcheck.d.ts} +162 -221
- package/dist/typescript/commonjs/lib/types/appcheck.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/version.d.ts +2 -0
- package/dist/typescript/commonjs/lib/version.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/web/RNFBAppCheckModule.android.d.ts +3 -0
- package/dist/typescript/commonjs/lib/web/RNFBAppCheckModule.android.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/web/RNFBAppCheckModule.d.ts +18 -0
- package/dist/typescript/commonjs/lib/web/RNFBAppCheckModule.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/web/RNFBAppCheckModule.ios.d.ts +3 -0
- package/dist/typescript/commonjs/lib/web/RNFBAppCheckModule.ios.d.ts.map +1 -0
- package/dist/typescript/commonjs/package.json +1 -0
- package/dist/typescript/module/lib/ReactNativeFirebaseAppCheckProvider.d.ts +8 -0
- package/dist/typescript/module/lib/ReactNativeFirebaseAppCheckProvider.d.ts.map +1 -0
- package/dist/typescript/module/lib/index.d.ts +5 -0
- package/dist/typescript/module/lib/index.d.ts.map +1 -0
- package/dist/typescript/module/lib/modular.d.ts +57 -0
- package/dist/typescript/module/lib/modular.d.ts.map +1 -0
- package/dist/typescript/module/lib/namespaced.d.ts +17 -0
- package/dist/typescript/module/lib/namespaced.d.ts.map +1 -0
- package/dist/typescript/module/lib/types/appcheck.d.ts +299 -0
- package/dist/typescript/module/lib/types/appcheck.d.ts.map +1 -0
- package/dist/typescript/module/lib/version.d.ts +2 -0
- package/dist/typescript/module/lib/version.d.ts.map +1 -0
- package/dist/typescript/module/lib/web/RNFBAppCheckModule.android.d.ts +3 -0
- package/dist/typescript/module/lib/web/RNFBAppCheckModule.android.d.ts.map +1 -0
- package/dist/typescript/module/lib/web/RNFBAppCheckModule.d.ts +18 -0
- package/dist/typescript/module/lib/web/RNFBAppCheckModule.d.ts.map +1 -0
- package/dist/typescript/module/lib/web/RNFBAppCheckModule.ios.d.ts +3 -0
- package/dist/typescript/module/lib/web/RNFBAppCheckModule.ios.d.ts.map +1 -0
- package/dist/typescript/module/package.json +1 -0
- package/lib/ReactNativeFirebaseAppCheckProvider.ts +21 -0
- package/lib/index.ts +46 -0
- package/lib/modular.ts +157 -0
- package/lib/namespaced.ts +305 -0
- package/lib/types/appcheck.ts +386 -0
- package/lib/version.ts +2 -0
- package/lib/web/RNFBAppCheckModule.android.ts +4 -0
- package/lib/web/RNFBAppCheckModule.ios.ts +4 -0
- package/lib/web/RNFBAppCheckModule.ts +115 -0
- package/package.json +64 -8
- package/tsconfig.json +21 -0
- package/CHANGELOG.md +0 -773
- package/RNFBAppCheck.podspec +0 -50
- package/android/.editorconfig +0 -10
- package/android/build.gradle +0 -110
- package/android/lint.xml +0 -5
- package/android/settings.gradle +0 -1
- package/android/src/main/AndroidManifest.xml +0 -7
- package/android/src/main/java/io/invertase/firebase/appcheck/ReactNativeFirebaseAppCheckModule.java +0 -281
- package/android/src/main/java/io/invertase/firebase/appcheck/ReactNativeFirebaseAppCheckPackage.java +0 -41
- package/android/src/main/java/io/invertase/firebase/appcheck/ReactNativeFirebaseAppCheckProvider.java +0 -97
- package/android/src/main/java/io/invertase/firebase/appcheck/ReactNativeFirebaseAppCheckProviderFactory.java +0 -67
- package/app.plugin.js +0 -1
- package/ios/RNFBAppCheck/RNFBAppCheckModule.m +0 -171
- package/ios/RNFBAppCheck/RNFBAppCheckProvider.h +0 -33
- package/ios/RNFBAppCheck/RNFBAppCheckProvider.m +0 -90
- package/ios/RNFBAppCheck/RNFBAppCheckProviderFactory.h +0 -28
- package/ios/RNFBAppCheck/RNFBAppCheckProviderFactory.m +0 -61
- package/ios/RNFBAppCheck.xcodeproj/project.pbxproj +0 -349
- package/ios/RNFBAppCheck.xcodeproj/xcshareddata/IDETemplateMacros.plist +0 -24
- package/lib/ReactNativeFirebaseAppCheckProvider.js +0 -9
- package/lib/modular/index.d.ts +0 -149
- package/lib/modular/index.js +0 -102
- package/lib/version.js +0 -2
- package/plugin/build/index.d.ts +0 -3
- package/plugin/build/index.js +0 -15
- package/plugin/build/ios/appDelegate.d.ts +0 -6
- package/plugin/build/ios/appDelegate.js +0 -137
- package/plugin/build/ios/index.d.ts +0 -2
- package/plugin/build/ios/index.js +0 -5
- package/plugin/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
class ReactNativeFirebaseAppCheckProvider {
|
|
8
|
+
constructor() {}
|
|
9
|
+
configure(options) {
|
|
10
|
+
this.providerOptions = options;
|
|
11
|
+
}
|
|
12
|
+
async getToken() {
|
|
13
|
+
// This is a placeholder - the actual implementation is handled by the native modules
|
|
14
|
+
// This method exists to satisfy the AppCheckProvider interface
|
|
15
|
+
throw new Error('getToken() must be called after configure() and is handled by native modules');
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.default = ReactNativeFirebaseAppCheckProvider;
|
|
19
|
+
//# sourceMappingURL=ReactNativeFirebaseAppCheckProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ReactNativeFirebaseAppCheckProvider","constructor","configure","options","providerOptions","getToken","Error","exports","default"],"sourceRoot":"../../lib","sources":["ReactNativeFirebaseAppCheckProvider.ts"],"mappings":";;;;;;AAMe,MAAMA,mCAAmC,CAA6B;EAGnFC,WAAWA,CAAA,EAAG,CAAC;EAEfC,SAASA,CAACC,OAAwB,EAAQ;IACxC,IAAI,CAACC,eAAe,GAAGD,OAAO;EAChC;EAEA,MAAME,QAAQA,CAAA,EAA2B;IACvC;IACA;IACA,MAAM,IAAIC,KAAK,CAAC,8EAA8E,CAAC;EACjG;AACF;AAACC,OAAA,CAAAC,OAAA,GAAAR,mCAAA","ignoreList":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _exportNames = {};
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _namespaced.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _modular = require("./modular.js");
|
|
14
|
+
Object.keys(_modular).forEach(function (key) {
|
|
15
|
+
if (key === "default" || key === "__esModule") return;
|
|
16
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
17
|
+
if (key in exports && exports[key] === _modular[key]) return;
|
|
18
|
+
Object.defineProperty(exports, key, {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _modular[key];
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
var _namespaced = _interopRequireWildcard(require("./namespaced.js"));
|
|
26
|
+
Object.keys(_namespaced).forEach(function (key) {
|
|
27
|
+
if (key === "default" || key === "__esModule") return;
|
|
28
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
29
|
+
if (key in exports && exports[key] === _namespaced[key]) return;
|
|
30
|
+
Object.defineProperty(exports, key, {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _namespaced[key];
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_modular","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_namespaced","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","set","getOwnPropertyDescriptor"],"sourceRoot":"../../lib","sources":["index.ts"],"mappings":";;;;;;;;;;;;AAyCA,IAAAA,QAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,QAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,QAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA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A,CAAAb,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAK,GAAA,IAAAN,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA","ignoreList":[]}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "ReactNativeFirebaseAppCheckProvider", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _ReactNativeFirebaseAppCheckProvider.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
exports.getLimitedUseToken = getLimitedUseToken;
|
|
13
|
+
exports.getToken = getToken;
|
|
14
|
+
exports.initializeAppCheck = initializeAppCheck;
|
|
15
|
+
exports.onTokenChanged = onTokenChanged;
|
|
16
|
+
exports.setTokenAutoRefreshEnabled = setTokenAutoRefreshEnabled;
|
|
17
|
+
var _app = require("@react-native-firebase/app");
|
|
18
|
+
var _common = require("@react-native-firebase/app/lib/common");
|
|
19
|
+
var _ReactNativeFirebaseAppCheckProvider = _interopRequireDefault(require("./ReactNativeFirebaseAppCheckProvider.js"));
|
|
20
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
|
+
/*
|
|
22
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
23
|
+
*
|
|
24
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
25
|
+
* you may not use this library except in compliance with the License.
|
|
26
|
+
* You may obtain a copy of the License at
|
|
27
|
+
*
|
|
28
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
29
|
+
*
|
|
30
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
31
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
32
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
33
|
+
* See the License for the specific language governing permissions and
|
|
34
|
+
* limitations under the License.
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Activate App Check for the given app. Can be called only once per app.
|
|
40
|
+
* @param app - The app to initialize App Check for. Optional.
|
|
41
|
+
* @param options - App Check options.
|
|
42
|
+
* @returns Promise<AppCheck>
|
|
43
|
+
*/
|
|
44
|
+
async function initializeAppCheck(app, options) {
|
|
45
|
+
if (app) {
|
|
46
|
+
const appInstance = (0, _app.getApp)(app.name);
|
|
47
|
+
const appCheck = appInstance.appCheck();
|
|
48
|
+
// @ts-ignore - Extra arg used by deprecation proxy to detect modular calls
|
|
49
|
+
await appCheck.initializeAppCheck.call(appCheck, options, _common.MODULAR_DEPRECATION_ARG);
|
|
50
|
+
return appCheck;
|
|
51
|
+
}
|
|
52
|
+
const appInstance = (0, _app.getApp)();
|
|
53
|
+
const appCheck = appInstance.appCheck();
|
|
54
|
+
// @ts-ignore - Extra arg used by deprecation proxy to detect modular calls
|
|
55
|
+
await appCheck.initializeAppCheck.call(appCheck, options, _common.MODULAR_DEPRECATION_ARG);
|
|
56
|
+
return appCheck;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Get the current App Check token. Attaches to the most recent in-flight request if one is present.
|
|
61
|
+
* Returns null if no token is present and no token requests are in-flight.
|
|
62
|
+
* @param appCheckInstance - The App Check instance.
|
|
63
|
+
* @param forceRefresh - Whether to force refresh the token. Optional
|
|
64
|
+
* @returns Promise<AppCheckTokenResult>
|
|
65
|
+
*/
|
|
66
|
+
function getToken(appCheckInstance, forceRefresh) {
|
|
67
|
+
return appCheckInstance.getToken.call(appCheckInstance, forceRefresh,
|
|
68
|
+
// @ts-ignore - Extra arg used by deprecation proxy to detect modular calls
|
|
69
|
+
_common.MODULAR_DEPRECATION_ARG);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Get a limited-use (consumable) App Check token.
|
|
74
|
+
* For use with server calls to firebase functions or custom backends using the firebase admin SDK.
|
|
75
|
+
* @param appCheckInstance - The App Check instance.
|
|
76
|
+
* @returns Promise<AppCheckTokenResult>
|
|
77
|
+
*/
|
|
78
|
+
function getLimitedUseToken(appCheckInstance) {
|
|
79
|
+
return appCheckInstance.getLimitedUseToken.call(appCheckInstance,
|
|
80
|
+
// @ts-ignore - Extra arg used by deprecation proxy to detect modular calls
|
|
81
|
+
_common.MODULAR_DEPRECATION_ARG);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Set whether App Check will automatically refresh tokens as needed.
|
|
86
|
+
* @param appCheckInstance - The App Check instance.
|
|
87
|
+
* @param isAutoRefreshEnabled - Whether to enable auto-refresh.
|
|
88
|
+
*/
|
|
89
|
+
function setTokenAutoRefreshEnabled(appCheckInstance, isAutoRefreshEnabled) {
|
|
90
|
+
appCheckInstance.setTokenAutoRefreshEnabled.call(appCheckInstance, isAutoRefreshEnabled,
|
|
91
|
+
// @ts-ignore - Extra arg used by deprecation proxy to detect modular calls
|
|
92
|
+
_common.MODULAR_DEPRECATION_ARG);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Registers a listener to changes in the token state. There can be more
|
|
97
|
+
* than one listener registered at the same time for one or more
|
|
98
|
+
* App Check instances. The listeners call back on the UI thread whenever
|
|
99
|
+
* the current token associated with this App Check instance changes.
|
|
100
|
+
*
|
|
101
|
+
* @param appCheckInstance - The App Check instance.
|
|
102
|
+
* @param listener - The listener to register.
|
|
103
|
+
* @returns Unsubscribe
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Registers a listener to changes in the token state. There can be more
|
|
108
|
+
* than one listener registered at the same time for one or more
|
|
109
|
+
* App Check instances. The listeners call back on the UI thread whenever
|
|
110
|
+
* the current token associated with this App Check instance changes.
|
|
111
|
+
*
|
|
112
|
+
* @param appCheckInstance - The App Check instance.
|
|
113
|
+
* @param onNext - The callback function for token changes.
|
|
114
|
+
* @param onError - Optional error callback.
|
|
115
|
+
* @param onCompletion - Optional completion callback.
|
|
116
|
+
* @returns Unsubscribe
|
|
117
|
+
*/
|
|
118
|
+
|
|
119
|
+
function onTokenChanged(appCheckInstance, onNextOrObserver, onError, onCompletion) {
|
|
120
|
+
return appCheckInstance.onTokenChanged.call(appCheckInstance, onNextOrObserver, onError, onCompletion,
|
|
121
|
+
// @ts-ignore - Extra arg used by deprecation proxy to detect modular calls
|
|
122
|
+
_common.MODULAR_DEPRECATION_ARG);
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=modular.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_app","require","_common","_ReactNativeFirebaseAppCheckProvider","_interopRequireDefault","e","__esModule","default","initializeAppCheck","app","options","appInstance","getApp","name","appCheck","call","MODULAR_DEPRECATION_ARG","getToken","appCheckInstance","forceRefresh","getLimitedUseToken","setTokenAutoRefreshEnabled","isAutoRefreshEnabled","onTokenChanged","onNextOrObserver","onError","onCompletion"],"sourceRoot":"../../lib","sources":["modular.ts"],"mappings":";;;;;;;;;;;;;;;;AAiBA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,oCAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAwF,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAnBxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAeA;AACA;AACA;AACA;AACA;AACA;AACO,eAAeG,kBAAkBA,CACtCC,GAAqC,EACrCC,OAAyB,EACN;EACnB,IAAID,GAA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,EAChCC,YAAyB,EACZ;EACb,OAAOR,gBAAgB,CAACK,cAAc,CAACR,IAAI,CACzCG,gBAAgB,EAChBM,gBAAgB,EAChBC,OAAO,EACPC,YAAY;EACZ;EACAV,+BACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.firebase = exports.default = exports.SDK_VERSION = exports.CustomProvider = void 0;
|
|
7
|
+
var _common = require("@react-native-firebase/app/lib/common");
|
|
8
|
+
var _internal = require("@react-native-firebase/app/lib/internal");
|
|
9
|
+
var _reactNative = require("react-native");
|
|
10
|
+
var _ReactNativeFirebaseAppCheckProvider = _interopRequireDefault(require("./ReactNativeFirebaseAppCheckProvider.js"));
|
|
11
|
+
var _nativeModule = require("@react-native-firebase/app/lib/internal/nativeModule");
|
|
12
|
+
var _RNFBAppCheckModule = _interopRequireDefault(require("./web/RNFBAppCheckModule"));
|
|
13
|
+
var _version = require("./version.js");
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
/*
|
|
16
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
17
|
+
*
|
|
18
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
19
|
+
* you may not use this library except in compliance with the License.
|
|
20
|
+
* You may obtain a copy of the License at
|
|
21
|
+
*
|
|
22
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
23
|
+
*
|
|
24
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
25
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
26
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
27
|
+
* See the License for the specific language governing permissions and
|
|
28
|
+
* limitations under the License.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
const namespace = 'appCheck';
|
|
33
|
+
const nativeModuleName = 'RNFBAppCheckModule';
|
|
34
|
+
class CustomProvider {
|
|
35
|
+
constructor(_customProviderOptions) {
|
|
36
|
+
if (!(0, _common.isObject)(_customProviderOptions)) {
|
|
37
|
+
throw new Error('Invalid configuration: no provider options defined.');
|
|
38
|
+
}
|
|
39
|
+
if (!(0, _common.isFunction)(_customProviderOptions.getToken)) {
|
|
40
|
+
throw new Error('Invalid configuration: no getToken function defined.');
|
|
41
|
+
}
|
|
42
|
+
this._customProviderOptions = _customProviderOptions;
|
|
43
|
+
}
|
|
44
|
+
async getToken() {
|
|
45
|
+
return this._customProviderOptions.getToken();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.CustomProvider = CustomProvider;
|
|
49
|
+
const statics = {
|
|
50
|
+
CustomProvider
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Type guard to check if a provider has providerOptions.
|
|
55
|
+
* This provides proper type narrowing for providers that support platform-specific configuration.
|
|
56
|
+
*/
|
|
57
|
+
function hasProviderOptions(provider) {
|
|
58
|
+
return provider !== undefined && 'providerOptions' in provider && provider.providerOptions !== undefined;
|
|
59
|
+
}
|
|
60
|
+
class FirebaseAppCheckModule extends _internal.FirebaseModule {
|
|
61
|
+
constructor(app, config, customUrlOrRegion) {
|
|
62
|
+
super(app, config, customUrlOrRegion);
|
|
63
|
+
this.emitter.addListener(this.eventNameForApp('appCheck_token_changed'), event => {
|
|
64
|
+
this.emitter.emit(this.eventNameForApp('onAppCheckTokenChanged'), event);
|
|
65
|
+
});
|
|
66
|
+
this._listenerCount = 0;
|
|
67
|
+
}
|
|
68
|
+
getIsTokenRefreshEnabledDefault() {
|
|
69
|
+
// no default to start
|
|
70
|
+
let isTokenAutoRefreshEnabled = undefined;
|
|
71
|
+
return isTokenAutoRefreshEnabled;
|
|
72
|
+
}
|
|
73
|
+
newReactNativeFirebaseAppCheckProvider() {
|
|
74
|
+
return new _ReactNativeFirebaseAppCheckProvider.default();
|
|
75
|
+
}
|
|
76
|
+
initializeAppCheck(options) {
|
|
77
|
+
if (_common.isOther) {
|
|
78
|
+
if (!(0, _common.isObject)(options)) {
|
|
79
|
+
throw new Error('Invalid configuration: no options defined.');
|
|
80
|
+
}
|
|
81
|
+
if ((0, _common.isUndefined)(options.provider)) {
|
|
82
|
+
throw new Error('Invalid configuration: no provider defined.');
|
|
83
|
+
}
|
|
84
|
+
return this.native.initializeAppCheck(options);
|
|
85
|
+
}
|
|
86
|
+
// determine token refresh setting, if not specified
|
|
87
|
+
if (!(0, _common.isBoolean)(options.isTokenAutoRefreshEnabled)) {
|
|
88
|
+
const tokenRefresh = this.firebaseJson.app_check_token_auto_refresh;
|
|
89
|
+
if ((0, _common.isBoolean)(tokenRefresh)) {
|
|
90
|
+
options.isTokenAutoRefreshEnabled = tokenRefresh;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// If that was not defined, attempt to use app-wide data collection setting per docs:
|
|
95
|
+
if (!(0, _common.isBoolean)(options.isTokenAutoRefreshEnabled)) {
|
|
96
|
+
const dataCollection = this.firebaseJson.app_data_collection_default_enabled;
|
|
97
|
+
if ((0, _common.isBoolean)(dataCollection)) {
|
|
98
|
+
options.isTokenAutoRefreshEnabled = dataCollection;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// If that also was not defined, the default is documented as true.
|
|
103
|
+
if (!(0, _common.isBoolean)(options.isTokenAutoRefreshEnabled)) {
|
|
104
|
+
options.isTokenAutoRefreshEnabled = true;
|
|
105
|
+
}
|
|
106
|
+
this.native.setTokenAutoRefreshEnabled(options.isTokenAutoRefreshEnabled);
|
|
107
|
+
if (!hasProviderOptions(options.provider)) {
|
|
108
|
+
throw new Error('Invalid configuration: no provider or no provider options defined.');
|
|
109
|
+
}
|
|
110
|
+
const provider = options.provider;
|
|
111
|
+
if (_reactNative.Platform.OS === 'android') {
|
|
112
|
+
if (!(0, _common.isString)(provider.providerOptions?.android?.provider)) {
|
|
113
|
+
throw new Error('Invalid configuration: no android provider configured while on android platform.');
|
|
114
|
+
}
|
|
115
|
+
return this.native.configureProvider(provider.providerOptions.android.provider, provider.providerOptions.android.debugToken);
|
|
116
|
+
}
|
|
117
|
+
if (_reactNative.Platform.OS === 'ios' || _reactNative.Platform.OS === 'macos') {
|
|
118
|
+
if (!(0, _common.isString)(provider.providerOptions?.apple?.provider)) {
|
|
119
|
+
throw new Error('Invalid configuration: no apple provider configured while on apple platform.');
|
|
120
|
+
}
|
|
121
|
+
return this.native.configureProvider(provider.providerOptions.apple.provider, provider.providerOptions.apple.debugToken);
|
|
122
|
+
}
|
|
123
|
+
throw new Error('Unsupported platform: ' + _reactNative.Platform.OS);
|
|
124
|
+
}
|
|
125
|
+
activate(siteKeyOrProvider, isTokenAutoRefreshEnabled) {
|
|
126
|
+
if (_common.isOther) {
|
|
127
|
+
throw new Error('firebase.appCheck().activate(*) is not supported on other platforms');
|
|
128
|
+
}
|
|
129
|
+
if (!(0, _common.isString)(siteKeyOrProvider)) {
|
|
130
|
+
throw new Error('siteKeyOrProvider must be a string value to match firebase-js-sdk API');
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// We wrap our new flexible interface, with compatible defaults
|
|
134
|
+
const rnfbProvider = new _ReactNativeFirebaseAppCheckProvider.default();
|
|
135
|
+
rnfbProvider.configure({
|
|
136
|
+
android: {
|
|
137
|
+
provider: 'playIntegrity'
|
|
138
|
+
},
|
|
139
|
+
apple: {
|
|
140
|
+
provider: 'deviceCheck'
|
|
141
|
+
},
|
|
142
|
+
web: {
|
|
143
|
+
provider: 'reCaptchaV3',
|
|
144
|
+
siteKey: 'none'
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
return this.initializeAppCheck({
|
|
148
|
+
provider: rnfbProvider,
|
|
149
|
+
isTokenAutoRefreshEnabled
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// TODO this is an async call
|
|
154
|
+
setTokenAutoRefreshEnabled(isTokenAutoRefreshEnabled) {
|
|
155
|
+
this.native.setTokenAutoRefreshEnabled(isTokenAutoRefreshEnabled);
|
|
156
|
+
}
|
|
157
|
+
getToken(forceRefresh) {
|
|
158
|
+
if (!forceRefresh) {
|
|
159
|
+
return this.native.getToken(false);
|
|
160
|
+
} else {
|
|
161
|
+
return this.native.getToken(true);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
getLimitedUseToken() {
|
|
165
|
+
return this.native.getLimitedUseToken();
|
|
166
|
+
}
|
|
167
|
+
onTokenChanged(onNextOrObserver, _onError, _onCompletion) {
|
|
168
|
+
// iOS does not provide any native listening feature
|
|
169
|
+
if (_common.isIOS) {
|
|
170
|
+
// eslint-disable-next-line no-console
|
|
171
|
+
console.warn('onTokenChanged is not implemented on IOS, only for Android');
|
|
172
|
+
return () => {};
|
|
173
|
+
}
|
|
174
|
+
const nextFn = (0, _common.parseListenerOrObserver)(onNextOrObserver);
|
|
175
|
+
// let errorFn = function () { };
|
|
176
|
+
// if (onNextOrObserver.error != null) {
|
|
177
|
+
// errorFn = onNextOrObserver.error.bind(onNextOrObserver);
|
|
178
|
+
// }
|
|
179
|
+
// else if (onError) {
|
|
180
|
+
// errorFn = onError;
|
|
181
|
+
// }
|
|
182
|
+
const subscription = this.emitter.addListener(this.eventNameForApp('onAppCheckTokenChanged'), nextFn);
|
|
183
|
+
if (this._listenerCount === 0) this.native.addAppCheckListener();
|
|
184
|
+
this._listenerCount++;
|
|
185
|
+
return () => {
|
|
186
|
+
subscription.remove();
|
|
187
|
+
this._listenerCount--;
|
|
188
|
+
if (this._listenerCount === 0) this.native.removeAppCheckListener();
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
const SDK_VERSION = exports.SDK_VERSION = _version.version;
|
|
193
|
+
const appCheckNamespace = (0, _internal.createModuleNamespace)({
|
|
194
|
+
statics,
|
|
195
|
+
version: _version.version,
|
|
196
|
+
namespace,
|
|
197
|
+
nativeModuleName,
|
|
198
|
+
nativeEvents: ['appCheck_token_changed'],
|
|
199
|
+
hasMultiAppSupport: true,
|
|
200
|
+
hasCustomUrlOrRegionSupport: false,
|
|
201
|
+
ModuleClass: FirebaseAppCheckModule
|
|
202
|
+
});
|
|
203
|
+
// import appCheck from '@react-native-firebase/app-check';
|
|
204
|
+
// appCheck().X(...);
|
|
205
|
+
var _default = exports.default = appCheckNamespace; // import appCheck, { firebase } from '@react-native-firebase/app-check';
|
|
206
|
+
// appCheck().X(...);
|
|
207
|
+
// firebase.appCheck().X(...);
|
|
208
|
+
const firebase = exports.firebase = (0, _internal.getFirebaseRoot)();
|
|
209
|
+
|
|
210
|
+
// Register the interop module for non-native platforms.
|
|
211
|
+
(0, _nativeModule.setReactNativeModule)(nativeModuleName, _RNFBAppCheckModule.default);
|
|
212
|
+
//# sourceMappingURL=namespaced.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_common","require","_internal","_reactNative","_ReactNativeFirebaseAppCheckProvider","_interopRequireDefault","_nativeModule","_RNFBAppCheckModule","_version","e","__esModule","default","namespace","nativeModuleName","CustomProvider","constructor","_customProviderOptions","isObject","Error","isFunction","getToken","exports","statics","hasProviderOptions","provider","undefined","providerOptions","FirebaseAppCheckModule","FirebaseModule","app","config","customUrlOrRegion","emitter","addListener","eventNameForApp","event","emit","_listenerCount","getIsTokenRefreshEnabledDefault","isTokenAutoRefreshEnabled","newReactNativeFirebaseAppCheckProvider","ReactNativeFirebaseAppCheckProvider","initializeAppCheck","options","isOther","isUndefined","native","isBoolean","tokenRefresh","firebaseJson","app_check_token_auto_refresh","dataCollection","app_data_collection_default_enabled","setTokenAutoRefreshEnabled","Platform","OS","isString","android","configureProvider","debugToken","apple","activate","siteKeyOrProvider","rnfbProvider","configure","web","siteKey","forceRefresh","getLimitedUseToken","onTokenChanged","onNextOrObserver","_onError","_onCompletion","isIOS","console","warn","nextFn","parseListenerOrObserver","subscription","addAppCheckListener","remove","removeAppCheckListener","SDK_VERSION","version","appCheckNamespace","createModuleNamespace","nativeEvents","hasMultiAppSupport","hasCustomUrlOrRegionSupport","ModuleClass","_default","firebase","getFirebaseRoot","setReactNativeModule","fallBackModule"],"sourceRoot":"../../lib","sources":["namespaced.ts"],"mappings":";;;;;;AAiBA,IAAAA,OAAA,GAAAC,OAAA;AAUA,IAAAC,SAAA,GAAAD,OAAA;AAMA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,oCAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAF,sBAAA,CAAAJ,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AAAoC,SAAAI,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AArCpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAoCA,MAAMG,SAAS,GAAG,UAAU;AAE5B,MAAMC,gBAAgB,GAAG,oBAAoB;AAEtC,MAAMC,cAAc,CAA6B;EAGtDC,WAAWA,CAACC,sBAA6C,EAAE;IACzD,IAAI,CAAC,IAAAC,gBAAQ,EAACD,sBAAsB,CAAC,EAAE;MACrC,MAAM,IAAIE,KAAK,CAAC,qDAAqD,CAAC;IACxE;IACA,IAAI,CAAC,IAAAC,kBAAU,EAACH,sBAAsB,CAACI,QAAQ,CAAC,EAAE;MAChD,MAAM,IAAIF,KAAK,CAAC,sDAAsD,CAAC;IACzE;IACA,IAAI,CAACF,sBAAsB,GAAGA,sBAAsB;EACtD;EAEA,MAAMI,QAAQA,CAAA,EAAG;IACf,OAAO,IAAI,CAACJ,sBAAsB,CAACI,QAAQ,CAAC,CAAC;EAC/C;AACF;AAACC,OAAA,CAAAP,cAAA,GAAAA,cAAA;AAED,MAAMQ,OAAO,GAAG;E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WAAW,EAAE9D;AACf,CAAC,CAAC;AAWF;AACA;AAAA,IAAA+D,QAAA,GAAArE,OAAA,CAAAV,OAAA,GACeyE,iBAAiB,EAEhC;AACA;AACA;AACO,MAAMO,QAAQ,GAAAtE,OAAA,CAAAsE,QAAA,GACnB,IAAAC,yBAAe,EAAC,CAKf;;AAEH;AACA,IAAAC,kCAAoB,EAAChF,gBAAgB,EAAEiF,2BAAoD,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"commonjs"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FirebaseAppCheckTypes = void 0;
|
|
7
|
+
/*
|
|
8
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
9
|
+
*
|
|
10
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
+
* you may not use this library except in compliance with the License.
|
|
12
|
+
* You may obtain a copy of the License at
|
|
13
|
+
*
|
|
14
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
+
*
|
|
16
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
17
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
+
* See the License for the specific language governing permissions and
|
|
20
|
+
* limitations under the License.
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
// ============ Provider Types ============
|
|
24
|
+
/**
|
|
25
|
+
* An App Check provider. This can be either the built-in reCAPTCHA provider
|
|
26
|
+
* or a custom provider. For more on custom providers, see
|
|
27
|
+
* https://firebase.google.com/docs/app-check/web-custom-provider
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* Function to get an App Check token through a custom provider service.
|
|
31
|
+
*/
|
|
32
|
+
// ============ Options & Result Types ============
|
|
33
|
+
/**
|
|
34
|
+
* Custom provider class.
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
/**
|
|
38
|
+
* Options for App Check initialization.
|
|
39
|
+
*/
|
|
40
|
+
/**
|
|
41
|
+
* The token returned from an `AppCheckProvider`.
|
|
42
|
+
*/
|
|
43
|
+
/**
|
|
44
|
+
* Result returned by `getToken()`.
|
|
45
|
+
*/
|
|
46
|
+
/**
|
|
47
|
+
* The result return from `onTokenChanged`
|
|
48
|
+
*/
|
|
49
|
+
// ============ Observer Types ============
|
|
50
|
+
/**
|
|
51
|
+
* A function that unsubscribes from token changes.
|
|
52
|
+
*/
|
|
53
|
+
// ============ ReactNativeFirebaseAppCheckProvider Types ============
|
|
54
|
+
/**
|
|
55
|
+
* Platform-specific provider options configuration.
|
|
56
|
+
*/
|
|
57
|
+
/**
|
|
58
|
+
* Configuration object for ReactNativeFirebaseAppCheckProvider
|
|
59
|
+
* that can be passed directly with providerOptions (for convenience in initialization).
|
|
60
|
+
* The runtime accepts objects with providerOptions even if they don't have
|
|
61
|
+
* getToken() and configure() methods.
|
|
62
|
+
*/
|
|
63
|
+
/**
|
|
64
|
+
* Type representing providers that have providerOptions.
|
|
65
|
+
* Used for type narrowing in runtime code.
|
|
66
|
+
*/
|
|
67
|
+
// ============ Module Interface ============
|
|
68
|
+
/**
|
|
69
|
+
* App Check module instance - returned from firebase.appCheck() or firebase.app().appCheck()
|
|
70
|
+
*/
|
|
71
|
+
// ============ Statics Interface ============
|
|
72
|
+
/**
|
|
73
|
+
* Static properties available on firebase.appCheck
|
|
74
|
+
*/
|
|
75
|
+
/**
|
|
76
|
+
* FirebaseApp type with appCheck() method.
|
|
77
|
+
* @deprecated Import FirebaseApp from '@react-native-firebase/app' instead.
|
|
78
|
+
* The appCheck() method is added via module augmentation.
|
|
79
|
+
*/
|
|
80
|
+
// ============ Module Augmentation ============
|
|
81
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
82
|
+
/* eslint-enable @typescript-eslint/no-namespace */
|
|
83
|
+
// ============ Backwards Compatibility Namespace ============
|
|
84
|
+
// Helper types to reference outer scope types within the namespace
|
|
85
|
+
// These are needed because TypeScript can't directly alias types with the same name
|
|
86
|
+
/**
|
|
87
|
+
* @deprecated Use the exported types directly instead.
|
|
88
|
+
* FirebaseAppCheckTypes namespace is kept for backwards compatibility.
|
|
89
|
+
*/
|
|
90
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
91
|
+
let FirebaseAppCheckTypes = exports.FirebaseAppCheckTypes = void 0;
|
|
92
|
+
/* eslint-enable @typescript-eslint/no-namespace */
|
|
93
|
+
//# sourceMappingURL=appcheck.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FirebaseAppCheckTypes","exports"],"sourceRoot":"../../../lib","sources":["types/appcheck.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AAEA;AACA;AACA;AACA;AACA;AAQA;AACA;AACA;AAKA;AAEA;AACA;AACA;AACA;AAMA;AACA;AACA;AAqBA;AACA;AACA;AAYA;AACA;AACA;AAQA;AACA;AACA;AAGA;AAcA;AACA;AACA;AAGA;AAqCA;AACA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AAuBA;AACA;AACA;AACA;AAKA;AAEA;AACA;AACA;AAwGA;AAEA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AAGA;AAEA;AAWA;AAEA;AAEA;AACA;AAUA;AACA;AACA;AACA;AACA;AAAA,IACiBA,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA;AAsBtC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["version","exports"],"sourceRoot":"../../lib","sources":["version.ts"],"mappings":";;;;;;AAAA;AACO,MAAMA,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG,QAAQ","ignoreList":[]}
|