@capacitor-firebase/functions 6.2.0 → 6.3.1
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/README.md +5 -4
- package/dist/docs.json +16 -0
- package/dist/esm/definitions.d.ts +7 -0
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.js +1 -1
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +1 -1
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +1 -1
- package/dist/plugin.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -179,10 +179,11 @@ On Android, the cleartext traffic must be allowed. On the Capacitor configuratio
|
|
|
179
179
|
|
|
180
180
|
#### UseEmulatorOptions
|
|
181
181
|
|
|
182
|
-
| Prop
|
|
183
|
-
|
|
|
184
|
-
| **`host`**
|
|
185
|
-
| **`port`**
|
|
182
|
+
| Prop | Type | Description | Default | Since |
|
|
183
|
+
| -------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ----- |
|
|
184
|
+
| **`host`** | <code>string</code> | The emulator host without any port or scheme. Note when using a Android Emulator device: 10.0.2.2 is the special IP address to connect to the 'localhost' of the host computer. | | 6.1.0 |
|
|
185
|
+
| **`port`** | <code>number</code> | The emulator port. | <code>5001</code> | 6.1.0 |
|
|
186
|
+
| **`regionOrCustomDomain`** | <code>string</code> | The region the callable functions are located in or a custom domain hosting the callable functions. | | |
|
|
186
187
|
|
|
187
188
|
|
|
188
189
|
### Type Aliases
|
package/dist/docs.json
CHANGED
|
@@ -235,6 +235,22 @@
|
|
|
235
235
|
"docs": "The emulator port.",
|
|
236
236
|
"complexTypes": [],
|
|
237
237
|
"type": "number | undefined"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"name": "regionOrCustomDomain",
|
|
241
|
+
"tags": [
|
|
242
|
+
{
|
|
243
|
+
"text": "'us-central1'",
|
|
244
|
+
"name": "example"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"text": "'https://mydomain.com'",
|
|
248
|
+
"name": "example"
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
"docs": "The region the callable functions are located in or a custom domain hosting the callable functions.",
|
|
252
|
+
"complexTypes": [],
|
|
253
|
+
"type": "string | undefined"
|
|
238
254
|
}
|
|
239
255
|
]
|
|
240
256
|
}
|
|
@@ -110,4 +110,11 @@ export interface UseEmulatorOptions {
|
|
|
110
110
|
* @example 5001
|
|
111
111
|
*/
|
|
112
112
|
port?: number;
|
|
113
|
+
/**
|
|
114
|
+
* The region the callable functions are located in or a custom domain hosting the callable functions.
|
|
115
|
+
*
|
|
116
|
+
* @example 'us-central1'
|
|
117
|
+
* @example 'https://mydomain.com'
|
|
118
|
+
*/
|
|
119
|
+
regionOrCustomDomain?: string;
|
|
113
120
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface FirebaseFunctionsPlugin {\n /**\n * Call a callable function by name.\n *\n * @since 6.1.0\n */\n callByName<RequestData = unknown, ResponseData = unknown>(\n options: CallByNameOptions<RequestData>,\n ): Promise<CallByNameResult<ResponseData>>;\n /**\n * Call a callable function by URL.\n *\n * @since 6.1.0\n */\n callByUrl<RequestData = unknown, ResponseData = unknown>(\n options: CallByUrlOptions<RequestData>,\n ): Promise<CallByUrlResult<ResponseData>>;\n /**\n * Instrument your app to talk to the Cloud Functions emulator.\n *\n * On Android, the cleartext traffic must be allowed. On the Capacitor configuration:\n * ```\n * {\n * server: {\n * cleartext: true\n * }\n * }\n * ```\n * **The cleartext traffic is not intended for use in production.**\n *\n * @since 6.1.0\n */\n useEmulator(options: UseEmulatorOptions): Promise<void>;\n}\n\n/**\n * @since 6.1.0\n */\nexport interface CallByNameOptions<RequestData = unknown>\n extends CallOptions<RequestData> {\n /**\n * The name of the callable function.\n *\n * @example 'myFunction'\n * @since 6.1.0\n */\n name: string;\n /**\n * The region of the callable function.\n *\n * @example 'us-central1'\n * @since 6.1.0\n */\n region?: string;\n}\n\n/**\n * @since 6.1.0\n */\nexport type CallByNameResult<ResponseData = unknown> = CallResult<ResponseData>;\n\n/**\n * @since 6.1.0\n */\nexport interface CallByUrlOptions<RequestData = unknown>\n extends CallOptions<RequestData> {\n /**\n * The URL of the callable function.\n *\n * @example 'https://us-central1-my-project.cloudfunctions.net/myFunction'\n * @since 6.1.0\n */\n url: string;\n}\n\n/**\n * @since 6.1.0\n */\nexport type CallByUrlResult<ResponseData = unknown> = CallResult<ResponseData>;\n\n/**\n * @since 6.1.0\n */\nexport interface CallOptions<RequestData = unknown> {\n /**\n * The data to pass to the callable function.\n *\n * @since 6.1.0\n */\n data?: RequestData | null;\n}\n\n/**\n * @since 6.1.0\n */\nexport interface CallResult<ResponseData = unknown> {\n /**\n * The result of the callable function.\n *\n * @since 6.1.0\n */\n data: ResponseData;\n}\n\n/**\n * @since 6.1.0\n */\nexport interface UseEmulatorOptions {\n /**\n * The emulator host without any port or scheme.\n *\n * Note when using a Android Emulator device: 10.0.2.2 is the special IP address to connect to the 'localhost' of the host computer.\n *\n * @since 6.1.0\n * @example \"127.0.0.1\"\n */\n host: string;\n /**\n * The emulator port.\n *\n * @since 6.1.0\n * @default 5001\n * @example 5001\n */\n port?: number;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface FirebaseFunctionsPlugin {\n /**\n * Call a callable function by name.\n *\n * @since 6.1.0\n */\n callByName<RequestData = unknown, ResponseData = unknown>(\n options: CallByNameOptions<RequestData>,\n ): Promise<CallByNameResult<ResponseData>>;\n /**\n * Call a callable function by URL.\n *\n * @since 6.1.0\n */\n callByUrl<RequestData = unknown, ResponseData = unknown>(\n options: CallByUrlOptions<RequestData>,\n ): Promise<CallByUrlResult<ResponseData>>;\n /**\n * Instrument your app to talk to the Cloud Functions emulator.\n *\n * On Android, the cleartext traffic must be allowed. On the Capacitor configuration:\n * ```\n * {\n * server: {\n * cleartext: true\n * }\n * }\n * ```\n * **The cleartext traffic is not intended for use in production.**\n *\n * @since 6.1.0\n */\n useEmulator(options: UseEmulatorOptions): Promise<void>;\n}\n\n/**\n * @since 6.1.0\n */\nexport interface CallByNameOptions<RequestData = unknown>\n extends CallOptions<RequestData> {\n /**\n * The name of the callable function.\n *\n * @example 'myFunction'\n * @since 6.1.0\n */\n name: string;\n /**\n * The region of the callable function.\n *\n * @example 'us-central1'\n * @since 6.1.0\n */\n region?: string;\n}\n\n/**\n * @since 6.1.0\n */\nexport type CallByNameResult<ResponseData = unknown> = CallResult<ResponseData>;\n\n/**\n * @since 6.1.0\n */\nexport interface CallByUrlOptions<RequestData = unknown>\n extends CallOptions<RequestData> {\n /**\n * The URL of the callable function.\n *\n * @example 'https://us-central1-my-project.cloudfunctions.net/myFunction'\n * @since 6.1.0\n */\n url: string;\n}\n\n/**\n * @since 6.1.0\n */\nexport type CallByUrlResult<ResponseData = unknown> = CallResult<ResponseData>;\n\n/**\n * @since 6.1.0\n */\nexport interface CallOptions<RequestData = unknown> {\n /**\n * The data to pass to the callable function.\n *\n * @since 6.1.0\n */\n data?: RequestData | null;\n}\n\n/**\n * @since 6.1.0\n */\nexport interface CallResult<ResponseData = unknown> {\n /**\n * The result of the callable function.\n *\n * @since 6.1.0\n */\n data: ResponseData;\n}\n\n/**\n * @since 6.1.0\n */\nexport interface UseEmulatorOptions {\n /**\n * The emulator host without any port or scheme.\n *\n * Note when using a Android Emulator device: 10.0.2.2 is the special IP address to connect to the 'localhost' of the host computer.\n *\n * @since 6.1.0\n * @example \"127.0.0.1\"\n */\n host: string;\n /**\n * The emulator port.\n *\n * @since 6.1.0\n * @default 5001\n * @example 5001\n */\n port?: number;\n /**\n * The region the callable functions are located in or a custom domain hosting the callable functions.\n *\n * @example 'us-central1'\n * @example 'https://mydomain.com'\n */\n regionOrCustomDomain?: string;\n}\n"]}
|
package/dist/esm/web.js
CHANGED
|
@@ -18,7 +18,7 @@ export class FirebaseFunctionsWeb extends WebPlugin {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
async useEmulator(options) {
|
|
21
|
-
const functions = getFunctions();
|
|
21
|
+
const functions = getFunctions(undefined, options.regionOrCustomDomain);
|
|
22
22
|
const port = options.port || 5001;
|
|
23
23
|
connectFunctionsEmulator(functions, options.host, port);
|
|
24
24
|
}
|
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EACL,wBAAwB,EACxB,YAAY,EACZ,aAAa,EACb,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAW5B,MAAM,OAAO,oBACX,SAAQ,SAAS;IAGV,KAAK,CAAC,UAAU,CACrB,OAAuC;QAEvC,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QAC1D,MAAM,QAAQ,GAAG,aAAa,CAC5B,SAAS,EACT,OAAO,CAAC,IAAI,CACb,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5C,OAAO;YACL,IAAI,EAAE,MAAM,CAAC,IAAI;SAClB,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,SAAS,CACpB,OAAsC;QAEtC,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;QACjC,MAAM,QAAQ,GAAG,oBAAoB,CACnC,SAAS,EACT,OAAO,CAAC,GAAG,CACZ,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5C,OAAO;YACL,IAAI,EAAE,MAAM,CAAC,IAAI;SAClB,CAA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AAC,CAAC;IAC1D,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\nimport {\n connectFunctionsEmulator,\n getFunctions,\n httpsCallable,\n httpsCallableFromURL,\n} from 'firebase/functions';\n\nimport type {\n CallByNameOptions,\n CallByNameResult,\n CallByUrlOptions,\n CallResult,\n FirebaseFunctionsPlugin,\n UseEmulatorOptions,\n} from './definitions';\n\nexport class FirebaseFunctionsWeb\n extends WebPlugin\n implements FirebaseFunctionsPlugin\n{\n public async callByName<RequestData = unknown, ResponseData = unknown>(\n options: CallByNameOptions<RequestData>,\n ): Promise<CallByNameResult<ResponseData>> {\n const functions = getFunctions(undefined, options.region);\n const callable = httpsCallable<RequestData, ResponseData>(\n functions,\n options.name,\n );\n const result = await callable(options.data);\n return {\n data: result.data,\n };\n }\n\n public async callByUrl<RequestData = unknown, ResponseData = unknown>(\n options: CallByUrlOptions<RequestData>,\n ): Promise<CallResult<ResponseData>> {\n const functions = getFunctions();\n const callable = httpsCallableFromURL<RequestData, ResponseData>(\n functions,\n options.url,\n );\n const result = await callable(options.data);\n return {\n data: result.data,\n };\n }\n\n public async useEmulator(options: UseEmulatorOptions): Promise<void> {\n const functions = getFunctions(undefined, options.regionOrCustomDomain);\n const port = options.port || 5001;\n connectFunctionsEmulator(functions, options.host, port);\n }\n}\n"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -27,7 +27,7 @@ class FirebaseFunctionsWeb extends core.WebPlugin {
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
async useEmulator(options) {
|
|
30
|
-
const functions$1 = functions.getFunctions();
|
|
30
|
+
const functions$1 = functions.getFunctions(undefined, options.regionOrCustomDomain);
|
|
31
31
|
const port = options.port || 5001;
|
|
32
32
|
functions.connectFunctionsEmulator(functions$1, options.host, port);
|
|
33
33
|
}
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst FirebaseFunctions = registerPlugin('FirebaseFunctions', {\n web: () => import('./web').then(m => new m.FirebaseFunctionsWeb()),\n});\nexport * from './definitions';\nexport { FirebaseFunctions };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { connectFunctionsEmulator, getFunctions, httpsCallable, httpsCallableFromURL, } from 'firebase/functions';\nexport class FirebaseFunctionsWeb extends WebPlugin {\n async callByName(options) {\n const functions = getFunctions(undefined, options.region);\n const callable = httpsCallable(functions, options.name);\n const result = await callable(options.data);\n return {\n data: result.data,\n };\n }\n async callByUrl(options) {\n const functions = getFunctions();\n const callable = httpsCallableFromURL(functions, options.url);\n const result = await callable(options.data);\n return {\n data: result.data,\n };\n }\n async useEmulator(options) {\n const functions = getFunctions();\n const port = options.port || 5001;\n connectFunctionsEmulator(functions, options.host, port);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","functions","getFunctions","httpsCallable","httpsCallableFromURL","connectFunctionsEmulator"],"mappings":";;;;;;;AACK,MAAC,iBAAiB,GAAGA,mBAAc,CAAC,mBAAmB,EAAE;AAC9D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,oBAAoB,EAAE,CAAC;AACtE,CAAC;;ACDM,MAAM,oBAAoB,SAASC,cAAS,CAAC;AACpD,IAAI,MAAM,UAAU,CAAC,OAAO,EAAE;AAC9B,QAAQ,MAAMC,WAAS,GAAGC,sBAAY,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;AAClE,QAAQ,MAAM,QAAQ,GAAGC,uBAAa,CAACF,WAAS,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;AAChE,QAAQ,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACpD,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,MAAM,CAAC,IAAI;AAC7B,SAAS,CAAC;AACV,KAAK;AACL,IAAI,MAAM,SAAS,CAAC,OAAO,EAAE;AAC7B,QAAQ,MAAMA,WAAS,GAAGC,sBAAY,EAAE,CAAC;AACzC,QAAQ,MAAM,QAAQ,GAAGE,8BAAoB,CAACH,WAAS,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;AACtE,QAAQ,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACpD,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,MAAM,CAAC,IAAI;AAC7B,SAAS,CAAC;AACV,KAAK;AACL,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE;AAC/B,QAAQ,MAAMA,WAAS,GAAGC,sBAAY,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst FirebaseFunctions = registerPlugin('FirebaseFunctions', {\n web: () => import('./web').then(m => new m.FirebaseFunctionsWeb()),\n});\nexport * from './definitions';\nexport { FirebaseFunctions };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { connectFunctionsEmulator, getFunctions, httpsCallable, httpsCallableFromURL, } from 'firebase/functions';\nexport class FirebaseFunctionsWeb extends WebPlugin {\n async callByName(options) {\n const functions = getFunctions(undefined, options.region);\n const callable = httpsCallable(functions, options.name);\n const result = await callable(options.data);\n return {\n data: result.data,\n };\n }\n async callByUrl(options) {\n const functions = getFunctions();\n const callable = httpsCallableFromURL(functions, options.url);\n const result = await callable(options.data);\n return {\n data: result.data,\n };\n }\n async useEmulator(options) {\n const functions = getFunctions(undefined, options.regionOrCustomDomain);\n const port = options.port || 5001;\n connectFunctionsEmulator(functions, options.host, port);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","functions","getFunctions","httpsCallable","httpsCallableFromURL","connectFunctionsEmulator"],"mapp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,EAAE,IAAI,CAAC,CAAC;AAChE,KAAK;AACL;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -23,7 +23,7 @@ var capacitorFirebaseFunctions = (function (exports, core, functions) {
|
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
async useEmulator(options) {
|
|
26
|
-
const functions$1 = functions.getFunctions();
|
|
26
|
+
const functions$1 = functions.getFunctions(undefined, options.regionOrCustomDomain);
|
|
27
27
|
const port = options.port || 5001;
|
|
28
28
|
functions.connectFunctionsEmulator(functions$1, options.host, port);
|
|
29
29
|
}
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst FirebaseFunctions = registerPlugin('FirebaseFunctions', {\n web: () => import('./web').then(m => new m.FirebaseFunctionsWeb()),\n});\nexport * from './definitions';\nexport { FirebaseFunctions };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { connectFunctionsEmulator, getFunctions, httpsCallable, httpsCallableFromURL, } from 'firebase/functions';\nexport class FirebaseFunctionsWeb extends WebPlugin {\n async callByName(options) {\n const functions = getFunctions(undefined, options.region);\n const callable = httpsCallable(functions, options.name);\n const result = await callable(options.data);\n return {\n data: result.data,\n };\n }\n async callByUrl(options) {\n const functions = getFunctions();\n const callable = httpsCallableFromURL(functions, options.url);\n const result = await callable(options.data);\n return {\n data: result.data,\n };\n }\n async useEmulator(options) {\n const functions = getFunctions();\n const port = options.port || 5001;\n connectFunctionsEmulator(functions, options.host, port);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","functions","getFunctions","httpsCallable","httpsCallableFromURL","connectFunctionsEmulator"],"mappings":";;;AACK,UAAC,iBAAiB,GAAGA,mBAAc,CAAC,mBAAmB,EAAE;IAC9D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,oBAAoB,EAAE,CAAC;IACtE,CAAC;;ICDM,MAAM,oBAAoB,SAASC,cAAS,CAAC;IACpD,IAAI,MAAM,UAAU,CAAC,OAAO,EAAE;IAC9B,QAAQ,MAAMC,WAAS,GAAGC,sBAAY,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAClE,QAAQ,MAAM,QAAQ,GAAGC,uBAAa,CAACF,WAAS,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,QAAQ,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,QAAQ,OAAO;IACf,YAAY,IAAI,EAAE,MAAM,CAAC,IAAI;IAC7B,SAAS,CAAC;IACV,KAAK;IACL,IAAI,MAAM,SAAS,CAAC,OAAO,EAAE;IAC7B,QAAQ,MAAMA,WAAS,GAAGC,sBAAY,EAAE,CAAC;IACzC,QAAQ,MAAM,QAAQ,GAAGE,8BAAoB,CAACH,WAAS,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IACtE,QAAQ,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,QAAQ,OAAO;IACf,YAAY,IAAI,EAAE,MAAM,CAAC,IAAI;IAC7B,SAAS,CAAC;IACV,KAAK;IACL,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE;IAC/B,QAAQ,MAAMA,WAAS,GAAGC,sBAAY,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst FirebaseFunctions = registerPlugin('FirebaseFunctions', {\n web: () => import('./web').then(m => new m.FirebaseFunctionsWeb()),\n});\nexport * from './definitions';\nexport { FirebaseFunctions };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { connectFunctionsEmulator, getFunctions, httpsCallable, httpsCallableFromURL, } from 'firebase/functions';\nexport class FirebaseFunctionsWeb extends WebPlugin {\n async callByName(options) {\n const functions = getFunctions(undefined, options.region);\n const callable = httpsCallable(functions, options.name);\n const result = await callable(options.data);\n return {\n data: result.data,\n };\n }\n async callByUrl(options) {\n const functions = getFunctions();\n const callable = httpsCallableFromURL(functions, options.url);\n const result = await callable(options.data);\n return {\n data: result.data,\n };\n }\n async useEmulator(options) {\n const functions = getFunctions(undefined, options.regionOrCustomDomain);\n const port = options.port || 5001;\n connectFunctionsEmulator(functions, options.host, port);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","functions","getFunctions","httpsCallable","httpsCallableFromURL","connectFunctionsEmulator"],"mappings":";;;AACK,UAAC,iBAAiB,GAAGA,mBAAc,CAAC,mBAAmB,EAAE;IAC9D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,oBAAoB,EAAE,CAAC;IACtE,CAAC;;ICDM,MAAM,oBAAoB,SAASC,cAAS,CAAC;IACpD,IAAI,MAAM,UAAU,CAAC,OAAO,EAAE;IAC9B,QAAQ,MAAMC,WAAS,GAAGC,sBAAY,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAClE,QAAQ,MAAM,QAAQ,GAAGC,uBAAa,CAACF,WAAS,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,QAAQ,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,QAAQ,OAAO;IACf,YAAY,IAAI,EAAE,MAAM,CAAC,IAAI;IAC7B,SAAS,CAAC;IACV,KAAK;IACL,IAAI,MAAM,SAAS,CAAC,OAAO,EAAE;IAC7B,QAAQ,MAAMA,WAAS,GAAGC,sBAAY,EAAE,CAAC;IACzC,QAAQ,MAAM,QAAQ,GAAGE,8BAAoB,CAACH,WAAS,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IACtE,QAAQ,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,QAAQ,OAAO;IACf,YAAY,IAAI,EAAE,MAAM,CAAC,IAAI;IAC7B,SAAS,CAAC;IACV,KAAK;IACL,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE;IAC/B,QAAQ,MAAMA,WAAS,GAAGC,sBAAY,CAAC,SAAS,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAChF,QAAQ,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC;IAC1C,QAAQG,kCAAwB,CAACJ,WAAS,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAChE,KAAK;IACL;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor-firebase/functions",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.1",
|
|
4
4
|
"description": "Capacitor plugin for Firebase Cloud Functions.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@capacitor/android": "6.0.0",
|
|
60
60
|
"@capacitor/cli": "6.0.0",
|
|
61
61
|
"@capacitor/core": "6.0.0",
|
|
62
|
-
"@capacitor/docgen": "0.
|
|
62
|
+
"@capacitor/docgen": "0.3.0",
|
|
63
63
|
"@capacitor/ios": "6.0.0",
|
|
64
64
|
"@ionic/eslint-config": "0.3.0",
|
|
65
65
|
"@ionic/swiftlint-config": "1.1.2",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"@capacitor/core": "^6.0.0",
|
|
77
|
-
"firebase": "^10.9.0"
|
|
77
|
+
"firebase": "^10.9.0 || ^11.0.0"
|
|
78
78
|
},
|
|
79
79
|
"peerDependenciesMeta": {
|
|
80
80
|
"firebase": {
|