lib0 0.2.89 → 0.2.91
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/bin/0ecdsa-generate-keypair.d.ts +2 -0
- package/bin/0ecdsa-generate-keypair.d.ts.map +1 -0
- package/bin/0ecdsa-generate-keypair.js +14 -0
- package/coverage/tmp/coverage-151987-1709590293199-0.json +1 -0
- package/crypto/jwt.d.ts.map +1 -1
- package/crypto/jwt.js +6 -1
- package/crypto.test.d.ts.map +1 -1
- package/dist/bin/0ecdsa-generate-keypair.d.ts +2 -0
- package/dist/bin/0ecdsa-generate-keypair.d.ts.map +1 -0
- package/dist/crypto/jwt.d.ts.map +1 -1
- package/dist/crypto.test.d.ts.map +1 -1
- package/dist/jwt.cjs +7 -1
- package/dist/jwt.cjs.map +1 -1
- package/dist/logging.cjs +11 -2
- package/dist/logging.cjs.map +1 -1
- package/dist/logging.common.cjs +23 -7
- package/dist/logging.common.cjs.map +1 -1
- package/dist/logging.common.d.ts +1 -1
- package/dist/logging.common.d.ts.map +1 -1
- package/dist/logging.d.ts.map +1 -1
- package/dist/logging.node.cjs +10 -4
- package/dist/logging.node.cjs.map +1 -1
- package/dist/logging.node.d.ts +1 -1
- package/dist/logging.node.d.ts.map +1 -1
- package/dist/logging.test.d.ts +1 -0
- package/dist/logging.test.d.ts.map +1 -1
- package/logging.common.d.ts +1 -1
- package/logging.common.d.ts.map +1 -1
- package/logging.common.js +25 -7
- package/logging.d.ts.map +1 -1
- package/logging.js +11 -2
- package/logging.node.d.ts +1 -1
- package/logging.node.d.ts.map +1 -1
- package/logging.node.js +9 -4
- package/logging.test.d.ts +1 -0
- package/logging.test.d.ts.map +1 -1
- package/package.json +3 -2
- package/test.html +1 -0
- package/coverage/tmp/coverage-25880-1708188297584-0.json +0 -1
- package/dist/environment.test.d.ts +0 -2
- package/dist/environment.test.d.ts.map +0 -1
- package/environment.test.d.ts +0 -2
- package/environment.test.d.ts.map +0 -1
package/logging.node.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging.node.d.ts","sourceRoot":"","sources":["logging.node.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logging.node.d.ts","sourceRoot":"","sources":["logging.node.js"],"names":[],"mappings":"AA6EO,+BAFI,MAAM,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,SAAS,CAAC,QAItD;AAMM,8BAFI,MAAM,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,CAAC,QAI5C;AAOM,gCAHI,KAAK,QAKf;AAQM,+BAJI,MAAM,WACN,MAAM,QAKhB;AAQM,uCAJI,MAAM,UACN,MAAM,QAIoC;AAM9C,+BAHI,MAAM,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,CAAC,QAK5C;AAMM,wCAHI,MAAM,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,CAAC,QAK5C;AAGM,iCAEN;AAMM,4CAHe,IAAI,QAGiB;AAOpC,oCAJI,iBAAiB,UACjB,MAAM,QAIqB;AAM/B,qCAHI,OAAO,QAGwB;AAOnC,+CAJI,MAAM,aACO,GAAG,OAAE,IAAI,CAG6D"}
|
package/logging.node.js
CHANGED
|
@@ -23,10 +23,13 @@ const _nodeStyleMap = {
|
|
|
23
23
|
|
|
24
24
|
/* c8 ignore start */
|
|
25
25
|
/**
|
|
26
|
-
* @param {Array<string|Symbol|Object|number
|
|
27
|
-
* @return {Array<string|object|number>}
|
|
26
|
+
* @param {Array<string|undefined|Symbol|Object|number|function():Array<any>>} args
|
|
27
|
+
* @return {Array<string|object|number|undefined>}
|
|
28
28
|
*/
|
|
29
29
|
const computeNodeLoggingArgs = (args) => {
|
|
30
|
+
if (args.length === 1 && args[0]?.constructor === Function) {
|
|
31
|
+
args = /** @type {Array<string|Symbol|Object|number>} */ (/** @type {[function]} */ (args)[0]())
|
|
32
|
+
}
|
|
30
33
|
const strBuilder = []
|
|
31
34
|
const logArgs = []
|
|
32
35
|
// try with formatting until we find something unsupported
|
|
@@ -38,7 +41,9 @@ const computeNodeLoggingArgs = (args) => {
|
|
|
38
41
|
if (style !== undefined) {
|
|
39
42
|
strBuilder.push(style)
|
|
40
43
|
} else {
|
|
41
|
-
if (arg
|
|
44
|
+
if (arg === undefined) {
|
|
45
|
+
break
|
|
46
|
+
} else if (arg.constructor === String || arg.constructor === Number) {
|
|
42
47
|
strBuilder.push(arg)
|
|
43
48
|
} else {
|
|
44
49
|
break
|
|
@@ -68,7 +73,7 @@ const computeLoggingArgs = env.supportsColor
|
|
|
68
73
|
/* c8 ignore stop */
|
|
69
74
|
|
|
70
75
|
/**
|
|
71
|
-
* @param {Array<string|Symbol|Object|number>} args
|
|
76
|
+
* @param {Array<string|Symbol|Object|number|undefined>} args
|
|
72
77
|
*/
|
|
73
78
|
export const print = (...args) => {
|
|
74
79
|
console.log(...computeLoggingArgs(args))
|
package/logging.test.d.ts
CHANGED
package/logging.test.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging.test.d.ts","sourceRoot":"","sources":["logging.test.js"],"names":[],"mappings":"AAEO,
|
|
1
|
+
{"version":3,"file":"logging.test.d.ts","sourceRoot":"","sources":["logging.test.js"],"names":[],"mappings":"AAEO,oCAgBN;AAEM,yCAON"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lib0",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.91",
|
|
4
4
|
"description": "",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
},
|
|
14
14
|
"bin": {
|
|
15
15
|
"0gentesthtml": "./bin/gentesthtml.js",
|
|
16
|
-
"0serve": "./bin/0serve.js"
|
|
16
|
+
"0serve": "./bin/0serve.js",
|
|
17
|
+
"0ecdsa-generate-keypair": "./bin/0ecdsa-generate-keypair.js"
|
|
17
18
|
},
|
|
18
19
|
"exports": {
|
|
19
20
|
"./package.json": "./package.json",
|
package/test.html
CHANGED
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"lib0/conditions.js": "./conditions.js",
|
|
30
30
|
"lib0/dist/conditions.cjs": "./dist/conditions.cjs",
|
|
31
31
|
"lib0/conditions": "./condititons.js",
|
|
32
|
+
"lib0/crypto/jwt": "./crypto/jwt.js",
|
|
32
33
|
"lib0/crypto/aes-gcm": "./crypto/aes-gcm.js",
|
|
33
34
|
"lib0/crypto/ecdsa": "./crypto/ecdsa.js",
|
|
34
35
|
"lib0/crypto/rsa-oaep": "./crypto/rsa-oaep.js",
|