Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/deploy/functions/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@

const invalidList = invalidEndpoints
.sort((a, b) => backend.compareFunctions(a.ep, b.ep))
.map(({ ep, limit }) => `\t${getFunctionLabel(ep)}: ${ep.timeoutSeconds}s (limit: ${limit}s)`)

Check warning on line 253 in src/deploy/functions/validate.ts

View workflow job for this annotation

GitHub Actions / lint (24)

Invalid type "number | null | undefined" of template literal expression
.join("\n");

const msg =
Expand Down Expand Up @@ -309,7 +309,7 @@
/**
* Validate function names only contain letters, numbers, underscores, and hyphens
* and not exceed 63 characters in length.
* @param functionNames Object containing function names as keys.

Check warning on line 312 in src/deploy/functions/validate.ts

View workflow job for this annotation

GitHub Actions / lint (24)

Expected @param names to be "functions". Got "functionNames"
* @throws { FirebaseError } Function names must be valid.
*/
export function functionIdsAreValid(functions: { id: string; platform: string }[]): void {
Expand All @@ -319,7 +319,7 @@
if (invalidIds.length !== 0) {
const msg =
`${invalidIds.map((f) => f.id).join(", ")} function name(s) can only contain letters, ` +
`numbers, hyphens, and not exceed 62 characters in length`;
`numbers, underscores, hyphens, and not exceed 63 characters in length`;
throw new FirebaseError(msg);
}
}
Expand All @@ -330,7 +330,7 @@
*
* If validation fails for any secret config, throws a FirebaseError.
*/
export async function secretsAreValid(projectId: string, wantBackend: backend.Backend) {

Check warning on line 333 in src/deploy/functions/validate.ts

View workflow job for this annotation

GitHub Actions / lint (24)

Missing return type on function
const endpoints = backend
.allEndpoints(wantBackend)
.filter((e) => e.secretEnvironmentVariables && e.secretEnvironmentVariables.length > 0);
Expand All @@ -343,7 +343,7 @@
/**
* Ensures that all endpoints specifying secret environment variables target platform that supports the feature.
*/
function validatePlatformTargets(endpoints: backend.Endpoint[]) {

Check warning on line 346 in src/deploy/functions/validate.ts

View workflow job for this annotation

GitHub Actions / lint (24)

Missing return type on function
const unsupported = endpoints.filter((e) => !secretsSupportedPlatforms.includes(e.platform));
if (unsupported.length > 0) {
const errs = unsupported.map((e) => `${e.id}[platform=${e.platform}]`);
Expand All @@ -361,7 +361,7 @@
* 1) It exists.
* 2) It's in state "enabled".
*/
async function validateSecretVersions(projectId: string, endpoints: backend.Endpoint[]) {

Check warning on line 364 in src/deploy/functions/validate.ts

View workflow job for this annotation

GitHub Actions / lint (24)

Missing return type on function
const toResolve: Set<string> = new Set();
for (const s of secrets.of(endpoints)) {
toResolve.add(s.secret);
Expand All @@ -384,7 +384,7 @@
if (sv.state !== "ENABLED") {
errs.push(
new FirebaseError(
`Expected secret ${sv.secret.name}@${sv.versionId} to be in state ENABLED not ${sv.state}.`,

Check warning on line 387 in src/deploy/functions/validate.ts

View workflow job for this annotation

GitHub Actions / lint (24)

Invalid type ""STATE_UNSPECIFIED" | "DISABLED" | "DESTROYED" | undefined" of template literal expression
),
);
}
Expand Down
Loading