@firebase/functions-compat 0.3.14 → 0.3.15

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 { FirebaseError } from '@firebase/util';
4
4
  import { Component } from '@firebase/component';
5
5
 
6
6
  const name = "@firebase/functions-compat";
7
- const version = "0.3.14";
7
+ const version = "0.3.15";
8
8
 
9
9
  /**
10
10
  * @license
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm2017.js","sources":["../../src/service.ts","../../src/register.ts","../../src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2020 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 { FirebaseFunctions, HttpsCallable } from '@firebase/functions-types';\nimport {\n httpsCallable as httpsCallableExp,\n httpsCallableFromURL as httpsCallableFromURLExp,\n connectFunctionsEmulator as useFunctionsEmulatorExp,\n HttpsCallableOptions,\n Functions as FunctionsServiceExp\n} from '@firebase/functions';\nimport { FirebaseApp, _FirebaseService } from '@firebase/app-compat';\nimport { FirebaseError } from '@firebase/util';\n\nexport class FunctionsService implements FirebaseFunctions, _FirebaseService {\n /**\n * For testing.\n * @internal\n */\n _region: string;\n /**\n * For testing.\n * @internal\n */\n _customDomain: string | null;\n\n constructor(\n public app: FirebaseApp,\n readonly _delegate: FunctionsServiceExp\n ) {\n this._region = this._delegate.region;\n this._customDomain = this._delegate.customDomain;\n }\n httpsCallable(name: string, options?: HttpsCallableOptions): HttpsCallable {\n return httpsCallableExp(this._delegate, name, options);\n }\n httpsCallableFromURL(\n url: string,\n options?: HttpsCallableOptions\n ): HttpsCallable {\n return httpsCallableFromURLExp(this._delegate, url, options);\n }\n /**\n * Deprecated in pre-modularized repo, does not exist in modularized\n * functions package, need to convert to \"host\" and \"port\" args that\n * `useFunctionsEmulatorExp` takes.\n * @deprecated\n */\n useFunctionsEmulator(origin: string): void {\n const match = origin.match('[a-zA-Z]+://([a-zA-Z0-9.-]+)(?::([0-9]+))?');\n if (match == null) {\n throw new FirebaseError(\n 'functions',\n 'No origin provided to useFunctionsEmulator()'\n );\n }\n if (match[2] == null) {\n throw new FirebaseError(\n 'functions',\n 'Port missing in origin provided to useFunctionsEmulator()'\n );\n }\n return useFunctionsEmulatorExp(this._delegate, match[1], Number(match[2]));\n }\n useEmulator(host: string, port: number): void {\n return useFunctionsEmulatorExp(this._delegate, host, port);\n }\n}\n","/**\n * @license\n * Copyright 2020 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, { _FirebaseNamespace } from '@firebase/app-compat';\nimport { FunctionsService } from './service';\nimport {\n Component,\n ComponentType,\n InstanceFactory,\n ComponentContainer,\n InstanceFactoryOptions\n} from '@firebase/component';\n\nconst DEFAULT_REGION = 'us-central1';\n\nconst factory: InstanceFactory<'functions-compat'> = (\n container: ComponentContainer,\n { instanceIdentifier: regionOrCustomDomain }: InstanceFactoryOptions\n) => {\n // Dependencies\n const app = container.getProvider('app-compat').getImmediate();\n const functionsServiceExp = container.getProvider('functions').getImmediate({\n identifier: regionOrCustomDomain ?? DEFAULT_REGION\n });\n\n return new FunctionsService(app, functionsServiceExp);\n};\n\nexport function registerFunctions(): void {\n const namespaceExports = {\n Functions: FunctionsService\n };\n (firebase as _FirebaseNamespace).INTERNAL.registerComponent(\n new Component('functions-compat', factory, ComponentType.PUBLIC)\n .setServiceProps(namespaceExports)\n .setMultipleInstances(true)\n );\n}\n","/**\n * @license\n * Copyright 2020 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 from '@firebase/app-compat';\nimport { name, version } from '../package.json';\nimport { registerFunctions } from './register';\nimport * as types from '@firebase/functions-types';\n\nregisterFunctions();\nfirebase.registerVersion(name, version);\n\ndeclare module '@firebase/app-compat' {\n interface FirebaseNamespace {\n functions: {\n (app?: FirebaseApp): types.FirebaseFunctions;\n Functions: typeof types.FirebaseFunctions;\n };\n }\n interface FirebaseApp {\n functions(regionOrCustomDomain?: string): types.FirebaseFunctions;\n }\n}\n"],"names":["httpsCallableExp","httpsCallableFromURLExp","useFunctionsEmulatorExp"],"mappings":";;;;;;;;AAAA;;;;;;;;;;;;;;;AAeG;MAaU,gBAAgB,CAAA;IAY3B,WACS,CAAA,GAAgB,EACd,SAA8B,EAAA;QADhC,IAAG,CAAA,GAAA,GAAH,GAAG,CAAa;QACd,IAAS,CAAA,SAAA,GAAT,SAAS,CAAqB;QAEvC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;QACrC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;KAClD;IACD,aAAa,CAAC,IAAY,EAAE,OAA8B,EAAA;QACxD,OAAOA,aAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;KACxD;IACD,oBAAoB,CAClB,G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A,OAAO,IAAI,gBAAgB,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;AACxD,CAAC,CAAC;SAEc,iBAAiB,GAAA;AAC/B,IAAA,MAAM,gBAAgB,GAAG;AACvB,QAAA,SAAS,EAAE,gBAAgB;KAC5B,CAAC;IACD,QAA+B,CAAC,QAAQ,CAAC,iBAAiB,CACzD,IAAI,SAAS,CAAC,kBAAkB,EAAE,OAAO,EAAuB,QAAA,4BAAA;SAC7D,eAAe,CAAC,gBAAgB,CAAC;AACjC,SAAA,oBAAoB,CAAC,IAAI,CAAC,CAC9B,CAAC;AACJ;;ACnDA;;;;;;;;;;;;;;;AAeG;AAOH,iBAAiB,EAAE,CAAC;AACpB,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC"}
package/dist/index.cjs.js CHANGED
@@ -10,7 +10,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
10
10
  var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase);
11
11
 
12
12
  const name = "@firebase/functions-compat";
13
- const version = "0.3.14";
13
+ const version = "0.3.15";
14
14
 
15
15
  /**
16
16
  * @license
package/package.json CHANGED
@@ -1,25 +1,23 @@
1
1
  {
2
2
  "name": "@firebase/functions-compat",
3
- "version": "0.3.14",
3
+ "version": "0.3.15",
4
4
  "description": "",
5
5
  "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
6
- "main": "dist/index.node.cjs.js",
7
- "browser": "dist/index.esm2017.js",
8
- "module": "dist/index.esm2017.js",
9
- "esm5": "dist/index.esm5.js",
6
+ "main": "dist/index.cjs.js",
7
+ "browser": "dist/esm/index.esm2017.js",
8
+ "module": "dist/esm/index.esm2017.js",
10
9
  "exports": {
11
10
  ".": {
12
11
  "types": "./dist/src/index.d.ts",
13
12
  "node": {
14
- "import": "./dist/node-esm/index.node.esm.js",
15
- "require": "./dist/index.node.cjs.js"
13
+ "require": "./dist/index.cjs.js",
14
+ "import": "./dist/esm/index.esm2017.js"
16
15
  },
17
- "esm5": "./dist/index.esm5.js",
18
16
  "browser": {
19
17
  "require": "./dist/index.cjs.js",
20
- "import": "./dist/index.esm2017.js"
18
+ "import": "./dist/esm/index.esm2017.js"
21
19
  },
22
- "default": "./dist/index.esm2017.js"
20
+ "default": "./dist/esm/index.esm2017.js"
23
21
  },
24
22
  "./package.json": "./package.json"
25
23
  },
@@ -31,7 +29,7 @@
31
29
  "@firebase/app-compat": "0.x"
32
30
  },
33
31
  "devDependencies": {
34
- "@firebase/app-compat": "0.2.41",
32
+ "@firebase/app-compat": "0.2.44",
35
33
  "rollup": "2.79.1",
36
34
  "@rollup/plugin-json": "4.1.0",
37
35
  "rollup-plugin-typescript2": "0.31.2",
@@ -57,17 +55,17 @@
57
55
  "test:all": "run-p --npm-path npm test:browser test:node",
58
56
  "test:browser": "karma start",
59
57
  "test:browser:debug": "karma start --browsers=Chrome --auto-watch",
60
- "test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'src/{,!(browser)/**/}*.test.ts' --file src/index.node.ts --config ../../config/mocharc.node.js",
58
+ "test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'src/{,!(browser)/**/}*.test.ts' --config ../../config/mocharc.node.js",
61
59
  "test:emulator": "env FIREBASE_FUNCTIONS_HOST=http://localhost FIREBASE_FUNCTIONS_PORT=5005 run-p --npm-path npm test:node",
