@firebase/util 1.10.1 → 1.10.2-canary.0755a723d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +2059 -2088
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +38 -39
- package/dist/index.esm2017.js +2060 -2088
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.node.cjs.js +2076 -2105
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.d.ts +38 -39
- package/dist/node-esm/index.d.ts +38 -39
- package/dist/node-esm/index.node.d.ts +38 -39
- package/dist/node-esm/index.node.esm.js +2077 -2105
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/dist/node-esm/src/assert.d.ts +24 -24
- package/dist/node-esm/src/compat.d.ts +20 -20
- package/dist/node-esm/src/constants.d.ts +33 -33
- package/dist/node-esm/src/crypt.d.ts +66 -66
- package/dist/node-esm/src/deepCopy.d.ts +35 -35
- package/dist/node-esm/src/defaults.d.ts +79 -79
- package/dist/node-esm/src/deferred.d.ts +28 -28
- package/dist/node-esm/src/emulator.d.ts +47 -47
- package/dist/node-esm/src/environment.d.ts +90 -90
- package/dist/node-esm/src/errors.d.ts +87 -87
- package/dist/node-esm/src/exponential_backoff.d.ts +37 -37
- package/dist/node-esm/src/formatters.d.ts +20 -20
- package/dist/node-esm/src/global.d.ts +22 -22
- package/dist/node-esm/src/json.d.ts +29 -29
- package/dist/node-esm/src/jwt.d.ts +73 -73
- package/dist/node-esm/src/obj.d.ts +30 -30
- package/dist/node-esm/src/promise.d.ts +21 -21
- package/dist/node-esm/src/query.d.ts +33 -33
- package/dist/node-esm/src/sha1.d.ts +84 -84
- package/dist/node-esm/src/subscribe.d.ts +49 -49
- package/dist/node-esm/src/utf8.d.ts +27 -27
- package/dist/node-esm/src/validation.d.ts +43 -43
- package/dist/node-esm/test/base64.test.d.ts +1 -1
- package/dist/node-esm/test/compat.test.d.ts +17 -17
- package/dist/node-esm/test/deepCopy.test.d.ts +1 -1
- package/dist/node-esm/test/defaults.test.d.ts +1 -1
- package/dist/node-esm/test/emulator.test.d.ts +1 -1
- package/dist/node-esm/test/environments.test.d.ts +17 -17
- package/dist/node-esm/test/errors.test.d.ts +1 -1
- package/dist/node-esm/test/exponential_backoff.test.d.ts +17 -17
- package/dist/node-esm/test/object.test.d.ts +17 -17
- package/dist/node-esm/test/subscribe.test.d.ts +17 -17
- package/dist/src/assert.d.ts +24 -24
- package/dist/src/compat.d.ts +20 -20
- package/dist/src/constants.d.ts +33 -33
- package/dist/src/crypt.d.ts +66 -66
- package/dist/src/deepCopy.d.ts +35 -35
- package/dist/src/defaults.d.ts +79 -79
- package/dist/src/deferred.d.ts +28 -28
- package/dist/src/emulator.d.ts +47 -47
- package/dist/src/environment.d.ts +90 -90
- package/dist/src/errors.d.ts +87 -87
- package/dist/src/exponential_backoff.d.ts +37 -37
- package/dist/src/formatters.d.ts +20 -20
- package/dist/src/global.d.ts +22 -22
- package/dist/src/json.d.ts +29 -29
- package/dist/src/jwt.d.ts +73 -73
- package/dist/src/obj.d.ts +30 -30
- package/dist/src/promise.d.ts +21 -21
- package/dist/src/query.d.ts +33 -33
- package/dist/src/sha1.d.ts +84 -84
- package/dist/src/subscribe.d.ts +49 -49
- package/dist/src/utf8.d.ts +27 -27
- package/dist/src/validation.d.ts +43 -43
- package/dist/test/base64.test.d.ts +1 -1
- package/dist/test/compat.test.d.ts +17 -17
- package/dist/test/deepCopy.test.d.ts +1 -1
- package/dist/test/defaults.test.d.ts +1 -1
- package/dist/test/emulator.test.d.ts +1 -1
- package/dist/test/environments.test.d.ts +17 -17
- package/dist/test/errors.test.d.ts +1 -1
- package/dist/test/exponential_backoff.test.d.ts +17 -17
- package/dist/test/object.test.d.ts +17 -17
- package/dist/test/subscribe.test.d.ts +17 -17
- package/dist/util-public.d.ts +0 -7
- package/dist/util.d.ts +0 -7
- package/package.json +2 -2
- package/dist/node-esm/src/uuid.d.ts +0 -22
- package/dist/src/uuid.d.ts +0 -22
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 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
|
-
/**
|
|
18
|
-
* @param {string} str
|
|
19
|
-
* @return {Array}
|
|
20
|
-
*/
|
|
21
|
-
export declare const stringToByteArray: (str: string) => number[];
|
|
22
|
-
/**
|
|
23
|
-
* Calculate length without actually converting; useful for doing cheaper validation.
|
|
24
|
-
* @param {string} str
|
|
25
|
-
* @return {number}
|
|
26
|
-
*/
|
|
27
|
-
export declare const stringLength: (str: string) => number;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 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
|
+
/**
|
|
18
|
+
* @param {string} str
|
|
19
|
+
* @return {Array}
|
|
20
|
+
*/
|
|
21
|
+
export declare const stringToByteArray: (str: string) => number[];
|
|
22
|
+
/**
|
|
23
|
+
* Calculate length without actually converting; useful for doing cheaper validation.
|
|
24
|
+
* @param {string} str
|
|
25
|
+
* @return {number}
|
|
26
|
+
*/
|
|
27
|
+
export declare const stringLength: (str: string) => number;
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 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
|
-
/**
|
|
18
|
-
* Check to make sure the appropriate number of arguments are provided for a public function.
|
|
19
|
-
* Throws an error if it fails.
|
|
20
|
-
*
|
|
21
|
-
* @param fnName The function name
|
|
22
|
-
* @param minCount The minimum number of arguments to allow for the function call
|
|
23
|
-
* @param maxCount The maximum number of argument to allow for the function call
|
|
24
|
-
* @param argCount The actual number of arguments provided.
|
|
25
|
-
*/
|
|
26
|
-
export declare const validateArgCount: (fnName: string, minCount: number, maxCount: number, argCount: number) => void;
|
|
27
|
-
/**
|
|
28
|
-
* Generates a string to prefix an error message about failed argument validation
|
|
29
|
-
*
|
|
30
|
-
* @param fnName The function name
|
|
31
|
-
* @param argName The name of the argument
|
|
32
|
-
* @return The prefix to add to the error thrown for validation.
|
|
33
|
-
*/
|
|
34
|
-
export declare function errorPrefix(fnName: string, argName: string): string;
|
|
35
|
-
/**
|
|
36
|
-
* @param fnName
|
|
37
|
-
* @param argumentNumber
|
|
38
|
-
* @param namespace
|
|
39
|
-
* @param optional
|
|
40
|
-
*/
|
|
41
|
-
export declare function validateNamespace(fnName: string, namespace: string, optional: boolean): void;
|
|
42
|
-
export declare function validateCallback(fnName: string, argumentName: string, callback: Function, optional: boolean): void;
|
|
43
|
-
export declare function validateContextObject(fnName: string, argumentName: string, context: unknown, optional: boolean): void;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 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
|
+
/**
|
|
18
|
+
* Check to make sure the appropriate number of arguments are provided for a public function.
|
|
19
|
+
* Throws an error if it fails.
|
|
20
|
+
*
|
|
21
|
+
* @param fnName The function name
|
|
22
|
+
* @param minCount The minimum number of arguments to allow for the function call
|
|
23
|
+
* @param maxCount The maximum number of argument to allow for the function call
|
|
24
|
+
* @param argCount The actual number of arguments provided.
|
|
25
|
+
*/
|
|
26
|
+
export declare const validateArgCount: (fnName: string, minCount: number, maxCount: number, argCount: number) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Generates a string to prefix an error message about failed argument validation
|
|
29
|
+
*
|
|
30
|
+
* @param fnName The function name
|
|
31
|
+
* @param argName The name of the argument
|
|
32
|
+
* @return The prefix to add to the error thrown for validation.
|
|
33
|
+
*/
|
|
34
|
+
export declare function errorPrefix(fnName: string, argName: string): string;
|
|
35
|
+
/**
|
|
36
|
+
* @param fnName
|
|
37
|
+
* @param argumentNumber
|
|
38
|
+
* @param namespace
|
|
39
|
+
* @param optional
|
|
40
|
+
*/
|
|
41
|
+
export declare function validateNamespace(fnName: string, namespace: string, optional: boolean): void;
|
|
42
|
+
export declare function validateCallback(fnName: string, argumentName: string, callback: Function, optional: boolean): void;
|
|
43
|
+
export declare function validateContextObject(fnName: string, argumentName: string, context: unknown, optional: boolean): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2021 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
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 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 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 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
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 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 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 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
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 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 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2021 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
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 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 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 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
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 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 {};
|
package/dist/src/assert.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 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
|
-
/**
|
|
18
|
-
* Throws an error if the provided assertion is falsy
|
|
19
|
-
*/
|
|
20
|
-
export declare const assert: (assertion: unknown, message: string) => void;
|
|
21
|
-
/**
|
|
22
|
-
* Returns an Error object suitable for throwing.
|
|
23
|
-
*/
|
|
24
|
-
export declare const assertionError: (message: string) => Error;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 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
|
+
/**
|
|
18
|
+
* Throws an error if the provided assertion is falsy
|
|
19
|
+
*/
|
|
20
|
+
export declare const assert: (assertion: unknown, message: string) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Returns an Error object suitable for throwing.
|
|
23
|
+
*/
|
|
24
|
+
export declare const assertionError: (message: string) => Error;
|
package/dist/src/compat.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2021 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 interface Compat<T> {
|
|
18
|
-
_delegate: T;
|
|
19
|
-
}
|
|
20
|
-
export declare function getModularInstance<ExpService>(service: Compat<ExpService> | ExpService): ExpService;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 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 interface Compat<T> {
|
|
18
|
+
_delegate: T;
|
|
19
|
+
}
|
|
20
|
+
export declare function getModularInstance<ExpService>(service: Compat<ExpService> | ExpService): ExpService;
|
package/dist/src/constants.d.ts
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 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
|
-
/**
|
|
18
|
-
* @fileoverview Firebase constants. Some of these (@defines) can be overridden at compile-time.
|
|
19
|
-
*/
|
|
20
|
-
export declare const CONSTANTS: {
|
|
21
|
-
/**
|
|
22
|
-
* @define {boolean} Whether this is the client Node.js SDK.
|
|
23
|
-
*/
|
|
24
|
-
NODE_CLIENT: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* @define {boolean} Whether this is the Admin Node.js SDK.
|
|
27
|
-
*/
|
|
28
|
-
NODE_ADMIN: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Firebase SDK Version
|
|
31
|
-
*/
|
|
32
|
-
SDK_VERSION: string;
|
|
33
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 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
|
+
/**
|
|
18
|
+
* @fileoverview Firebase constants. Some of these (@defines) can be overridden at compile-time.
|
|
19
|
+
*/
|
|
20
|
+
export declare const CONSTANTS: {
|
|
21
|
+
/**
|
|
22
|
+
* @define {boolean} Whether this is the client Node.js SDK.
|
|
23
|
+
*/
|
|
24
|
+
NODE_CLIENT: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* @define {boolean} Whether this is the Admin Node.js SDK.
|
|
27
|
+
*/
|
|
28
|
+
NODE_ADMIN: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Firebase SDK Version
|
|
31
|
+
*/
|
|
32
|
+
SDK_VERSION: string;
|
|
33
|
+
};
|
package/dist/src/crypt.d.ts
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 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
|
-
interface Base64 {
|
|
18
|
-
byteToCharMap_: {
|
|
19
|
-
[key: number]: string;
|
|
20
|
-
} | null;
|
|
21
|
-
charToByteMap_: {
|
|
22
|
-
[key: string]: number;
|
|
23
|
-
} | null;
|
|
24
|
-
byteToCharMapWebSafe_: {
|
|
25
|
-
[key: number]: string;
|
|
26
|
-
} | null;
|
|
27
|
-
charToByteMapWebSafe_: {
|
|
28
|
-
[key: string]: number;
|
|
29
|
-
} | null;
|
|
30
|
-
ENCODED_VALS_BASE: string;
|
|
31
|
-
readonly ENCODED_VALS: string;
|
|
32
|
-
readonly ENCODED_VALS_WEBSAFE: string;
|
|
33
|
-
HAS_NATIVE_SUPPORT: boolean;
|
|
34
|
-
encodeByteArray(input: number[] | Uint8Array, webSafe?: boolean): string;
|
|
35
|
-
encodeString(input: string, webSafe?: boolean): string;
|
|
36
|
-
decodeString(input: string, webSafe: boolean): string;
|
|
37
|
-
decodeStringToByteArray(input: string, webSafe: boolean): number[];
|
|
38
|
-
init_(): void;
|
|
39
|
-
}
|
|
40
|
-
export declare const base64: Base64;
|
|
41
|
-
/**
|
|
42
|
-
* An error encountered while decoding base64 string.
|
|
43
|
-
*/
|
|
44
|
-
export declare class DecodeBase64StringError extends Error {
|
|
45
|
-
readonly name = "DecodeBase64StringError";
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* URL-safe base64 encoding
|
|
49
|
-
*/
|
|
50
|
-
export declare const base64Encode: (str: string) => string;
|
|
51
|
-
/**
|
|
52
|
-
* URL-safe base64 encoding (without "." padding in the end).
|
|
53
|
-
* e.g. Used in JSON Web Token (JWT) parts.
|
|
54
|
-
*/
|
|
55
|
-
export declare const base64urlEncodeWithoutPadding: (str: string) => string;
|
|
56
|
-
/**
|
|
57
|
-
* URL-safe base64 decoding
|
|
58
|
-
*
|
|
59
|
-
* NOTE: DO NOT use the global atob() function - it does NOT support the
|
|
60
|
-
* base64Url variant encoding.
|
|
61
|
-
*
|
|
62
|
-
* @param str To be decoded
|
|
63
|
-
* @return Decoded result, if possible
|
|
64
|
-
*/
|
|
65
|
-
export declare const base64Decode: (str: string) => string | null;
|
|
66
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 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
|
+
interface Base64 {
|
|
18
|
+
byteToCharMap_: {
|
|
19
|
+
[key: number]: string;
|
|
20
|
+
} | null;
|
|
21
|
+
charToByteMap_: {
|
|
22
|
+
[key: string]: number;
|
|
23
|
+
} | null;
|
|
24
|
+
byteToCharMapWebSafe_: {
|
|
25
|
+
[key: number]: string;
|
|
26
|
+
} | null;
|
|
27
|
+
charToByteMapWebSafe_: {
|
|
28
|
+
[key: string]: number;
|
|
29
|
+
} | null;
|
|
30
|
+
ENCODED_VALS_BASE: string;
|
|
31
|
+
readonly ENCODED_VALS: string;
|
|
32
|
+
readonly ENCODED_VALS_WEBSAFE: string;
|
|
33
|
+
HAS_NATIVE_SUPPORT: boolean;
|
|
34
|
+
encodeByteArray(input: number[] | Uint8Array, webSafe?: boolean): string;
|
|
35
|
+
encodeString(input: string, webSafe?: boolean): string;
|
|
36
|
+
decodeString(input: string, webSafe: boolean): string;
|
|
37
|
+
decodeStringToByteArray(input: string, webSafe: boolean): number[];
|
|
38
|
+
init_(): void;
|
|
39
|
+
}
|
|
40
|
+
export declare const base64: Base64;
|
|
41
|
+
/**
|
|
42
|
+
* An error encountered while decoding base64 string.
|
|
43
|
+
*/
|
|
44
|
+
export declare class DecodeBase64StringError extends Error {
|
|
45
|
+
readonly name = "DecodeBase64StringError";
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* URL-safe base64 encoding
|
|
49
|
+
*/
|
|
50
|
+
export declare const base64Encode: (str: string) => string;
|
|
51
|
+
/**
|
|
52
|
+
* URL-safe base64 encoding (without "." padding in the end).
|
|
53
|
+
* e.g. Used in JSON Web Token (JWT) parts.
|
|
54
|
+
*/
|
|
55
|
+
export declare const base64urlEncodeWithoutPadding: (str: string) => string;
|
|
56
|
+
/**
|
|
57
|
+
* URL-safe base64 decoding
|
|
58
|
+
*
|
|
59
|
+
* NOTE: DO NOT use the global atob() function - it does NOT support the
|
|
60
|
+
* base64Url variant encoding.
|
|
61
|
+
*
|
|
62
|
+
* @param str To be decoded
|
|
63
|
+
* @return Decoded result, if possible
|
|
64
|
+
*/
|
|
65
|
+
export declare const base64Decode: (str: string) => string | null;
|
|
66
|
+
export {};
|