mirror of
https://github.com/musix-org/musix-oss
synced 2025-06-17 04:26:00 +00:00
Modules
This commit is contained in:
32
node_modules/@firebase/util/README.md
generated
vendored
Normal file
32
node_modules/@firebase/util/README.md
generated
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
# @firebase/util
|
||||
|
||||
_NOTE: This is specifically tailored for Firebase JS SDK usage, if you are not a
|
||||
member of the Firebase team, please avoid using this package_
|
||||
|
||||
This is a wrapper of some Webchannel Features for the Firebase JS SDK.
|
||||
|
||||
## Installation
|
||||
|
||||
You can install this wrapper by running the following in your project:
|
||||
|
||||
```bash
|
||||
$ npm install @firebase/util
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
**ES Modules**
|
||||
|
||||
```javascript
|
||||
import { Deferred } from '@firebase/util';
|
||||
|
||||
// Do stuff with Deferred or any of the other Utils you import
|
||||
```
|
||||
|
||||
**CommonJS Modules**
|
||||
|
||||
```javascript
|
||||
const utils = require('@firebase/util');
|
||||
|
||||
// Do stuff with any of the re-exported `utils`
|
||||
```
|
1647
node_modules/@firebase/util/dist/index.cjs.js
generated
vendored
Normal file
1647
node_modules/@firebase/util/dist/index.cjs.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@firebase/util/dist/index.cjs.js.map
generated
vendored
Normal file
1
node_modules/@firebase/util/dist/index.cjs.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
31
node_modules/@firebase/util/dist/index.d.ts
generated
vendored
Normal file
31
node_modules/@firebase/util/dist/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export * from './src/assert';
|
||||
export * from './src/crypt';
|
||||
export * from './src/constants';
|
||||
export * from './src/deepCopy';
|
||||
export * from './src/deferred';
|
||||
export * from './src/environment';
|
||||
export * from './src/errors';
|
||||
export * from './src/json';
|
||||
export * from './src/jwt';
|
||||
export * from './src/obj';
|
||||
export * from './src/query';
|
||||
export * from './src/sha1';
|
||||
export * from './src/subscribe';
|
||||
export * from './src/validation';
|
||||
export * from './src/utf8';
|
1600
node_modules/@firebase/util/dist/index.esm.js
generated
vendored
Normal file
1600
node_modules/@firebase/util/dist/index.esm.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@firebase/util/dist/index.esm.js.map
generated
vendored
Normal file
1
node_modules/@firebase/util/dist/index.esm.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1611
node_modules/@firebase/util/dist/index.esm2017.js
generated
vendored
Normal file
1611
node_modules/@firebase/util/dist/index.esm2017.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@firebase/util/dist/index.esm2017.js.map
generated
vendored
Normal file
1
node_modules/@firebase/util/dist/index.esm2017.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1666
node_modules/@firebase/util/dist/index.node.cjs.js
generated
vendored
Normal file
1666
node_modules/@firebase/util/dist/index.node.cjs.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@firebase/util/dist/index.node.cjs.js.map
generated
vendored
Normal file
1
node_modules/@firebase/util/dist/index.node.cjs.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
31
node_modules/@firebase/util/dist/index.node.d.ts
generated
vendored
Normal file
31
node_modules/@firebase/util/dist/index.node.d.ts
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export * from './src/assert';
|
||||
export * from './src/crypt';
|
||||
export * from './src/constants';
|
||||
export * from './src/deepCopy';
|
||||
export * from './src/deferred';
|
||||
export * from './src/environment';
|
||||
export * from './src/errors';
|
||||
export * from './src/json';
|
||||
export * from './src/jwt';
|
||||
export * from './src/obj';
|
||||
export * from './src/query';
|
||||
export * from './src/sha1';
|
||||
export * from './src/subscribe';
|
||||
export * from './src/validation';
|
||||
export * from './src/utf8';
|
24
node_modules/@firebase/util/dist/src/assert.d.ts
generated
vendored
Normal file
24
node_modules/@firebase/util/dist/src/assert.d.ts
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* Throws an error if the provided assertion is falsy
|
||||
*/
|
||||
export declare const assert: (assertion: unknown, message: string) => void;
|
||||
/**
|
||||
* Returns an Error object suitable for throwing.
|
||||
*/
|
||||
export declare const assertionError: (message: string) => Error;
|
33
node_modules/@firebase/util/dist/src/constants.d.ts
generated
vendored
Normal file
33
node_modules/@firebase/util/dist/src/constants.d.ts
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* @fileoverview Firebase constants. Some of these (@defines) can be overridden at compile-time.
|
||||
*/
|
||||
export declare const CONSTANTS: {
|
||||
/**
|
||||
* @define {boolean} Whether this is the client Node.js SDK.
|
||||
*/
|
||||
NODE_CLIENT: boolean;
|
||||
/**
|
||||
* @define {boolean} Whether this is the Admin Node.js SDK.
|
||||
*/
|
||||
NODE_ADMIN: boolean;
|
||||
/**
|
||||
* Firebase SDK Version
|
||||
*/
|
||||
SDK_VERSION: string;
|
||||
};
|
55
node_modules/@firebase/util/dist/src/crypt.d.ts
generated
vendored
Normal file
55
node_modules/@firebase/util/dist/src/crypt.d.ts
generated
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
interface Base64 {
|
||||
byteToCharMap_: {
|
||||
[key: number]: string;
|
||||
} | null;
|
||||
charToByteMap_: {
|
||||
[key: string]: number;
|
||||
} | null;
|
||||
byteToCharMapWebSafe_: {
|
||||
[key: number]: string;
|
||||
} | null;
|
||||
charToByteMapWebSafe_: {
|
||||
[key: string]: number;
|
||||
} | null;
|
||||
ENCODED_VALS_BASE: string;
|
||||
readonly ENCODED_VALS: string;
|
||||
readonly ENCODED_VALS_WEBSAFE: string;
|
||||
HAS_NATIVE_SUPPORT: boolean;
|
||||
encodeByteArray(input: number[] | Uint8Array, webSafe?: boolean): string;
|
||||
encodeString(input: string, webSafe?: boolean): string;
|
||||
decodeString(input: string, webSafe: boolean): string;
|
||||
decodeStringToByteArray(input: string, webSafe: boolean): number[];
|
||||
init_(): void;
|
||||
}
|
||||
export declare const base64: Base64;
|
||||
/**
|
||||
* URL-safe base64 encoding
|
||||
*/
|
||||
export declare const base64Encode: (str: string) => string;
|
||||
/**
|
||||
* URL-safe base64 decoding
|
||||
*
|
||||
* NOTE: DO NOT use the global atob() function - it does NOT support the
|
||||
* base64Url variant encoding.
|
||||
*
|
||||
* @param str To be decoded
|
||||
* @return Decoded result, if possible
|
||||
*/
|
||||
export declare const base64Decode: (str: string) => string | null;
|
||||
export {};
|
33
node_modules/@firebase/util/dist/src/deepCopy.d.ts
generated
vendored
Normal file
33
node_modules/@firebase/util/dist/src/deepCopy.d.ts
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* Do a deep-copy of basic JavaScript Objects or Arrays.
|
||||
*/
|
||||
export declare function deepCopy<T>(value: T): T;
|
||||
/**
|
||||
* Copy properties from source to target (recursively allows extension
|
||||
* of Objects and Arrays). Scalar values in the target are over-written.
|
||||
* If target is undefined, an object of the appropriate type will be created
|
||||
* (and returned).
|
||||
*
|
||||
* We recursively copy all child properties of plain Objects in the source- so
|
||||
* that namespace- like dictionaries are merged.
|
||||
*
|
||||
* Note that the target can be a function, in which case the properties in
|
||||
* the source Object are copied onto it as static properties of the Function.
|
||||
*/
|
||||
export declare function deepExtend(target: unknown, source: unknown): unknown;
|
28
node_modules/@firebase/util/dist/src/deferred.d.ts
generated
vendored
Normal file
28
node_modules/@firebase/util/dist/src/deferred.d.ts
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export declare class Deferred<R> {
|
||||
promise: Promise<R>;
|
||||
reject: (value?: unknown) => void;
|
||||
resolve: (value?: unknown) => void;
|
||||
constructor();
|
||||
/**
|
||||
* Our API internals are not promiseified and cannot because our callback APIs have subtle expectations around
|
||||
* invoking promises inline, which Promises are forbidden to do. This method accepts an optional node-style callback
|
||||
* and returns a node-style callback which will resolve or reject the Deferred's promise.
|
||||
*/
|
||||
wrapCallback(callback?: (error?: unknown, value?: unknown) => void): (error: unknown, value?: unknown) => void;
|
||||
}
|
58
node_modules/@firebase/util/dist/src/environment.d.ts
generated
vendored
Normal file
58
node_modules/@firebase/util/dist/src/environment.d.ts
generated
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* Returns navigator.userAgent string or '' if it's not defined.
|
||||
* @return user agent string
|
||||
*/
|
||||
export declare function getUA(): string;
|
||||
/**
|
||||
* Detect Cordova / PhoneGap / Ionic frameworks on a mobile device.
|
||||
*
|
||||
* Deliberately does not rely on checking `file://` URLs (as this fails PhoneGap
|
||||
* in the Ripple emulator) nor Cordova `onDeviceReady`, which would normally
|
||||
* wait for a callback.
|
||||
*/
|
||||
export declare function isMobileCordova(): boolean;
|
||||
/**
|
||||
* Detect Node.js.
|
||||
*
|
||||
* @return true if Node.js environment is detected.
|
||||
*/
|
||||
export declare function isNode(): boolean;
|
||||
/**
|
||||
* Detect Browser Environment
|
||||
*/
|
||||
export declare function isBrowser(): boolean;
|
||||
export declare function isBrowserExtension(): boolean;
|
||||
/**
|
||||
* Detect React Native.
|
||||
*
|
||||
* @return true if ReactNative environment is detected.
|
||||
*/
|
||||
export declare function isReactNative(): boolean;
|
||||
/** Detects Electron apps. */
|
||||
export declare function isElectron(): boolean;
|
||||
/** Detects Internet Explorer. */
|
||||
export declare function isIE(): boolean;
|
||||
/** Detects Universal Windows Platform apps. */
|
||||
export declare function isUWP(): boolean;
|
||||
/**
|
||||
* Detect whether the current SDK build is the Node version.
|
||||
*
|
||||
* @return true if it's the Node SDK build.
|
||||
*/
|
||||
export declare function isNodeSdk(): boolean;
|
87
node_modules/@firebase/util/dist/src/errors.d.ts
generated
vendored
Normal file
87
node_modules/@firebase/util/dist/src/errors.d.ts
generated
vendored
Normal file
@ -0,0 +1,87 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* @fileoverview Standardized Firebase Error.
|
||||
*
|
||||
* Usage:
|
||||
*
|
||||
* // Typescript string literals for type-safe codes
|
||||
* type Err =
|
||||
* 'unknown' |
|
||||
* 'object-not-found'
|
||||
* ;
|
||||
*
|
||||
* // Closure enum for type-safe error codes
|
||||
* // at-enum {string}
|
||||
* var Err = {
|
||||
* UNKNOWN: 'unknown',
|
||||
* OBJECT_NOT_FOUND: 'object-not-found',
|
||||
* }
|
||||
*
|
||||
* let errors: Map<Err, string> = {
|
||||
* 'generic-error': "Unknown error",
|
||||
* 'file-not-found': "Could not find file: {$file}",
|
||||
* };
|
||||
*
|
||||
* // Type-safe function - must pass a valid error code as param.
|
||||
* let error = new ErrorFactory<Err>('service', 'Service', errors);
|
||||
*
|
||||
* ...
|
||||
* throw error.create(Err.GENERIC);
|
||||
* ...
|
||||
* throw error.create(Err.FILE_NOT_FOUND, {'file': fileName});
|
||||
* ...
|
||||
* // Service: Could not file file: foo.txt (service/file-not-found).
|
||||
*
|
||||
* catch (e) {
|
||||
* assert(e.message === "Could not find file: foo.txt.");
|
||||
* if (e.code === 'service/file-not-found') {
|
||||
* console.log("Could not read file: " + e['file']);
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
export declare type ErrorMap<ErrorCode extends string> = {
|
||||
readonly [K in ErrorCode]: string;
|
||||
};
|
||||
declare const ERROR_NAME = "FirebaseError";
|
||||
export interface StringLike {
|
||||
toString(): string;
|
||||
}
|
||||
export interface ErrorData {
|
||||
[key: string]: StringLike | undefined;
|
||||
}
|
||||
export interface FirebaseError extends Error, ErrorData {
|
||||
readonly code: string;
|
||||
readonly message: string;
|
||||
readonly name: typeof ERROR_NAME;
|
||||
readonly stack?: string;
|
||||
}
|
||||
export declare class FirebaseError extends Error {
|
||||
readonly code: string;
|
||||
readonly name: "FirebaseError";
|
||||
constructor(code: string, message: string);
|
||||
}
|
||||
export declare class ErrorFactory<ErrorCode extends string, ErrorParams extends {
|
||||
readonly [K in ErrorCode]?: ErrorData;
|
||||
} = {}> {
|
||||
private readonly service;
|
||||
private readonly serviceName;
|
||||
private readonly errors;
|
||||
constructor(service: string, serviceName: string, errors: ErrorMap<ErrorCode>);
|
||||
create<K extends ErrorCode>(code: K, ...data: K extends keyof ErrorParams ? [ErrorParams[K]] : []): FirebaseError;
|
||||
}
|
||||
export {};
|
29
node_modules/@firebase/util/dist/src/json.d.ts
generated
vendored
Normal file
29
node_modules/@firebase/util/dist/src/json.d.ts
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* Evaluates a JSON string into a javascript object.
|
||||
*
|
||||
* @param {string} str A string containing JSON.
|
||||
* @return {*} The javascript object representing the specified JSON.
|
||||
*/
|
||||
export declare function jsonEval(str: string): unknown;
|
||||
/**
|
||||
* Returns JSON representing a javascript object.
|
||||
* @param {*} data Javascript object to be stringified.
|
||||
* @return {string} The JSON contents of the object.
|
||||
*/
|
||||
export declare function stringify(data: unknown): string;
|
73
node_modules/@firebase/util/dist/src/jwt.d.ts
generated
vendored
Normal file
73
node_modules/@firebase/util/dist/src/jwt.d.ts
generated
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
interface Claims {
|
||||
[key: string]: {};
|
||||
}
|
||||
interface DecodedToken {
|
||||
header: object;
|
||||
claims: Claims;
|
||||
data: object;
|
||||
signature: string;
|
||||
}
|
||||
/**
|
||||
* Decodes a Firebase auth. token into constituent parts.
|
||||
*
|
||||
* Notes:
|
||||
* - May return with invalid / incomplete claims if there's no native base64 decoding support.
|
||||
* - Doesn't check if the token is actually valid.
|
||||
*/
|
||||
export declare const decode: (token: string) => DecodedToken;
|
||||
interface DecodedToken {
|
||||
header: object;
|
||||
claims: Claims;
|
||||
data: object;
|
||||
signature: string;
|
||||
}
|
||||
/**
|
||||
* Decodes a Firebase auth. token and checks the validity of its time-based claims. Will return true if the
|
||||
* token is within the time window authorized by the 'nbf' (not-before) and 'iat' (issued-at) claims.
|
||||
*
|
||||
* Notes:
|
||||
* - May return a false negative if there's no native base64 decoding support.
|
||||
* - Doesn't check if the token is actually valid.
|
||||
*/
|
||||
export declare const isValidTimestamp: (token: string) => boolean;
|
||||
/**
|
||||
* Decodes a Firebase auth. token and returns its issued at time if valid, null otherwise.
|
||||
*
|
||||
* Notes:
|
||||
* - May return null if there's no native base64 decoding support.
|
||||
* - Doesn't check if the token is actually valid.
|
||||
*/
|
||||
export declare const issuedAtTime: (token: string) => number | null;
|
||||
/**
|
||||
* Decodes a Firebase auth. token and checks the validity of its format. Expects a valid issued-at time.
|
||||
*
|
||||
* Notes:
|
||||
* - May return a false negative if there's no native base64 decoding support.
|
||||
* - Doesn't check if the token is actually valid.
|
||||
*/
|
||||
export declare const isValidFormat: (token: string) => boolean;
|
||||
/**
|
||||
* Attempts to peer into an auth token and determine if it's an admin auth token by looking at the claims portion.
|
||||
*
|
||||
* Notes:
|
||||
* - May return a false negative if there's no native base64 decoding support.
|
||||
* - Doesn't check if the token is actually valid.
|
||||
*/
|
||||
export declare const isAdmin: (token: string) => boolean;
|
||||
export {};
|
26
node_modules/@firebase/util/dist/src/obj.d.ts
generated
vendored
Normal file
26
node_modules/@firebase/util/dist/src/obj.d.ts
generated
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export declare function contains<T extends object>(obj: T, key: string): boolean;
|
||||
export declare function safeGet<T extends object, K extends keyof T>(obj: T, key: K): T[K] | undefined;
|
||||
export declare function isEmpty(obj: object): obj is {};
|
||||
export declare function map<K extends string, V, U>(obj: {
|
||||
[key in K]: V;
|
||||
}, fn: (value: V, key: K, obj: {
|
||||
[key in K]: V;
|
||||
}) => U, contextObj?: unknown): {
|
||||
[key in K]: U;
|
||||
};
|
29
node_modules/@firebase/util/dist/src/query.d.ts
generated
vendored
Normal file
29
node_modules/@firebase/util/dist/src/query.d.ts
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* Returns a querystring-formatted string (e.g. &arg=val&arg2=val2) from a
|
||||
* params object (e.g. {arg: 'val', arg2: 'val2'})
|
||||
* Note: You must prepend it with ? when adding it to a URL.
|
||||
*/
|
||||
export declare function querystring(querystringParams: {
|
||||
[key: string]: string | number;
|
||||
}): string;
|
||||
/**
|
||||
* Decodes a querystring (e.g. ?arg=val&arg2=val2) into a params object
|
||||
* (e.g. {arg: 'val', arg2: 'val2'})
|
||||
*/
|
||||
export declare function querystringDecode(querystring: string): object;
|
84
node_modules/@firebase/util/dist/src/sha1.d.ts
generated
vendored
Normal file
84
node_modules/@firebase/util/dist/src/sha1.d.ts
generated
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* @fileoverview SHA-1 cryptographic hash.
|
||||
* Variable names follow the notation in FIPS PUB 180-3:
|
||||
* http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf.
|
||||
*
|
||||
* Usage:
|
||||
* var sha1 = new sha1();
|
||||
* sha1.update(bytes);
|
||||
* var hash = sha1.digest();
|
||||
*
|
||||
* Performance:
|
||||
* Chrome 23: ~400 Mbit/s
|
||||
* Firefox 16: ~250 Mbit/s
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* SHA-1 cryptographic hash constructor.
|
||||
*
|
||||
* The properties declared here are discussed in the above algorithm document.
|
||||
* @constructor
|
||||
* @final
|
||||
* @struct
|
||||
*/
|
||||
export declare class Sha1 {
|
||||
/**
|
||||
* Holds the previous values of accumulated variables a-e in the compress_
|
||||
* function.
|
||||
* @private
|
||||
*/
|
||||
private chain_;
|
||||
/**
|
||||
* A buffer holding the partially computed hash result.
|
||||
* @private
|
||||
*/
|
||||
private buf_;
|
||||
/**
|
||||
* An array of 80 bytes, each a part of the message to be hashed. Referred to
|
||||
* as the message schedule in the docs.
|
||||
* @private
|
||||
*/
|
||||
private W_;
|
||||
/**
|
||||
* Contains data needed to pad messages less than 64 bytes.
|
||||
* @private
|
||||
*/
|
||||
private pad_;
|
||||
/**
|
||||
* @private {number}
|
||||
*/
|
||||
private inbuf_;
|
||||
/**
|
||||
* @private {number}
|
||||
*/
|
||||
private total_;
|
||||
blockSize: number;
|
||||
constructor();
|
||||
reset(): void;
|
||||
/**
|
||||
* Internal compress helper function.
|
||||
* @param buf Block to compress.
|
||||
* @param offset Offset of the block in the buffer.
|
||||
* @private
|
||||
*/
|
||||
compress_(buf: number[] | Uint8Array | string, offset?: number): void;
|
||||
update(bytes?: number[] | Uint8Array | string, length?: number): void;
|
||||
/** @override */
|
||||
digest(): number[];
|
||||
}
|
49
node_modules/@firebase/util/dist/src/subscribe.d.ts
generated
vendored
Normal file
49
node_modules/@firebase/util/dist/src/subscribe.d.ts
generated
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export declare type NextFn<T> = (value: T) => void;
|
||||
export declare type ErrorFn = (error: Error) => void;
|
||||
export declare type CompleteFn = () => void;
|
||||
export interface Observer<T> {
|
||||
next: NextFn<T>;
|
||||
error: ErrorFn;
|
||||
complete: CompleteFn;
|
||||
}
|
||||
export declare type PartialObserver<T> = Partial<Observer<T>>;
|
||||
export declare type Unsubscribe = () => void;
|
||||
/**
|
||||
* The Subscribe interface has two forms - passing the inline function
|
||||
* callbacks, or a object interface with callback properties.
|
||||
*/
|
||||
export interface Subscribe<T> {
|
||||
(next?: NextFn<T>, error?: ErrorFn, complete?: CompleteFn): Unsubscribe;
|
||||
(observer: PartialObserver<T>): Unsubscribe;
|
||||
}
|
||||
export interface Observable<T> {
|
||||
subscribe: Subscribe<T>;
|
||||
}
|
||||
export declare type Executor<T> = (observer: Observer<T>) => void;
|
||||
/**
|
||||
* Helper to make a Subscribe function (just like Promise helps make a
|
||||
* Thenable).
|
||||
*
|
||||
* @param executor Function which can make calls to a single Observer
|
||||
* as a proxy.
|
||||
* @param onNoObservers Callback when count of Observers goes to zero.
|
||||
*/
|
||||
export declare function createSubscribe<T>(executor: Executor<T>, onNoObservers?: Executor<T>): Subscribe<T>;
|
||||
/** Turn synchronous function into one called asynchronously. */
|
||||
export declare function async(fn: Function, onError?: ErrorFn): Function;
|
27
node_modules/@firebase/util/dist/src/utf8.d.ts
generated
vendored
Normal file
27
node_modules/@firebase/util/dist/src/utf8.d.ts
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* @param {string} str
|
||||
* @return {Array}
|
||||
*/
|
||||
export declare const stringToByteArray: (str: string) => number[];
|
||||
/**
|
||||
* Calculate length without actually converting; useful for doing cheaper validation.
|
||||
* @param {string} str
|
||||
* @return {number}
|
||||
*/
|
||||
export declare const stringLength: (str: string) => number;
|
44
node_modules/@firebase/util/dist/src/validation.d.ts
generated
vendored
Normal file
44
node_modules/@firebase/util/dist/src/validation.d.ts
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* Check to make sure the appropriate number of arguments are provided for a public function.
|
||||
* Throws an error if it fails.
|
||||
*
|
||||
* @param fnName The function name
|
||||
* @param minCount The minimum number of arguments to allow for the function call
|
||||
* @param maxCount The maximum number of argument to allow for the function call
|
||||
* @param argCount The actual number of arguments provided.
|
||||
*/
|
||||
export declare const validateArgCount: (fnName: string, minCount: number, maxCount: number, argCount: number) => void;
|
||||
/**
|
||||
* Generates a string to prefix an error message about failed argument validation
|
||||
*
|
||||
* @param fnName The function name
|
||||
* @param argumentNumber The index of the argument
|
||||
* @param optional Whether or not the argument is optional
|
||||
* @return The prefix to add to the error thrown for validation.
|
||||
*/
|
||||
export declare function errorPrefix(fnName: string, argumentNumber: number, optional: boolean): string;
|
||||
/**
|
||||
* @param fnName
|
||||
* @param argumentNumber
|
||||
* @param namespace
|
||||
* @param optional
|
||||
*/
|
||||
export declare function validateNamespace(fnName: string, argumentNumber: number, namespace: string, optional: boolean): void;
|
||||
export declare function validateCallback(fnName: string, argumentNumber: number, callback: Function, optional: boolean): void;
|
||||
export declare function validateContextObject(fnName: string, argumentNumber: number, context: unknown, optional: boolean): void;
|
1
node_modules/@firebase/util/dist/test/base64.test.d.ts
generated
vendored
Normal file
1
node_modules/@firebase/util/dist/test/base64.test.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export {};
|
1
node_modules/@firebase/util/dist/test/deepCopy.test.d.ts
generated
vendored
Normal file
1
node_modules/@firebase/util/dist/test/deepCopy.test.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export {};
|
1
node_modules/@firebase/util/dist/test/errors.test.d.ts
generated
vendored
Normal file
1
node_modules/@firebase/util/dist/test/errors.test.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export {};
|
17
node_modules/@firebase/util/dist/test/subscribe.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/util/dist/test/subscribe.test.d.ts
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export {};
|
89
node_modules/@firebase/util/package.json
generated
vendored
Normal file
89
node_modules/@firebase/util/package.json
generated
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
{
|
||||
"_from": "@firebase/util@0.2.39",
|
||||
"_id": "@firebase/util@0.2.39",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-hxbQJ9TkFzd6g8/ZcWBjdrxjxS0jYnR1EN3i1ah7i3KtvuxAtwNJ04YRf0QhKhCoitTkJ1Yn3cGb0kFnGtJVRA==",
|
||||
"_location": "/@firebase/util",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "@firebase/util@0.2.39",
|
||||
"name": "@firebase/util",
|
||||
"escapedName": "@firebase%2futil",
|
||||
"scope": "@firebase",
|
||||
"rawSpec": "0.2.39",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0.2.39"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@firebase/analytics",
|
||||
"/@firebase/app",
|
||||
"/@firebase/component",
|
||||
"/@firebase/database",
|
||||
"/@firebase/firestore",
|
||||
"/@firebase/installations",
|
||||
"/@firebase/messaging",
|
||||
"/@firebase/performance",
|
||||
"/@firebase/remote-config",
|
||||
"/@firebase/storage",
|
||||
"/firebase"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@firebase/util/-/util-0.2.39.tgz",
|
||||
"_shasum": "4387b12c315857081f595bba7229b0cabadb754f",
|
||||
"_spec": "@firebase/util@0.2.39",
|
||||
"_where": "C:\\Users\\matia\\Documents\\GitHub\\Musix-V3\\node_modules\\firebase",
|
||||
"author": {
|
||||
"name": "Firebase",
|
||||
"email": "firebase-support@google.com",
|
||||
"url": "https://firebase.google.com/"
|
||||
},
|
||||
"browser": "dist/index.cjs.js",
|
||||
"bugs": {
|
||||
"url": "https://github.com/firebase/firebase-js-sdk/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"tslib": "1.10.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "_NOTE: This is specifically tailored for Firebase JS SDK usage, if you are not a member of the Firebase team, please avoid using this package_",
|
||||
"devDependencies": {
|
||||
"rollup": "1.28.0",
|
||||
"rollup-plugin-typescript2": "0.25.3",
|
||||
"typescript": "3.7.3"
|
||||
},
|
||||
"esm2017": "dist/index.esm2017.js",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"homepage": "https://github.com/firebase/firebase-js-sdk#readme",
|
||||
"license": "Apache-2.0",
|
||||
"main": "dist/index.node.cjs.js",
|
||||
"module": "dist/index.esm.js",
|
||||
"name": "@firebase/util",
|
||||
"nyc": {
|
||||
"extension": [
|
||||
".ts"
|
||||
],
|
||||
"reportDir": "./coverage/node"
|
||||
},
|
||||
"repository": {
|
||||
"directory": "packages/util",
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/firebase/firebase-js-sdk.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
"dev": "rollup -c -w",
|
||||
"lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
|
||||
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
|
||||
"prepare": "yarn build",
|
||||
"test": "yarn type-check && run-p lint test:browser test:node",
|
||||
"test:browser": "karma start --single-run",
|
||||
"test:node": "TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha test/**/*.test.* --opts ../../config/mocha.node.opts",
|
||||
"type-check": "tsc -p . --noEmit"
|
||||
},
|
||||
"typings": "dist/index.d.ts",
|
||||
"version": "0.2.39"
|
||||
}
|
Reference in New Issue
Block a user