Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
nktpro committed May 20, 2024
1 parent acf2d88 commit 830524b
Show file tree
Hide file tree
Showing 15 changed files with 102 additions and 93 deletions.
87 changes: 48 additions & 39 deletions deno.lock

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

2 changes: 1 addition & 1 deletion examples/multi/multi-1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
cpus: 15,
memoryGiBs: 50,
diskGiBs: 200,
k3sVersion: "v1.24.17+k3s1",
k3sVersion: "v1.26.15+k3s1",
serviceCidr: "10.254.244.0/22",
clusterCidr: "10.254.248.0/21",
clusterDnsIp: "10.254.244.10",
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

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

7 changes: 3 additions & 4 deletions src/actions/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
parseYaml,
resolvePath,
stringifyYaml,
Type,
} from "../deps.ts";
import {
multipass,
Expand Down Expand Up @@ -194,10 +193,10 @@ export async function createInstance(instance: InstanceConfig, signal: AbortSign
}

export default createCliAction(
Type.Object({
{
config: InstanceConfigPathSchema,
}),
async ({ config: configPath }, _, signal) => {
},
async ({ config: configPath }, signal) => {
const absoluteConfigPath = resolvePath(configPath);
const instance = await loadInstanceConfig(absoluteConfigPath);

Expand Down
4 changes: 2 additions & 2 deletions src/actions/destroy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ export async function destroyInstance(instance: InstanceConfig) {
}

export default createCliAction(
Type.Object({
{
config: InstanceConfigPathSchema,
skipConfirm: Type.Optional(Type.Boolean({
default: false,
})),
}),
},
async ({ config: configPath, skipConfirm }) => {
const absoluteConfigPath = resolvePath(configPath);
const instance = await loadInstanceConfig(absoluteConfigPath);
Expand Down
8 changes: 4 additions & 4 deletions src/actions/refresh.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { createCliAction, ExitCode, resolvePath, Type } from "../deps.ts";
import { createCliAction, ExitCode, resolvePath } from "../deps.ts";
import { multipassInfo, multipassPostStart } from "../multipass.ts";
import { InstanceConfigPathSchema, InstanceState } from "../types.ts";
import { err, loadInstanceConfig, ok } from "../utils.ts";
import { updateKubeconfig } from "./create.ts";

export default createCliAction(
Type.Object({
{
config: InstanceConfigPathSchema,
}),
async ({ config: configPath }, _, signal) => {
},
async ({ config: configPath }, signal) => {
const absoluteConfigPath = resolvePath(configPath);
const instance = await loadInstanceConfig(absoluteConfigPath);

Expand Down
6 changes: 3 additions & 3 deletions src/actions/reset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import { createInstance } from "./create.ts";
import { destroyInstance } from "./destroy.ts";

export default createCliAction(
Type.Object({
{
config: InstanceConfigPathSchema,
skipConfirm: Type.Optional(Type.Boolean({
default: false,
})),
}),
async ({ config: configPath, skipConfirm }, _, signal) => {
},
async ({ config: configPath, skipConfirm }, signal) => {
const absoluteConfigPath = resolvePath(configPath);
const instance = await loadInstanceConfig(absoluteConfigPath);
const { name } = instance;
Expand Down
6 changes: 3 additions & 3 deletions src/actions/resize.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { createCliAction, ExitCode, resolvePath, Type } from "../deps.ts";
import { createCliAction, ExitCode, resolvePath } from "../deps.ts";
import { multipassInfo, multipassResize } from "../multipass.ts";
import { InstanceConfigPathSchema, InstanceState } from "../types.ts";
import { loadInstanceConfig, ok } from "../utils.ts";

export default createCliAction(
Type.Object({
{
config: InstanceConfigPathSchema,
}),
},
async ({ config: configPath }) => {
const absoluteConfigPath = resolvePath(configPath);
const instance = await loadInstanceConfig(absoluteConfigPath);
Expand Down
13 changes: 7 additions & 6 deletions src/actions/ssh.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { createCliAction, ExitCode, gray, resolvePath, Type } from "../deps.ts";
import { createCliAction, ExitCode, gray, NonEmptyString, resolvePath, Type } from "../deps.ts";
import { multipassInfo, multipassSshInteractive } from "../multipass.ts";
import { InstanceConfigPathSchema, InstanceState } from "../types.ts";
import { getExternalIp, loadInstanceConfig, log } from "../utils.ts";

export default createCliAction(
Type.Object({
{
config: InstanceConfigPathSchema,
}),
async (args, unparsedArgs) => {
const absoluteConfigPath = resolvePath(args.config);
"--": Type.Array(NonEmptyString()),
},
async ({ config, "--": cmd }) => {
const absoluteConfigPath = resolvePath(config);
const instance = await loadInstanceConfig(absoluteConfigPath);
const { name, sshDirectoryPath } = instance;

Expand All @@ -23,7 +24,7 @@ export default createCliAction(
log(gray(`Instance IP is '${ip}'`));

const exitCode = await multipassSshInteractive({
cmd: unparsedArgs,
cmd: cmd,
sshDirectoryPath,
ip: getExternalIp(ipv4, instance.externalNetworkCidr),
});
Expand Down
8 changes: 4 additions & 4 deletions src/actions/start.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { createCliAction, ExitCode, gray, resolvePath, Type } from "../deps.ts";
import { createCliAction, ExitCode, gray, resolvePath } from "../deps.ts";
import { multipassInfo, multipassInheritSsh, multipassPostStart, multipassStart } from "../multipass.ts";
import { InstanceConfigPathSchema, InstanceState } from "../types.ts";
import { loadInstanceConfig, log, ok } from "../utils.ts";
import { updateKubeconfig } from "./create.ts";

export default createCliAction(
Type.Object({
{
config: InstanceConfigPathSchema,
}),
async ({ config: configPath }, _, signal) => {
},
async ({ config: configPath }, signal) => {
const absoluteConfigPath = resolvePath(configPath);
const instance = await loadInstanceConfig(absoluteConfigPath);
const { name } = instance;
Expand Down
6 changes: 3 additions & 3 deletions src/actions/stop.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { createCliAction, ExitCode, resolvePath, Type } from "../deps.ts";
import { createCliAction, ExitCode, resolvePath } from "../deps.ts";
import { multipassInfo, multipassK3sKillAll, multipassStop, multipassUnroute } from "../multipass.ts";
import { InstanceConfigPathSchema, InstanceState } from "../types.ts";
import { getExternalIp, loadInstanceConfig, ok } from "../utils.ts";

export default createCliAction(
Type.Object({
{
config: InstanceConfigPathSchema,
}),
},
async ({ config: configPath }) => {
const absoluteConfigPath = resolvePath(configPath);
const instance = await loadInstanceConfig(absoluteConfigPath);
Expand Down
6 changes: 3 additions & 3 deletions src/actions/suspend.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { createCliAction, ExitCode, resolvePath, Type } from "../deps.ts";
import { createCliAction, ExitCode, resolvePath } from "../deps.ts";
import { multipassInfo, multipassSuspend, multipassUnroute } from "../multipass.ts";
import { InstanceConfigPathSchema, InstanceState } from "../types.ts";
import { loadInstanceConfig, ok } from "../utils.ts";

export default createCliAction(
Type.Object({
{
config: InstanceConfigPathSchema,
}),
},
async ({ config: configPath }) => {
const absoluteConfigPath = resolvePath(configPath);
const instance = await loadInstanceConfig(absoluteConfigPath);
Expand Down
4 changes: 2 additions & 2 deletions src/actions/version.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createCliAction, ExitCode, Type } from "../deps.ts";
import { createCliAction, ExitCode } from "../deps.ts";

export default createCliAction(
Type.Object({}),
{},
() => {
console.log({ app: Deno.env.get("JETSKI_VERSION") ?? "dev", ...Deno.version });
return Promise.resolve(ExitCode.Zero);
Expand Down
24 changes: 12 additions & 12 deletions src/deps.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export * from "jsr:@wok/utils@~1.1.3/cli";
export * from "jsr:@wok/utils@~1.1.3/exec";
export * from "jsr:@wok/utils@~1.1.3/validation";
export * from "jsr:@wok/utils@1.3.2/cli";
export * from "jsr:@wok/utils@1.3.2/exec";
export * from "jsr:@wok/utils@1.3.2/validation";
export * from "./deps/typebox.ts";
export type { ValidationResult } from "jsr:@wok/utils@~1.1.3/validation";
export * from "jsr:@std/fmt@^0.221.0/colors";
export type { ValidationResult } from "jsr:@wok/utils@1.3.2/validation";
export * from "jsr:@std/fmt@0.224.0/colors";

export {
basename,
Expand All @@ -12,11 +12,11 @@ export {
fromFileUrl,
join as joinPath,
resolve as resolvePath,
} from "jsr:@std/path@^0.221.0";
} from "jsr:@std/path@0.224.0";

export { parse as parseYaml, stringify as stringifyYaml } from "jsr:@std/yaml@^0.221.0";
export { exists as fsExists } from "jsr:@std/fs@^0.221.0/exists";
export { ensureFile } from "jsr:@std/fs@^0.221.0/ensure-file";
export { assertExists } from "jsr:@std/assert@^0.221.0/assert-exists";
export { memoizePromise } from "jsr:@wok/utils@~1.1.3/async";
export { delay } from "jsr:@std/async@^0.221.0/delay";
export { parse as parseYaml, stringify as stringifyYaml } from "jsr:@std/yaml@0.224.0";
export { exists as fsExists } from "jsr:@std/fs@0.224.0/exists";
export { ensureFile } from "jsr:@std/fs@0.224.0/ensure-file";
export { assertExists } from "jsr:@std/assert@0.224.0/assert-exists";
export { memoizePromise } from "jsr:@wok/utils@1.3.2/async";
export { delay } from "jsr:@std/async@0.224.0/delay";
2 changes: 1 addition & 1 deletion src/deps/typebox.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "jsr:@wok/utils@~1.1.3/typebox";
export * from "jsr:@wok/utils@1.3.2/typebox";

0 comments on commit 830524b

Please sign in to comment.