mol_crypto_lib 0.0.412 → 0.0.415
Sign up to get free protection for your applications and to get access to all the features.
- package/node.d.ts +164 -0
- package/node.deps.json +1 -1
- package/node.esm.js +712 -20
- package/node.esm.js.map +1 -1
- package/node.js +712 -20
- package/node.js.map +1 -1
- package/node.test.js +1614 -1643
- package/node.test.js.map +1 -1
- package/package.json +18 -1
- package/web.d.ts +4 -0
- package/web.deps.json +1 -1
- package/web.esm.js +27 -20
- package/web.esm.js.map +1 -1
- package/web.js +27 -20
- package/web.js.map +1 -1
- package/web.test.js +3 -7
- package/web.test.js.map +1 -1
package/node.d.ts
CHANGED
@@ -13,6 +13,170 @@ declare namespace $ {
|
|
13
13
|
export {};
|
14
14
|
}
|
15
15
|
|
16
|
+
interface $node {
|
17
|
+
[key: string]: any;
|
18
|
+
}
|
19
|
+
declare var $node: $node;
|
20
|
+
|
21
|
+
declare namespace $ {
|
22
|
+
type $mol_log3_event<Fields> = {
|
23
|
+
[key in string]: unknown;
|
24
|
+
} & {
|
25
|
+
time?: string;
|
26
|
+
place: unknown;
|
27
|
+
message: string;
|
28
|
+
} & Fields;
|
29
|
+
type $mol_log3_logger<Fields, Res = void> = (this: $, event: $mol_log3_event<Fields>) => Res;
|
30
|
+
let $mol_log3_come: $mol_log3_logger<{}>;
|
31
|
+
let $mol_log3_done: $mol_log3_logger<{}>;
|
32
|
+
let $mol_log3_fail: $mol_log3_logger<{}>;
|
33
|
+
let $mol_log3_warn: $mol_log3_logger<{
|
34
|
+
hint: string;
|
35
|
+
}>;
|
36
|
+
let $mol_log3_rise: $mol_log3_logger<{}>;
|
37
|
+
let $mol_log3_area: $mol_log3_logger<{}, () => void>;
|
38
|
+
function $mol_log3_area_lazy(this: $, event: $mol_log3_event<{}>): () => void;
|
39
|
+
let $mol_log3_stack: (() => void)[];
|
40
|
+
}
|
41
|
+
|
42
|
+
declare namespace $ {
|
43
|
+
const $mol_ambient_ref: unique symbol;
|
44
|
+
type $mol_ambient_context = $;
|
45
|
+
function $mol_ambient(this: $ | void, overrides: Partial<$>): $;
|
46
|
+
}
|
47
|
+
|
48
|
+
declare namespace $ {
|
49
|
+
function $mol_delegate<Value extends object>(proto: Value, target: () => Value): Value;
|
50
|
+
}
|
51
|
+
|
52
|
+
declare namespace $ {
|
53
|
+
const $mol_owning_map: WeakMap<any, any>;
|
54
|
+
function $mol_owning_allow<Having>(having: Having): having is Having & {
|
55
|
+
destructor(): void;
|
56
|
+
};
|
57
|
+
function $mol_owning_get<Having, Owner extends object>(having: Having, Owner?: {
|
58
|
+
new (): Owner;
|
59
|
+
}): Owner | null;
|
60
|
+
function $mol_owning_check<Owner, Having>(owner: Owner, having: Having): having is Having & {
|
61
|
+
destructor(): void;
|
62
|
+
};
|
63
|
+
function $mol_owning_catch<Owner, Having>(owner: Owner, having: Having): boolean;
|
64
|
+
}
|
65
|
+
|
66
|
+
declare namespace $ {
|
67
|
+
function $mol_fail(error: any): never;
|
68
|
+
}
|
69
|
+
|
70
|
+
declare namespace $ {
|
71
|
+
function $mol_fail_hidden(error: any): never;
|
72
|
+
}
|
73
|
+
|
74
|
+
declare namespace $ {
|
75
|
+
type $mol_type_writable<T> = {
|
76
|
+
-readonly [P in keyof T]: T[P];
|
77
|
+
};
|
78
|
+
}
|
79
|
+
|
80
|
+
declare namespace $ {
|
81
|
+
class $mol_object2 {
|
82
|
+
static $: typeof $$;
|
83
|
+
[$mol_ambient_ref]: typeof $$;
|
84
|
+
get $(): $;
|
85
|
+
set $(next: $);
|
86
|
+
static create<Instance>(this: new (init?: (instance: any) => void) => Instance, init?: (instance: $mol_type_writable<Instance>) => void): Instance;
|
87
|
+
static [Symbol.toPrimitive](): any;
|
88
|
+
static toString(): any;
|
89
|
+
destructor(): void;
|
90
|
+
toString(): any;
|
91
|
+
toJSON(): any;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
|
95
|
+
declare namespace $ {
|
96
|
+
const $mol_tree_convert: unique symbol;
|
97
|
+
type $mol_tree_path = Array<string | number | null>;
|
98
|
+
type $mol_tree_hack = (input: $mol_tree, context: $mol_tree_context) => readonly $mol_tree[];
|
99
|
+
type $mol_tree_context = Record<string, $mol_tree_hack>;
|
100
|
+
type $mol_tree_library = Record<string, $mol_tree_context>;
|
101
|
+
class $mol_tree extends $mol_object2 {
|
102
|
+
readonly type: string;
|
103
|
+
readonly data: string;
|
104
|
+
readonly sub: readonly $mol_tree[];
|
105
|
+
readonly baseUri: string;
|
106
|
+
readonly row: number;
|
107
|
+
readonly col: number;
|
108
|
+
readonly length: number;
|
109
|
+
constructor(config?: Partial<$mol_tree>);
|
110
|
+
static values(str: string, baseUri?: string): $mol_tree[];
|
111
|
+
clone(config?: Partial<$mol_tree>): $mol_tree;
|
112
|
+
make(config: Partial<$mol_tree>): $mol_tree;
|
113
|
+
make_data(value: string, sub?: readonly $mol_tree[]): $mol_tree;
|
114
|
+
make_struct(type: string, sub?: readonly $mol_tree[]): $mol_tree;
|
115
|
+
static fromString(str: string, baseUri?: string): $mol_tree;
|
116
|
+
static fromJSON(json: any, baseUri?: string): $mol_tree;
|
117
|
+
get uri(): string;
|
118
|
+
toString(prefix?: string): string;
|
119
|
+
toJSON(): any;
|
120
|
+
get value(): string;
|
121
|
+
insert(value: $mol_tree, ...path: $mol_tree_path): $mol_tree;
|
122
|
+
select(...path: $mol_tree_path): $mol_tree;
|
123
|
+
filter(path: string[], value?: string): $mol_tree;
|
124
|
+
transform(visit: (stack: $mol_tree[], sub: () => $mol_tree[]) => $mol_tree | null, stack?: $mol_tree[]): $mol_tree | null;
|
125
|
+
hack(context: $mol_tree_context): $mol_tree;
|
126
|
+
error(message: string): Error;
|
127
|
+
}
|
128
|
+
}
|
129
|
+
|
130
|
+
declare namespace $ {
|
131
|
+
class $mol_term_color {
|
132
|
+
static reset: (str: string) => string;
|
133
|
+
static bold: (str: string) => string;
|
134
|
+
static italic: (str: string) => string;
|
135
|
+
static underline: (str: string) => string;
|
136
|
+
static inverse: (str: string) => string;
|
137
|
+
static hidden: (str: string) => string;
|
138
|
+
static strike: (str: string) => string;
|
139
|
+
static gray: (str: string) => string;
|
140
|
+
static red: (str: string) => string;
|
141
|
+
static green: (str: string) => string;
|
142
|
+
static yellow: (str: string) => string;
|
143
|
+
static blue: (str: string) => string;
|
144
|
+
static magenta: (str: string) => string;
|
145
|
+
static cyan: (str: string) => string;
|
146
|
+
static white: (str: string) => string;
|
147
|
+
static Red: (str: string) => string;
|
148
|
+
static Green: (str: string) => string;
|
149
|
+
static Yellow: (str: string) => string;
|
150
|
+
static Blue: (str: string) => string;
|
151
|
+
static Magenta: (str: string) => string;
|
152
|
+
static Cyan: (str: string) => string;
|
153
|
+
static White: (str: string) => string;
|
154
|
+
static ansi(open: number, close: number): (str: string) => string;
|
155
|
+
}
|
156
|
+
}
|
157
|
+
|
158
|
+
declare namespace $ {
|
159
|
+
function $mol_log3_node_make(level: keyof Console, output: 'stdout' | 'stderr', type: string, color: (str: string) => string): (this: $, event: $mol_log3_event<{}>) => () => void;
|
160
|
+
}
|
161
|
+
|
162
|
+
declare namespace $ {
|
163
|
+
function $mol_env(): Record<string, string | undefined>;
|
164
|
+
}
|
165
|
+
|
166
|
+
declare namespace $ {
|
167
|
+
}
|
168
|
+
|
169
|
+
/// <reference types="node" />
|
170
|
+
/// <reference types="node" />
|
171
|
+
declare namespace $ {
|
172
|
+
function $mol_exec(this: $, dir: string, command: string, ...args: string[]): import("child_process").SpawnSyncReturns<Buffer>;
|
173
|
+
}
|
174
|
+
|
175
|
+
/// <reference types="node" />
|
176
|
+
declare namespace $ {
|
177
|
+
var $mol_crypto_native: import("crypto").webcrypto.Crypto;
|
178
|
+
}
|
179
|
+
|
16
180
|
declare namespace $ {
|
17
181
|
class $mol_crypto_secret extends Object {
|
18
182
|
readonly native: CryptoKey & {
|
package/node.deps.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"files":["LICENSE","README.md","lang.lang.tree","mam.jam.js","mam.ts","package.json","sandbox.config.json","tsconfig.json","tsfmt.json","yarn.lock","mol/CNAME","mol/CODE_OF_CONDUCT.md","mol/CONTRIBUTING.md","mol/LICENSE","mol/index.html","mol/mol.meta.tree","mol/readme.md","mol/crypto/README.md","mol/crypto/secret/secret.ts","mol/crypto/cipher/cipher.ts","mol/crypto/auditor/auditor.ts","mol/crypto/hash/hash.ts","mol/crypto/salt/salt.ts","mol/crypto/lib/lib.meta.tree"],"mods":{},"deps_in":{"mol/crypto":{"mol/crypto/lib":-9007199254740991,"mol/crypto/secret":-9007199254740991,"mol/crypto/cipher":-9007199254740991,"mol/crypto/auditor":-9007199254740991,"mol/crypto/hash":-9007199254740991,"mol/crypto/salt":-9007199254740991},"mol":{"mol/crypto":-9007199254740991},"":{"mol":-9007199254740991},"mol/crypto/secret":{"mol/crypto/lib":-9000},"mol/crypto/cipher":{"mol/crypto/lib":-9000},"mol/crypto/auditor":{"mol/crypto/lib":-9000},"mol/crypto/hash":{"mol/crypto/lib":-9000},"mol/crypto/salt":{"mol/crypto/lib":-9000}},"deps_out":{"mol/crypto/lib":{"mol/crypto":-9007199254740991,"mol/crypto/secret":-9000,"mol/crypto/cipher":-9000,"mol/crypto/auditor":-9000,"mol/crypto/hash":-9000,"mol/crypto/salt":-9000},"mol/crypto":{"mol":-9007199254740991},"mol":{"":-9007199254740991},"mol/crypto/secret":{"mol/crypto":-9007199254740991},"mol/crypto/cipher":{"mol/crypto":-9007199254740991},"mol/crypto/auditor":{"mol/crypto":-9007199254740991},"mol/crypto/hash":{"mol/crypto":-9007199254740991},"mol/crypto/salt":{"mol/crypto":-9007199254740991}},"sloc":{"LICENSE":113,"md":
|
1
|
+
{"files":["LICENSE","README.md","lang.lang.tree","mam.jam.js","mam.ts","package.json","sandbox.config.json","tsconfig.json","tsfmt.json","yarn.lock","mol/CNAME","mol/CODE_OF_CONDUCT.md","mol/CONTRIBUTING.md","mol/LICENSE","mol/index.html","mol/mol.meta.tree","mol/readme.md","mol/crypto/README.md","node/node.ts","node/node.node.ts","mol/log3/log3.ts","mol/ambient/ambient.ts","mol/ambient/readme.md","mol/delegate/delegate.ts","mol/owning/owning.ts","mol/fail/fail.ts","mol/fail/hidden/hidden.ts","mol/type/README.md","mol/type/writable/writable.ts","mol/object2/object2.ts","mol/tree/readme.md","mol/tree/tree.ts","mol/term/color/color.ts","mol/log3/log3.node.ts","mol/env/env.ts","mol/env/env.node.ts","mol/exec/exec.node.ts","mol/crypto/native/native.node.ts","mol/crypto/secret/secret.ts","mol/crypto/cipher/cipher.ts","mol/crypto/auditor/auditor.ts","mol/crypto/hash/hash.ts","mol/crypto/salt/salt.ts","mol/crypto/lib/lib.meta.tree"],"mods":{},"deps_in":{"mol/crypto":{"mol/crypto/lib":-9007199254740991,"mol/crypto/secret":-9007199254740991,"mol/crypto/native":-9007199254740991,"mol/crypto/cipher":-9007199254740991,"mol/crypto/auditor":-9007199254740991,"mol/crypto/hash":-9007199254740991,"mol/crypto/salt":-9007199254740991},"mol":{"mol/crypto":-9007199254740991,"mol/exec":-9007199254740991,"mol/log3":-9007199254740991,"mol/tree":-9007199254740991,"mol/object2":-9007199254740991,"mol/ambient":-9007199254740991,"mol/owning":-9007199254740991,"mol/delegate":-9007199254740991,"mol/fail":-9007199254740991,"mol/type":-9007199254740991,"mol/term":-9007199254740991,"mol/env":-9007199254740991},"":{"mol":-9007199254740991,"node":-9007199254740991,"node_modules":-9007199254740991},"mol/crypto/secret":{"mol/crypto/lib":-9000},"mol/crypto/native":{"mol/crypto/secret":-3,"mol/crypto/cipher":-2,"mol/crypto/auditor":-2,"mol/crypto/salt":-2},"node":{"mol/crypto/native":-1,"mol/exec":-2},"node/node.ts":{"node":0},"node_modules":{"node":-2},"mol/exec":{"mol/crypto/native":-4},"mol/log3":{"mol/exec":-2},"mol/log3/log3.ts":{"mol/log3":0},"mol/tree":{"mol/log3":-3},"mol/object2":{"mol/tree":-1},"mol/ambient":{"mol/object2":-2},"mol/owning":{"mol/object2":-3},"mol/delegate":{"mol/owning":-3},"mol/fail/hidden":{"mol/object2":-3},"mol/fail":{"mol/fail/hidden":-9007199254740991,"mol/tree":-4,"mol/exec":-2},"mol/type/writable":{"mol/object2":-3},"mol/type":{"mol/type/writable":-9007199254740991},"mol/term/color":{"mol/log3":-1},"mol/term":{"mol/term/color":-9007199254740991},"mol/env":{"mol/exec":-4},"mol/env/env.ts":{"mol/env":0},"mol/crypto/cipher":{"mol/crypto/lib":-9000},"mol/crypto/auditor":{"mol/crypto/lib":-9000},"mol/crypto/hash":{"mol/crypto/lib":-9000},"mol/crypto/salt":{"mol/crypto/lib":-9000}},"deps_out":{"mol/crypto/lib":{"mol/crypto":-9007199254740991,"mol/crypto/secret":-9000,"mol/crypto/cipher":-9000,"mol/crypto/auditor":-9000,"mol/crypto/hash":-9000,"mol/crypto/salt":-9000},"mol/crypto":{"mol":-9007199254740991},"mol":{"":-9007199254740991},"mol/crypto/secret":{"mol/crypto":-9007199254740991,"mol/crypto/native":-3},"mol/crypto/native":{"mol/crypto":-9007199254740991,"node":-1,"mol/exec":-4},"node":{"":-9007199254740991,"node/node.ts":0,"node_modules":-2},"node_modules":{"":-9007199254740991},"mol/exec":{"mol":-9007199254740991,"mol/log3":-2,"node":-2,"mol/env":-4,"mol/fail":-2},"mol/log3":{"mol":-9007199254740991,"mol/log3/log3.ts":0,"mol/tree":-3,"mol/term/color":-1},"mol/log3/log3.ts":{},"mol/tree":{"mol":-9007199254740991,"mol/object2":-1,"mol/fail":-4},"mol/object2":{"mol":-9007199254740991,"mol/ambient":-2,"mol/owning":-3,"mol/fail/hidden":-3,"mol/type/writable":-3},"mol/ambient":{"mol":-9007199254740991},"mol/owning":{"mol":-9007199254740991,"mol/delegate":-3},"mol/delegate":{"mol":-9007199254740991},"mol/fail/hidden":{"mol/fail":-9007199254740991},"mol/fail":{"mol":-9007199254740991},"mol/type/writable":{"mol/type":-9007199254740991},"mol/type":{"mol":-9007199254740991},"mol/term/color":{"mol/term":-9007199254740991},"mol/term":{"mol":-9007199254740991},"mol/env":{"mol":-9007199254740991,"mol/env/env.ts":0},"mol/env/env.ts":{},"mol/crypto/cipher":{"mol/crypto":-9007199254740991,"mol/crypto/native":-2},"mol/crypto/auditor":{"mol/crypto":-9007199254740991,"mol/crypto/native":-2},"mol/crypto/hash":{"mol/crypto":-9007199254740991},"mol/crypto/salt":{"mol/crypto":-9007199254740991,"mol/crypto/native":-2}},"sloc":{"LICENSE":113,"md":635,"tree":36,"js":9,"ts":1024,"json":85,"lock":994,"CNAME":1,"html":1},"deps":{"mol/crypto/lib":{"..":-9007199254740991,"/mol/crypto/secret":-9000,"/mol/crypto/cipher":-9000,"/mol/crypto/auditor":-9000,"/mol/crypto/hash":-9000,"/mol/crypto/salt":-9000},"mol/crypto":{"..":-9007199254740991},"mol":{"..":-9007199254740991},"":{},"mol/crypto/secret":{"..":-9007199254740991,"/mol/crypto/secret":-1,"/mol/crypto/native/subtle/generate/key":-4,"/mol/crypto/native/subtle/import/key":-4,"/mol/crypto/native/subtle/export/key":-3,"/mol/crypto/native/subtle/encrypt":-3,"/mol/crypto/native/subtle/decrypt":-3},"mol/crypto/native":{"..":-9007199254740991,"./native.ts":0,"/mol/crypto/native":-1,"/node/crypto/webcrypto":-1},"node":{"..":-9007199254740991,"./node.ts":0,"/node":0,"module":-2,"path":-2,"fs":-2,"/mol/exec":-4},"node/node.ts":{},"node_modules":{"..":-9007199254740991},"mol/exec":{"..":-9007199254740991,"./exec.ts":0,"/mol/exec":-1,"/mol/log3/come":-2,"/node/path/relative":-3,"/node/child_process":-2,"/node/path/resolve":-4,"/mol/env":-4,"/mol/fail":-2},"mol/log3":{"..":-9007199254740991,"./log3.ts":0,"/mol/log3/node/make":-1,"/mol/log3/logger":-1,"/mol/log3/event":-1,"/mol/tree/from":-3,"/mol/log3/come":-1,"/mol/term/color/blue":-1,"/mol/log3/done":-1,"/mol/term/color/green":-1,"/mol/log3/fail":-1,"/mol/term/color/red":-1,"/mol/log3/warn":-1,"/mol/term/color/yellow":-1,"/mol/log3/rise":-1,"/mol/term/color/magenta":-1,"/mol/log3/area":-1,"/mol/term/color/cyan":-1,"/mol/log3/area/lazy":-1,"/mol/log3/stack":-1,"/mol/log3/area/call":-3},"mol/log3/log3.ts":{"/mol/log3/event":-1,"/mol/log3/logger":-1,"/mol/log3/come":-1,"/mol/log3/done":-1,"/mol/log3/fail":-1,"/mol/log3/warn":-1,"/mol/log3/rise":-1,"/mol/log3/area":-1,"/mol/log3/area/lazy":-1,"/mol/log3/stack":-1,"/mol/log3/area/call":-3},"mol/tree":{"..":-9007199254740991,"/mol/tree/convert":-1,"/mol/tree/path":-1,"/mol/tree/hack":-1,"/mol/tree":-1,"/mol/tree/context":-1,"/mol/tree/library":-1,"/mol/object2":-1,"/mol/tree/values":-4,"/mol/fail":-4,"/mol/tree/json/from":-2.25,"/mol/tree/from":-6,"/mol/tree/json/to":-2.25},"mol/object2":{"..":-9007199254740991,"/mol/object2":-1,"/mol/ambient/ref":-2,"/mol/owning/get":-3,"/mol/fail/hidden":-3,"/mol/type/writable":-3},"mol/ambient":{"..":-9007199254740991,"/mol/ambient/ref":-1,"/mol/ambient/context":-1,"/mol/ambient":-1},"mol/owning":{"..":-9007199254740991,"/mol/owning/map":-1,"/mol/owning/allow":-1,"/mol/delegate":-3,"/mol/owning/get":-1,"/mol/owning/map/get":-2,"/mol/owning/check":-1,"/mol/owning/catch":-1,"/mol/owning/map/set":-2},"mol/delegate":{"..":-9007199254740991,"/mol/delegate":-1},"mol/fail/hidden":{"..":-9007199254740991,"/mol/fail/hidden":-1},"mol/fail":{"..":-9007199254740991,"/mol/fail":-1},"mol/type/writable":{"..":-9007199254740991,"/mol/type/writable":-1},"mol/type":{"..":-9007199254740991},"mol/term/color":{"..":-9007199254740991,"/mol/term/color":-1},"mol/term":{"..":-9007199254740991},"mol/env":{"..":-9007199254740991,"./env.ts":0,"/mol/env":-1},"mol/env/env.ts":{"/mol/env":-1},"mol/crypto/cipher":{"..":-9007199254740991,"/mol/crypto/cipher/pair":-1,"/mol/crypto/native/subtle/generate/key":-2,"/mol/crypto/cipher/public":-1,"/mol/crypto/cipher/private":-1,"/mol/crypto/native/subtle/import/key":-4,"/mol/crypto/native/subtle/export/key":-3,"/mol/crypto/native/subtle/encrypt":-3,"/mol/crypto/native/subtle/decrypt":-3,"/mol/crypto/cipher/ecrypted/size":-1},"mol/crypto/auditor":{"..":-9007199254740991,"/mol/crypto/auditor/pair":-1,"/mol/crypto/native/subtle/generate/key":-2,"/mol/crypto/auditor/public":-1,"/mol/crypto/auditor/private":-1,"/mol/crypto/native/subtle/import/key":-4,"/mol/crypto/native/subtle/export/key":-3,"/mol/crypto/native/subtle/verify":-3,"/mol/crypto/native/subtle/sign":-3,"/mol/crypto/auditor/sign/size":-1},"mol/crypto/hash":{"..":-9007199254740991,"/mol/crypto/hash":-1},"mol/crypto/salt":{"..":-9007199254740991,"/mol/crypto/salt":-1,"/mol/crypto/native/get/random/values":-2}}}
|