Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
nktpro committed Aug 1, 2024
1 parent 1d9f8ae commit f3c392d
Show file tree
Hide file tree
Showing 15 changed files with 47 additions and 32 deletions.
3 changes: 1 addition & 2 deletions cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ ENTRY_FILE="./src/helmet.ts"
MOD_FILE="./src/mod.ts"

update_deps() {
# shellcheck disable=SC2046
deno add $(jq -r '.imports | keys[]' < deno.json)
deno run -A jsr:@wok/deup@1.0.3
}

code_quality() {
Expand Down
3 changes: 2 additions & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"@std/semver": "jsr:@std/semver@^0.224.3",
"@std/yaml": "jsr:@std/yaml@^1.0.0",
"@wok/case": "jsr:@wok/case@^1.0.1",
"@wok/utils": "jsr:@wok/utils@^1.3.6"
"@wok/typebox": "jsr:@wok/typebox@^0.32.36",
"@wok/utils": "jsr:@wok/utils@^1.4.0"
}
}
17 changes: 9 additions & 8 deletions deno.lock

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

6 changes: 3 additions & 3 deletions flake.lock

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

2 changes: 1 addition & 1 deletion src/actions/blacklist_instance.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Type } from "@wok/utils/typebox";
import { Type } from "@wok/typebox";
import { createCliAction, ExitCode } from "@wok/utils/cli";
import { fetchCurrentWhitelist, updateWhitelist } from "./whitelist_instance.ts";
import { resolve as resolvePath } from "@std/path";
Expand Down
2 changes: 1 addition & 1 deletion src/actions/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { stringifyYamlRelaxed } from "../libs/yaml_utils.ts";
import type { HelmetChartInstance } from "../libs/types.ts";
import { join as joinPath, resolve as resolvePath } from "@std/path";
import { createCliAction, ExitCode } from "@wok/utils/cli";
import { Type } from "@wok/utils/typebox";
import { Type } from "@wok/typebox";
import { cyan } from "@std/fmt/colors";
import { importBundleModule } from "../libs/iac_utils.ts";
import { K8sKind } from "@wok/utils/k8s";
Expand Down
2 changes: 1 addition & 1 deletion src/actions/ensure_instance_whitelisted.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createCliAction, ExitCode } from "@wok/utils/cli";
import { captureExec } from "@wok/utils/exec";
import { bold, cyan, red } from "@std/fmt/colors";
import { resolve as resolvePath } from "@std/path";
import { Type } from "@wok/utils/typebox";
import { Type } from "@wok/typebox";
import { importBundleModule } from "../libs/iac_utils.ts";
import { fetchCurrentWhitelist } from "./whitelist_instance.ts";

Expand Down
2 changes: 1 addition & 1 deletion src/actions/install.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { captureExec, inheritExec, printErrLines, printOutLines } from "@wok/utils/exec";
import { validate } from "@wok/utils/validation";
import { type Static, type TObject, Type } from "@wok/utils/typebox";
import { type Static, type TObject, Type } from "@wok/typebox";
import { join as joinPath, resolve as resolvePath } from "@std/path";
import { expandGlobSync } from "@std/fs";
import { createCliAction, ExitCode } from "@wok/utils/cli";
Expand Down
2 changes: 1 addition & 1 deletion src/actions/typeify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { pascalCase } from "@wok/case";
import { captureExec, inheritExec, printErrLines } from "@wok/utils/exec";
import { K8sCrdApiVersionV1beta1 } from "@wok/utils/k8s";
import { createCliAction, ExitCode } from "@wok/utils/cli";
import { Type } from "@wok/utils/typebox";
import { Type } from "@wok/typebox";
import { cyan, gray } from "@std/fmt/colors";

export type ClassifiedType =
Expand Down
2 changes: 1 addition & 1 deletion src/actions/uninstall.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createCliAction, ExitCode } from "@wok/utils/cli";
import { inheritExec } from "@wok/utils/exec";
import { Type } from "@wok/utils/typebox";
import { Type } from "@wok/typebox";

