-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0fde5dc
commit 1ccb226
Showing
18 changed files
with
249 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,8 @@ | |
* @license MIT | ||
*/ | ||
|
||
import * as flags from "https://deno.land/[email protected].0/flags/mod.ts"; | ||
import { JSON_SCHEMA, parse } from "https://deno.land/[email protected].0/yaml/mod.ts"; | ||
import { parseArgs } from "jsr:@std/cli@0.224.6/parse-args"; | ||
import { JSON_SCHEMA, parse } from "jsr:@std/yaml@0.224.1"; | ||
|
||
/** | ||
* If the value is '-' stdin is read and returned. | ||
|
@@ -51,7 +51,7 @@ export function getArgsObject( | |
: (_: string, value: string) => { | ||
return !!looksLikeYamlRe.exec(value); | ||
}; | ||
const rawArgs = flags.parse(argsArray || Deno.args); | ||
const rawArgs = parseArgs(argsArray || Deno.args); | ||
const parsedArgs: any = {}; | ||
Object.entries(rawArgs).forEach(([key, rawValue]) => { | ||
let value = textOrStdIn(rawValue); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { assertEquals } from "https://deno.land/std@0.224.0/assert/mod.ts"; | ||
import { delay } from "https://deno.land/[email protected].0/async/delay.ts"; | ||
import { assertEquals } from "jsr:@std/assert@0.226.0"; | ||
import { delay } from "jsr:@std/async@0.224.2"; | ||
import { Emittery } from "./emittery.ts"; | ||
const emitter = new Emittery(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
*/ | ||
|
||
import { HmacSha256 } from "https://deno.land/[email protected]/hash/sha256.ts"; | ||
import { encodeBase64 } from "https://deno.land/[email protected].0/encoding/base64.ts"; | ||
import { encodeBase64 } from "jsr:@std/encoding@0.224.3"; | ||
|
||
///// | ||
interface parseOptions { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
import { sha1 } from "https://deno.land/x/[email protected]/mod.ts"; | ||
import titleCase from "https://deno.land/x/[email protected]/titleCase.ts"; | ||
import { sha256 } from "https://deno.land/x/[email protected]/mod.ts"; | ||
import * as base32 from "https://deno.land/[email protected].0/encoding/base32.ts"; | ||
import { decodeBase32, encodeBase32 } from "jsr:@std/encoding@0.224.3/base32"; | ||
|
||
const RE = /^{{.*}}$/; | ||
|
||
|
@@ -91,10 +91,10 @@ class Helpers { | |
b64dec = atob; | ||
b32enc = (a: string) => { | ||
const binary = new TextEncoder().encode(a); | ||
return base32.encodeBase32(binary); | ||
return encodeBase32(binary); | ||
}; | ||
b32dec = (a: string) => { | ||
const decoded = base32.decodeBase32(a); | ||
const decoded = decodeBase32(a); | ||
return new TextDecoder().decode(decoded); | ||
}; | ||
sha1sum = sha1; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ import template, { | |
} from "./template.ts"; | ||
import { getArgsObject } from "../args.ts"; | ||
import { merge } from "../merge.ts"; | ||
import * as YAML from "https://deno.land/[email protected].0/yaml/mod.ts"; | ||
import * as YAML from "jsr:@std/yaml@0.224.1"; | ||
|
||
const helpText = `\ | ||
Kite™️ Template Tool by Brandon Kalinowski @brandonkal | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,14 +6,16 @@ | |
* @license MIT | ||
*/ | ||
|
||
import * as fs from "https://deno.land/[email protected]/fs/mod.ts"; | ||
import * as path from "https://deno.land/[email protected]/path/mod.ts"; | ||
import * as fs from "jsr:@std/[email protected]"; | ||
import * as path from "jsr:@std/[email protected]"; | ||
import * as YAML from "jsr:@std/[email protected]"; | ||
import { toText } from "jsr:@std/[email protected]"; | ||
import { decodeBase32, encodeBase32 } from "jsr:@std/[email protected]/base32"; | ||
|
||
import { sha1 } from "https://deno.land/x/[email protected]/mod.ts"; | ||
import titleCase from "https://deno.land/x/[email protected]/titleCase.ts"; | ||
import { sha256 } from "https://deno.land/x/[email protected]/mod.ts"; | ||
import * as YAML from "https://deno.land/[email protected]/yaml/mod.ts"; | ||
import * as base32 from "https://deno.land/[email protected]/encoding/base32.ts"; | ||
import { toText } from "https://deno.land/[email protected]/streams/to_text.ts"; | ||
|
||
import * as k8s from "https://x.kite.run/lib/kubernetes.ts"; | ||
|
||
import { dotProp, homedir, jsonItem, visitAll, withTimeout } from "../utils.ts"; | ||
|
@@ -901,10 +903,10 @@ function ops(envars: Record<string, string | undefined>) { | |
b64dec: atob, | ||
b32enc: (a: string) => { | ||
const binary = new TextEncoder().encode(a); | ||
return base32.encodeBase32(binary); | ||
return encodeBase32(binary); | ||
}, | ||
b32dec: (a: string) => { | ||
const decoded = base32.decodeBase32(a); | ||
const decoded = decodeBase32(a); | ||
return new TextDecoder().decode(decoded); | ||
}, | ||
sha1sum: (a: string) => sha1(a, "utf8", "hex"), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,7 @@ | |
* Refer to kite.ts for more info. | ||
*/ | ||
|
||
import { | ||
JSON_SCHEMA, | ||
parseAll, | ||
} from "https://deno.land/[email protected]/yaml/mod.ts"; | ||
import { JSON_SCHEMA, parseAll } from "jsr:@std/[email protected]"; | ||
import * as kite from "./kite.ts"; | ||
import { meta } from "./kubernetes/gen/types.ts"; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
* @license MIT | ||
*/ | ||
|
||
import { delay as wait } from "https://deno.land/[email protected]/async/delay.ts"; | ||
import { delay as wait } from "jsr:@std/async@0.224.0"; | ||
|
||
/** | ||
* Retry an async function until it does not throw an exception. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,13 +9,12 @@ | |
* @license MIT | ||
*/ | ||
|
||
import * as YAML from "https://deno.land/[email protected]/yaml/mod.ts"; | ||
import { Type } from "https://deno.land/[email protected]/yaml/type.ts"; | ||
import * as YAML from "jsr:@std/[email protected]"; | ||
import { Schema } from "https://deno.land/[email protected]/yaml/schema.ts"; | ||
import { execDedent } from "./dedent.ts"; | ||
import { stripUndefined } from "./utils.ts"; | ||
|
||
const undefinedType = new Type("tag:yaml.org,2002:js/undefined", { | ||
const undefinedType = new YAML.Type("tag:yaml.org,2002:js/undefined", { | ||
kind: "scalar", | ||
resolve: () => true, | ||
construct: () => undefined, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters