Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
nktpro committed Jan 15, 2025
1 parent 2b6c3e8 commit ace28a9
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 26 deletions.
2 changes: 1 addition & 1 deletion cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ update_lock() {
}

update_deps() {
deno run -A jsr:@wok/deup@1.3.1 update "$@"
deno run -A jsr:@wok/deup@2.1.0 update "$@"
"$0" update_lock
}

Expand Down
4 changes: 2 additions & 2 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@std/fs": "jsr:@std/fs@^1.0.9",
"@std/path": "jsr:@std/path@^1.0.8",
"@std/yaml": "jsr:@std/yaml@^1.0.5",
"@wok/schema": "jsr:@wok/schema@^2.0.1",
"@wok/utils": "jsr:@wok/utils@^4.0.1"
"@wok/schema": "jsr:@wok/schema@^2.1.0",
"@wok/utils": "jsr:@wok/utils@^4.1.0"
}
}
27 changes: 12 additions & 15 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/deps.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export * from "@wok/utils/cli";
export * from "@wok/utils/exec";
export * from "@wok/utils/validation";
export type { ValidationResult } from "@wok/utils/validation";
export * from "@wok/schema/validation";
export * from "@std/fmt/colors";

export { basename, dirname, extname, fromFileUrl, join as joinPath, resolve as resolvePath } from "@std/path";
Expand Down
4 changes: 2 additions & 2 deletions src/multipass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
NonZeroExitError,
printErrLines,
printOutLines,
typedParse,
validate,
} from "./deps.ts";
import type { InstanceConfig, JoinMetadata, ServerInstanceConfig } from "./types.ts";
import { InstanceState, MultipassInfo } from "./types.ts";
Expand Down Expand Up @@ -112,7 +112,7 @@ export async function multipassInfo(
}
})();

const result = typedParse(MultipassInfo, output);
const result = validate(MultipassInfo, output);

if (!result.isSuccess) {
throw new Error(
Expand Down
8 changes: 4 additions & 4 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
printErrLines,
printOutLines,
resolvePath,
typedParse,
validate,
type ValueError,
} from "./deps.ts";
import { fsExists, gray, inheritExec, joinPath, red, stringifyYaml } from "./deps.ts";
Expand Down Expand Up @@ -64,8 +64,8 @@ export async function loadInstanceConfig(
}

const instanceResult = (instanceConfig.role === "server")
? typedParse(ServerInstanceConfigSchema, instanceMod.default)
: typedParse(AgentInstanceConfigSchema, instanceMod.default);
? validate(ServerInstanceConfigSchema, instanceMod.default)
: validate(AgentInstanceConfigSchema, instanceMod.default);

if (!instanceResult.isSuccess) {
throw new Error(
Expand Down Expand Up @@ -147,7 +147,7 @@ export async function createCloudInitConfig(
try {
if (instance.role === "agent" || (instance.role === "server" && !instance.clusterInit)) {
const content = JSON.parse(await Deno.readTextFile(instance.joinMetadataPath));
const result = typedParse(JoinMetadataSchema, content);
const result = validate(JoinMetadataSchema, content);

if (!result.isSuccess) {
throw new Error(
Expand Down

0 comments on commit ace28a9

Please sign in to comment.