@depup/firebase__storage 0.14.1-depup.0
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 +31 -0
- package/changes.json +10 -0
- package/dist/index.browser.cjs.js +3685 -0
- package/dist/index.browser.cjs.js.map +1 -0
- package/dist/index.cjs.js +3685 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.esm.js +3656 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.node.cjs.js +3710 -0
- package/dist/index.node.cjs.js.map +1 -0
- package/dist/node-esm/index.node.esm.js +3681 -0
- package/dist/node-esm/index.node.esm.js.map +1 -0
- package/dist/node-esm/package.json +1 -0
- package/dist/node-esm/src/api.browser.d.ts +47 -0
- package/dist/node-esm/src/api.d.ts +200 -0
- package/dist/node-esm/src/api.node.d.ts +47 -0
- package/dist/node-esm/src/constants.d.ts +20 -0
- package/dist/node-esm/src/implementation/async.d.ts +22 -0
- package/dist/node-esm/src/implementation/backoff.d.ts +43 -0
- package/dist/node-esm/src/implementation/blob.d.ts +34 -0
- package/dist/node-esm/src/implementation/connection.d.ts +56 -0
- package/dist/node-esm/src/implementation/constants.d.ts +48 -0
- package/dist/node-esm/src/implementation/error.d.ts +126 -0
- package/dist/node-esm/src/implementation/failrequest.d.ts +29 -0
- package/dist/node-esm/src/implementation/fs.d.ts +17 -0
- package/dist/node-esm/src/implementation/json.d.ts +7 -0
- package/dist/node-esm/src/implementation/list.d.ts +19 -0
- package/dist/node-esm/src/implementation/location.d.ts +32 -0
- package/dist/node-esm/src/implementation/metadata.d.ts +40 -0
- package/dist/node-esm/src/implementation/observer.d.ts +47 -0
- package/dist/node-esm/src/implementation/path.d.ts +31 -0
- package/dist/node-esm/src/implementation/request.d.ts +47 -0
- package/dist/node-esm/src/implementation/requestinfo.d.ts +73 -0
- package/dist/node-esm/src/implementation/requests.d.ts +84 -0
- package/dist/node-esm/src/implementation/string.d.ts +73 -0
- package/dist/node-esm/src/implementation/taskenums.d.ts +77 -0
- package/dist/node-esm/src/implementation/type.d.ts +23 -0
- package/dist/node-esm/src/implementation/url.d.ts +22 -0
- package/dist/node-esm/src/implementation/utils.d.ts +23 -0
- package/dist/node-esm/src/index.d.ts +7 -0
- package/dist/node-esm/src/index.node.d.ts +7 -0
- package/dist/node-esm/src/list.d.ts +41 -0
- package/dist/node-esm/src/metadata.d.ts +27 -0
- package/dist/node-esm/src/platform/base64.d.ts +20 -0
- package/dist/node-esm/src/platform/browser/base64.d.ts +19 -0
- package/dist/node-esm/src/platform/browser/connection.d.ts +55 -0
- package/dist/node-esm/src/platform/connection.d.ts +22 -0
- package/dist/node-esm/src/platform/node/base64.d.ts +19 -0
- package/dist/node-esm/src/platform/node/connection.d.ts +58 -0
- package/dist/node-esm/src/public-types.d.ts +424 -0
- package/dist/node-esm/src/reference.d.ts +208 -0
- package/dist/node-esm/src/service.d.ts +131 -0
- package/dist/node-esm/src/task.d.ts +148 -0
- package/dist/node-esm/test/unit/connection.d.ts +47 -0
- package/dist/node-esm/test/unit/testshared.d.ts +60 -0
- package/dist/src/api.browser.d.ts +47 -0
- package/dist/src/api.d.ts +200 -0
- package/dist/src/api.node.d.ts +47 -0
- package/dist/src/constants.d.ts +20 -0
- package/dist/src/implementation/async.d.ts +22 -0
- package/dist/src/implementation/backoff.d.ts +43 -0
- package/dist/src/implementation/blob.d.ts +34 -0
- package/dist/src/implementation/connection.d.ts +56 -0
- package/dist/src/implementation/constants.d.ts +48 -0
- package/dist/src/implementation/error.d.ts +126 -0
- package/dist/src/implementation/failrequest.d.ts +29 -0
- package/dist/src/implementation/fs.d.ts +17 -0
- package/dist/src/implementation/json.d.ts +7 -0
- package/dist/src/implementation/list.d.ts +19 -0
- package/dist/src/implementation/location.d.ts +32 -0
- package/dist/src/implementation/metadata.d.ts +40 -0
- package/dist/src/implementation/observer.d.ts +47 -0
- package/dist/src/implementation/path.d.ts +31 -0
- package/dist/src/implementation/request.d.ts +47 -0
- package/dist/src/implementation/requestinfo.d.ts +73 -0
- package/dist/src/implementation/requests.d.ts +84 -0
- package/dist/src/implementation/string.d.ts +73 -0
- package/dist/src/implementation/taskenums.d.ts +77 -0
- package/dist/src/implementation/type.d.ts +23 -0
- package/dist/src/implementation/url.d.ts +22 -0
- package/dist/src/implementation/utils.d.ts +23 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/index.node.d.ts +7 -0
- package/dist/src/list.d.ts +41 -0
- package/dist/src/metadata.d.ts +27 -0
- package/dist/src/platform/base64.d.ts +20 -0
- package/dist/src/platform/browser/base64.d.ts +19 -0
- package/dist/src/platform/browser/connection.d.ts +55 -0
- package/dist/src/platform/connection.d.ts +22 -0
- package/dist/src/platform/node/base64.d.ts +19 -0
- package/dist/src/platform/node/connection.d.ts +58 -0
- package/dist/src/public-types.d.ts +424 -0
- package/dist/src/reference.d.ts +208 -0
- package/dist/src/service.d.ts +131 -0
- package/dist/src/task.d.ts +148 -0
- package/dist/src/tsdoc-metadata.json +11 -0
- package/dist/storage-public.d.ts +725 -0
- package/dist/storage.d.ts +1391 -0
- package/dist/test/unit/connection.d.ts +47 -0
- package/dist/test/unit/testshared.d.ts +60 -0
- package/package.json +98 -0
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
import { ErrorCode, Headers, Connection } from '../../src/implementation/connection';
|
|
18
|
+
export type SendHook = (connection: TestingConnection, url: string, method: string, body?: ArrayBufferView | Blob | string | null, headers?: Headers) => void;
|
|
19
|
+
export declare enum State {
|
|
20
|
+
START = 0,
|
|
21
|
+
SENT = 1,
|
|
22
|
+
DONE = 2
|
|
23
|
+
}
|
|
24
|
+
export declare class TestingConnection implements Connection<string> {
|
|
25
|
+
private state;
|
|
26
|
+
private sendPromise;
|
|
27
|
+
private resolve;
|
|
28
|
+
private sendHook;
|
|
29
|
+
private status;
|
|
30
|
+
private responseText;
|
|
31
|
+
private headers;
|
|
32
|
+
private errorCode;
|
|
33
|
+
constructor(sendHook: SendHook | null);
|
|
34
|
+
send(url: string, method: string, _isUsingEmulator: boolean, body?: ArrayBufferView | Blob | string | null, headers?: Headers): Promise<void>;
|
|
35
|
+
simulateResponse(status: number, body: string, headers: {
|
|
36
|
+
[key: string]: string;
|
|
37
|
+
}): void;
|
|
38
|
+
getErrorCode(): ErrorCode;
|
|
39
|
+
getStatus(): number;
|
|
40
|
+
getResponse(): string;
|
|
41
|
+
getErrorText(): string;
|
|
42
|
+
abort(): void;
|
|
43
|
+
getResponseHeader(header: string): string | null;
|
|
44
|
+
addUploadProgressListener(): void;
|
|
45
|
+
removeUploadProgressListener(): void;
|
|
46
|
+
}
|
|
47
|
+
export declare function newTestConnection(sendHook?: SendHook | null): Connection<string>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { FirebaseApp } from '@firebase/app-types';
|
|
2
|
+
import { StorageError } from '../../src/implementation/error';
|
|
3
|
+
import { Headers, Connection, ConnectionType } from '../../src/implementation/connection';
|
|
4
|
+
import { FirebaseAuthInternalName } from '@firebase/auth-interop-types';
|
|
5
|
+
import { Provider } from '@firebase/component';
|
|
6
|
+
import { AppCheckInternalComponentName } from '@firebase/app-check-interop-types';
|
|
7
|
+
import { FirebaseStorageImpl } from '../../src/service';
|
|
8
|
+
import { Metadata } from '../../src/metadata';
|
|
9
|
+
export declare const authToken = "totally-legit-auth-token";
|
|
10
|
+
export declare const appCheckToken = "totally-shady-token";
|
|
11
|
+
export declare const bucket = "mybucket";
|
|
12
|
+
export declare const fakeApp: FirebaseApp;
|
|
13
|
+
export declare const fakeAuthProvider: Provider<"auth-internal">;
|
|
14
|
+
export declare const emptyAuthProvider: Provider<"auth-internal">;
|
|
15
|
+
export declare const fakeAppCheckTokenProvider: Provider<"app-check-internal">;
|
|
16
|
+
export declare function makeFakeApp(bucketArg?: string): FirebaseApp;
|
|
17
|
+
export declare function makeFakeAuthProvider(token: {
|
|
18
|
+
accessToken: string;
|
|
19
|
+
}): Provider<FirebaseAuthInternalName>;
|
|
20
|
+
export declare function makeFakeAppCheckProvider(tokenResult: {
|
|
21
|
+
token: string;
|
|
22
|
+
}): Provider<AppCheckInternalComponentName>;
|
|
23
|
+
/**
|
|
24
|
+
* Returns something that looks like an fbs.XhrIo with the given headers
|
|
25
|
+
* and status.
|
|
26
|
+
*/
|
|
27
|
+
export declare function fakeXhrIo<I extends ConnectionType = string>(headers: Headers, status?: number): Connection<I>;
|
|
28
|
+
/**
|
|
29
|
+
* Binds ignoring types. Used to test calls involving improper arguments.
|
|
30
|
+
*/
|
|
31
|
+
export declare function bind(f: Function, ctx: any, ...args: any[]): () => void;
|
|
32
|
+
export declare function assertThrows(f: () => void, code: string): StorageError;
|
|
33
|
+
export declare function assertUint8ArrayEquals(arr1: Uint8Array, arr2: Uint8Array): void;
|
|
34
|
+
export declare function assertObjectIncludes(included: {
|
|
35
|
+
[name: string]: any;
|
|
36
|
+
}, obj: {
|
|
37
|
+
[name: string]: any;
|
|
38
|
+
}): void;
|
|
39
|
+
interface Response {
|
|
40
|
+
status: number;
|
|
41
|
+
body: string;
|
|
42
|
+
headers: Headers;
|
|
43
|
+
}
|
|
44
|
+
export type RequestHandler = (url: string, method: string, body?: ArrayBufferView | Blob | string | null, headers?: Headers) => Response;
|
|
45
|
+
export declare function storageServiceWithHandler(handler: RequestHandler, shouldResponseCb?: () => boolean): FirebaseStorageImpl;
|
|
46
|
+
export declare function fakeServerHandler(fakeMetadata?: Partial<Metadata>): RequestHandler;
|
|
47
|
+
/**
|
|
48
|
+
* Responds with a 503 for finalize.
|
|
49
|
+
* @param fakeMetadata metadata to respond with for finalize
|
|
50
|
+
* @returns a handler for requests
|
|
51
|
+
*/
|
|
52
|
+
export declare function fake503ForFinalizeServerHandler(fakeMetadata?: Partial<Metadata>): RequestHandler;
|
|
53
|
+
/**
|
|
54
|
+
* Responds with a 503 for upload.
|
|
55
|
+
* @param fakeMetadata metadata to respond with for query
|
|
56
|
+
* @returns a handler for requests
|
|
57
|
+
*/
|
|
58
|
+
export declare function fake503ForUploadServerHandler(fakeMetadata?: Partial<Metadata>, cb?: () => void): RequestHandler;
|
|
59
|
+
export declare function fakeOneShot503ServerHandler(fakeMetadata?: Partial<Metadata>): RequestHandler;
|
|
60
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@depup/firebase__storage",
|
|
3
|
+
"version": "0.14.1-depup.0",
|
|
4
|
+
"description": "[DepUp] Dependency-bumped version of @firebase/storage",
|
|
5
|
+
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
|
|
6
|
+
"main": "dist/index.node.cjs.js",
|
|
7
|
+
"module": "dist/index.esm.js",
|
|
8
|
+
"browser": "dist/index.esm.js",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/storage-public.d.ts",
|
|
12
|
+
"node": {
|
|
13
|
+
"import": "./dist/node-esm/index.node.esm.js",
|
|
14
|
+
"default": "./dist/index.node.cjs.js"
|
|
15
|
+
},
|
|
16
|
+
"browser": {
|
|
17
|
+
"require": "./dist/index.cjs.js",
|
|
18
|
+
"import": "./dist/index.esm.js"
|
|
19
|
+
},
|
|
20
|
+
"default": "./dist/index.esm.js"
|
|
21
|
+
},
|
|
22
|
+
"./package.json": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist",
|
|
26
|
+
"changes.json",
|
|
27
|
+
"README.md"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"bundle": "rollup -c",
|
|
31
|
+
"lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
|
|
32
|
+
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
|
|
33
|
+
"build": "rollup -c rollup.config.js && yarn api-report",
|
|
34
|
+
"build:deps": "lerna run --scope @firebase/storage --include-dependencies build",
|
|
35
|
+
"dev": "rollup -c -w",
|
|
36
|
+
"test": "run-p --npm-path npm test:browser test:node lint",
|
|
37
|
+
"test:all": "run-p --npm-path npm test:browser test:node",
|
|
38
|
+
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
|
|
39
|
+
"test:browser:unit": "karma start --unit",
|
|
40
|
+
"test:browser:integration": "karma start --integration",
|
|
41
|
+
"test:browser": "karma start",
|
|
42
|
+
"test:node": "TS_NODE_FILES=true TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --file src/index.node.ts --config ../../config/mocharc.node.js",
|
|
43
|
+
"test:debug": "karma start --browser=Chrome",
|
|
44
|
+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
|
|
45
|
+
"prettier": "prettier --write 'src/**/*.ts' 'test/**/*.ts'",
|
|
46
|
+
"api-report": "api-extractor run --local --verbose && ts-node-script ../../repo-scripts/prune-dts/prune-dts.ts --input dist/storage-public.d.ts --output dist/storage-public.d.ts",
|
|
47
|
+
"typings:public": "node ../../scripts/build/use_typings.js ./dist/storage-public.d.ts"
|
|
48
|
+
},
|
|
49
|
+
"license": "Apache-2.0",
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@firebase/util": "1.14.0",
|
|
52
|
+
"@firebase/component": "0.7.1",
|
|
53
|
+
"tslib": "^2.8.1"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"@firebase/app": "0.x"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@firebase/app": "0.14.9",
|
|
60
|
+
"@firebase/auth": "1.12.1",
|
|
61
|
+
"rollup": "2.79.2",
|
|
62
|
+
"@rollup/plugin-alias": "5.1.1",
|
|
63
|
+
"@rollup/plugin-json": "6.1.0",
|
|
64
|
+
"rollup-plugin-typescript2": "0.36.0",
|
|
65
|
+
"typescript": "5.5.4"
|
|
66
|
+
},
|
|
67
|
+
"repository": {
|
|
68
|
+
"directory": "packages/storage",
|
|
69
|
+
"type": "git",
|
|
70
|
+
"url": "git+https://github.com/firebase/firebase-js-sdk.git"
|
|
71
|
+
},
|
|
72
|
+
"bugs": {
|
|
73
|
+
"url": "https://github.com/firebase/firebase-js-sdk/issues"
|
|
74
|
+
},
|
|
75
|
+
"typings": "./dist/storage-public.d.ts",
|
|
76
|
+
"engines": {
|
|
77
|
+
"node": ">=20.0.0"
|
|
78
|
+
},
|
|
79
|
+
"keywords": [
|
|
80
|
+
"depup",
|
|
81
|
+
"dependency-bumped",
|
|
82
|
+
"updated-deps",
|
|
83
|
+
"@firebase/storage"
|
|
84
|
+
],
|
|
85
|
+
"depup": {
|
|
86
|
+
"changes": {
|
|
87
|
+
"tslib": {
|
|
88
|
+
"from": "^2.1.0",
|
|
89
|
+
"to": "^2.8.1"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"depsUpdated": 1,
|
|
93
|
+
"originalPackage": "@firebase/storage",
|
|
94
|
+
"originalVersion": "0.14.1",
|
|
95
|
+
"processedAt": "2026-03-17T16:31:43.496Z",
|
|
96
|
+
"smokeTest": "failed"
|
|
97
|
+
}
|
|
98
|
+
}
|