Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit c0de4b6

Browse files
Merge pull request #57 from robdimarco-render/robdimarco-render/SVC-1626-fix-build-issue
Fix dependency and resulting build issue
2 parents 7dc06e4 + 9468738 commit c0de4b6

8 files changed

Lines changed: 27 additions & 117 deletions

File tree

buildpack/crud.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { pathExists } from "../util/paths.ts";
44
import { DOCKERFILE_TEMPLATE } from "./templates/dockerfile_template.ts";
55
import { RenderBuildpackFile } from "./types.ts";
66

7-
const BUILDPACKS_VALIDATOR = ajv.compile<RenderBuildpackFile>(RenderBuildpackFile);
7+
const BUILDPACKS_VALIDATOR = ajv.compile(RenderBuildpackFile);
88

99
export async function initDockerfile(dir: string, force: boolean) {
1010
const f = `${dir}/Dockerfile.render`;

commands/services/tail.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export const servicesTailCommand =
6666
throw err;
6767
}
6868

69-
const logEntryValidator = ajv.compile<LogTailEntry>(LogTailEntry);
69+
const logEntryValidator = ajv.compile(LogTailEntry);
7070

7171

7272
setInterval(() => {

config/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ async function buildRuntimeProfile(
118118
}
119119

120120
export function validateRegion(s: string): Region {
121-
if (!ajv.validate<Region>(Region, s)) {
121+
if (!ajv.validate(Region, s)) {
122122
throw new Error(`Invalid region '${s}'. Valid regions: ${ALL_REGIONS.join(' ')}`);
123123
}
124124

125-
return s;
125+
return s as Region;
126126
}

config/types/enums.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export type Region = Static<typeof Region>;
1414
export const ALL_REGIONS = Region.anyOf.map(i => i.const);
1515

1616
export function assertValidRegion(s: string): asserts s is Region {
17-
if (!ajv.validate<Region>(Region, s)) {
17+
if (!ajv.validate(Region, s)) {
1818
throw new Error(`Region '${s}' is not one of: ${ALL_REGIONS.join(' ')}`);
1919
}
2020
}

deps-lock.json

Lines changed: 17 additions & 107 deletions
Large diffs are not rendered by default.

deps.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ export {
1010
sortBy
1111
} from "https://raw.githubusercontent.com/lodash/lodash/4.17.21-es/lodash.js";
1212

13-
export { Type, type Static } from "https://deno.land/x/typebox@0.24.27/src/typebox.ts";
14-
export * as Typebox from "https://deno.land/x/typebox@0.24.27/src/typebox.ts";
13+
export { Type, type Static } from "https://deno.land/x/typebox@0.28.10/src/typebox.ts";
14+
export * as Typebox from "https://deno.land/x/typebox@0.28.10/src/typebox.ts";
1515

16-
export { default as Ajv, type ErrorObject as AjvErrorObject } from "https://esm.sh/v86/ajv@8.11.0";
16+
export { default as Ajv } from "https://esm.sh/v86/ajv@8.11.0";
1717
export { default as AjvFormats } from "https://esm.sh/v86/ajv-formats@2.1.1";
1818

1919
export * as Cliffy from "https://deno.land/x/cliffy@v0.25.6/mod.ts";

errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class ValidationFailed extends RenderCLIError {
4747
super(
4848
`Error validating object of type ${schema.title ?? schema.$id ?? 'unknown'}: ` +
4949
"\n\n" +
50-
(errors ?? []).map(error => ajv.errorsText([error])).join("\n")
50+
(errors ?? []).map((error:any) => ajv.errorsText([error])).join("\n")
5151
);
5252
}
5353
}

util/ajv.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function logAjvErrors(logger: Log.Logger, errors: typeof ajv.errors) {
3535
}
3636

3737
export function assertType<T extends Typebox.TSchema>(schema: T, content: unknown): asserts content is Typebox.Static<T> {
38-
const isValid = ajv.validate<T>(schema, content);
38+
const isValid = ajv.validate(schema, content);
3939
if (!isValid) {
4040
throw new ValidationFailed(schema, ajv.errors);
4141
}

0 commit comments

Comments
 (0)