62
60
  "trusted-type-check": "tsec -p tsconfig.json --noEmit",
63
61
  "add-compat-overloads": "ts-node-script ../../scripts/build/create-overloads.ts -i ../functions/dist/functions-public.d.ts -o dist/src/index.d.ts -a -r Functions:types.FirebaseFunctions -r FirebaseApp:FirebaseAppCompat --moduleToEnhance @firebase/functions"
64
62
  },
65
63
  "typings": "dist/src/index.d.ts",
66
64
  "dependencies": {
67
- "@firebase/component": "0.6.9",
68
- "@firebase/functions": "0.11.8",
65
+ "@firebase/component": "0.6.10",
66
+ "@firebase/functions": "0.11.9",
69
67
  "@firebase/functions-types": "0.6.2",
70
- "@firebase/util": "1.10.0",
68
+ "@firebase/util": "1.10.1",
71
69
  "tslib": "^2.1.0"
72
70
  },
73
71
  "nyc": {
@@ -75,5 +73,8 @@
75
73
  ".ts"
76
74
  ],
77
75
  "reportDir": "./coverage/node"
76
+ },
77
+ "engines": {
78
+ "node": ">=18.0.0"
78
79
  }
79
80
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.esm2017.js","sources":["../src/service.ts","../src/register.ts","../src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2020 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 { FirebaseFunctions, HttpsCallable } from '@firebase/functions-types';\nimport {\n httpsCallable as httpsCallableExp,\n httpsCallableFromURL as httpsCallableFromURLExp,\n connectFunctionsEmulator as useFunctionsEmulatorExp,\n HttpsCallableOptions,\n Functions as FunctionsServiceExp\n} from '@firebase/functions';\nimport { FirebaseApp, _FirebaseService } from '@firebase/app-compat';\nimport { FirebaseError } from '@firebase/util';\n\nexport class FunctionsService implements FirebaseFunctions, _FirebaseService {\n /**\n * For testing.\n * @internal\n */\n _region: string;\n /**\n * For testing.\n * @internal\n */\n _customDomain: string | null;\n\n constructor(\n public app: FirebaseApp,\n readonly _delegate: FunctionsServiceExp\n ) {\n this._region = this._delegate.region;\n this._customDomain = this._delegate.customDomain;\n }\n httpsCallable(name: string, options?: HttpsCallableOptions): HttpsCallable {\n return httpsCallableExp(this._delegate, name, options);\n }\n httpsCallableFromURL(\n url: string,\n options?: HttpsCallableOptions\n ): HttpsCallable {\n return httpsCallableFromURLExp(this._delegate, url, options);\n }\n /**\n * Deprecated in pre-modularized repo, does not exist in modularized\n * functions package, need to convert to \"host\" and \"port\" args that\n * `useFunctionsEmulatorExp` takes.\n * @deprecated\n */\n useFunctionsEmulator(origin: string): void {\n const match = origin.match('[a-zA-Z]+://([a-zA-Z0-9.-]+)(?::([0-9]+))?');\n if (match == null) {\n throw new FirebaseError(\n 'functions',\n 'No origin provided to useFunctionsEmulator()'\n );\n }\n if (match[2] == null) {\n throw new FirebaseError(\n 'functions',\n 'Port missing in origin provided to useFunctionsEmulator()'\n );\n }\n return useFunctionsEmulatorExp(this._delegate, match[1], Number(match[2]));\n }\n useEmulator(host: string, port: number): void {\n return useFunctionsEmulatorExp(this._delegate, host, port);\n }\n}\n","/**\n * @license\n * Copyright 2020 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, { _FirebaseNamespace } from '@firebase/app-compat';\nimport { FunctionsService } from './service';\nimport {\n Component,\n ComponentType,\n InstanceFactory,\n ComponentContainer,\n InstanceFactoryOptions\n} from '@firebase/component';\n\nconst DEFAULT_REGION = 'us-central1';\n\nconst factory: InstanceFactory<'functions-compat'> = (\n container: ComponentContainer,\n { instanceIdentifier: regionOrCustomDomain }: InstanceFactoryOptions\n) => {\n // Dependencies\n const app = container.getProvider('app-compat').getImmediate();\n const functionsServiceExp = container.getProvider('functions').getImmediate({\n identifier: regionOrCustomDomain ?? DEFAULT_REGION\n });\n\n return new FunctionsService(app, functionsServiceExp);\n};\n\nexport function registerFunctions(): void {\n const namespaceExports = {\n Functions: FunctionsService\n };\n (firebase as _FirebaseNamespace).INTERNAL.registerComponent(\n new Component('functions-compat', factory, ComponentType.PUBLIC)\n .setServiceProps(namespaceExports)\n .setMultipleInstances(true)\n );\n}\n","/**\n * @license\n * Copyright 2020 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 from '@firebase/app-compat';\nimport { name, version } from '../package.json';\nimport { registerFunctions } from './register';\nimport * as types from '@firebase/functions-types';\n\nregisterFunctions();\nfirebase.registerVersion(name, version);\n\ndeclare module '@firebase/app-compat' {\n interface FirebaseNamespace {\n functions: {\n (app?: FirebaseApp): types.FirebaseFunctions;\n Functions: typeof types.FirebaseFunctions;\n };\n }\n interface FirebaseApp {\n functions(regionOrCustomDomain?: string): types.FirebaseFunctions;\n }\n}\n"],"names":["httpsCallableExp","httpsCallableFromURLExp","useFunctionsEmulatorExp"],"mappings":";;;;;;;;AAAA;;;;;;;;;;;;;;;AAeG;MAaU,gBAAgB,CAAA;IAY3B,WACS,CAAA,GAAgB,EACd,SAA8B,EAAA;QADhC,IAAG,CAAA,GAAA,GAAH,GAAG,CAAa;QACd,IAAS,CAAA,SAAA,GAAT,SAAS,CAAqB;QAEvC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;QACrC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;KAClD;IACD,aAAa,CAAC,IAAY,EAAE,OAA8B,EAAA;QACxD,OAAOA,aAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;KACxD;IACD,oBAAoB,CAClB,GAAW,EACX,OA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I,gBAAgB,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;AACxD,CAAC,CAAC;SAEc,iBAAiB,GAAA;AAC/B,IAAA,MAAM,gBAAgB,GAAG;AACvB,QAAA,SAAS,EAAE,gBAAgB;KAC5B,CAAC;IACD,QAA+B,CAAC,QAAQ,CAAC,iBAAiB,CACzD,IAAI,SAAS,CAAC,kBAAkB,EAAE,OAAO,EAAuB,QAAA,4BAAA;SAC7D,eAAe,CAAC,gBAAgB,CAAC;AACjC,SAAA,oBAAoB,CAAC,IAAI,CAAC,CAC9B,CAAC;AACJ;;ACnDA;;;;;;;;;;;;;;;AAeG;AAOH,iBAAiB,EAAE,CAAC;AACpB,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC"}
@@ -1,113 +0,0 @@
1
- import firebase from '@firebase/app-compat';
2
- import { httpsCallable, httpsCallableFromURL, connectFunctionsEmulator } from '@firebase/functions';
3
- import { FirebaseError } from '@firebase/util';
4
- import { Component } from '@firebase/component';
5
-
6
- var name = "@firebase/functions-compat";
7
- var version = "0.3.14";
8
-
9
- /**
10
- * @license
11
- * Copyright 2020 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 FunctionsService = /** @class */ (function () {
26
- function FunctionsService(app, _delegate) {
27
- this.app = app;
28
- this._delegate = _delegate;
29
- this._region = this._delegate.region;
30
- this._customDomain = this._delegate.customDomain;
31
- }
32
- FunctionsService.prototype.httpsCallable = function (name, options) {
33
- return httpsCallable(this._delegate, name, options);
34
- };
35
- FunctionsService.prototype.httpsCallableFromURL = function (url, options) {
36
- return httpsCallableFromURL(this._delegate, url, options);
37
- };
38
- /**
39
- * Deprecated in pre-modularized repo, does not exist in modularized
40
- * functions package, need to convert to "host" and "port" args that
41
- * `useFunctionsEmulatorExp` takes.
42
- * @deprecated
43
- */
44
- FunctionsService.prototype.useFunctionsEmulator = function (origin) {
45
- var match = origin.match('[a-zA-Z]+://([a-zA-Z0-9.-]+)(?::([0-9]+))?');
46
- if (match == null) {
47
- throw new FirebaseError('functions', 'No origin provided to useFunctionsEmulator()');
48
- }
49
- if (match[2] == null) {
50
- throw new FirebaseError('functions', 'Port missing in origin provided to useFunctionsEmulator()');
51
- }
52
- return connectFunctionsEmulator(this._delegate, match[1], Number(match[2]));
53
- };
54
- FunctionsService.prototype.useEmulator = function (host, port) {
55
- return connectFunctionsEmulator(this._delegate, host, port);
56
- };
57
- return FunctionsService;
58
- }());
59
-
60
- /**
61
- * @license
62
- * Copyright 2020 Google LLC
63
- *
64
- * Licensed under the Apache License, Version 2.0 (the "License");
65
- * you may not use this file except in compliance with the License.
66
- * You may obtain a copy of the License at
67
- *
68
- * http://www.apache.org/licenses/LICENSE-2.0
69
- *
70
- * Unless required by applicable law or agreed to in writing, software
71
- * distributed under the License is distributed on an "AS IS" BASIS,
72
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
73
- * See the License for the specific language governing permissions and
74
- * limitations under the License.
75
- */
76
- var DEFAULT_REGION = 'us-central1';
77
- var factory = function (container, _a) {
78
- var regionOrCustomDomain = _a.instanceIdentifier;
79
- // Dependencies
80
- var app = container.getProvider('app-compat').getImmediate();
81
- var functionsServiceExp = container.getProvider('functions').getImmediate({
82
- identifier: regionOrCustomDomain !== null && regionOrCustomDomain !== void 0 ? regionOrCustomDomain : DEFAULT_REGION
83
- });
84
- return new FunctionsService(app, functionsServiceExp);
85
- };
86
- function registerFunctions() {
87
- var namespaceExports = {
88
- Functions: FunctionsService
89
- };
90
- firebase.INTERNAL.registerComponent(new Component('functions-compat', factory, "PUBLIC" /* ComponentType.PUBLIC */)
91
- .setServiceProps(namespaceExports)
92
- .setMultipleInstances(true));
93
- }
94
-
95
- /**
96
- * @license
97
- * Copyright 2020 Google LLC
98
- *
99
- * Licensed under the Apache License, Version 2.0 (the "License");
100
- * you may not use this file except in compliance with the License.
101
- * You may obtain a copy of the License at
102
- *
103
- * http://www.apache.org/licenses/LICENSE-2.0
104
- *
105
- * Unless required by applicable law or agreed to in writing, software
106
- * distributed under the License is distributed on an "AS IS" BASIS,
107
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
108
- * See the License for the specific language governing permissions and
109
- * limitations under the License.
110
- */
111
- registerFunctions();
112
- firebase.registerVersion(name, version);
113
- //# sourceMappingURL=index.esm5.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.esm5.js","sources":["../src/service.ts","../src/register.ts","../src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2020 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 { FirebaseFunctions, HttpsCallable } from '@firebase/functions-types';\nimport {\n httpsCallable as httpsCallableExp,\n httpsCallableFromURL as httpsCallableFromURLExp,\n connectFunctionsEmulator as useFunctionsEmulatorExp,\n HttpsCallableOptions,\n Functions as FunctionsServiceExp\n} from '@firebase/functions';\nimport { FirebaseApp, _FirebaseService } from '@firebase/app-compat';\nimport { FirebaseError } from '@firebase/util';\n\nexport class FunctionsService implements FirebaseFunctions, _FirebaseService {\n /**\n * For testing.\n * @internal\n */\n _region: string;\n /**\n * For testing.\n * @internal\n */\n _customDomain: string | null;\n\n constructor(\n public app: FirebaseApp,\n readonly _delegate: FunctionsServiceExp\n ) {\n this._region = this._delegate.region;\n this._customDomain = this._delegate.customDomain;\n }\n httpsCallable(name: string, options?: HttpsCallableOptions): HttpsCallable {\n return httpsCallableExp(this._delegate, name, options);\n }\n httpsCallableFromURL(\n url: string,\n options?: HttpsCallableOptions\n ): HttpsCallable {\n return httpsCallableFromURLExp(this._delegate, url, options);\n }\n /**\n * Deprecated in pre-modularized repo, does not exist in modularized\n * functions package, need to convert to \"host\" and \"port\" args that\n * `useFunctionsEmulatorExp` takes.\n * @deprecated\n */\n useFunctionsEmulator(origin: string): void {\n const match = origin.match('[a-zA-Z]+://([a-zA-Z0-9.-]+)(?::([0-9]+))?');\n if (match == null) {\n throw new FirebaseError(\n 'functions',\n 'No origin provided to useFunctionsEmulator()'\n );\n }\n if (match[2] == null) {\n throw new FirebaseError(\n 'functions',\n 'Port missing in origin provided to useFunctionsEmulator()'\n );\n }\n return useFunctionsEmulatorExp(this._delegate, match[1], Number(match[2]));\n }\n useEmulator(host: string, port: number): void {\n return useFunctionsEmulatorExp(this._delegate, host, port);\n }\n}\n","/**\n * @license\n * Copyright 2020 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, { _FirebaseNamespace } from '@firebase/app-compat';\nimport { FunctionsService } from './service';\nimport {\n Component,\n ComponentType,\n InstanceFactory,\n ComponentContainer,\n InstanceFactoryOptions\n} from '@firebase/component';\n\nconst DEFAULT_REGION = 'us-central1';\n\nconst factory: InstanceFactory<'functions-compat'> = (\n container: ComponentContainer,\n { instanceIdentifier: regionOrCustomDomain }: InstanceFactoryOptions\n) => {\n // Dependencies\n const app = container.getProvider('app-compat').getImmediate();\n const functionsServiceExp = container.getProvider('functions').getImmediate({\n identifier: regionOrCustomDomain ?? DEFAULT_REGION\n });\n\n return new FunctionsService(app, functionsServiceExp);\n};\n\nexport function registerFunctions(): void {\n const namespaceExports = {\n Functions: FunctionsService\n };\n (firebase as _FirebaseNamespace).INTERNAL.registerComponent(\n new Component('functions-compat', factory, ComponentType.PUBLIC)\n .setServiceProps(namespaceExports)\n .setMultipleInstances(true)\n );\n}\n","/**\n * @license\n * Copyright 2020 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 from '@firebase/app-compat';\nimport { name, version } from '../package.json';\nimport { registerFunctions } from './register';\nimport * as types from '@firebase/functions-types';\n\nregisterFunctions();\nfirebase.registerVersion(name, version);\n\ndeclare module '@firebase/app-compat' {\n interface FirebaseNamespace {\n functions: {\n (app?: FirebaseApp): types.FirebaseFunctions;\n Functions: typeof types.FirebaseFunctions;\n };\n }\n interface FirebaseApp {\n functions(regionOrCustomDomain?: string): types.FirebaseFunctions;\n }\n}\n"],"names":["httpsCallableExp","httpsCallableFromURLExp","useFunctionsEmulatorExp"],"mappings":";;;;;;;;AAAA;;;;;;;;;;;;;;;AAeG;AAaH,IAAA,gBAAA,kBAAA,YAAA;IAYE,SACS,gBAAA,CAAA,GAAgB,EACd,SAA8B,EAAA;QADhC,IAAG,CAAA,GAAA,GAAH,GAAG,CAAa;QACd,IAAS,CAAA,SAAA,GAAT,SAAS,CAAqB;QAEvC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;QACrC,IAAI,CAAC,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G,aAAa,CAAC;AAErC,IAAM,OAAO,GAAwC,UACnD,SAA6B,EAC7B,EAAoE,EAAA;AAA9C,IAAA,IAAA,oBAAoB,GAAA,EAAA,CAAA,kBAAA,CAAA;;IAG1C,IAAM,GAAG,GAAG,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,YAAY,EAAE,CAAC;IAC/D,IAAM,mBAAmB,GAAG,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,YAAY,CAAC;AAC1E,QAAA,UAAU,EAAE,oBAAoB,KAAA,IAAA,IAApB,oBAAoB,KAApB,KAAA,CAAA,GAAA,oBAAoB,GAAI,cAAc;AACnD,KAAA,CAAC,CAAC;AAEH,IAAA,OAAO,IAAI,gBAAgB,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;AACxD,CAAC,CAAC;SAEc,iBAAiB,GAAA;AAC/B,IAAA,IAAM,gBAAgB,GAAG;AACvB,QAAA,SAAS,EAAE,gBAAgB;KAC5B,CAAC;IACD,QAA+B,CAAC,QAAQ,CAAC,iBAAiB,CACzD,IAAI,SAAS,CAAC,kBAAkB,EAAE,OAAO,EAAuB,QAAA,4BAAA;SAC7D,eAAe,CAAC,gBAAgB,CAAC;AACjC,SAAA,oBAAoB,CAAC,IAAI,CAAC,CAC9B,CAAC;AACJ;;ACnDA;;;;;;;;;;;;;;;AAeG;AAOH,iBAAiB,EAAE,CAAC;AACpB,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC"}
@@ -1,119 +0,0 @@
1
- 'use strict';
2
-
3
- var firebase = require('@firebase/app-compat');
4
- var functions = require('@firebase/functions');
5
- var util = require('@firebase/util');
6
- var component = require('@firebase/component');
7
-
8
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
-
10
- var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase);
11
-
12
- var name = "@firebase/functions-compat";
13
- var version = "0.3.14";
14
-
15
- /**
16
- * @license
17
- * Copyright 2020 Google LLC
18
- *
19
- * Licensed under the Apache License, Version 2.0 (the "License");
20
- * you may not use this file except in compliance with the License.
21
- * You may obtain a copy of the License at
22
- *
23
- * http://www.apache.org/licenses/LICENSE-2.0
24
- *
25
- * Unless required by applicable law or agreed to in writing, software
26
- * distributed under the License is distributed on an "AS IS" BASIS,
27
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28
- * See the License for the specific language governing permissions and
29
- * limitations under the License.
30
- */
31
- var FunctionsService = /** @class */ (function () {
32
- function FunctionsService(app, _delegate) {
33
- this.app = app;
34
- this._delegate = _delegate;
35
- this._region = this._delegate.region;
36
- this._customDomain = this._delegate.customDomain;
37
- }
38
- FunctionsService.prototype.httpsCallable = function (name, options) {
39
- return functions.httpsCallable(this._delegate, name, options);
40
- };
41
- FunctionsService.prototype.httpsCallableFromURL = function (url, options) {
42
- return functions.httpsCallableFromURL(this._delegate, url, options);
43
- };
44
- /**
45
- * Deprecated in pre-modularized repo, does not exist in modularized
46
- * functions package, need to convert to "host" and "port" args that
47
- * `useFunctionsEmulatorExp` takes.
48
- * @deprecated
49
- */
50
- FunctionsService.prototype.useFunctionsEmulator = function (origin) {
51
- var match = origin.match('[a-zA-Z]+://([a-zA-Z0-9.-]+)(?::([0-9]+))?');
52
- if (match == null) {
53
- throw new util.FirebaseError('functions', 'No origin provided to useFunctionsEmulator()');
54
- }
55
- if (match[2] == null) {
56
- throw new util.FirebaseError('functions', 'Port missing in origin provided to useFunctionsEmulator()');
57
- }
58
- return functions.connectFunctionsEmulator(this._delegate, match[1], Number(match[2]));
59
- };
60
- FunctionsService.prototype.useEmulator = function (host, port) {
61
- return functions.connectFunctionsEmulator(this._delegate, host, port);
62
- };
63
- return FunctionsService;
64
- }());
65
-
66
- /**
67
- * @license
68
- * Copyright 2020 Google LLC
69
- *
70
- * Licensed under the Apache License, Version 2.0 (the "License");
71
- * you may not use this file except in compliance with the License.
72
- * You may obtain a copy of the License at
73
- *
74
- * http://www.apache.org/licenses/LICENSE-2.0
75
- *
76
- * Unless required by applicable law or agreed to in writing, software
77
- * distributed under the License is distributed on an "AS IS" BASIS,
78
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
79
- * See the License for the specific language governing permissions and
80
- * limitations under the License.
81
- */
82
- var DEFAULT_REGION = 'us-central1';
83
- var factory = function (container, _a) {
84
- var regionOrCustomDomain = _a.instanceIdentifier;
85
- // Dependencies
86
- var app = container.getProvider('app-compat').getImmediate();
87
- var functionsServiceExp = container.getProvider('functions').getImmediate({
88
- identifier: regionOrCustomDomain !== null && regionOrCustomDomain !== void 0 ? regionOrCustomDomain : DEFAULT_REGION
89
- });
90
- return new FunctionsService(app, functionsServiceExp);
91
- };
92
- function registerFunctions() {
93
- var namespaceExports = {
94
- Functions: FunctionsService
95
- };
96
- firebase__default["default"].INTERNAL.registerComponent(new component.Component('functions-compat', factory, "PUBLIC" /* ComponentType.PUBLIC */)
97
- .setServiceProps(namespaceExports)
98
- .setMultipleInstances(true));
99
- }
100
-
101
- /**
102
- * @license
103
- * Copyright 2020 Google LLC
104
- *
105
- * Licensed under the Apache License, Version 2.0 (the "License");
106
- * you may not use this file except in compliance with the License.
107
- * You may obtain a copy of the License at
108
- *
109
- * http://www.apache.org/licenses/LICENSE-2.0
110
- *
111
- * Unless required by applicable law or agreed to in writing, software
112
- * distributed under the License is distributed on an "AS IS" BASIS,
113
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
114
- * See the License for the specific language governing permissions and
115
- * limitations under the License.
116
- */
117
- registerFunctions();
118
- firebase__default["default"].registerVersion(name, version, 'node');
119
- //# sourceMappingURL=index.node.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.node.cjs.js","sources":["../src/service.ts","../src/register.ts","../src/index.node.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2020 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 { FirebaseFunctions, HttpsCallable } from '@firebase/functions-types';\nimport {\n httpsCallable as httpsCallableExp,\n httpsCallableFromURL as httpsCallableFromURLExp,\n connectFunctionsEmulator as useFunctionsEmulatorExp,\n HttpsCallableOptions,\n Functions as FunctionsServiceExp\n} from '@firebase/functions';\nimport { FirebaseApp, _FirebaseService } from '@firebase/app-compat';\nimport { FirebaseError } from '@firebase/util';\n\nexport class FunctionsService implements FirebaseFunctions, _FirebaseService {\n /**\n * For testing.\n * @internal\n */\n _region: string;\n /**\n * For testing.\n * @internal\n */\n _customDomain: string | null;\n\n constructor(\n public app: FirebaseApp,\n readonly _delegate: FunctionsServiceExp\n ) {\n this._region = this._delegate.region;\n this._customDomain = this._delegate.customDomain;\n }\n httpsCallable(name: string, options?: HttpsCallableOptions): HttpsCallable {\n return httpsCallableExp(this._delegate, name, options);\n }\n httpsCallableFromURL(\n url: string,\n options?: HttpsCallableOptions\n ): HttpsCallable {\n return httpsCallableFromURLExp(this._delegate, url, options);\n }\n /**\n * Deprecated in pre-modularized repo, does not exist in modularized\n * functions package, need to convert to \"host\" and \"port\" args that\n * `useFunctionsEmulatorExp` takes.\n * @deprecated\n */\n useFunctionsEmulator(origin: string): void {\n const match = origin.match('[a-zA-Z]+://([a-zA-Z0-9.-]+)(?::([0-9]+))?');\n if (match == null) {\n throw new FirebaseError(\n 'functions',\n 'No origin provided to useFunctionsEmulator()'\n );\n }\n if (match[2] == null) {\n throw new FirebaseError(\n 'functions',\n 'Port missing in origin provided to useFunctionsEmulator()'\n );\n }\n return useFunctionsEmulatorExp(this._delegate, match[1], Number(match[2]));\n }\n useEmulator(host: string, port: number): void {\n return useFunctionsEmulatorExp(this._delegate, host, port);\n }\n}\n","/**\n * @license\n * Copyright 2020 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, { _FirebaseNamespace } from '@firebase/app-compat';\nimport { FunctionsService } from './service';\nimport {\n Component,\n ComponentType,\n InstanceFactory,\n ComponentContainer,\n InstanceFactoryOptions\n} from '@firebase/component';\n\nconst DEFAULT_REGION = 'us-central1';\n\nconst factory: InstanceFactory<'functions-compat'> = (\n container: ComponentContainer,\n { instanceIdentifier: regionOrCustomDomain }: InstanceFactoryOptions\n) => {\n // Dependencies\n const app = container.getProvider('app-compat').getImmediate();\n const functionsServiceExp = container.getProvider('functions').getImmediate({\n identifier: regionOrCustomDomain ?? DEFAULT_REGION\n });\n\n return new FunctionsService(app, functionsServiceExp);\n};\n\nexport function registerFunctions(): void {\n const namespaceExports = {\n Functions: FunctionsService\n };\n (firebase as _FirebaseNamespace).INTERNAL.registerComponent(\n new Component('functions-compat', factory, ComponentType.PUBLIC)\n .setServiceProps(namespaceExports)\n .setMultipleInstances(true)\n );\n}\n","/**\n * @license\n * Copyright 2020 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 from '@firebase/app-compat';\nimport { name, version } from '../package.json';\nimport { registerFunctions } from './register';\n\nregisterFunctions();\nfirebase.registerVersion(name, version, 'node');\n"],"names":["httpsCallableExp","httpsCallableFromURLExp","FirebaseError","useFunctionsEmulatorExp","firebase","Component"],"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;AAeG;AAaH,IAAA,gBAAA,kBAAA,YAAA;IAYE,SACS,gBAAA,CAAA,GAAgB,EACd,SAA8B,EAAA;QADhC,IAAG,CAAA,GAAA,GAAH,GAAG,CAAa;QACd,IAAS,CAAA,SAAA,GAAT,SAAS,CAAqB;QAEvC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;QACrC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;KAClD;AACD,IAAA,gBAAA,CAAA,SAAA,CAAA,aAAa,GAAb,UAAc,IAAY,EAAE,OAA8B,EAAA;QACxD,OAAOA,uBAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;KACxD,CAAA;AACD,IAAA,gBAAA,CAAA,SAAA,CAAA,oBAAoB,GAApB,UACE,GAAW,EACX,OAA8B,EAAA;QAE9B,OAAOC,8BAAuB,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;KAC9D,CAAA;AACD;;;;;AAKG;IACH,gBAAoB,CAAA,SAAA,CAAA,oBAAA,GAApB,UAAqB,MAAc,EAAA;QACjC,IAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,4CAA4C,CAAC,CAAC;QACzE,IAAI,KAAK,IAAI,IAAI,EAAE;AACjB,YAAA,MAAM,IAAIC,kBAAa,CACrB,WAAW,EACX,8CAA8C,CAC/C,CAAC;AACH,SAAA;AACD,QAAA,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE;AACpB,YAAA,MAAM,IAAIA,kBAAa,CACrB,WAAW,EACX,2DAA2D,CAC5D,CAAC;AACH,SAAA;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9B,CAAC;AACJ;;ACnDA;;;;;;;;;;;;;;;AAeG;AAMH,iBAAiB,EAAE,CAAC;AACpBD,4BAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC;;"}
@@ -1,111 +0,0 @@
1
- import firebase from '@firebase/app-compat';
2
- import { httpsCallable, httpsCallableFromURL, connectFunctionsEmulator } from '@firebase/functions';
3
- import { FirebaseError } from '@firebase/util';
4
- import { Component } from '@firebase/component';
5
-
6
- const name = "@firebase/functions-compat";
7
- const version = "0.3.14";
8
-
9
- /**
10
- * @license
11
- * Copyright 2020 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
- class FunctionsService {
26
- constructor(app, _delegate) {
27
- this.app = app;
28
- this._delegate = _delegate;
29
- this._region = this._delegate.region;
30
- this._customDomain = this._delegate.customDomain;
31
- }
32
- httpsCallable(name, options) {
33
- return httpsCallable(this._delegate, name, options);
34
- }
35
- httpsCallableFromURL(url, options) {
36
- return httpsCallableFromURL(this._delegate, url, options);
37
- }
38
- /**
39
- * Deprecated in pre-modularized repo, does not exist in modularized
40
- * functions package, need to convert to "host" and "port" args that
41
- * `useFunctionsEmulatorExp` takes.
42
- * @deprecated
43
- */
44
- useFunctionsEmulator(origin) {
45
- const match = origin.match('[a-zA-Z]+://([a-zA-Z0-9.-]+)(?::([0-9]+))?');
46
- if (match == null) {
47
- throw new FirebaseError('functions', 'No origin provided to useFunctionsEmulator()');
48
- }
49
- if (match[2] == null) {
50
- throw new FirebaseError('functions', 'Port missing in origin provided to useFunctionsEmulator()');
51
- }
52
- return connectFunctionsEmulator(this._delegate, match[1], Number(match[2]));
53
- }
54
- useEmulator(host, port) {
55
- return connectFunctionsEmulator(this._delegate, host, port);
56
- }
57
- }
58
-
59
- /**
60
- * @license
61
- * Copyright 2020 Google LLC
62
- *
63
- * Licensed under the Apache License, Version 2.0 (the "License");
64
- * you may not use this file except in compliance with the License.
65
- * You may obtain a copy of the License at
66
- *
67
- * http://www.apache.org/licenses/LICENSE-2.0
68
- *
69
- * Unless required by applicable law or agreed to in writing, software
70
- * distributed under the License is distributed on an "AS IS" BASIS,
71
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
72
- * See the License for the specific language governing permissions and
73
- * limitations under the License.
74
- */
75
- const DEFAULT_REGION = 'us-central1';
76
- const factory = (container, { instanceIdentifier: regionOrCustomDomain }) => {
77
- // Dependencies
78
- const app = container.getProvider('app-compat').getImmediate();
79
- const functionsServiceExp = container.getProvider('functions').getImmediate({
80
- identifier: regionOrCustomDomain !== null && regionOrCustomDomain !== void 0 ? regionOrCustomDomain : DEFAULT_REGION
81
- });
82
- return new FunctionsService(app, functionsServiceExp);
83
- };
84
- function registerFunctions() {
85
- const namespaceExports = {
86
- Functions: FunctionsService
87
- };
88
- firebase.INTERNAL.registerComponent(new Component('functions-compat', factory, "PUBLIC" /* ComponentType.PUBLIC */)
89
- .setServiceProps(namespaceExports)
90
- .setMultipleInstances(true));
91
- }
92
-
93
- /**
94
- * @license
95
- * Copyright 2020 Google LLC
96
- *
97
- * Licensed under the Apache License, Version 2.0 (the "License");
98
- * you may not use this file except in compliance with the License.
99
- * You may obtain a copy of the License at
100
- *
101
- * http://www.apache.org/licenses/LICENSE-2.0
102
- *
103
- * Unless required by applicable law or agreed to in writing, software
104
- * distributed under the License is distributed on an "AS IS" BASIS,
105
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
106
- * See the License for the specific language governing permissions and
107
- * limitations under the License.
108
- */
109
- registerFunctions();
110
- firebase.registerVersion(name, version, 'node');
111
- //# sourceMappingURL=index.node.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.node.esm.js","sources":["../../src/service.ts","../../src/register.ts","../../src/index.node.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2020 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 { FirebaseFunctions, HttpsCallable } from '@firebase/functions-types';\nimport {\n httpsCallable as httpsCallableExp,\n httpsCallableFromURL as httpsCallableFromURLExp,\n connectFunctionsEmulator as useFunctionsEmulatorExp,\n HttpsCallableOptions,\n Functions as FunctionsServiceExp\n} from '@firebase/functions';\nimport { FirebaseApp, _FirebaseService } from '@firebase/app-compat';\nimport { FirebaseError } from '@firebase/util';\n\nexport class FunctionsService implements FirebaseFunctions, _FirebaseService {\n /**\n * For testing.\n * @internal\n */\n _region: string;\n /**\n * For testing.\n * @internal\n */\n _customDomain: string | null;\n\n constructor(\n public app: FirebaseApp,\n readonly _delegate: FunctionsServiceExp\n ) {\n this._region = this._delegate.region;\n this._customDomain = this._delegate.customDomain;\n }\n httpsCallable(name: string, options?: HttpsCallableOptions): HttpsCallable {\n return httpsCallableExp(this._delegate, name, options);\n }\n httpsCallableFromURL(\n url: string,\n options?: HttpsCallableOptions\n ): HttpsCallable {\n return httpsCallableFromURLExp(this._delegate, url, options);\n }\n /**\n * Deprecated in pre-modularized repo, does not exist in modularized\n * functions package, need to convert to \"host\" and \"port\" args that\n * `useFunctionsEmulatorExp` takes.\n * @deprecated\n */\n useFunctionsEmulator(origin: string): void {\n const match = origin.match('[a-zA-Z]+://([a-zA-Z0-9.-]+)(?::([0-9]+))?');\n if (match == null) {\n throw new FirebaseError(\n 'functions',\n 'No origin provided to useFunctionsEmulator()'\n );\n }\n if (match[2] == null) {\n throw new FirebaseError(\n 'functions',\n 'Port missing in origin provided to useFunctionsEmulator()'\n );\n }\n return useFunctionsEmulatorExp(this._delegate, match[1], Number(match[2]));\n }\n useEmulator(host: string, port: number): void {\n return useFunctionsEmulatorExp(this._delegate, host, port);\n }\n}\n","/**\n * @license\n * Copyright 2020 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, { _FirebaseNamespace } from '@firebase/app-compat';\nimport { FunctionsService } from './service';\nimport {\n Component,\n ComponentType,\n InstanceFactory,\n ComponentContainer,\n InstanceFactoryOptions\n} from '@firebase/component';\n\nconst DEFAULT_REGION = 'us-central1';\n\nconst factory: InstanceFactory<'functions-compat'> = (\n container: ComponentContainer,\n { instanceIdentifier: regionOrCustomDomain }: InstanceFactoryOptions\n) => {\n // Dependencies\n const app = container.getProvider('app-compat').getImmediate();\n const functionsServiceExp = container.getProvider('functions').getImmediate({\n identifier: regionOrCustomDomain ?? DEFAULT_REGION\n });\n\n return new FunctionsService(app, functionsServiceExp);\n};\n\nexport function registerFunctions(): void {\n const namespaceExports = {\n Functions: FunctionsService\n };\n (firebase as _FirebaseNamespace).INTERNAL.registerComponent(\n new Component('functions-compat', factory, ComponentType.PUBLIC)\n .setServiceProps(namespaceExports)\n .setMultipleInstances(true)\n );\n}\n","/**\n * @license\n * Copyright 2020 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 from '@firebase/app-compat';\nimport { name, version } from '../package.json';\nimport { registerFunctions } from './register';\n\nregisterFunctions();\nfirebase.registerVersion(name, version, 'node');\n"],"names":["httpsCallableExp","httpsCallableFromURLExp","useFunctionsEmulatorExp"],"mappings":";;;;;;;;AAAA;;;;;;;;;;;;;;;AAeG;MAaU,gBAAgB,CAAA;IAY3B,WACS,CAAA,GAAgB,EACd,SAA8B,EAAA;QADhC,IAAG,CAAA,GAAA,GAAH,GAAG,CAAa;QACd,IAAS,CAAA,SAAA,GAAT,SAAS,CAAqB;QAEvC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;QACrC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;KAClD;IACD,aAAa,CAAC,IAAY,EAAE,OAA8B,EAAA;QACxD,OAAOA,aAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;KACxD;IACD,oBAAoB,CAClB,GAAW,EACX,OAA8B,EAAA;QAE9B,OAAOC,oBAAuB,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;KAC9D;AACD;;;;;AAKG;AACH,IAAA,oBAAoB,CAAC,MAAc,EAAA;QACjC,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,4CAA4C,CAAC,CAAC;QACzE,IAAI,KAAK,IAAI,IAAI,EAAE;AACjB,YAAA,MAAM,IAAI,aAAa,CACrB,WAAW,EACX,8CAA8C,CAC/C,CAAC;AACH,SAAA;AACD,QAAA,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE;AACpB,YAAA,MAAM,I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AAC;AACpB,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC"}
@@ -1,17 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2020 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- export {};
@@ -1,17 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2020 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- export {};
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes