File tree Expand file tree Collapse file tree 4 files changed +7
-8
lines changed Expand file tree Collapse file tree 4 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"extends" : " ../../config/api-extractor.json" ,
3
3
// Point it to your entry point d.ts file.
4
- "mainEntryPointFilePath" : " <projectFolder>/exp/dist/exp/index.d.ts" ,
4
+ "mainEntryPointFilePath" : " <projectFolder>/exp/dist/packages/storage/ exp/index.d.ts" ,
5
5
"dtsRollup" : {
6
6
"enabled" : true ,
7
7
"untrimmedFilePath" : " <projectFolder>/exp/dist/<unscopedPackageName>.d.ts" ,
Original file line number Diff line number Diff line change 4
4
"main" : " ./dist/index.browser.cjs.js" ,
5
5
"module" : " ./dist/index.browser.esm2017.js" ,
6
6
"browser" : " ./dist/index.browser.esm2017.js" ,
7
- "typings" : " ./dist/index .d.ts" ,
7
+ "typings" : " ./dist/storage .d.ts" ,
8
8
"private" : true
9
9
}
Original file line number Diff line number Diff line change 20
20
* abstract representations.
21
21
*/
22
22
23
- import firebase from '@firebase/app' ;
24
23
import * as backoff from './backoff' ;
25
24
import {
26
25
FirebaseStorageError ,
@@ -34,6 +33,8 @@ import * as type from './type';
34
33
import * as UrlUtils from './url' ;
35
34
import { Headers , XhrIo , ErrorCode } from './xhrio' ;
36
35
import { XhrIoPool } from './xhriopool' ;
36
+ // Firebase SDK version
37
+ import { version } from '../../../../package.json' ;
37
38
38
39
export interface Request < T > {
39
40
getPromise ( ) : Promise < T > ;
@@ -268,9 +269,7 @@ export function addAuthHeader_(
268
269
}
269
270
270
271
export function addVersionHeader_ ( headers : Headers ) : void {
271
- const version =
272
- typeof firebase !== 'undefined' ? firebase . SDK_VERSION : 'AppManager' ;
273
- headers [ 'X-Firebase-Storage-Version' ] = 'webjs/' + version ;
272
+ headers [ 'X-Firebase-Storage-Version' ] = 'webjs/' + ( version ?? 'AppManager' ) ;
274
273
}
275
274
276
275
export function addGmpidHeader_ ( headers : Headers , appId : string | null ) : void {
Original file line number Diff line number Diff line change 16
16
*/
17
17
import { assert } from 'chai' ;
18
18
import * as sinon from 'sinon' ;
19
- import firebase from '@firebase/app' ;
20
19
import { makeRequest } from '../../src/implementation/request' ;
21
20
import { RequestInfo } from '../../src/implementation/requestinfo' ;
22
21
import { XhrIo } from '../../src/implementation/xhrio' ;
23
22
import { makePool } from './testshared' ;
24
23
import { TestingXhrIo } from './xhrio' ;
24
+ import { version } from '../../../../package.json' ;
25
25
26
26
describe ( 'Firebase Storage > Request' , ( ) => {
27
27
const versionHeaderName = 'X-Firebase-Storage-Version' ;
28
- const versionHeaderValue = 'webjs/' + firebase . SDK_VERSION ;
28
+ const versionHeaderValue = 'webjs/' + version ;
29
29
const timeout = 60 * 1000 ;
30
30
31
31
it ( 'Simple success request works' , ( ) => {
You can’t perform that action at this time.
0 commit comments