export default createCliAction(
{
Expand Down
2 changes: 1 addition & 1 deletion src/actions/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { inheritExec } from "@wok/utils/exec";
import { exists as fsExists, expandGlobSync } from "@std/fs";
import { dirname, join as joinPath, resolve as resolvePath } from "@std/path";
import { parse as parseYaml } from "@std/yaml";
import { Type } from "@wok/utils/typebox";
import { Type } from "@wok/typebox";
import { validate } from "@wok/utils/validation";
import {
format as semverFormat,
Expand Down
2 changes: 1 addition & 1 deletion src/actions/whitelist_instance.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { inheritExec, printErrLines, printOutLines } from "@wok/utils/exec";
import { createK8sConfigMap } from "@wok/utils/k8s";
import { createCliAction, ExitCode } from "@wok/utils/cli";
import { Type } from "@wok/utils/typebox";
import { Type } from "@wok/typebox";
import { resolve as resolvePath } from "@std/path";
import { gray } from "@std/fmt/colors";
import { importBundleModule } from "../libs/iac_utils.ts";
Expand Down
2 changes: 1 addition & 1 deletion src/deps/typebox.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "@wok/utils/typebox";
export * from "@wok/typebox";
2 changes: 1 addition & 1 deletion src/libs/iac_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { type K8sCrd, K8sCrdKind, K8sCrdSchema, type K8sResource, K8sResourceSch
import { exists as fsExists, expandGlob } from "@std/fs";
import { basename, dirname, fromFileUrl, join as joinPath } from "@std/path";
import { parse as parseYaml } from "@std/yaml";
import { type Static, type TObject, type TProperties, Type } from "@wok/utils/typebox";
import { type Static, type TObject, type TProperties, Type } from "@wok/typebox";
import { createValidator, validate, type ValidationResult } from "@wok/utils/validation";
import {
type ChartInstanceConfig,
Expand Down
30 changes: 22 additions & 8 deletions src/libs/types.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
import type { K8sCrd, K8sResource } from "@wok/utils/k8s";
import type { Range as SemverRange } from "@std/semver";
import { FlexObject, type Static, Type } from "@wok/utils/typebox";
import { type Static, Type } from "@wok/typebox";

export const ChartRepoReleaseSchema = FlexObject({
export const ChartRepoReleaseSchema = Type.Object({
apiVersion: Type.Optional(Type.String()),
version: Type.String(),
name: Type.String(),
urls: Type.Array(Type.String()),
}, {
additionalProperties: true,
});

export type ChartRepoRelease = Static<typeof ChartRepoReleaseSchema>;

export const ChartRepoIndexSchema = FlexObject({
export const ChartRepoIndexSchema = Type.Object({
apiVersion: Type.String(),
entries: Type.Record(
Type.String(),
Type.Array(ChartRepoReleaseSchema),
),
}, {
additionalProperties: true,
});

export type ChartRepoIndex = Static<typeof ChartRepoIndexSchema>;
Expand Down Expand Up @@ -68,7 +72,7 @@ export type RemoteChartConfigMap = {
[name: string]: RemoteChartConfig;
};

export const ChartMetadataSchema = FlexObject({
export const ChartMetadataSchema = Type.Object({
apiVersion: Type.String(),
name: Type.String(),
version: Type.String(),
Expand All @@ -84,6 +88,8 @@ export const ChartMetadataSchema = FlexObject({
appVersion: Type.Optional(Type.String()), // The version of the app that this contains (optional). This needn't be SemVer.
deprecated: Type.Optional(Type.Boolean()), // Whether this chart is deprecated (optional, boolean)
annotations: Type.Optional(Type.Any()),
}, {
additionalProperties: true,
});

export type ChartMetadata = Static<typeof ChartMetadataSchema>;
Expand All @@ -110,14 +116,22 @@ export interface HelmetBundle {
create: () => Promise<HelmetChartInstance[]>;
}

export const KubectlClientVersionCmdOutputSchema = FlexObject({
clientVersion: FlexObject({
export const KubectlClientVersionCmdOutputSchema = Type.Object({
clientVersion: Type.Object({
gitVersion: Type.String({ minLength: 1 }),
}, {
additionalProperties: true,
}),
}, {
additionalProperties: true,
});

export const KubectlServerVersionCmdOutputSchema = FlexObject({
serverVersion: FlexObject({
export const KubectlServerVersionCmdOutputSchema = Type.Object({
serverVersion: Type.Object({
gitVersion: Type.String({ minLength: 1 }),
}, {
additionalProperties: true,
}),
}, {
additionalProperties: true,
});

0 comments on commit f3c392d

Please sign in to comment.