Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
dlarocque committed Oct 7, 2024
1 parent 0dbb8e6 commit 7d56bb5
Show file tree
Hide file tree
Showing 74 changed files with 22,272 additions and 194 deletions.
18 changes: 18 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Prune .d.ts",
"program": "${workspaceRoot}/repo-scripts/prune-dts/node_modules/.bin/_mocha",
"cwd": "${workspaceRoot}/repo-scripts/prune-dts",
"args": [
"--require",
"ts-node/register",
"--timeout",
"5000",
"${workspaceFolder}/repo-scripts/prune-dts/*.test.ts"
],
"env": {
"TS_NODE_COMPILER_OPTIONS" : "{\"module\":\"commonjs\"}"
},
"sourceMaps": true,
},
{
"type": "node",
"request": "launch",
Expand Down
2 changes: 1 addition & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"karma-typescript": "5.5.4",
"karma-typescript-es6-transform": "5.5.4",
"mocha": "9.2.2",
"typescript": "4.7.4",
"typescript": "4.9.5",
"webpack": "5.76.0",
"webpack-cli": "4.10.0",
"webpack-dev-server": "4.11.1"
Expand Down
2 changes: 1 addition & 1 deletion integration/compat-interop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@firebase/remote-config-compat": "0.2.9"
},
"devDependencies": {
"typescript": "4.7.4"
"typescript": "4.9.5"
},
"engines": {
"node": ">=18.0.0"
Expand Down
2 changes: 1 addition & 1 deletion integration/compat-typings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"firebase": "*"
},
"devDependencies": {
"typescript": "4.7.4"
"typescript": "4.9.5"
},
"engines": {
"node": ">=18.0.0"
Expand Down
2 changes: 1 addition & 1 deletion integration/firebase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"karma-typescript": "5.5.4",
"mocha": "9.2.2",
"npm-run-all": "4.1.5",
"typescript": "4.7.4"
"typescript": "4.9.5"
},
"engines": {
"node": ">=18.0.0"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
"tsec": "0.2.8",
"tslint": "6.1.3",
"typedoc": "0.16.11",
"typescript": "4.7.4",
"typescript": "5.0.4",
"watch": "1.0.2",
"webpack": "5.76.0",
"yargs": "17.7.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/analytics-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"rollup": "2.79.1",
"@rollup/plugin-json": "4.1.0",
"rollup-plugin-typescript2": "0.31.2",
"typescript": "4.7.4"
"typescript": "4.9.5"
},
"repository": {
"directory": "packages/analytics-compat",
Expand Down
2 changes: 1 addition & 1 deletion packages/analytics-interop-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"url": "https://github.com/firebase/firebase-js-sdk/issues"
},
"devDependencies": {
"typescript": "4.7.4"
"typescript": "4.9.5"
}
}
2 changes: 1 addition & 1 deletion packages/analytics-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"url": "https://github.com/firebase/firebase-js-sdk/issues"
},
"devDependencies": {
"typescript": "4.7.4"
"typescript": "4.9.5"
}
}
2 changes: 1 addition & 1 deletion packages/analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@rollup/plugin-json": "4.1.0",
"@rollup/plugin-node-resolve": "13.3.0",
"rollup-plugin-typescript2": "0.31.2",
"typescript": "4.7.4"
"typescript": "4.9.5"
},
"repository": {
"directory": "packages/analytics",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-check-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@rollup/plugin-json": "4.1.0",
"@rollup/plugin-node-resolve": "13.3.0",
"rollup-plugin-typescript2": "0.31.2",
"typescript": "4.7.4"
"typescript": "4.9.5"
},
"repository": {
"directory": "packages/app-check",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-check-interop-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"url": "https://github.com/firebase/firebase-js-sdk/issues"
},
"devDependencies": {
"typescript": "4.7.4"
"typescript": "4.9.5"
}
}
2 changes: 1 addition & 1 deletion packages/app-check-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"url": "https://github.com/firebase/firebase-js-sdk/issues"
},
"devDependencies": {
"typescript": "4.7.4"
"typescript": "4.9.5"
}
}
2 changes: 1 addition & 1 deletion packages/app-check/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@rollup/plugin-json": "4.1.0",
"@rollup/plugin-node-resolve": "13.3.0",
"rollup-plugin-typescript2": "0.31.2",
"typescript": "4.7.4"
"typescript": "4.9.5"
},
"repository": {
"directory": "packages/app-check",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@rollup/plugin-json": "4.1.0",
"rollup-plugin-replace": "2.2.0",
"rollup-plugin-typescript2": "0.31.2",
"typescript": "4.7.4"
"typescript": "4.9.5"
},
"repository": {
"directory": "packages/app-compat",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"@firebase/logger": "0.2.6"
},
"devDependencies": {
"typescript": "4.7.4"
"typescript": "4.9.5"
}
}
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"rollup-plugin-replace": "2.2.0",
"rollup-plugin-typescript2": "0.31.2",
"rollup-plugin-dts": "5.3.1",
"typescript": "4.7.4"
"typescript": "4.9.5"
},
"repository": {
"directory": "packages/app",
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-compat/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"rollup-plugin-sourcemaps": "0.6.3",
"rollup-plugin-typescript2": "0.31.2",
"rollup-plugin-uglify": "6.0.4",
"typescript": "4.7.4"
"typescript": "4.9.5"
},
"repository": {
"directory": "packages/auth-compat/demo",
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"rollup-plugin-replace": "2.2.0",
"rollup-plugin-typescript2": "0.31.2",
"selenium-webdriver": "4.8.0",
"typescript": "4.7.4"
"typescript": "4.9.5"
},
"repository": {
"directory": "packages/auth-compat",
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-interop-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"url": "https://github.com/firebase/firebase-js-sdk/issues"
},
"devDependencies": {
"typescript": "4.7.4"
"typescript": "4.9.5"
}
}
2 changes: 1 addition & 1 deletion packages/auth-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"url": "https://github.com/firebase/firebase-js-sdk/issues"
},
"devDependencies": {
"typescript": "4.7.4"
"typescript": "4.9.5"
}
}
2 changes: 1 addition & 1 deletion packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
"rollup-plugin-typescript2": "0.31.2",
"selenium-webdriver": "4.8.0",
"totp-generator": "0.0.14",
"typescript": "4.7.4"
"typescript": "4.9.5"
},
"repository": {
"directory": "packages/auth",
Expand Down
6 changes: 3 additions & 3 deletions packages/auth/src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,20 +237,20 @@ export async function _performSignInRequest<T, V extends IdTokenResponse>(
request?: T,
customErrorMap: Partial<ServerErrorMap<ServerError>> = {}
): Promise<V> {
const serverResponse = (await _performApiRequest<T, V | IdTokenMfaResponse>(
const serverResponse = await _performApiRequest<T, V | IdTokenMfaResponse>(
auth,
method,
path,
request,
customErrorMap
)) as V;
);
if ('mfaPendingCredential' in serverResponse) {
_fail(auth, AuthErrorCode.MFA_REQUIRED, {
_serverResponse: serverResponse
});
}

return serverResponse;
return serverResponse as V;
}

export function _getFinalTarget(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,22 +159,20 @@ export async function injectRecaptchaFields<T>(
captchaResp = false
): Promise<T> {
const verifier = new RecaptchaEnterpriseVerifier(auth);
let captchaResponse;
let captchaResponse: string;
try {
captchaResponse = await verifier.verify(action);
} catch (error) {
captchaResponse = await verifier.verify(action, true);
}
const newRequest = { ...request };
if (!captchaResp) {
Object.assign(newRequest, { captchaResponse });
} else {
Object.assign(newRequest, { 'captchaResp': captchaResponse });
}
Object.assign(newRequest, { 'clientType': RecaptchaClientType.WEB });
Object.assign(newRequest, {
'recaptchaVersion': RecaptchaVersion.ENTERPRISE
});

const newRequest: T = {
...request,
...(captchaResp ? { captchaResp: captchaResponse } : { captchaResponse }),
clientType: RecaptchaClientType.WEB,
recaptchaVersion: RecaptchaVersion.ENTERPRISE
};

return newRequest;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"devDependencies": {
"rollup": "2.79.1",
"rollup-plugin-typescript2": "0.31.2",
"typescript": "4.7.4"
"typescript": "4.9.5"
},
"repository": {
"directory": "packages/component",
Expand Down
5 changes: 5 additions & 0 deletions packages/database-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,13 @@
"tslib": "^2.1.0"
},
"devDependencies": {
<<<<<<< HEAD
"@firebase/app-compat": "0.2.42",
"typescript": "4.7.4"
=======
"@firebase/app-compat": "0.2.41",
"typescript": "4.9.5"
>>>>>>> 2494f4005 (WIP)
},
"repository": {
"directory": "packages/database-compat",
Expand Down
2 changes: 1 addition & 1 deletion packages/database-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"url": "https://github.com/firebase/firebase-js-sdk/issues"
},
"devDependencies": {
"typescript": "4.7.4"
"typescript": "4.9.5"
}
}
2 changes: 1 addition & 1 deletion packages/database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@firebase/app": "0.10.12",
"rollup": "2.79.1",
"rollup-plugin-typescript2": "0.31.2",
"typescript": "4.7.4"
"typescript": "4.9.5"
},
"repository": {
"directory": "packages/database",
Expand Down
2 changes: 1 addition & 1 deletion packages/firestore-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"rollup-plugin-typescript2": "0.31.2",
"@rollup/plugin-node-resolve": "13.3.0",
"ts-node": "10.9.1",
"typescript": "4.7.4"
"typescript": "4.9.5"
},
"license": "Apache-2.0",
"typings": "dist/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"rollup-plugin-typescript2": "0.31.2",
"rollup-plugin-dts": "5.3.1",
"ts-node": "10.9.1",
"typescript": "4.7.4"
"typescript": "4.9.5"
},
"repository": {
"directory": "packages/firestore",
Expand Down
2 changes: 1 addition & 1 deletion packages/functions-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"rollup": "2.79.1",
"@rollup/plugin-json": "4.1.0",
"rollup-plugin-typescript2": "0.31.2",
"typescript": "4.7.4"
"typescript": "4.9.5"
},
"repository": {
"directory": "packages/functions-compat",
Expand Down
2 changes: 1 addition & 1 deletion packages/functions-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"url": "https://github.com/firebase/firebase-js-sdk/issues"
},
"devDependencies": {
"typescript": "4.7.4"
"typescript": "4.9.5"
}
}
2 changes: 1 addition & 1 deletion packages/functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"rollup": "2.79.1",
"@rollup/plugin-json": "4.1.0",
"rollup-plugin-typescript2": "0.31.2",
"typescript": "4.7.4"
"typescript": "4.9.5"
},
"repository": {
"directory": "packages/functions",
Expand Down
2 changes: 1 addition & 1 deletion packages/installations-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@rollup/plugin-node-resolve": "13.3.0",
"rollup-plugin-typescript2": "0.31.2",
"rollup-plugin-uglify": "6.0.4",
"typescript": "4.7.4"
"typescript": "4.9.5"
},
"peerDependencies": {
"@firebase/app-compat": "0.x"
Expand Down
2 changes: 1 addition & 1 deletion packages/installations-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
"url": "https://github.com/firebase/firebase-js-sdk/issues"
},
"devDependencies": {
"typescript": "4.7.4"
"typescript": "4.9.5"
}
}
2 changes: 1 addition & 1 deletion packages/installations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"@rollup/plugin-node-resolve": "13.3.0",
"rollup-plugin-typescript2": "0.31.2",
"rollup-plugin-uglify": "6.0.4",
"typescript": "4.7.4"
"typescript": "4.9.5"
},
"peerDependencies": {
"@firebase/app": "0.x"
Expand Down
2 changes: 1 addition & 1 deletion packages/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"devDependencies": {
"rollup": "2.79.1",
"rollup-plugin-typescript2": "0.31.2",
"typescript": "4.7.4"
"typescript": "4.9.5"
},
"repository": {
"directory": "packages/logger",
Expand Down
2 changes: 1 addition & 1 deletion packages/messaging-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@rollup/plugin-json": "4.1.0",
"rollup-plugin-typescript2": "0.31.2",
"ts-essentials": "9.3.0",
"typescript": "4.7.4"
"typescript": "4.9.5"
},
"repository": {
"directory": "packages/messaging",
Expand Down
2 changes: 1 addition & 1 deletion packages/messaging-interop-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"url": "https://github.com/firebase/firebase-js-sdk/issues"
},
"devDependencies": {
"typescript": "4.7.4"
"typescript": "4.9.5"
}
}
Loading

0 comments on commit 7d56bb5

Please sign in to comment.