git-remote-ops 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +177 -0
- package/LICENSE +21 -0
- package/README.md +247 -0
- package/esm/_dnt.shims.js +72 -0
- package/esm/cli.js +217 -0
- package/esm/client.js +439 -0
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/_argument_types.js +1 -0
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/_errors.js +133 -0
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/_spread.js +1 -0
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/_type_utils.js +1 -0
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/_utils.js +141 -0
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/command.js +1861 -0
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/help/_help_generator.js +357 -0
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/mod.js +13 -0
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/type.js +27 -0
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/action_list.js +16 -0
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/boolean.js +13 -0
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/child_command.js +14 -0
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/command.js +9 -0
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/enum.js +24 -0
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/file.js +12 -0
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/integer.js +9 -0
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/number.js +9 -0
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/secret.js +7 -0
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/string.js +9 -0
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types.js +2 -0
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/upgrade/_check_version.js +26 -0
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/_errors.js +129 -0
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/_utils.js +100 -0
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/_validate_flags.js +166 -0
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/flags.js +750 -0
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/mod.js +55 -0
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/types/boolean.js +11 -0
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/types/integer.js +9 -0
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/types/number.js +11 -0
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/types/string.js +4 -0
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/types.js +1 -0
- package/esm/deps/jsr.io/@cliffy/internal/1.1.0/runtime/exit.js +16 -0
- package/esm/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_args.js +11 -0
- package/esm/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_columns.js +25 -0
- package/esm/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_env.js +18 -0
- package/esm/deps/jsr.io/@cliffy/internal/1.1.0/runtime/inspect.js +11 -0
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/_layout.js +616 -0
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/_utils.js +79 -0
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/border.js +18 -0
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/cell.js +190 -0
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/column.js +117 -0
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/consume_words.js +64 -0
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/mod.js +42 -0
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/row.js +82 -0
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/table.js +341 -0
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/unicode_width.js +101 -0
- package/esm/deps/jsr.io/@std/crypto/1.1.0/_types.js +2 -0
- package/esm/deps/jsr.io/@std/crypto/1.1.0/_wasm/lib/deno_std_wasm_crypto.internal.js +237 -0
- package/esm/deps/jsr.io/@std/crypto/1.1.0/_wasm/lib/deno_std_wasm_crypto.js +2277 -0
- package/esm/deps/jsr.io/@std/crypto/1.1.0/_wasm/mod.js +46 -0
- package/esm/deps/jsr.io/@std/crypto/1.1.0/aes_gcm.js +132 -0
- package/esm/deps/jsr.io/@std/crypto/1.1.0/crypto.js +270 -0
- package/esm/deps/jsr.io/@std/crypto/1.1.0/mod.js +23 -0
- package/esm/deps/jsr.io/@std/crypto/1.1.0/timing_safe_equal.js +61 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common16.js +51 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common_detach.js +13 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_types.js +2 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/hex.js +87 -0
- package/esm/deps/jsr.io/@std/fmt/1.0.10/colors.js +903 -0
- package/esm/deps/jsr.io/@std/text/1.0.18/closest_string.js +46 -0
- package/esm/deps/jsr.io/@std/text/1.0.18/levenshtein_distance.js +127 -0
- package/esm/errors.js +38 -0
- package/esm/index.js +10 -0
- package/esm/logger.js +216 -0
- package/esm/objects/commit.js +47 -0
- package/esm/objects/index.js +2 -0
- package/esm/objects/tree.js +149 -0
- package/esm/pack/delta.js +179 -0
- package/esm/pack/index.js +3 -0
- package/esm/pack/objects.js +72 -0
- package/esm/pack/parser.js +304 -0
- package/esm/package.json +3 -0
- package/esm/protocol/index.js +3 -0
- package/esm/protocol/pkt_line.js +103 -0
- package/esm/protocol/refs.js +100 -0
- package/esm/protocol/upload_pack.js +259 -0
- package/esm/transport.js +128 -0
- package/esm/types.js +8 -0
- package/package.json +50 -0
- package/types/_dnt.shims.d.ts +16 -0
- package/types/_dnt.shims.d.ts.map +1 -0
- package/types/cli.d.ts +3 -0
- package/types/cli.d.ts.map +1 -0
- package/types/client.d.ts +108 -0
- package/types/client.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_argument_types.d.ts +163 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_argument_types.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_errors.d.ts +71 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_errors.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_spread.d.ts +16 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_spread.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_type_utils.d.ts +15 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_type_utils.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_utils.d.ts +38 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_utils.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/command.d.ts +1086 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/command.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/help/_help_generator.d.ts +33 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/help/_help_generator.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/mod.d.ts +78 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/mod.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/type.d.ts +51 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/type.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/action_list.d.ts +10 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/action_list.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/boolean.d.ts +10 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/boolean.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/child_command.d.ts +10 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/child_command.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/command.d.ts +8 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/command.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/enum.d.ts +11 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/enum.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/file.d.ts +6 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/file.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/integer.d.ts +8 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/integer.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/number.d.ts +8 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/number.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/secret.d.ts +6 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/secret.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/string.d.ts +8 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/string.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types.d.ts +161 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/upgrade/_check_version.d.ts +4 -0
- package/types/deps/jsr.io/@cliffy/command/1.1.0/upgrade/_check_version.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/_errors.d.ts +67 -0
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/_errors.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/_utils.d.ts +17 -0
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/_utils.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/_validate_flags.d.ts +11 -0
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/_validate_flags.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/flags.d.ts +154 -0
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/flags.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/mod.d.ts +57 -0
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/mod.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/boolean.d.ts +4 -0
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/boolean.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/integer.d.ts +4 -0
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/integer.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/number.d.ts +4 -0
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/number.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/string.d.ts +4 -0
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/string.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types.d.ts +170 -0
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/exit.d.ts +8 -0
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/exit.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_args.d.ts +7 -0
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_args.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_columns.d.ts +7 -0
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_columns.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_env.d.ts +8 -0
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_env.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/inspect.d.ts +7 -0
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/inspect.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/table/1.1.0/_layout.d.ts +108 -0
- package/types/deps/jsr.io/@cliffy/table/1.1.0/_layout.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/table/1.1.0/_utils.d.ts +26 -0
- package/types/deps/jsr.io/@cliffy/table/1.1.0/_utils.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/table/1.1.0/border.d.ts +21 -0
- package/types/deps/jsr.io/@cliffy/table/1.1.0/border.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/table/1.1.0/cell.d.ts +155 -0
- package/types/deps/jsr.io/@cliffy/table/1.1.0/cell.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/table/1.1.0/column.d.ts +97 -0
- package/types/deps/jsr.io/@cliffy/table/1.1.0/column.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/table/1.1.0/consume_words.d.ts +30 -0
- package/types/deps/jsr.io/@cliffy/table/1.1.0/consume_words.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/table/1.1.0/mod.d.ts +43 -0
- package/types/deps/jsr.io/@cliffy/table/1.1.0/mod.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/table/1.1.0/row.d.ts +67 -0
- package/types/deps/jsr.io/@cliffy/table/1.1.0/row.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/table/1.1.0/table.d.ts +235 -0
- package/types/deps/jsr.io/@cliffy/table/1.1.0/table.d.ts.map +1 -0
- package/types/deps/jsr.io/@cliffy/table/1.1.0/unicode_width.d.ts +40 -0
- package/types/deps/jsr.io/@cliffy/table/1.1.0/unicode_width.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/crypto/1.1.0/_types.d.ts +9 -0
- package/types/deps/jsr.io/@std/crypto/1.1.0/_types.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/crypto/1.1.0/_wasm/lib/deno_std_wasm_crypto.d.ts +2 -0
- package/types/deps/jsr.io/@std/crypto/1.1.0/_wasm/lib/deno_std_wasm_crypto.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/crypto/1.1.0/_wasm/lib/deno_std_wasm_crypto.internal.d.ts +69 -0
- package/types/deps/jsr.io/@std/crypto/1.1.0/_wasm/lib/deno_std_wasm_crypto.internal.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/crypto/1.1.0/_wasm/mod.d.ts +13 -0
- package/types/deps/jsr.io/@std/crypto/1.1.0/_wasm/mod.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/crypto/1.1.0/aes_gcm.d.ts +76 -0
- package/types/deps/jsr.io/@std/crypto/1.1.0/aes_gcm.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/crypto/1.1.0/crypto.d.ts +149 -0
- package/types/deps/jsr.io/@std/crypto/1.1.0/crypto.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/crypto/1.1.0/mod.d.ts +22 -0
- package/types/deps/jsr.io/@std/crypto/1.1.0/mod.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/crypto/1.1.0/timing_safe_equal.d.ts +40 -0
- package/types/deps/jsr.io/@std/crypto/1.1.0/timing_safe_equal.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/encoding/1.0.10/_common16.d.ts +23 -0
- package/types/deps/jsr.io/@std/encoding/1.0.10/_common16.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts +4 -0
- package/types/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts +9 -0
- package/types/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/encoding/1.0.10/hex.d.ts +39 -0
- package/types/deps/jsr.io/@std/encoding/1.0.10/hex.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fmt/1.0.10/colors.d.ts +700 -0
- package/types/deps/jsr.io/@std/fmt/1.0.10/colors.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/text/1.0.18/closest_string.d.ts +42 -0
- package/types/deps/jsr.io/@std/text/1.0.18/closest_string.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/text/1.0.18/levenshtein_distance.d.ts +23 -0
- package/types/deps/jsr.io/@std/text/1.0.18/levenshtein_distance.d.ts.map +1 -0
- package/types/errors.d.ts +73 -0
- package/types/errors.d.ts.map +1 -0
- package/types/index.d.ts +14 -0
- package/types/index.d.ts.map +1 -0
- package/types/logger.d.ts +70 -0
- package/types/logger.d.ts.map +1 -0
- package/types/objects/commit.d.ts +23 -0
- package/types/objects/commit.d.ts.map +1 -0
- package/types/objects/index.d.ts +3 -0
- package/types/objects/index.d.ts.map +1 -0
- package/types/objects/tree.d.ts +49 -0
- package/types/objects/tree.d.ts.map +1 -0
- package/types/pack/delta.d.ts +47 -0
- package/types/pack/delta.d.ts.map +1 -0
- package/types/pack/index.d.ts +4 -0
- package/types/pack/index.d.ts.map +1 -0
- package/types/pack/objects.d.ts +53 -0
- package/types/pack/objects.d.ts.map +1 -0
- package/types/pack/parser.d.ts +61 -0
- package/types/pack/parser.d.ts.map +1 -0
- package/types/protocol/index.d.ts +4 -0
- package/types/protocol/index.d.ts.map +1 -0
- package/types/protocol/pkt_line.d.ts +44 -0
- package/types/protocol/pkt_line.d.ts.map +1 -0
- package/types/protocol/refs.d.ts +40 -0
- package/types/protocol/refs.d.ts.map +1 -0
- package/types/protocol/upload_pack.d.ts +45 -0
- package/types/protocol/upload_pack.d.ts.map +1 -0
- package/types/transport.d.ts +24 -0
- package/types/transport.d.ts.map +1 -0
- package/types/types.d.ts +121 -0
- package/types/types.d.ts.map +1 -0
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { type Border } from "./border.js";
|
|
2
|
+
import { type Direction } from "./cell.js";
|
|
3
|
+
import { Column, type ColumnOptions } from "./column.js";
|
|
4
|
+
import { type DataRow, Row, type RowType } from "./row.js";
|
|
5
|
+
/** Border characters settings. */
|
|
6
|
+
export type BorderOptions = Partial<Border>;
|
|
7
|
+
/** Table settings. */
|
|
8
|
+
export interface TableSettings {
|
|
9
|
+
/** Table indentation. */
|
|
10
|
+
indent: number;
|
|
11
|
+
/** Enable/disable border on all cells. */
|
|
12
|
+
border: boolean;
|
|
13
|
+
/** Set min column width. */
|
|
14
|
+
minColWidth: number | Array<number>;
|
|
15
|
+
/** Set max column width. */
|
|
16
|
+
maxColWidth: number | Array<number>;
|
|
17
|
+
/** Set max table width. */
|
|
18
|
+
maxWidth: number;
|
|
19
|
+
/**
|
|
20
|
+
* Set column flex-shrink weight. Follows CSS flex-shrink semantics: reduction
|
|
21
|
+
* is proportional to `weight × width`. 0 = no shrink (default), >= 1 = shrinkable.
|
|
22
|
+
*/
|
|
23
|
+
flexShrink: number | Array<number>;
|
|
24
|
+
/**
|
|
25
|
+
* Set column flex-grow weight. Follows CSS flex-grow semantics: available
|
|
26
|
+
* slack is distributed proportionally by weight. 0 = no grow (default), >= 1 = growable.
|
|
27
|
+
*/
|
|
28
|
+
flexGrow: number | Array<number>;
|
|
29
|
+
/** Set cell padding. */
|
|
30
|
+
padding: number | Array<number>;
|
|
31
|
+
/** Set table characters. */
|
|
32
|
+
chars: Border;
|
|
33
|
+
/** Set cell content alignment. */
|
|
34
|
+
align?: Direction;
|
|
35
|
+
/** Set column options. */
|
|
36
|
+
columns: Array<Column>;
|
|
37
|
+
}
|
|
38
|
+
/** Table type. */
|
|
39
|
+
export type TableType<TRow extends RowType = RowType> = Array<TRow> | Table<TRow>;
|
|
40
|
+
/**
|
|
41
|
+
* Table representation.
|
|
42
|
+
*
|
|
43
|
+
* ```ts
|
|
44
|
+
* import { Row, Table } from "./mod.ts";
|
|
45
|
+
*
|
|
46
|
+
* new Table()
|
|
47
|
+
* .header(new Row("Name", "Date", "City", "Country").border())
|
|
48
|
+
* .body([
|
|
49
|
+
* ["Baxter Herman", "Oct 1, 2020", "Harderwijk", "Slovenia"],
|
|
50
|
+
* ["Jescie Wolfe", "Dec 4, 2020", "Alto Hospicio", "Japan"],
|
|
51
|
+
* ["Allegra Cleveland", "Apr 16, 2020", "Avernas-le-Bauduin", "Samoa"],
|
|
52
|
+
* ["Aretha Gamble", "Feb 22, 2021", "Honolulu", "Georgia"],
|
|
53
|
+
* ])
|
|
54
|
+
* .render();
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export declare class Table<TRow extends RowType = RowType> extends Array<TRow> {
|
|
58
|
+
protected static _chars: Border;
|
|
59
|
+
protected options: TableSettings;
|
|
60
|
+
private headerRow?;
|
|
61
|
+
/**
|
|
62
|
+
* Create a new table. If rows is a table, all rows and options of the table
|
|
63
|
+
* will be copied to the new table.
|
|
64
|
+
*
|
|
65
|
+
* @param rows An array of rows or a table instance.
|
|
66
|
+
*/
|
|
67
|
+
static from<TRow extends RowType>(rows: TableType<TRow>): Table<TRow>;
|
|
68
|
+
/**
|
|
69
|
+
* Create a new table from an array of json objects. An object represents a
|
|
70
|
+
* row and each property a column.
|
|
71
|
+
*
|
|
72
|
+
* @param rows Array of objects.
|
|
73
|
+
*/
|
|
74
|
+
static fromJson(rows: Array<DataRow>): Table;
|
|
75
|
+
/**
|
|
76
|
+
* Set global default border characters.
|
|
77
|
+
*
|
|
78
|
+
* @param chars Border options.
|
|
79
|
+
*/
|
|
80
|
+
static chars(chars: BorderOptions): typeof Table;
|
|
81
|
+
/**
|
|
82
|
+
* Write table or rows to stdout.
|
|
83
|
+
*
|
|
84
|
+
* @param rows Table or rows.
|
|
85
|
+
*/
|
|
86
|
+
static render<TRow extends RowType>(rows: TableType<TRow>): void;
|
|
87
|
+
/**
|
|
88
|
+
* Read data from an array of json objects. An object represents a
|
|
89
|
+
* row and each property a column.
|
|
90
|
+
*
|
|
91
|
+
* @param rows Array of objects.
|
|
92
|
+
*/
|
|
93
|
+
fromJson(rows: Array<DataRow>): this;
|
|
94
|
+
/**
|
|
95
|
+
* Set column options.
|
|
96
|
+
*
|
|
97
|
+
* @param columns An array of columns or column options.
|
|
98
|
+
*/
|
|
99
|
+
columns(columns: Array<Column | ColumnOptions>): this;
|
|
100
|
+
/**
|
|
101
|
+
* Set column options by index.
|
|
102
|
+
*
|
|
103
|
+
@param index The column index.
|
|
104
|
+
@param column Column or column options.
|
|
105
|
+
*/
|
|
106
|
+
column(index: number, column: Column | ColumnOptions): this;
|
|
107
|
+
/**
|
|
108
|
+
* Set table header.
|
|
109
|
+
*
|
|
110
|
+
* @param header Header row or cells.
|
|
111
|
+
*/
|
|
112
|
+
header(header: RowType): this;
|
|
113
|
+
/**
|
|
114
|
+
* Set table body.
|
|
115
|
+
*
|
|
116
|
+
* @param rows Array of rows.
|
|
117
|
+
*/
|
|
118
|
+
body(rows: Array<TRow>): this;
|
|
119
|
+
/** Clone table recursively with header and options. */
|
|
120
|
+
clone(): Table;
|
|
121
|
+
/** Generate table string. */
|
|
122
|
+
toString(): string;
|
|
123
|
+
/** Write table to stdout. */
|
|
124
|
+
render(): this;
|
|
125
|
+
/**
|
|
126
|
+
* Set max column width.
|
|
127
|
+
*
|
|
128
|
+
* @param width Max column width.
|
|
129
|
+
* @param override Override existing value.
|
|
130
|
+
*/
|
|
131
|
+
maxColWidth(width: number | Array<number>, override?: boolean): this;
|
|
132
|
+
/**
|
|
133
|
+
* Set min column width.
|
|
134
|
+
*
|
|
135
|
+
* @param width Min column width.
|
|
136
|
+
* @param override Override existing value.
|
|
137
|
+
*/
|
|
138
|
+
minColWidth(width: number | Array<number>, override?: boolean): this;
|
|
139
|
+
/**
|
|
140
|
+
* Set max table width
|
|
141
|
+
*
|
|
142
|
+
* @param width Max table width.
|
|
143
|
+
* @param override Override existing value.
|
|
144
|
+
*/
|
|
145
|
+
maxWidth(width: number, override?: boolean): this;
|
|
146
|
+
/**
|
|
147
|
+
* Set column flex-shrink weight. Follows CSS flex-shrink semantics: each
|
|
148
|
+
* column's share of the reduction is proportional to `weight × width`, so
|
|
149
|
+
* a wider column or one with a higher weight absorbs more of the overflow.
|
|
150
|
+
* 0 = no shrink (default), >= 1 = shrinkable.
|
|
151
|
+
*
|
|
152
|
+
* @param flexShrink Per-column shrink weight, or a single value for all columns.
|
|
153
|
+
* @param override Override existing value.
|
|
154
|
+
*/
|
|
155
|
+
flexShrink(flexShrink?: number | Array<number>, override?: boolean): this;
|
|
156
|
+
/**
|
|
157
|
+
* Set column flex-grow weight. Follows CSS flex-grow semantics: available
|
|
158
|
+
* slack is distributed proportionally by weight, so weight 2 receives twice
|
|
159
|
+
* the extra space of weight 1. 0 = no grow (default), >= 1 = growable.
|
|
160
|
+
*
|
|
161
|
+
* @param flexGrow Per-column grow weight, or a single value for all columns.
|
|
162
|
+
* @param override Override existing value.
|
|
163
|
+
*/
|
|
164
|
+
flexGrow(flexGrow?: number | Array<number>, override?: boolean): this;
|
|
165
|
+
/**
|
|
166
|
+
* Shorthand to set both flex-grow and flex-shrink to the same value.
|
|
167
|
+
* Columns will both expand into and contract out of
|
|
168
|
+
* available space proportionally. 0 = rigid (default), >= 1 = flexible.
|
|
169
|
+
*
|
|
170
|
+
* @param flex Per-column weight, or a single value for all columns.
|
|
171
|
+
* @param override Override existing value.
|
|
172
|
+
*/
|
|
173
|
+
flex(flex?: number | Array<number>, override?: boolean): this;
|
|
174
|
+
/**
|
|
175
|
+
* Set table indentation.
|
|
176
|
+
*
|
|
177
|
+
* @param width Indent width.
|
|
178
|
+
* @param override Override existing value.
|
|
179
|
+
*/
|
|
180
|
+
indent(width: number, override?: boolean): this;
|
|
181
|
+
/**
|
|
182
|
+
* Set cell padding.
|
|
183
|
+
*
|
|
184
|
+
* @param padding Cell padding.
|
|
185
|
+
* @param override Override existing value.
|
|
186
|
+
*/
|
|
187
|
+
padding(padding: number | Array<number>, override?: boolean): this;
|
|
188
|
+
/**
|
|
189
|
+
* Enable/disable cell border.
|
|
190
|
+
*
|
|
191
|
+
* @param enable Enable/disable cell border.
|
|
192
|
+
* @param override Override existing value.
|
|
193
|
+
*/
|
|
194
|
+
border(enable?: boolean, override?: boolean): this;
|
|
195
|
+
/**
|
|
196
|
+
* Align table content.
|
|
197
|
+
*
|
|
198
|
+
* @param direction Align direction.
|
|
199
|
+
* @param override Override existing value.
|
|
200
|
+
*/
|
|
201
|
+
align(direction: Direction, override?: boolean): this;
|
|
202
|
+
/**
|
|
203
|
+
* Set border characters.
|
|
204
|
+
*
|
|
205
|
+
* @param chars Border options.
|
|
206
|
+
*/
|
|
207
|
+
chars(chars: BorderOptions): this;
|
|
208
|
+
/** Get table header. */
|
|
209
|
+
getHeader(): Row | undefined;
|
|
210
|
+
/** Get table body. */
|
|
211
|
+
getBody(): Array<TRow>;
|
|
212
|
+
/** Get max column width. */
|
|
213
|
+
getMaxColWidth(): number | Array<number>;
|
|
214
|
+
/** Get min column width. */
|
|
215
|
+
getMinColWidth(): number | Array<number>;
|
|
216
|
+
/** Get table indentation. */
|
|
217
|
+
getIndent(): number;
|
|
218
|
+
/** Get cell padding. */
|
|
219
|
+
getPadding(): number | Array<number>;
|
|
220
|
+
/** Check if table has border. */
|
|
221
|
+
getBorder(): boolean;
|
|
222
|
+
/** Check if header row has border. */
|
|
223
|
+
hasHeaderBorder(): boolean;
|
|
224
|
+
/** Check if table bordy has border. */
|
|
225
|
+
hasBodyBorder(): boolean;
|
|
226
|
+
/** Check if table header or body has border. */
|
|
227
|
+
hasBorder(): boolean;
|
|
228
|
+
/** Get table alignment. */
|
|
229
|
+
getAlign(): Direction;
|
|
230
|
+
/** Get columns. */
|
|
231
|
+
getColumns(): Array<Column>;
|
|
232
|
+
/** Get column by column index. */
|
|
233
|
+
getColumn(index: number): Column;
|
|
234
|
+
}
|
|
235
|
+
//# sourceMappingURL=table.d.ts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CAAC;IAI7B,4BAA4B;IACrB,cAAc,IAAI,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAI/C,4BAA4B;IACrB,cAAc,IAAI,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAI/C,6BAA6B;IACtB,SAAS,IAAI,MAAM;IAI1B,wBAAwB;IACjB,UAAU,IAAI,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAI3C,iCAAiC;IAC1B,SAAS,IAAI,OAAO;IAI3B,sCAAsC;IAC/B,eAAe,IAAI,OAAO;IAKjC,uCAAuC;IAChC,aAAa,IAAI,OAAO;IAU/B,gDAAgD;IACzC,SAAS,IAAI,OAAO;IAI3B,2BAA2B;IACpB,QAAQ,IAAI,SAAS;IAI5B,mBAAmB;IACZ,UAAU,IAAI,KAAK,CAAC,MAAM,CAAC;IAIlC,kCAAkC;IAC3B,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;CAGxC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculate the physical width of a string in a TTY-like environment. This is
|
|
3
|
+
* useful for cases such as calculating where a line-wrap will occur and
|
|
4
|
+
* underlining strings.
|
|
5
|
+
*
|
|
6
|
+
* The physical width is given by the number of columns required to display
|
|
7
|
+
* the string. The number of columns a given unicode character occupies can
|
|
8
|
+
* vary depending on the character itself.
|
|
9
|
+
*
|
|
10
|
+
* @param str The string to measure.
|
|
11
|
+
* @returns The unicode width of the string.
|
|
12
|
+
*
|
|
13
|
+
* @example Calculating the unicode width of a string
|
|
14
|
+
* ```ts
|
|
15
|
+
* import { unicodeWidth } from "@std/cli/unicode-width";
|
|
16
|
+
* import { assertEquals } from "@std/assert";
|
|
17
|
+
*
|
|
18
|
+
* assertEquals(unicodeWidth("hello world"), 11);
|
|
19
|
+
* assertEquals(unicodeWidth("天地玄黃宇宙洪荒"), 16);
|
|
20
|
+
* assertEquals(unicodeWidth("fullwidth"), 18);
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @example Calculating the unicode width of a color-encoded string
|
|
24
|
+
* ```ts
|
|
25
|
+
* import { unicodeWidth } from "@std/cli/unicode-width";
|
|
26
|
+
* import { stripAnsiCode } from "@std/fmt/colors";
|
|
27
|
+
* import { assertEquals } from "@std/assert";
|
|
28
|
+
*
|
|
29
|
+
* assertEquals(unicodeWidth(stripAnsiCode("\x1b[36mголубой\x1b[39m")), 7);
|
|
30
|
+
* assertEquals(unicodeWidth(stripAnsiCode("\x1b[31m紅色\x1b[39m")), 4);
|
|
31
|
+
* assertEquals(unicodeWidth(stripAnsiCode("\x1B]8;;https://deno.land\x07🦕\x1B]8;;\x07")), 2);
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* Use
|
|
35
|
+
* {@linkcode https://jsr.io/@std/fmt/doc/colors/~/stripAnsiCode | stripAnsiCode}
|
|
36
|
+
* to remove ANSI escape codes from a string before passing it to
|
|
37
|
+
* {@linkcode unicodeWidth}.
|
|
38
|
+
*/
|
|
39
|
+
export declare function unicodeWidth(str: string): number;
|
|
40
|
+
//# sourceMappingURL=unicode_width.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unicode_width.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@cliffy/table/1.1.0/unicode_width.ts"],"names":[],"mappings":"AA8DA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Proxy type of {@code Uint8Array<ArrayBuffer>} or {@code Uint8Array} in TypeScript 5.7 or below respectively.
|
|
3
|
+
*
|
|
4
|
+
* This type is internal utility type and should not be used directly.
|
|
5
|
+
*
|
|
6
|
+
* @internal @private
|
|
7
|
+
*/
|
|
8
|
+
export type Uint8Array_ = ReturnType<Uint8Array["slice"]>;
|
|
9
|
+
//# sourceMappingURL=_types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_types.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/crypto/1.1.0/_types.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deno_std_wasm_crypto.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/crypto/1.1.0/_wasm/lib/deno_std_wasm_crypto.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export function __wbg_set_wasm(val: any): void;
|
|
2
|
+
/**
|
|
3
|
+
* Returns the digest of the given `data` using the given hash `algorithm`.
|
|
4
|
+
*
|
|
5
|
+
* `length` will usually be left `undefined` to use the default length for
|
|
6
|
+
* the algorithm. For algorithms with variable-length output, it can be used
|
|
7
|
+
* to specify a non-negative integer number of bytes.
|
|
8
|
+
*
|
|
9
|
+
* An error will be thrown if `algorithm` is not a supported hash algorithm or
|
|
10
|
+
* `length` is not a supported length for the algorithm.
|
|
11
|
+
* @param {string} algorithm
|
|
12
|
+
* @param {Uint8Array} data
|
|
13
|
+
* @param {number | null} [length]
|
|
14
|
+
* @returns {Uint8Array}
|
|
15
|
+
*/
|
|
16
|
+
export function digest(algorithm: string, data: Uint8Array, length?: number | null): Uint8Array;
|
|
17
|
+
export function __wbg_buffer_09165b52af8c5237(arg0: any): any;
|
|
18
|
+
export function __wbg_buffer_609cc3eee51ed158(arg0: any): any;
|
|
19
|
+
export function __wbg_byteLength_e674b853d9c77e1d(arg0: any): any;
|
|
20
|
+
export function __wbg_byteOffset_fd862df290ef848d(arg0: any): any;
|
|
21
|
+
export function __wbg_length_a446193dc22c12f8(arg0: any): any;
|
|
22
|
+
export function __wbg_new_a12002a7f91c75be(arg0: any): Uint8Array<any>;
|
|
23
|
+
export function __wbg_new_b08a00743b8ae2f3(arg0: any, arg1: any): TypeError;
|
|
24
|
+
export function __wbg_newwithbyteoffsetandlength_d97e637ebe145a9a(arg0: any, arg1: any, arg2: any): Uint8Array<any>;
|
|
25
|
+
export function __wbg_set_65595bdd868b3009(arg0: any, arg1: any, arg2: any): void;
|
|
26
|
+
export function __wbindgen_init_externref_table(): void;
|
|
27
|
+
export function __wbindgen_memory(): any;
|
|
28
|
+
export function __wbindgen_throw(arg0: any, arg1: any): void;
|
|
29
|
+
/**
|
|
30
|
+
* A context for incrementally computing a digest using a given hash algorithm.
|
|
31
|
+
*/
|
|
32
|
+
export class DigestContext {
|
|
33
|
+
/**
|
|
34
|
+
* Creates a new context incrementally computing a digest using the given
|
|
35
|
+
* hash algorithm.
|
|
36
|
+
*
|
|
37
|
+
* An error will be thrown if `algorithm` is not a supported hash algorithm.
|
|
38
|
+
* @param {string} algorithm
|
|
39
|
+
*/
|
|
40
|
+
constructor(algorithm: string);
|
|
41
|
+
__destroy_into_raw(): number;
|
|
42
|
+
__wbg_ptr: number;
|
|
43
|
+
free(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Update the digest's internal state with the additional input `data`.
|
|
46
|
+
*
|
|
47
|
+
* If the `data` array view is large, it will be split into subarrays (via
|
|
48
|
+
* JavaScript bindings) which will be processed sequentially in order to
|
|
49
|
+
* limit the amount of memory that needs to be allocated in the Wasm heap.
|
|
50
|
+
* @param {Uint8Array} data
|
|
51
|
+
*/
|
|
52
|
+
update(data: Uint8Array): void;
|
|
53
|
+
/**
|
|
54
|
+
* Returns the digest of the input data so far, and then drops the context
|
|
55
|
+
* from memory on the Wasm side. This context must no longer be used, and any
|
|
56
|
+
* further method calls will result in null pointer errors being thrown.
|
|
57
|
+
* https://github.com/rustwasm/wasm-bindgen/blob/bf39cfd8/crates/backend/src/codegen.rs#L186
|
|
58
|
+
*
|
|
59
|
+
* `length` will usually be left `undefined` to use the default length for
|
|
60
|
+
* the algorithm. For algorithms with variable-length output, it can be used
|
|
61
|
+
* to specify a non-negative integer number of bytes.
|
|
62
|
+
*
|
|
63
|
+
* An error will be thrown if `length` is not a supported length for the algorithm.
|
|
64
|
+
* @param {number | null} [length]
|
|
65
|
+
* @returns {Uint8Array}
|
|
66
|
+
*/
|
|
67
|
+
digestAndDrop(length?: number | null): Uint8Array;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=deno_std_wasm_crypto.internal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deno_std_wasm_crypto.internal.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/crypto/1.1.0/_wasm/lib/deno_std_wasm_crypto.internal.js"],"names":[],"mappings":"AAMA,+CAEC;AAwGD;;;;;;;;;;;;;GAaG;AACH,kCALW,MAAM,QACN,UAAU,WACV,MAAM,GAAG,IAAI,GACX,UAAU,CAqBtB;AAuFD,8DAGC;AAED,8DAGC;AAED,kEAGC;AAED,kEAGC;AAED,8DAGC;AAED,uEAGC;AAED,4EAGC;AAED,oHAOC;AAED,kFAEC;AAED,wDAQC;AAED,yCAGC;AAED,6DAEC;AAjJD;;GAEG;AACH;IAYE;;;;;;OAMG;IACH,uBAFW,MAAM,EAgBhB;IAhCD,6BAKC;IAHC,kBAAkB;IAKpB,aAGC;IAuBD;;;;;;;OAOG;IACH,aAFW,UAAU,QAOpB;IACD;;;;;;;;;;;;;OAaG;IACH,uBAHW,MAAM,GAAG,IAAI,GACX,UAAU,CActB;CACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { digest, DigestContext } from "./lib/deno_std_wasm_crypto.js";
|
|
2
|
+
/**
|
|
3
|
+
* All cryptographic hash/digest algorithms supported by std/crypto.
|
|
4
|
+
*
|
|
5
|
+
* For algorithms that are supported by WebCrypto, the name here will match the
|
|
6
|
+
* one used by WebCrypto. Otherwise we prefer the formatting used in the
|
|
7
|
+
* algorithm's official specification. All names are uppercase to facilitate
|
|
8
|
+
* case-insensitive comparisons required by the WebCrypto spec.
|
|
9
|
+
*/
|
|
10
|
+
export declare const DIGEST_ALGORITHM_NAMES: readonly ["BLAKE2B", "BLAKE2B-128", "BLAKE2B-160", "BLAKE2B-224", "BLAKE2B-256", "BLAKE2B-384", "BLAKE2S", "BLAKE3", "KECCAK-224", "KECCAK-256", "KECCAK-384", "KECCAK-512", "SHA-384", "SHA3-224", "SHA3-256", "SHA3-384", "SHA3-512", "SHAKE128", "SHAKE256", "TIGER", "RIPEMD-160", "SHA-224", "SHA-256", "SHA-512", "MD4", "MD5", "SHA-1", "FNV32", "FNV32A", "FNV64", "FNV64A"];
|
|
11
|
+
/** An algorithm name supported by std/crypto. */
|
|
12
|
+
export type DigestAlgorithmName = typeof DIGEST_ALGORITHM_NAMES[number];
|
|
13
|
+
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/crypto/1.1.0/_wasm/mod.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEtE;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,sXAmCzB,CAAC;AAEX,iDAAiD;AACjD,MAAM,MAAM,mBAAmB,GAAG,OAAO,sBAAsB,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import * as dntShim from "../../../../../_dnt.shims.js";
|
|
2
|
+
import type { Uint8Array_ } from "./_types.js";
|
|
3
|
+
export type { Uint8Array_ };
|
|
4
|
+
/** Options for {@linkcode encryptAesGcm} and {@linkcode decryptAesGcm}. */
|
|
5
|
+
export interface AesGcmOptions {
|
|
6
|
+
/** Additional authenticated data. Authenticated but not encrypted. */
|
|
7
|
+
additionalData?: dntShim.BufferSource;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Encrypts plaintext using AES-GCM with a random 96-bit nonce.
|
|
11
|
+
*
|
|
12
|
+
* Returns `nonce (12 bytes) || ciphertext || tag (16 bytes)`.
|
|
13
|
+
*
|
|
14
|
+
* @example Usage
|
|
15
|
+
* ```ts
|
|
16
|
+
* import { encryptAesGcm } from "@std/crypto/aes-gcm";
|
|
17
|
+
* import { assertNotEquals } from "@std/assert";
|
|
18
|
+
*
|
|
19
|
+
* const key = await crypto.subtle.generateKey(
|
|
20
|
+
* { name: "AES-GCM", length: 256 },
|
|
21
|
+
* false,
|
|
22
|
+
* ["encrypt", "decrypt"],
|
|
23
|
+
* );
|
|
24
|
+
*
|
|
25
|
+
* const encrypted = await encryptAesGcm(
|
|
26
|
+
* key,
|
|
27
|
+
* new TextEncoder().encode("hello world"),
|
|
28
|
+
* );
|
|
29
|
+
*
|
|
30
|
+
* assertNotEquals(encrypted.length, 0);
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @param key The AES-GCM `CryptoKey` to encrypt with.
|
|
34
|
+
* @param plaintext The data to encrypt.
|
|
35
|
+
* @param options Optional additional authenticated data.
|
|
36
|
+
* @returns The concatenated nonce, ciphertext, and authentication tag.
|
|
37
|
+
*
|
|
38
|
+
* @remarks With random nonces, do not encrypt more than ~2^32 messages
|
|
39
|
+
* under the same key. Beyond this limit, nonce collision probability
|
|
40
|
+
* becomes non-negligible.
|
|
41
|
+
*
|
|
42
|
+
* @see {@link https://csrc.nist.gov/pubs/sp/800/38/d/final | NIST SP 800-38D} Section 8.3
|
|
43
|
+
*/
|
|
44
|
+
export declare function encryptAesGcm(key: dntShim.CryptoKey, plaintext: dntShim.BufferSource, options?: AesGcmOptions): Promise<Uint8Array_>;
|
|
45
|
+
/**
|
|
46
|
+
* Decrypts data produced by {@linkcode encryptAesGcm}.
|
|
47
|
+
*
|
|
48
|
+
* Expects input in the format `nonce (12 bytes) || ciphertext || tag (16 bytes)`.
|
|
49
|
+
*
|
|
50
|
+
* @example Usage
|
|
51
|
+
* ```ts
|
|
52
|
+
* import { decryptAesGcm, encryptAesGcm } from "@std/crypto/aes-gcm";
|
|
53
|
+
* import { assertEquals } from "@std/assert";
|
|
54
|
+
*
|
|
55
|
+
* const key = await crypto.subtle.generateKey(
|
|
56
|
+
* { name: "AES-GCM", length: 256 },
|
|
57
|
+
* false,
|
|
58
|
+
* ["encrypt", "decrypt"],
|
|
59
|
+
* );
|
|
60
|
+
*
|
|
61
|
+
* const plaintext = new TextEncoder().encode("hello world");
|
|
62
|
+
* const encrypted = await encryptAesGcm(key, plaintext);
|
|
63
|
+
*
|
|
64
|
+
* assertEquals(await decryptAesGcm(key, encrypted), plaintext);
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* @param key The AES-GCM `CryptoKey` to decrypt with.
|
|
68
|
+
* @param data The wire-format output from {@linkcode encryptAesGcm}: nonce (12 B) || ciphertext || tag (16 B).
|
|
69
|
+
* @param options Optional additional authenticated data (must match what was used during encryption).
|
|
70
|
+
* @returns The decrypted plaintext.
|
|
71
|
+
* @throws {RangeError} If `data` is shorter than 28 bytes (12 nonce + 16 tag).
|
|
72
|
+
* @throws {DOMException} If authentication fails (wrong key, tampered data, or
|
|
73
|
+
* mismatched additional data).
|
|
74
|
+
*/
|
|
75
|
+
export declare function decryptAesGcm(key: dntShim.CryptoKey, data: dntShim.BufferSource, options?: AesGcmOptions): Promise<Uint8Array_>;
|
|
76
|
+
//# sourceMappingURL=aes_gcm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aes_gcm.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/crypto/1.1.0/aes_gcm.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAC;AAGxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,YAAY,EAAE,WAAW,EAAE,CAAC;AAiC5B,2EAA2E;AAC3E,MAAM,WAAW,aAAa;IAC5B,sEAAsE;IACtE,cAAc,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC;CACvC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,OAAO,CAAC,SAAS,EACtB,SAAS,EAAE,OAAO,CAAC,YAAY,EAC/B,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,WAAW,CAAC,CAqBtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,OAAO,CAAC,SAAS,EACtB,IAAI,EAAE,OAAO,CAAC,YAAY,EAC1B,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,WAAW,CAAC,CA0BtB"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extensions to the
|
|
3
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API | Web Crypto API}
|
|
4
|
+
* supporting additional encryption APIs, but also delegating to the built-in
|
|
5
|
+
* APIs when possible.
|
|
6
|
+
*
|
|
7
|
+
* Provides additional digest algorithms that are not part of the WebCrypto
|
|
8
|
+
* standard as well as a `subtle.digest` and `subtle.digestSync` methods.
|
|
9
|
+
*
|
|
10
|
+
* The {@linkcode KeyStack} export implements the {@linkcode KeyRing} interface
|
|
11
|
+
* for managing rotatable keys for signing data to prevent tampering, like with
|
|
12
|
+
* HTTP cookies.
|
|
13
|
+
*
|
|
14
|
+
* ## Supported algorithms
|
|
15
|
+
*
|
|
16
|
+
* Here is a list of supported algorithms. If the algorithm name in WebCrypto
|
|
17
|
+
* and Wasm/Rust is the same, this library prefers to use the implementation
|
|
18
|
+
* provided by WebCrypto.
|
|
19
|
+
*
|
|
20
|
+
* Length-adjustable algorithms support the
|
|
21
|
+
* {@linkcode DigestAlgorithmObject.length} option.
|
|
22
|
+
*
|
|
23
|
+
* WebCrypto:
|
|
24
|
+
* - `SHA-384`
|
|
25
|
+
* - `SHA-256` (length-extendable)
|
|
26
|
+
* - `SHA-512` (length-extendable)
|
|
27
|
+
*
|
|
28
|
+
* Wasm/Rust:
|
|
29
|
+
* - `BLAKE2B`
|
|
30
|
+
* - `BLAKE2B-128`
|
|
31
|
+
* - `BLAKE2B-160`
|
|
32
|
+
* - `BLAKE2B-224`
|
|
33
|
+
* - `BLAKE2B-256`
|
|
34
|
+
* - `BLAKE2B-384`
|
|
35
|
+
* - `BLAKE2S`
|
|
36
|
+
* - `BLAKE3` (length-adjustable)
|
|
37
|
+
* - `KECCAK-224`
|
|
38
|
+
* - `KECCAK-256`
|
|
39
|
+
* - `KECCAK-384`
|
|
40
|
+
* - `KECCAK-512`
|
|
41
|
+
* - `SHA-384`
|
|
42
|
+
* - `SHA3-224`
|
|
43
|
+
* - `SHA3-256`
|
|
44
|
+
* - `SHA3-384`
|
|
45
|
+
* - `SHA3-512`
|
|
46
|
+
* - `SHAKE128` (length-adjustable)
|
|
47
|
+
* - `SHAKE256` (length-adjustable)
|
|
48
|
+
* - `TIGER`
|
|
49
|
+
* - `RIPEMD-160` (length-extendable)
|
|
50
|
+
* - `SHA-224` (length-extendable)
|
|
51
|
+
* - `SHA-256` (length-extendable)
|
|
52
|
+
* - `SHA-512` (length-extendable)
|
|
53
|
+
* - `MD4` (length-extendable and collidable)
|
|
54
|
+
* - `MD5` (length-extendable and collidable)
|
|
55
|
+
* - `SHA-1` (length-extendable and collidable)
|
|
56
|
+
* - `FNV32` (non-cryptographic)
|
|
57
|
+
* - `FNV32A` (non-cryptographic)
|
|
58
|
+
* - `FNV64` (non-cryptographic)
|
|
59
|
+
* - `FNV64A` (non-cryptographic)
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* import { crypto } from "@std/crypto";
|
|
64
|
+
*
|
|
65
|
+
* // This will delegate to the runtime's WebCrypto implementation.
|
|
66
|
+
* console.log(
|
|
67
|
+
* new Uint8Array(
|
|
68
|
+
* await crypto.subtle.digest(
|
|
69
|
+
* "SHA-384",
|
|
70
|
+
* new TextEncoder().encode("hello world"),
|
|
71
|
+
* ),
|
|
72
|
+
* ),
|
|
73
|
+
* );
|
|
74
|
+
*
|
|
75
|
+
* // This will use a bundled Wasm/Rust implementation.
|
|
76
|
+
* console.log(
|
|
77
|
+
* new Uint8Array(
|
|
78
|
+
* await crypto.subtle.digest(
|
|
79
|
+
* "BLAKE3",
|
|
80
|
+
* new TextEncoder().encode("hello world"),
|
|
81
|
+
* ),
|
|
82
|
+
* ),
|
|
83
|
+
* );
|
|
84
|
+
* ```
|
|
85
|
+
*
|
|
86
|
+
* @example Convert hash to a string
|
|
87
|
+
*
|
|
88
|
+
* ```ts
|
|
89
|
+
* import {
|
|
90
|
+
* crypto,
|
|
91
|
+
* } from "@std/crypto";
|
|
92
|
+
* import { encodeHex } from "@std/encoding/hex"
|
|
93
|
+
* import { encodeBase64 } from "@std/encoding/base64"
|
|
94
|
+
*
|
|
95
|
+
* const hash = await crypto.subtle.digest(
|
|
96
|
+
* "SHA-384",
|
|
97
|
+
* new TextEncoder().encode("You hear that Mr. Anderson?"),
|
|
98
|
+
* );
|
|
99
|
+
*
|
|
100
|
+
* // Hex encoding
|
|
101
|
+
* console.log(encodeHex(hash));
|
|
102
|
+
*
|
|
103
|
+
* // Or with base64 encoding
|
|
104
|
+
* console.log(encodeBase64(hash));
|
|
105
|
+
* ```
|
|
106
|
+
*
|
|
107
|
+
* @module
|
|
108
|
+
*/
|
|
109
|
+
import * as dntShim from "../../../../../_dnt.shims.js";
|
|
110
|
+
import { DIGEST_ALGORITHM_NAMES, type DigestAlgorithmName } from "./_wasm/mod.js";
|
|
111
|
+
export { DIGEST_ALGORITHM_NAMES, type DigestAlgorithmName };
|
|
112
|
+
/** Extensions to the web standard `SubtleCrypto` interface. */
|
|
113
|
+
export interface StdSubtleCrypto extends dntShim.SubtleCrypto {
|
|
114
|
+
/**
|
|
115
|
+
* Returns a new `Promise` object that will digest `data` using the specified
|
|
116
|
+
* `AlgorithmIdentifier`.
|
|
117
|
+
*/
|
|
118
|
+
digest(algorithm: DigestAlgorithm, data: dntShim.BufferSource | AsyncIterable<dntShim.BufferSource> | Iterable<dntShim.BufferSource>): Promise<ArrayBuffer>;
|
|
119
|
+
/**
|
|
120
|
+
* Returns a ArrayBuffer with the result of digesting `data` using the
|
|
121
|
+
* specified `AlgorithmIdentifier`.
|
|
122
|
+
*/
|
|
123
|
+
digestSync(algorithm: DigestAlgorithm, data: dntShim.BufferSource | Iterable<dntShim.BufferSource>): ArrayBuffer;
|
|
124
|
+
}
|
|
125
|
+
/** Extensions to the Web {@linkcode Crypto} interface. */
|
|
126
|
+
export interface StdCrypto extends dntShim.Crypto {
|
|
127
|
+
/** Extension to the {@linkcode crypto.SubtleCrypto} interface. */
|
|
128
|
+
readonly subtle: StdSubtleCrypto;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* A wrapper for WebCrypto which adds support for additional non-standard
|
|
132
|
+
* algorithms, but delegates to the runtime WebCrypto implementation whenever
|
|
133
|
+
* possible.
|
|
134
|
+
*/
|
|
135
|
+
declare const stdCrypto: StdCrypto;
|
|
136
|
+
/** Extended digest algorithm objects. */
|
|
137
|
+
export type DigestAlgorithmObject = {
|
|
138
|
+
name: DigestAlgorithmName;
|
|
139
|
+
length?: number;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Extended digest algorithms accepted by {@linkcode stdCrypto.subtle.digest}.
|
|
143
|
+
*
|
|
144
|
+
* The `length` option will be ignored for
|
|
145
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest#algorithm | Web Standard algorithms}.
|
|
146
|
+
*/
|
|
147
|
+
export type DigestAlgorithm = DigestAlgorithmName | DigestAlgorithmObject;
|
|
148
|
+
export { stdCrypto as crypto };
|
|
149
|
+
//# sourceMappingURL=crypto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
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B,CAAC;AAuB1E,OAAO,EAAE,SAAS,IAAI,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extensions to the
|
|
3
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API | Web Crypto}
|
|
4
|
+
* supporting additional encryption APIs, but also delegating to the built-in
|
|
5
|
+
* APIs when possible.
|
|
6
|
+
*
|
|
7
|
+
* ```ts no-assert
|
|
8
|
+
* import { crypto } from "@std/crypto/crypto";
|
|
9
|
+
*
|
|
10
|
+
* const message = "Hello, Deno!";
|
|
11
|
+
* const encoder = new TextEncoder();
|
|
12
|
+
* const data = encoder.encode(message);
|
|
13
|
+
*
|
|
14
|
+
* await crypto.subtle.digest("BLAKE3", data);
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @module
|
|
18
|
+
*/
|
|
19
|
+
export * from "./aes_gcm.js";
|
|
20
|
+
export * from "./crypto.js";
|
|
21
|
+
export * from "./timing_safe_equal.js";
|
|
22
|
+
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/crypto/1.1.0/mod.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;GAiBG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC"}
|