@firebase/app-check-compat 0.3.15 → 0.3.16

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.
@@ -4,7 +4,7 @@ import { ReCaptchaV3Provider, ReCaptchaEnterpriseProvider, CustomProvider, initi
4
4
  import { ErrorFactory } from '@firebase/util';
5
5
 
6
6
  const name = "@firebase/app-check-compat";
7
- const version = "0.3.15";
7
+ const version = "0.3.16";
8
8
 
9
9
  /**
10
10
  * @license
package/dist/index.cjs.js CHANGED
@@ -11,8 +11,8 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
11
11
 
12
12
  var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase);
13
13
 
14
- var name = "@firebase/app-check-compat";
15
- var version = "0.3.15";
14
+ const name = "@firebase/app-check-compat";
15
+ const version = "0.3.16";
16
16
 
17
17
  /**
18
18
  * @license
@@ -30,12 +30,11 @@ var version = "0.3.15";
30
30
  * See the License for the specific language governing permissions and
31
31
  * limitations under the License.
32
32
  */
33
- var _a;
34
- var ERRORS = (_a = {},
35
- _a["use-before-activation" /* AppCheckError.USE_BEFORE_ACTIVATION */] = 'App Check is being used before activate() is called for FirebaseApp {$appName}. ' +
36
- 'Call activate() before instantiating other Firebase services.',
37
- _a);
38
- var ERROR_FACTORY = new util.ErrorFactory('appCheck', 'AppCheck', ERRORS);
33
+ const ERRORS = {
34
+ ["use-before-activation" /* AppCheckError.USE_BEFORE_ACTIVATION */]: 'App Check is being used before activate() is called for FirebaseApp {$appName}. ' +
35
+ 'Call activate() before instantiating other Firebase services.'
36
+ };
37
+ const ERROR_FACTORY = new util.ErrorFactory('appCheck', 'AppCheck', ERRORS);
39
38
 
40
39
  /**
41
40
  * @license
@@ -53,12 +52,12 @@ var ERROR_FACTORY = new util.ErrorFactory('appCheck', 'AppCheck', ERRORS);
53
52
  * See the License for the specific language governing permissions and
54
53
  * limitations under the License.
55
54
  */
56
- var AppCheckService = /** @class */ (function () {
57
- function AppCheckService(app) {
55
+ class AppCheckService {
56
+ constructor(app) {
58
57
  this.app = app;
59
58
  }
60
- AppCheckService.prototype.activate = function (siteKeyOrProvider, isTokenAutoRefreshEnabled) {
61
- var provider;
59
+ activate(siteKeyOrProvider, isTokenAutoRefreshEnabled) {
60
+ let provider;
62
61
  if (typeof siteKeyOrProvider === 'string') {
63
62
  provider = new appCheck.ReCaptchaV3Provider(siteKeyOrProvider);
64
63
  }
@@ -71,27 +70,27 @@ var AppCheckService = /** @class */ (function () {
71
70
  provider = new appCheck.CustomProvider({ getToken: siteKeyOrProvider.getToken });
72
71
  }
73
72
  this._delegate = appCheck.initializeAppCheck(this.app, {
74
- provider: provider,
75
- isTokenAutoRefreshEnabled: isTokenAutoRefreshEnabled
73
+ provider,
74
+ isTokenAutoRefreshEnabled
76
75
  });
77
- };
78
- AppCheckService.prototype.setTokenAutoRefreshEnabled = function (isTokenAutoRefreshEnabled) {
76
+ }
77
+ setTokenAutoRefreshEnabled(isTokenAutoRefreshEnabled) {
79
78
  if (!this._delegate) {
80
79
  throw ERROR_FACTORY.create("use-before-activation" /* AppCheckError.USE_BEFORE_ACTIVATION */, {
81
80
  appName: this.app.name
82
81
  });
83
82
  }
84
83
  appCheck.setTokenAutoRefreshEnabled(this._delegate, isTokenAutoRefreshEnabled);
85
- };
86
- AppCheckService.prototype.getToken = function (forceRefresh) {
84
+ }
85
+ getToken(forceRefresh) {
87
86
  if (!this._delegate) {
88
87
  throw ERROR_FACTORY.create("use-before-activation" /* AppCheckError.USE_BEFORE_ACTIVATION */, {
89
88
  appName: this.app.name
90
89
  });
91
90
  }
92
91
  return appCheck.getToken(this._delegate, forceRefresh);
93
- };
94
- AppCheckService.prototype.onTokenChanged = function (onNextOrObserver, onError, onCompletion) {
92
+ }
93
+ onTokenChanged(onNextOrObserver, onError, onCompletion) {
95
94
  if (!this._delegate) {
96
95
  throw ERROR_FACTORY.create("use-before-activation" /* AppCheckError.USE_BEFORE_ACTIVATION */, {
97
96
  appName: this.app.name
@@ -103,9 +102,8 @@ var AppCheckService = /** @class */ (function () {
103
102
  * to specify one to not confuse TypeScript.
104
103
  */
105
104
  onNextOrObserver, onError, onCompletion);
106
- };
107
- return AppCheckService;
108
- }());
105
+ }
106
+ }
109
107
 
110
108
  /**
111
109
  * @license
@@ -123,9 +121,9 @@ var AppCheckService = /** @class */ (function () {
123
121
  * See the License for the specific language governing permissions and
124
122
  * limitations under the License.
125
123
  */
126
- var factory = function (container) {
124
+ const factory = (container) => {
127
125
  // Dependencies
128
- var app = container.getProvider('app-compat').getImmediate();
126
+ const app = container.getProvider('app-compat').getImmediate();
129
127
  return new AppCheckService(app);
130
128
  };
131
129
  function registerAppCheck() {
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../src/errors.ts","../src/service.ts","../src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ErrorFactory, ErrorMap } from '@firebase/util';\n\nexport const enum AppCheckError {\n USE_BEFORE_ACTIVATION = 'use-before-activation'\n}\n\nconst ERRORS: ErrorMap<AppCheckError> = {\n [AppCheckError.USE_BEFORE_ACTIVATION]:\n 'App Check is being used before activate() is called for FirebaseApp {$appName}. ' +\n 'Call activate() before instantiating other Firebase services.'\n};\n\ninterface ErrorParams {\n [AppCheckError.USE_BEFORE_ACTIVATION]: { appName: string };\n}\n\nexport const ERROR_FACTORY = new ErrorFactory<AppCheckError, ErrorParams>(\n 'appCheck',\n 'AppCheck',\n ERRORS\n);\n","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n AppCheckProvider,\n AppCheckTokenResult,\n FirebaseAppCheck\n} from '@firebase/app-check-types';\nimport { _FirebaseService, FirebaseApp } from '@firebase/app-compat';\nimport {\n AppCheck as AppCheckServiceExp,\n CustomProvider,\n initializeAppCheck,\n ReCaptchaV3Provider,\n ReCaptchaEnterpriseProvider,\n setTokenAutoRefreshEnabled as setTokenAutoRefreshEnabledExp,\n getToken as getTokenExp,\n onTokenChanged as onTokenChangedExp\n} from '@firebase/app-check';\nimport { PartialObserver, Unsubscribe } from '@firebase/util';\nimport { ERROR_FACTORY, AppCheckError } from './errors';\n\nexport class AppCheckService\n implements FirebaseAppCheck, Omit<_FirebaseService, '_delegate'>\n{\n _delegate?: AppCheckServiceExp;\n constructor(public app: FirebaseApp) {}\n\n activate(\n siteKeyOrProvider: string | AppCheckProvider,\n isTokenAutoRefreshEnabled?: boolean\n ): void {\n let provider:\n | ReCaptchaV3Provider\n | CustomProvider\n | ReCaptchaEnterpriseProvider;\n if (typeof siteKeyOrProvider === 'string') {\n provider = new ReCaptchaV3Provider(siteKeyOrProvider);\n } else if (\n siteKeyOrProvider instanceof ReCaptchaEnterpriseProvider ||\n siteKeyOrProvider instanceof ReCaptchaV3Provider ||\n siteKeyOrProvider instanceof CustomProvider\n ) {\n provider = siteKeyOrProvider;\n } else {\n provider = new CustomProvider({ getToken: siteKeyOrProvider.getToken });\n }\n this._delegate = initializeAppCheck(this.app, {\n provider,\n isTokenAutoRefreshEnabled\n });\n }\n\n setTokenAutoRefreshEnabled(isTokenAutoRefreshEnabled: boolean): void {\n if (!this._delegate) {\n throw ERROR_FACTORY.create(AppCheckError.USE_BEFORE_ACTIVATION, {\n appName: this.app.name\n });\n }\n setTokenAutoRefreshEnabledExp(this._delegate, isTokenAutoRefreshEnabled);\n }\n\n getToken(forceRefresh?: boolean): Promise<AppCheckTokenResult> {\n if (!this._delegate) {\n throw ERROR_FACTORY.create(AppCheckError.USE_BEFORE_ACTIVATION, {\n appName: this.app.name\n });\n }\n return getTokenExp(this._delegate, forceRefresh);\n }\n\n onTokenChanged(\n onNextOrObserver:\n | PartialObserver<AppCheckTokenResult>\n | ((tokenResult: AppCheckTokenResult) => void),\n onError?: (error: Error) => void,\n onCompletion?: () => void\n ): Unsubscribe {\n if (!this._delegate) {\n throw ERROR_FACTORY.create(AppCheckError.USE_BEFORE_ACTIVATION, {\n appName: this.app.name\n });\n }\n return onTokenChangedExp(\n this._delegate,\n /**\n * Exp onTokenChanged() will handle both overloads but we need\n * to specify one to not confuse TypeScript.\n */\n onNextOrObserver as (tokenResult: AppCheckTokenResult) => void,\n onError,\n onCompletion\n );\n }\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport firebase, {\n _FirebaseNamespace,\n FirebaseApp\n} from '@firebase/app-compat';\nimport { name, version } from '../package.json';\nimport {\n Component,\n ComponentContainer,\n ComponentType,\n InstanceFactory\n} from '@firebase/component';\nimport { AppCheckService } from './service';\nimport { FirebaseAppCheck } from '@firebase/app-check-types';\nimport {\n ReCaptchaV3Provider,\n ReCaptchaEnterpriseProvider,\n CustomProvider\n} from '@firebase/app-check';\n\nconst factory: InstanceFactory<'appCheck-compat'> = (\n container: ComponentContainer\n) => {\n // Dependencies\n const app = container.getProvider('app-compat').getImmediate();\n\n return new AppCheckService(app as FirebaseApp);\n};\n\nexport function registerAppCheck(): void {\n (firebase as _FirebaseNamespace).INTERNAL.registerComponent(\n new Component(\n 'appCheck-compat',\n factory,\n ComponentType.PUBLIC\n ).setServiceProps({\n ReCaptchaEnterpriseProvider,\n ReCaptchaV3Provider,\n CustomProvider\n })\n );\n}\n\nregisterAppCheck();\nfirebase.registerVersion(name, version);\n\n/**\n * Define extension behavior of `registerAppCheck`\n */\ndeclare module '@firebase/app-compat' {\n interface FirebaseNamespace {\n appCheck(app?: FirebaseApp): FirebaseAppCheck;\n }\n interface FirebaseApp {\n appCheck(): FirebaseAppCheck;\n }\n}\n"],"names":["ErrorFactory","ReCaptchaV3Provider","ReCaptchaEnterpriseProvider","CustomProvider","initializeAppCheck","setTokenAutoRefreshEnabledExp","getTokenExp","onTokenChangedExp","firebase","Component"],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;AAeG;;AAQH,IAAM,MAAM,IAAA,EAAA,GAAA,EAAA;AACV,IAAA,EAAA,CAAA,uBAAA,2CAAA,GACE,kFAAkF;QAClF,+DAA+D;OAClE,CAAC;AAMK,IAAM,aAAa,GAAG,IAAIA,iBAAY,CAC3C,UAAU,EACV,UAAU,EACV,MAAM,CACP;;ACrCD;;;;;;;;;;;;;;;AAeG;AAqBH,IAAA,eAAA,kBAAA,YAAA;AAIE,IAAA,SAAA,eAAA,CAAmB,GAAgB,EAAA;QAAhB,IAAG,CAAA,GAAA,GAAH,GAAG,CAAa;KAAI;AAEvC,IAAA,eAAA,CAAA,SAAA,CAAA,QAAQ,GAAR,UACE,iBAA4C,EAC5C,yBAAmC,EAAA;AAEnC,QAAA,IAAI,QAG2B,CAAC;AAChC,QAAA,IAAI,OAAO,iBAAiB,KAAK,QAAQ,EAAE;AACzC,YAAA,QAAQ,GAAG,IAAIC,4BAAmB,CAAC,iBAAiB,CAAC,CAAC;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A;AAEzB,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACnB,MAAM,aAAa,CAAC,MAAM,CAAsC,uBAAA,4CAAA;AAC9D,gBAAA,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI;AACvB,aAAA,CAAC,CAAC;AACJ,SAAA;AACD,QAAA,OAAOC,uBAAiB,CACtB,IAAI,CAAC,SAAS;AACd;;;AAGG;AACH,QAAA,gBAA8D,EAC9D,OAAO,EACP,YAAY,CACb,CAAC;KACH,CAAA;IACH,OAAC,eAAA,CAAA;AAAD,CAAC,EAAA,CAAA;;AC5GD;;;;;;;;;;;;;;;AAeG;AAqBH,IAAM,OAAO,GAAuC,UAClD,SAA6B,EAAA;;IAG7B,IAAM,GAAG,GAAG,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,YAAY,EAAE,CAAC;AAE/D,IAAA,OAAO,IAAI,eAAe,CAAC,GAAkB,CAAC,CAAC;AACjD,CAAC,CAAC;SAEc,gBAAgB,GAAA;AAC7B,IAAAC,4BAA+B,CAAC,QAAQ,CAAC,iBAAiB,CACzD,IAAIC,mBAAS,CACX,iBAAiB,EACjB,OAAO,EAER,QAAA,4BAAA,CAAC,eAAe,CAAC;AAChB,QAAA,2BAA2B,EAAAP,oCAAA;AAC3B,QAAA,mBAAmB,EAAAD,4BAAA;AACnB,QAAA,cAAc,EAAAE,uBAAA;AACf,KAAA,CAAC,CACH,CAAC;AACJ,CAAC;AAED,gBAAgB,EAAE,CAAC;AACnBK,4BAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC;;;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../src/errors.ts","../src/service.ts","../src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ErrorFactory, ErrorMap } from '@firebase/util';\n\nexport const enum AppCheckError {\n USE_BEFORE_ACTIVATION = 'use-before-activation'\n}\n\nconst ERRORS: ErrorMap<AppCheckError> = {\n [AppCheckError.USE_BEFORE_ACTIVATION]:\n 'App Check is being used before activate() is called for FirebaseApp {$appName}. ' +\n 'Call activate() before instantiating other Firebase services.'\n};\n\ninterface ErrorParams {\n [AppCheckError.USE_BEFORE_ACTIVATION]: { appName: string };\n}\n\nexport const ERROR_FACTORY = new ErrorFactory<AppCheckError, ErrorParams>(\n 'appCheck',\n 'AppCheck',\n ERRORS\n);\n","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n AppCheckProvider,\n AppCheckTokenResult,\n FirebaseAppCheck\n} from '@firebase/app-check-types';\nimport { _FirebaseService, FirebaseApp } from '@firebase/app-compat';\nimport {\n AppCheck as AppCheckServiceExp,\n CustomProvider,\n initializeAppCheck,\n ReCaptchaV3Provider,\n ReCaptchaEnterpriseProvider,\n setTokenAutoRefreshEnabled as setTokenAutoRefreshEnabledExp,\n getToken as getTokenExp,\n onTokenChanged as onTokenChangedExp\n} from '@firebase/app-check';\nimport { PartialObserver, Unsubscribe } from '@firebase/util';\nimport { ERROR_FACTORY, AppCheckError } from './errors';\n\nexport class AppCheckService\n implements FirebaseAppCheck, Omit<_FirebaseService, '_delegate'>\n{\n _delegate?: AppCheckServiceExp;\n constructor(public app: FirebaseApp) {}\n\n activate(\n siteKeyOrProvider: string | AppCheckProvider,\n isTokenAutoRefreshEnabled?: boolean\n ): void {\n let provider:\n | ReCaptchaV3Provider\n | CustomProvider\n | ReCaptchaEnterpriseProvider;\n if (typeof siteKeyOrProvider === 'string') {\n provider = new ReCaptchaV3Provider(siteKeyOrProvider);\n } else if (\n siteKeyOrProvider instanceof ReCaptchaEnterpriseProvider ||\n siteKeyOrProvider instanceof ReCaptchaV3Provider ||\n siteKeyOrProvider instanceof CustomProvider\n ) {\n provider = siteKeyOrProvider;\n } else {\n provider = new CustomProvider({ getToken: siteKeyOrProvider.getToken });\n }\n this._delegate = initializeAppCheck(this.app, {\n provider,\n isTokenAutoRefreshEnabled\n });\n }\n\n setTokenAutoRefreshEnabled(isTokenAutoRefreshEnabled: boolean): void {\n if (!this._delegate) {\n throw ERROR_FACTORY.create(AppCheckError.USE_BEFORE_ACTIVATION, {\n appName: this.app.name\n });\n }\n setTokenAutoRefreshEnabledExp(this._delegate, isTokenAutoRefreshEnabled);\n }\n\n getToken(forceRefresh?: boolean): Promise<AppCheckTokenResult> {\n if (!this._delegate) {\n throw ERROR_FACTORY.create(AppCheckError.USE_BEFORE_ACTIVATION, {\n appName: this.app.name\n });\n }\n return getTokenExp(this._delegate, forceRefresh);\n }\n\n onTokenChanged(\n onNextOrObserver:\n | PartialObserver<AppCheckTokenResult>\n | ((tokenResult: AppCheckTokenResult) => void),\n onError?: (error: Error) => void,\n onCompletion?: () => void\n ): Unsubscribe {\n if (!this._delegate) {\n throw ERROR_FACTORY.create(AppCheckError.USE_BEFORE_ACTIVATION, {\n appName: this.app.name\n });\n }\n return onTokenChangedExp(\n this._delegate,\n /**\n * Exp onTokenChanged() will handle both overloads but we need\n * to specify one to not confuse TypeScript.\n */\n onNextOrObserver as (tokenResult: AppCheckTokenResult) => void,\n onError,\n onCompletion\n );\n }\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport firebase, {\n _FirebaseNamespace,\n FirebaseApp\n} from '@firebase/app-compat';\nimport { name, version } from '../package.json';\nimport {\n Component,\n ComponentContainer,\n ComponentType,\n InstanceFactory\n} from '@firebase/component';\nimport { AppCheckService } from './service';\nimport { FirebaseAppCheck } from '@firebase/app-check-types';\nimport {\n ReCaptchaV3Provider,\n ReCaptchaEnterpriseProvider,\n CustomProvider\n} from '@firebase/app-check';\n\nconst factory: InstanceFactory<'appCheck-compat'> = (\n container: ComponentContainer\n) => {\n // Dependencies\n const app = container.getProvider('app-compat').getImmediate();\n\n return new AppCheckService(app as FirebaseApp);\n};\n\nexport function registerAppCheck(): void {\n (firebase as _FirebaseNamespace).INTERNAL.registerComponent(\n new Component(\n 'appCheck-compat',\n factory,\n ComponentType.PUBLIC\n ).setServiceProps({\n ReCaptchaEnterpriseProvider,\n ReCaptchaV3Provider,\n CustomProvider\n })\n );\n}\n\nregisterAppCheck();\nfirebase.registerVersion(name, version);\n\n/**\n * Define extension behavior of `registerAppCheck`\n */\ndeclare module '@firebase/app-compat' {\n interface FirebaseNamespace {\n appCheck(app?: FirebaseApp): FirebaseAppCheck;\n }\n interface FirebaseApp {\n appCheck(): FirebaseAppCheck;\n }\n}\n"],"names":["ErrorFactory","ReCaptchaV3Provider","ReCaptchaEnterpriseProvider","CustomProvider","initializeAppCheck","setTokenAutoRefreshEnabledExp","getTokenExp","onTokenChangedExp","firebase","Component"],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;AAeG;AAQH,MAAM,MAAM,GAA4B;AACtC,IAAA,CAAA,uBAA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GED
@@ -1,17 +1,15 @@
1
1
  {
2
2
  "name": "@firebase/app-check-compat",
3
- "version": "0.3.15",
3
+ "version": "0.3.16",
4
4
  "description": "A compat App Check package for new firebase packages",
5
5
  "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
6
6
  "main": "dist/index.cjs.js",
7
7
  "browser": "dist/esm/index.esm2017.js",
8
8
  "module": "dist/esm/index.esm2017.js",
9
- "esm5": "dist/esm/index.esm.js",
10
9
  "exports": {
11
10
  ".": {
12
11
  "types": "./dist/src/index.d.ts",
13
12
  "require": "./dist/index.cjs.js",
14
- "esm5": "./dist/esm/index.esm.js",
15
13
  "default": "./dist/esm/index.esm2017.js"
16
14
  },
17
15
  "./package.json": "./package.json"
@@ -36,16 +34,16 @@
36
34
  "@firebase/app-compat": "0.x"
37
35
  },
38
36
  "dependencies": {
39
- "@firebase/app-check": "0.8.8",
37
+ "@firebase/app-check": "0.8.9",
40
38
  "@firebase/app-check-types": "0.5.2",
41
- "@firebase/logger": "0.4.2",
42
- "@firebase/util": "1.10.0",
43
- "@firebase/component": "0.6.9",
39
+ "@firebase/logger": "0.4.3",
40
+ "@firebase/util": "1.10.1",
41
+ "@firebase/component": "0.6.10",
44
42
  "tslib": "^2.1.0"
45
43
  },
46
44
  "license": "Apache-2.0",
47
45
  "devDependencies": {
48
- "@firebase/app-compat": "0.2.41",
46
+ "@firebase/app-compat": "0.2.44",
49
47
  "rollup": "2.79.1",
50
48
  "@rollup/plugin-commonjs": "21.1.0",
51
49
  "@rollup/plugin-json": "4.1.0",
@@ -67,5 +65,8 @@
67
65
  ".ts"
68
66
  ],
69
67
  "reportDir": "./coverage/node"
68
+ },
69
+ "engines": {
70
+ "node": ">=18.0.0"
70
71
  }
71
72
  }
@@ -1,134 +0,0 @@
1
- import firebase from '@firebase/app-compat';
2
- import { Component } from '@firebase/component';
3
- import { ReCaptchaV3Provider, ReCaptchaEnterpriseProvider, CustomProvider, initializeAppCheck, setTokenAutoRefreshEnabled, getToken, onTokenChanged } from '@firebase/app-check';
4
- import { ErrorFactory } from '@firebase/util';
5
-
6
- var name = "@firebase/app-check-compat";
7
- var version = "0.3.15";
8
-
9
- /**
10
- * @license
11
- * Copyright 2021 Google LLC
12
- *
13
- * Licensed under the Apache License, Version 2.0 (the "License");
14
- * you may not use this file except in compliance with the License.
15
- * You may obtain a copy of the License at
16
- *
17
- * http://www.apache.org/licenses/LICENSE-2.0
18
- *
19
- * Unless required by applicable law or agreed to in writing, software
20
- * distributed under the License is distributed on an "AS IS" BASIS,
21
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
- * See the License for the specific language governing permissions and
23
- * limitations under the License.
24
- */
25
- var _a;
26
- var ERRORS = (_a = {},
27
- _a["use-before-activation" /* AppCheckError.USE_BEFORE_ACTIVATION */] = 'App Check is being used before activate() is called for FirebaseApp {$appName}. ' +
28
- 'Call activate() before instantiating other Firebase services.',
29
- _a);
30
- var ERROR_FACTORY = new ErrorFactory('appCheck', 'AppCheck', ERRORS);
31
-
32
- /**
33
- * @license
34
- * Copyright 2021 Google LLC
35
- *
36
- * Licensed under the Apache License, Version 2.0 (the "License");
37
- * you may not use this file except in compliance with the License.
38
- * You may obtain a copy of the License at
39
- *
40
- * http://www.apache.org/licenses/LICENSE-2.0
41
- *
42
- * Unless required by applicable law or agreed to in writing, software
43
- * distributed under the License is distributed on an "AS IS" BASIS,
44
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
45
- * See the License for the specific language governing permissions and
46
- * limitations under the License.
47
- */
48
- var AppCheckService = /** @class */ (function () {
49
- function AppCheckService(app) {
50
- this.app = app;
51
- }
52
- AppCheckService.prototype.activate = function (siteKeyOrProvider, isTokenAutoRefreshEnabled) {
53
- var provider;
54
- if (typeof siteKeyOrProvider === 'string') {
55
- provider = new ReCaptchaV3Provider(siteKeyOrProvider);
56
- }
57
- else if (siteKeyOrProvider instanceof ReCaptchaEnterpriseProvider ||
58
- siteKeyOrProvider instanceof ReCaptchaV3Provider ||
59
- siteKeyOrProvider instanceof CustomProvider) {
60
- provider = siteKeyOrProvider;
61
- }
62
- else {
63
- provider = new CustomProvider({ getToken: siteKeyOrProvider.getToken });
64
- }
65
- this._delegate = initializeAppCheck(this.app, {
66
- provider: provider,
67
- isTokenAutoRefreshEnabled: isTokenAutoRefreshEnabled
68
- });
69
- };
70
- AppCheckService.prototype.setTokenAutoRefreshEnabled = function (isTokenAutoRefreshEnabled) {
71
- if (!this._delegate) {
72
- throw ERROR_FACTORY.create("use-before-activation" /* AppCheckError.USE_BEFORE_ACTIVATION */, {
73
- appName: this.app.name
74
- });
75
- }
76
- setTokenAutoRefreshEnabled(this._delegate, isTokenAutoRefreshEnabled);
77
- };
78
- AppCheckService.prototype.getToken = function (forceRefresh) {
79
- if (!this._delegate) {
80
- throw ERROR_FACTORY.create("use-before-activation" /* AppCheckError.USE_BEFORE_ACTIVATION */, {
81
- appName: this.app.name
82
- });
83
- }
84
- return getToken(this._delegate, forceRefresh);
85
- };
86
- AppCheckService.prototype.onTokenChanged = function (onNextOrObserver, onError, onCompletion) {
87
- if (!this._delegate) {
88
- throw ERROR_FACTORY.create("use-before-activation" /* AppCheckError.USE_BEFORE_ACTIVATION */, {
89
- appName: this.app.name
90
- });
91
- }
92
- return onTokenChanged(this._delegate,
93
- /**
94
- * Exp onTokenChanged() will handle both overloads but we need
95
- * to specify one to not confuse TypeScript.
96
- */
97
- onNextOrObserver, onError, onCompletion);
98
- };
99
- return AppCheckService;
100
- }());
101
-
102
- /**
103
- * @license
104
- * Copyright 2021 Google LLC
105
- *
106
- * Licensed under the Apache License, Version 2.0 (the "License");
107
- * you may not use this file except in compliance with the License.
108
- * You may obtain a copy of the License at
109
- *
110
- * http://www.apache.org/licenses/LICENSE-2.0
111
- *
112
- * Unless required by applicable law or agreed to in writing, software
113
- * distributed under the License is distributed on an "AS IS" BASIS,
114
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
115
- * See the License for the specific language governing permissions and
116
- * limitations under the License.
117
- */
118
- var factory = function (container) {
119
- // Dependencies
120
- var app = container.getProvider('app-compat').getImmediate();
121
- return new AppCheckService(app);
122
- };
123
- function registerAppCheck() {
124
- firebase.INTERNAL.registerComponent(new Component('appCheck-compat', factory, "PUBLIC" /* ComponentType.PUBLIC */).setServiceProps({
125
- ReCaptchaEnterpriseProvider: ReCaptchaEnterpriseProvider,
126
- ReCaptchaV3Provider: ReCaptchaV3Provider,
127
- CustomProvider: CustomProvider
128
- }));
129
- }
130
- registerAppCheck();
131
- firebase.registerVersion(name, version);
132
-
133
- export { registerAppCheck };
134
- //# sourceMappingURL=index.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.esm.js","sources":["../../src/errors.ts","../../src/service.ts","../../src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ErrorFactory, ErrorMap } from '@firebase/util';\n\nexport const enum AppCheckError {\n USE_BEFORE_ACTIVATION = 'use-before-activation'\n}\n\nconst ERRORS: ErrorMap<AppCheckError> = {\n [AppCheckError.USE_BEFORE_ACTIVATION]:\n 'App Check is being used before activate() is called for FirebaseApp {$appName}. ' +\n 'Call activate() before instantiating other Firebase services.'\n};\n\ninterface ErrorParams {\n [AppCheckError.USE_BEFORE_ACTIVATION]: { appName: string };\n}\n\nexport const ERROR_FACTORY = new ErrorFactory<AppCheckError, ErrorParams>(\n 'appCheck',\n 'AppCheck',\n ERRORS\n);\n","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n AppCheckProvider,\n AppCheckTokenResult,\n FirebaseAppCheck\n} from '@firebase/app-check-types';\nimport { _FirebaseService, FirebaseApp } from '@firebase/app-compat';\nimport {\n AppCheck as AppCheckServiceExp,\n CustomProvider,\n initializeAppCheck,\n ReCaptchaV3Provider,\n ReCaptchaEnterpriseProvider,\n setTokenAutoRefreshEnabled as setTokenAutoRefreshEnabledExp,\n getToken as getTokenExp,\n onTokenChanged as onTokenChangedExp\n} from '@firebase/app-check';\nimport { PartialObserver, Unsubscribe } from '@firebase/util';\nimport { ERROR_FACTORY, AppCheckError } from './errors';\n\nexport class AppCheckService\n implements FirebaseAppCheck, Omit<_FirebaseService, '_delegate'>\n{\n _delegate?: AppCheckServiceExp;\n constructor(public app: FirebaseApp) {}\n\n activate(\n siteKeyOrProvider: string | AppCheckProvider,\n isTokenAutoRefreshEnabled?: boolean\n ): void {\n let provider:\n | ReCaptchaV3Provider\n | CustomProvider\n | ReCaptchaEnterpriseProvider;\n if (typeof siteKeyOrProvider === 'string') {\n provider = new ReCaptchaV3Provider(siteKeyOrProvider);\n } else if (\n siteKeyOrProvider instanceof ReCaptchaEnterpriseProvider ||\n siteKeyOrProvider instanceof ReCaptchaV3Provider ||\n siteKeyOrProvider instanceof CustomProvider\n ) {\n provider = siteKeyOrProvider;\n } else {\n provider = new CustomProvider({ getToken: siteKeyOrProvider.getToken });\n }\n this._delegate = initializeAppCheck(this.app, {\n provider,\n isTokenAutoRefreshEnabled\n });\n }\n\n setTokenAutoRefreshEnabled(isTokenAutoRefreshEnabled: boolean): void {\n if (!this._delegate) {\n throw ERROR_FACTORY.create(AppCheckError.USE_BEFORE_ACTIVATION, {\n appName: this.app.name\n });\n }\n setTokenAutoRefreshEnabledExp(this._delegate, isTokenAutoRefreshEnabled);\n }\n\n getToken(forceRefresh?: boolean): Promise<AppCheckTokenResult> {\n if (!this._delegate) {\n throw ERROR_FACTORY.create(AppCheckError.USE_BEFORE_ACTIVATION, {\n appName: this.app.name\n });\n }\n return getTokenExp(this._delegate, forceRefresh);\n }\n\n onTokenChanged(\n onNextOrObserver:\n | PartialObserver<AppCheckTokenResult>\n | ((tokenResult: AppCheckTokenResult) => void),\n onError?: (error: Error) => void,\n onCompletion?: () => void\n ): Unsubscribe {\n if (!this._delegate) {\n throw ERROR_FACTORY.create(AppCheckError.USE_BEFORE_ACTIVATION, {\n appName: this.app.name\n });\n }\n return onTokenChangedExp(\n this._delegate,\n /**\n * Exp onTokenChanged() will handle both overloads but we need\n * to specify one to not confuse TypeScript.\n */\n onNextOrObserver as (tokenResult: AppCheckTokenResult) => void,\n onError,\n onCompletion\n );\n }\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport firebase, {\n _FirebaseNamespace,\n FirebaseApp\n} from '@firebase/app-compat';\nimport { name, version } from '../package.json';\nimport {\n Component,\n ComponentContainer,\n ComponentType,\n InstanceFactory\n} from '@firebase/component';\nimport { AppCheckService } from './service';\nimport { FirebaseAppCheck } from '@firebase/app-check-types';\nimport {\n ReCaptchaV3Provider,\n ReCaptchaEnterpriseProvider,\n CustomProvider\n} from '@firebase/app-check';\n\nconst factory: InstanceFactory<'appCheck-compat'> = (\n container: ComponentContainer\n) => {\n // Dependencies\n const app = container.getProvider('app-compat').getImmediate();\n\n return new AppCheckService(app as FirebaseApp);\n};\n\nexport function registerAppCheck(): void {\n (firebase as _FirebaseNamespace).INTERNAL.registerComponent(\n new Component(\n 'appCheck-compat',\n factory,\n ComponentType.PUBLIC\n ).setServiceProps({\n ReCaptchaEnterpriseProvider,\n ReCaptchaV3Provider,\n CustomProvider\n })\n );\n}\n\nregisterAppCheck();\nfirebase.registerVersion(name, version);\n\n/**\n * Define extension behavior of `registerAppCheck`\n */\ndeclare module '@firebase/app-compat' {\n interface FirebaseNamespace {\n appCheck(app?: FirebaseApp): FirebaseAppCheck;\n }\n interface FirebaseApp {\n appCheck(): FirebaseAppCheck;\n }\n}\n"],"names":["setTokenAutoRefreshEnabledExp","getTokenExp","onTokenChangedExp"],"mappings":";;;;;;;;AAAA;;;;;;;;;;;;;;;AAeG;;AAQH,IAAM,MAAM,IAAA,EAAA,GAAA,EAAA;AACV,IAAA,EAAA,CAAA,uBAAA,2CAAA,GACE,kFAAkF;QAClF,+DAA+D;OAClE,CAAC;AAMK,IAAM,aAAa,GAAG,IAAI,YAAY,CAC3C,UAAU,EACV,UAAU,EACV,MAAM,CACP;;ACrCD;;;;;;;;;;;;;;;AAeG;AAqBH,IAAA,eAAA,kBAAA,YAAA;AAIE,IAAA,SAAA,eAAA,CAAmB,GAAgB,EAAA;QAAhB,IAAG,CAAA,GAAA,GAAH,GAAG,CAAa;KAAI;AAEvC,IAAA,eAAA,CAAA,SAAA,CAAA,QAAQ,GAAR,UACE,iBAA4C,EAC5C,yBAAmC,EAAA;AAEnC,QAAA,IAAI,QAG2B,CAAC;AAChC,QAAA,IAAI,OAAO,iBAAiB,KAAK,QAAQ,EAAE;AACzC,YAAA,QAAQ,GAAG,IAAI,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AACvD,SAAA;aAAM,IACL,iBAAiB,YAAY,2BAA2B;AACxD,YAAA,iBAAiB,YAAY,mBAAmB;YAChD,iBAAiB,YAAY,cAAc,EAC3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