@ibgib/ts-gib 0.5.31 → 0.5.33
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/CHANGELOG.md +20 -0
- package/README.md +13 -0
- package/dist/V1/sha256v1.d.mts +52 -7
- package/dist/V1/sha256v1.d.mts.map +1 -1
- package/dist/V1/sha256v1.mjs +175 -291
- package/dist/V1/sha256v1.mjs.map +1 -1
- package/dist/helper.d.mts +2 -21
- package/dist/helper.d.mts.map +1 -1
- package/dist/helper.mjs +2 -43
- package/dist/helper.mjs.map +1 -1
- package/package.json +7 -29
- package/src/V1/sha256v1.mts +183 -279
- package/src/V1/sha256v1.respec.mts +45 -2
- package/src/helper.mts +2 -46
- package/.vscode/launch.json +0 -24
- package/.vscode/settings.json +0 -37
- package/.vscode/tasks.json +0 -37
- package/.vscode/ts-gib-snippets.code-snippets +0 -293
package/.vscode/settings.json
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"typescript.tsdk": "node_modules/typescript/lib",
|
|
3
|
-
"search.exclude": {
|
|
4
|
-
"**/*.BAK": true,
|
|
5
|
-
"**/dist": true
|
|
6
|
-
},
|
|
7
|
-
"files.watcherExclude": {
|
|
8
|
-
"**/*.BAK": true
|
|
9
|
-
},
|
|
10
|
-
"editor.formatOnSave": true,
|
|
11
|
-
"debug.node.autoAttach": "on",
|
|
12
|
-
"files.trimTrailingWhitespace": true,
|
|
13
|
-
"files.insertFinalNewline": true,
|
|
14
|
-
"files.trimFinalNewlines": true,
|
|
15
|
-
"workbench.colorTheme": "Kimbie Dark",
|
|
16
|
-
"workbench.colorCustomizations": {
|
|
17
|
-
"editor.background": "#0E3003",
|
|
18
|
-
"sideBar.background": "#0E3003",
|
|
19
|
-
"editor.lineHighlightBackground": "#00ff2f18"
|
|
20
|
-
},
|
|
21
|
-
"editor.tokenColorCustomizations": {
|
|
22
|
-
"[Kimbie Dark]": {
|
|
23
|
-
"variables": "#c77a22",
|
|
24
|
-
"comments": "#fffb128c",
|
|
25
|
-
"textMateRules": [
|
|
26
|
-
{
|
|
27
|
-
"name": "Lists",
|
|
28
|
-
"scope": "markup.list",
|
|
29
|
-
"settings": {
|
|
30
|
-
"foreground": "#cb76d6"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"insertGuid.pasteAutomatically": "{n}"
|
|
37
|
-
}
|
package/.vscode/tasks.json
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
|
3
|
-
// for the documentation about the tasks.json format
|
|
4
|
-
"version": "2.0.0",
|
|
5
|
-
"tasks": [
|
|
6
|
-
{
|
|
7
|
-
"type": "npm",
|
|
8
|
-
"script": "build",
|
|
9
|
-
"group": "build",
|
|
10
|
-
"problemMatcher": []
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"type": "npm",
|
|
14
|
-
"script": "test",
|
|
15
|
-
"group": "build",
|
|
16
|
-
"problemMatcher": []
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"type": "npm",
|
|
20
|
-
"script": "clean",
|
|
21
|
-
"group": "build",
|
|
22
|
-
"problemMatcher": []
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"type": "npm",
|
|
26
|
-
"script": "build:test",
|
|
27
|
-
"group": "build",
|
|
28
|
-
"problemMatcher": []
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"type": "npm",
|
|
32
|
-
"script": "prepare:publish",
|
|
33
|
-
"group": "build",
|
|
34
|
-
"problemMatcher": []
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
|
-
}
|
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"this Fn lc try..catch rethrow": {
|
|
3
|
-
"scope": "javascript,typescript",
|
|
4
|
-
"prefix": "lc_trycatch_rethrow_this",
|
|
5
|
-
"body": [
|
|
6
|
-
"const lc = `\\${this.lc}[\\${this.$1.name}]`;",
|
|
7
|
-
"try {",
|
|
8
|
-
"\t$SELECTION$0",
|
|
9
|
-
"} catch (error) {",
|
|
10
|
-
"\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
|
|
11
|
-
"\tthrow error;",
|
|
12
|
-
"}"
|
|
13
|
-
],
|
|
14
|
-
},
|
|
15
|
-
"this Fn lc try..catch..finally rethrow": {
|
|
16
|
-
"scope": "javascript,typescript",
|
|
17
|
-
"prefix": "lc_trycatchfinally_rethrow_this",
|
|
18
|
-
"body": [
|
|
19
|
-
"const lc = `\\${this.lc}[\\${this.$1.name}]`;",
|
|
20
|
-
"try {",
|
|
21
|
-
"\t$SELECTION$0",
|
|
22
|
-
"} catch (error) {",
|
|
23
|
-
"\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
|
|
24
|
-
"\tthrow error;",
|
|
25
|
-
"} finally {",
|
|
26
|
-
"\t$2",
|
|
27
|
-
"}"
|
|
28
|
-
],
|
|
29
|
-
},
|
|
30
|
-
"this Fn lc try..catch..finally rethrow with logging": {
|
|
31
|
-
"scope": "javascript,typescript",
|
|
32
|
-
"prefix": "lc_trycatchfinally_rethrow_withlogging_this",
|
|
33
|
-
"body": [
|
|
34
|
-
"const lc = `\\${this.lc}[\\${this.$1.name}]`;",
|
|
35
|
-
"try {",
|
|
36
|
-
"\tif (logalot) { console.log(`\\${lc} starting... (I: $RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$CURRENT_YEAR_SHORT)`); }",
|
|
37
|
-
"\t$SELECTION$0",
|
|
38
|
-
"} catch (error) {",
|
|
39
|
-
"\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
|
|
40
|
-
"\tthrow error;",
|
|
41
|
-
"} finally {",
|
|
42
|
-
"\tif (logalot) { console.log(`\\${lc} complete.`); }",
|
|
43
|
-
"}"
|
|
44
|
-
],
|
|
45
|
-
},
|
|
46
|
-
"this Fn func async lc try..catch rethrow": {
|
|
47
|
-
"scope": "javascript,typescript",
|
|
48
|
-
"prefix": "this_func_lc_trycatch_rethrow_this",
|
|
49
|
-
"body": [
|
|
50
|
-
"${1:async }${2:fnName}({",
|
|
51
|
-
"\t$3,",
|
|
52
|
-
"}: {",
|
|
53
|
-
"\t$3: $4,",
|
|
54
|
-
"}): Promise<$5> {",
|
|
55
|
-
"\tconst lc = `\\${this.lc}[\\${this.$2.name}]`;",
|
|
56
|
-
"\ttry {",
|
|
57
|
-
"\t\t$SELECTION$0",
|
|
58
|
-
"\t} catch (error) {",
|
|
59
|
-
"\t\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
|
|
60
|
-
"\t\tthrow error;",
|
|
61
|
-
"\t}",
|
|
62
|
-
"}"
|
|
63
|
-
],
|
|
64
|
-
},
|
|
65
|
-
"this Fn func async lc try..catch..finally rethrow": {
|
|
66
|
-
"scope": "javascript,typescript",
|
|
67
|
-
"prefix": "this_func_lc_trycatchfinally_rethrow_this",
|
|
68
|
-
"body": [
|
|
69
|
-
"${1:async }${2:fnName}({",
|
|
70
|
-
"\t$3,",
|
|
71
|
-
"}: {",
|
|
72
|
-
"\t$3: $4,",
|
|
73
|
-
"}): Promise<$5> {",
|
|
74
|
-
"\tconst lc = `\\${this.lc}[\\${this.$2.name}]`;",
|
|
75
|
-
"\ttry {",
|
|
76
|
-
"\t\t$SELECTION$0",
|
|
77
|
-
"\t} catch (error) {",
|
|
78
|
-
"\t\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
|
|
79
|
-
"\t\tthrow error;",
|
|
80
|
-
"\t} finally {",
|
|
81
|
-
"\t\t$6",
|
|
82
|
-
"\t}",
|
|
83
|
-
"}"
|
|
84
|
-
],
|
|
85
|
-
},
|
|
86
|
-
"this Fn func async lc try..catch..finally rethrow with logging": {
|
|
87
|
-
"scope": "javascript,typescript",
|
|
88
|
-
"prefix": "this_func_lc_trycatchfinally_rethrow_withlogging_this",
|
|
89
|
-
"body": [
|
|
90
|
-
"${1:async }${2:fnName}({",
|
|
91
|
-
"\t$3,",
|
|
92
|
-
"}: {",
|
|
93
|
-
"\t$3: $4,",
|
|
94
|
-
"}): Promise<$5> {",
|
|
95
|
-
"\tconst lc = `\\${this.lc}[\\${this.$2.name}]`;",
|
|
96
|
-
"\ttry {",
|
|
97
|
-
"\t\tif (logalot) { console.log(`\\${lc} starting... (I: $RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$CURRENT_YEAR_SHORT)`); }",
|
|
98
|
-
"\t\t$SELECTION$0",
|
|
99
|
-
"\t} catch (error) {",
|
|
100
|
-
"\t\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
|
|
101
|
-
"\t\tthrow error;",
|
|
102
|
-
"\t} finally {",
|
|
103
|
-
"\t\tif (logalot) { console.log(`\\${lc} complete.`); }",
|
|
104
|
-
"\t}",
|
|
105
|
-
"}"
|
|
106
|
-
],
|
|
107
|
-
},
|
|
108
|
-
"Fn lc try..catch rethrow": {
|
|
109
|
-
"scope": "javascript,typescript",
|
|
110
|
-
"prefix": "lc_trycatch_rethrow",
|
|
111
|
-
"body": [
|
|
112
|
-
"const lc = `[\\${$1.name}]`;",
|
|
113
|
-
"try {",
|
|
114
|
-
"\t$SELECTION$0",
|
|
115
|
-
"} catch (error) {",
|
|
116
|
-
"\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
|
|
117
|
-
"\tthrow error;",
|
|
118
|
-
"}"
|
|
119
|
-
],
|
|
120
|
-
},
|
|
121
|
-
"Fn lc try..catch..finally rethrow": {
|
|
122
|
-
"scope": "javascript,typescript",
|
|
123
|
-
"prefix": "lc_trycatchfinally_rethrow",
|
|
124
|
-
"body": [
|
|
125
|
-
"const lc = `[\\${$1.name}]`;",
|
|
126
|
-
"try {",
|
|
127
|
-
"\t$SELECTION$0",
|
|
128
|
-
"} catch (error) {",
|
|
129
|
-
"\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
|
|
130
|
-
"\tthrow error;",
|
|
131
|
-
"} finally {",
|
|
132
|
-
"\t$2",
|
|
133
|
-
"}"
|
|
134
|
-
],
|
|
135
|
-
},
|
|
136
|
-
"Fn lc try..catch..finally rethrow with logging": {
|
|
137
|
-
"scope": "javascript,typescript",
|
|
138
|
-
"prefix": "lc_trycatchfinally_rethrow_withlogging",
|
|
139
|
-
"body": [
|
|
140
|
-
"const lc = `[\\${$1.name}]`;",
|
|
141
|
-
"try {",
|
|
142
|
-
"\tif (logalot) { console.log(`\\${lc} starting... (I: $RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$CURRENT_YEAR_SHORT)`); }",
|
|
143
|
-
"\t$SELECTION$0",
|
|
144
|
-
"} catch (error) {",
|
|
145
|
-
"\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
|
|
146
|
-
"\tthrow error;",
|
|
147
|
-
"} finally {",
|
|
148
|
-
"\tif (logalot) { console.log(`\\${lc} complete.`); }",
|
|
149
|
-
"}"
|
|
150
|
-
],
|
|
151
|
-
},
|
|
152
|
-
"Fn func async lc try..catch rethrow": {
|
|
153
|
-
"scope": "javascript,typescript",
|
|
154
|
-
"prefix": "func_lc_trycatch_rethrow",
|
|
155
|
-
"body": [
|
|
156
|
-
"${1:export async function} ${2:fnName}({",
|
|
157
|
-
"\t$3,",
|
|
158
|
-
"}: {",
|
|
159
|
-
"\t$3: $4,",
|
|
160
|
-
"}): Promise<$5> {",
|
|
161
|
-
"\tconst lc = `[\\${$2.name}]`;",
|
|
162
|
-
"\ttry {",
|
|
163
|
-
"\t\t$SELECTION$0",
|
|
164
|
-
"\t} catch (error) {",
|
|
165
|
-
"\t\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
|
|
166
|
-
"\t\tthrow error;",
|
|
167
|
-
"\t}",
|
|
168
|
-
"}"
|
|
169
|
-
],
|
|
170
|
-
},
|
|
171
|
-
"Fn func async lc try..catch..finally rethrow": {
|
|
172
|
-
"scope": "javascript,typescript",
|
|
173
|
-
"prefix": "func_lc_trycatchfinally_rethrow",
|
|
174
|
-
"body": [
|
|
175
|
-
"${1:export async function} ${2:fnName}({",
|
|
176
|
-
"\t$3,",
|
|
177
|
-
"}: {",
|
|
178
|
-
"\t$3: $4,",
|
|
179
|
-
"}): Promise<$5> {",
|
|
180
|
-
"\tconst lc = `[\\${$2.name}]`;",
|
|
181
|
-
"\ttry {",
|
|
182
|
-
"\t\t$SELECTION$0",
|
|
183
|
-
"\t} catch (error) {",
|
|
184
|
-
"\t\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
|
|
185
|
-
"\t\tthrow error;",
|
|
186
|
-
"\t} finally {",
|
|
187
|
-
"\t\t$6",
|
|
188
|
-
"\t}",
|
|
189
|
-
"}"
|
|
190
|
-
],
|
|
191
|
-
},
|
|
192
|
-
"Fn func async lc try..catch..finally rethrow with logging": {
|
|
193
|
-
"scope": "javascript,typescript",
|
|
194
|
-
"prefix": "func_lc_trycatchfinally_rethrow_withlogging",
|
|
195
|
-
"body": [
|
|
196
|
-
"${1:export async function} ${2:fnName}({",
|
|
197
|
-
"\t$3,",
|
|
198
|
-
"}: {",
|
|
199
|
-
"\t$3: $4,",
|
|
200
|
-
"}): Promise<$5> {",
|
|
201
|
-
"\tconst lc = `[\\${$2.name}]`;",
|
|
202
|
-
"\ttry {",
|
|
203
|
-
"\t\tif (logalot) { console.log(`\\${lc} starting... (I: $RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$CURRENT_YEAR_SHORT)`); }",
|
|
204
|
-
"\t\t$SELECTION$0",
|
|
205
|
-
"\t} catch (error) {",
|
|
206
|
-
"\t\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
|
|
207
|
-
"\t\tthrow error;",
|
|
208
|
-
"\t} finally {",
|
|
209
|
-
"\t\tif (logalot) { console.log(`\\${lc} complete.`); }",
|
|
210
|
-
"\t}",
|
|
211
|
-
"}"
|
|
212
|
-
],
|
|
213
|
-
},
|
|
214
|
-
"throw new error with guid": {
|
|
215
|
-
"scope": "javascript,typescript",
|
|
216
|
-
"prefix": "throw_new_error_with_guid",
|
|
217
|
-
"body": [
|
|
218
|
-
"$0throw new Error(`$1 (E: $RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$CURRENT_YEAR_SHORT)`); "
|
|
219
|
-
],
|
|
220
|
-
},
|
|
221
|
-
"throw new error with guid (UNEXPECTED)": {
|
|
222
|
-
"scope": "javascript,typescript",
|
|
223
|
-
"prefix": "throw_new_error_with_guid_unexpected",
|
|
224
|
-
"body": [
|
|
225
|
-
"$0throw new Error(`(UNEXPECTED) $1? (E: $RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$CURRENT_YEAR_SHORT)`); "
|
|
226
|
-
],
|
|
227
|
-
},
|
|
228
|
-
"throw new error with guid not implemented": {
|
|
229
|
-
"scope": "javascript,typescript",
|
|
230
|
-
"prefix": "throw_new_error_with_guid_not_impl",
|
|
231
|
-
"body": [
|
|
232
|
-
"$0throw new Error(`not implemented (E: $RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$CURRENT_YEAR_SHORT)`); "
|
|
233
|
-
],
|
|
234
|
-
},
|
|
235
|
-
"if..throw with guid": {
|
|
236
|
-
"scope": "javascript,typescript",
|
|
237
|
-
"prefix": "if_throw_with_guid",
|
|
238
|
-
"body": [
|
|
239
|
-
"$0if ($1) { throw new Error(`$2 (E: $RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$CURRENT_YEAR_SHORT)`); }"
|
|
240
|
-
],
|
|
241
|
-
},
|
|
242
|
-
"if logalot log": {
|
|
243
|
-
"scope": "javascript,typescript",
|
|
244
|
-
"prefix": "if_logalot_log",
|
|
245
|
-
"body": [
|
|
246
|
-
"$0if (logalot$1) { console.${2:log}(`\\${lc} $3 (I: $RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$CURRENT_YEAR_SHORT)`); }"
|
|
247
|
-
],
|
|
248
|
-
},
|
|
249
|
-
"surround log if logalot log": {
|
|
250
|
-
"scope": "javascript,typescript",
|
|
251
|
-
"prefix": "surround_log_if_logalot",
|
|
252
|
-
"body": [
|
|
253
|
-
"if (logalot) { $SELECTION }"
|
|
254
|
-
],
|
|
255
|
-
},
|
|
256
|
-
"surround if logalot timer console time-timeEnd": {
|
|
257
|
-
"scope": "javascript,typescript",
|
|
258
|
-
"prefix": "surround_if_logalot_timer_console_time_timeend",
|
|
259
|
-
"body": [
|
|
260
|
-
"let timerName: string;",
|
|
261
|
-
"const timerEnabled = true",
|
|
262
|
-
"if (logalot && timerEnabled) {",
|
|
263
|
-
"\ttimerName = lc.substring(0, ${1:24}) + '[timer $RANDOM_HEX]';",
|
|
264
|
-
"\tconsole.log(`\\${timerName} starting... (I: $RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$CURRENT_YEAR_SHORT)`);",
|
|
265
|
-
"\tconsole.time(timerName);",
|
|
266
|
-
"}",
|
|
267
|
-
"// can intersperse with calls to console.timeLog for intermediate times",
|
|
268
|
-
"// if (logalot) { console.timeLog(timerName); }",
|
|
269
|
-
"",
|
|
270
|
-
"$0$SELECTION",
|
|
271
|
-
"",
|
|
272
|
-
"if (logalot && timerEnabled) {",
|
|
273
|
-
"\tconsole.timeEnd(timerName);",
|
|
274
|
-
"\tconsole.log(`\\${timerName} complete.`);",
|
|
275
|
-
"}",
|
|
276
|
-
],
|
|
277
|
-
},
|
|
278
|
-
"if logalot global ibgib timer": {
|
|
279
|
-
"scope": "javascript,typescript",
|
|
280
|
-
"prefix": "if_logalot_ibgib_timer",
|
|
281
|
-
"body": [
|
|
282
|
-
"if (logalot) { console.log(`\\${lc}\\${c.GLOBAL_TIMER_NAME}`); console.timeLog(c.GLOBAL_TIMER_NAME); }$0"
|
|
283
|
-
],
|
|
284
|
-
},
|
|
285
|
-
"return early": {
|
|
286
|
-
"scope": "javascript,typescript",
|
|
287
|
-
"prefix": "return_early",
|
|
288
|
-
"description": "I like to indicate returning early in a function in a comment, so it's more obvious in the editor if I'm scanning for comments.",
|
|
289
|
-
"body": [
|
|
290
|
-
"return$1; /* <<<< returns early */$0",
|
|
291
|
-
],
|
|
292
|
-
},
|
|
293
|
-
}
|