@nivinjoseph/n-sec 5.0.1 → 5.0.2
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/.eslintignore +2 -0
- package/.eslintrc +335 -0
- package/dist/api-security/alg-type.js +2 -0
- package/dist/api-security/alg-type.js.map +1 -1
- package/dist/api-security/claim.d.ts +2 -2
- package/dist/api-security/claim.js +3 -1
- package/dist/api-security/claim.js.map +1 -1
- package/dist/api-security/claims-identity.js +2 -1
- package/dist/api-security/claims-identity.js.map +1 -1
- package/dist/api-security/expired-token-exception.js +2 -1
- package/dist/api-security/expired-token-exception.js.map +1 -1
- package/dist/api-security/invalid-token-exception.js +3 -2
- package/dist/api-security/invalid-token-exception.js.map +1 -1
- package/dist/api-security/json-web-token.d.ts +3 -3
- package/dist/api-security/json-web-token.js +57 -37
- package/dist/api-security/json-web-token.js.map +1 -1
- package/dist/api-security/security-token.js +2 -2
- package/dist/api-security/security-token.js.map +1 -1
- package/dist/crypto/asymmetric-encryption.js +49 -0
- package/dist/crypto/asymmetric-encryption.js.map +1 -1
- package/dist/crypto/crypto-exception.js +1 -0
- package/dist/crypto/crypto-exception.js.map +1 -1
- package/dist/crypto/digital-signature.js +51 -0
- package/dist/crypto/digital-signature.js.map +1 -1
- package/dist/crypto/hash.js +4 -3
- package/dist/crypto/hash.js.map +1 -1
- package/dist/crypto/hmac.js +3 -2
- package/dist/crypto/hmac.js.map +1 -1
- package/dist/crypto/symmetric-encryption.js +5 -4
- package/dist/crypto/symmetric-encryption.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +12 -11
- package/src/api-security/claim.ts +5 -4
- package/src/api-security/claims-identity.ts +1 -1
- package/src/api-security/expired-token-exception.ts +1 -1
- package/src/api-security/invalid-token-exception.ts +2 -2
- package/src/api-security/json-web-token.ts +68 -66
- package/src/crypto/hash.ts +1 -2
- package/src/crypto/symmetric-encryption.ts +0 -2
- package/test/hash.test.ts +34 -32
- package/test/hmac.test.ts +24 -23
- package/test/json-web-token.test.ts +40 -37
- package/test/other.test.ts +3 -3
- package/test/symmetric-encryption.test.ts +12 -10
- package/tsconfig.json +8 -11
- package/dist/crypto/uuid.js.map +0 -1
- package/tslint.json +0 -64
package/test/hash.test.ts
CHANGED
|
@@ -9,26 +9,27 @@ suite("Hash", () =>
|
|
|
9
9
|
{
|
|
10
10
|
test("must return a string value that is not null, empty, whitespace or same as input when called with a valid input", () =>
|
|
11
11
|
{
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
const input = "hello world";
|
|
13
|
+
const hash = Hash.create(input);
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
14
15
|
Assert.ok(hash !== null && !hash.isEmptyOrWhiteSpace());
|
|
15
16
|
Assert.notStrictEqual(hash, input);
|
|
16
17
|
});
|
|
17
18
|
|
|
18
19
|
test("multiple invocations with the same input must return the same output", () =>
|
|
19
20
|
{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
const input = "hello world";
|
|
22
|
+
const hash1 = Hash.create(input);
|
|
23
|
+
const hash2 = Hash.create(input);
|
|
23
24
|
Assert.strictEqual(hash1, hash2);
|
|
24
25
|
});
|
|
25
26
|
|
|
26
27
|
test("multiple invocations with the different inputs must return different outputs", () =>
|
|
27
28
|
{
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
const input1 = "hello world";
|
|
30
|
+
const hash1 = Hash.create(input1);
|
|
31
|
+
const input2 = "goodbye world";
|
|
32
|
+
const hash2 = Hash.create(input2);
|
|
32
33
|
Assert.notStrictEqual(hash1, hash2);
|
|
33
34
|
});
|
|
34
35
|
|
|
@@ -93,9 +94,10 @@ suite("Hash", () =>
|
|
|
93
94
|
{
|
|
94
95
|
test("must return a string value that is not null, empty, whitespace or same as input or salt when called with a valid input and salt", () =>
|
|
95
96
|
{
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
const input = "hello world";
|
|
98
|
+
const salt = "salt";
|
|
99
|
+
const hash = Hash.createUsingSalt(input, salt);
|
|
100
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
99
101
|
Assert.ok(hash !== null && !hash.isEmptyOrWhiteSpace());
|
|
100
102
|
Assert.notStrictEqual(hash, input);
|
|
101
103
|
Assert.notStrictEqual(hash, salt);
|
|
@@ -103,46 +105,46 @@ suite("Hash", () =>
|
|
|
103
105
|
|
|
104
106
|
test("multiple invocations with the same input and salt must return the same output", () =>
|
|
105
107
|
{
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
const input = "hello world";
|
|
109
|
+
const salt = "salt";
|
|
110
|
+
const hash1 = Hash.createUsingSalt(input, salt);
|
|
111
|
+
const hash2 = Hash.createUsingSalt(input, salt);
|
|
110
112
|
Assert.strictEqual(hash1, hash2);
|
|
111
113
|
});
|
|
112
114
|
|
|
113
115
|
test("multiple invocations with different inputs and different salts must return different outputs", () =>
|
|
114
116
|
{
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
117
|
+
const input1 = "hello world";
|
|
118
|
+
const salt1 = "salt-1";
|
|
119
|
+
const hash1 = Hash.createUsingSalt(input1, salt1);
|
|
118
120
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
121
|
+
const input2 = "goodbye world";
|
|
122
|
+
const salt2 = "salt-2";
|
|
123
|
+
const hash2 = Hash.createUsingSalt(input2, salt2);
|
|
122
124
|
|
|
123
125
|
Assert.notStrictEqual(hash1, hash2);
|
|
124
126
|
});
|
|
125
127
|
|
|
126
128
|
test("multiple invocations with different inputs and the same salt must return different outputs", () =>
|
|
127
129
|
{
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
const input1 = "hello world";
|
|
131
|
+
const salt1 = "salt-1";
|
|
132
|
+
const hash1 = Hash.createUsingSalt(input1, salt1);
|
|
131
133
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
+
const input2 = "goodbye world";
|
|
135
|
+
const hash2 = Hash.createUsingSalt(input2, salt1);
|
|
134
136
|
|
|
135
137
|
Assert.notStrictEqual(hash1, hash2);
|
|
136
138
|
});
|
|
137
139
|
|
|
138
140
|
test("multiple invocations with the same input and different salts must return different outputs", () =>
|
|
139
141
|
{
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
142
|
+
const input = "hello world";
|
|
143
|
+
const salt1 = "salt-1";
|
|
144
|
+
const hash1 = Hash.createUsingSalt(input, salt1);
|
|
143
145
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
+
const salt2 = "salt-2";
|
|
147
|
+
const hash2 = Hash.createUsingSalt(input, salt2);
|
|
146
148
|
|
|
147
149
|
Assert.notStrictEqual(hash1, hash2);
|
|
148
150
|
});
|
package/test/hmac.test.ts
CHANGED
|
@@ -9,9 +9,10 @@ suite("Hmac", () =>
|
|
|
9
9
|
{
|
|
10
10
|
test("should return string value that is not null, empty, whitespace or same as the key or input", async () =>
|
|
11
11
|
{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
const key = await SymmetricEncryption.generateKey();
|
|
13
|
+
const value = "hello world";
|
|
14
|
+
const hmac = Hmac.create(key, value);
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
15
16
|
Assert.ok(hmac !== null && !hmac.isEmptyOrWhiteSpace());
|
|
16
17
|
Assert.notStrictEqual(hmac, key);
|
|
17
18
|
Assert.notStrictEqual(hmac, value);
|
|
@@ -19,42 +20,42 @@ suite("Hmac", () =>
|
|
|
19
20
|
|
|
20
21
|
test("multiple invocations with the same key and value must return the same output", async () =>
|
|
21
22
|
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
const key = await SymmetricEncryption.generateKey();
|
|
24
|
+
const value = "hello world";
|
|
25
|
+
const hmac1 = Hmac.create(key, value);
|
|
26
|
+
const hmac2 = Hmac.create(key, value);
|
|
26
27
|
Assert.strictEqual(hmac1, hmac2);
|
|
27
28
|
});
|
|
28
29
|
|
|
29
30
|
test("multiple invocations with different keys and different values must return different outputs", async () =>
|
|
30
31
|
{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
const key1 = await SymmetricEncryption.generateKey();
|
|
33
|
+
const value1 = "hello world";
|
|
34
|
+
const hmac1 = Hmac.create(key1, value1);
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
const key2 = await SymmetricEncryption.generateKey();
|
|
37
|
+
const value2 = "goodbye world";
|
|
38
|
+
const hmac2 = Hmac.create(key2, value2);
|
|
38
39
|
Assert.notStrictEqual(hmac1, hmac2);
|
|
39
40
|
});
|
|
40
41
|
|
|
41
42
|
test("multiple invocations with the same key and different values must return different outputs", async () =>
|
|
42
43
|
{
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
const key = await SymmetricEncryption.generateKey();
|
|
45
|
+
const value1 = "hello world";
|
|
46
|
+
const value2 = "goodbye world";
|
|
47
|
+
const hmac1 = Hmac.create(key, value1);
|
|
48
|
+
const hmac2 = Hmac.create(key, value2);
|
|
48
49
|
Assert.notStrictEqual(hmac1, hmac2);
|
|
49
50
|
});
|
|
50
51
|
|
|
51
52
|
test("multiple invocations with different keys and the same value must return different outputs", async () =>
|
|
52
53
|
{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
const key1 = await SymmetricEncryption.generateKey();
|
|
55
|
+
const key2 = await SymmetricEncryption.generateKey();
|
|
56
|
+
const value = "hello world";
|
|
57
|
+
const hmac1 = Hmac.create(key1, value);
|
|
58
|
+
const hmac2 = Hmac.create(key2, value);
|
|
58
59
|
Assert.notStrictEqual(hmac1, hmac2);
|
|
59
60
|
});
|
|
60
61
|
|
|
@@ -14,11 +14,12 @@ suite("Json Web Token ", () =>
|
|
|
14
14
|
|
|
15
15
|
test("should successfully create a token using hmac with one claim", async () =>
|
|
16
16
|
{
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
const claim = new Claim("this_claim", "ThisValue");
|
|
18
|
+
const key = await SymmetricEncryption.generateKey();
|
|
19
|
+
const time = Date.now();
|
|
20
|
+
const token = JsonWebToken.fromClaims("issuer1", 1, key, time + 10000000, [claim]).generateToken();
|
|
21
|
+
const jwt = JsonWebToken.fromToken("issuer1", 1, key, token);
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
22
23
|
Assert.ok(jwt !== null || jwt !== undefined);
|
|
23
24
|
Assert.strictEqual(jwt.issuer, "issuer1");
|
|
24
25
|
Assert.strictEqual(jwt.algType, 1);
|
|
@@ -28,12 +29,13 @@ suite("Json Web Token ", () =>
|
|
|
28
29
|
|
|
29
30
|
test("should successfully create a token using hmac with 2 claims", async () =>
|
|
30
31
|
{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
const claim1 = new Claim("this_claim", "ThisValue");
|
|
33
|
+
const claim2 = new Claim("that_claim", "ThatValue");
|
|
34
|
+
const key = await SymmetricEncryption.generateKey();
|
|
35
|
+
const time = Date.now();
|
|
36
|
+
const token = JsonWebToken.fromClaims("issuer1", 1, key, time + 10000000, [claim1, claim2]).generateToken();
|
|
37
|
+
const jwt = JsonWebToken.fromToken("issuer1", 1, key, token);
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
37
39
|
Assert.ok(jwt !== null || jwt !== undefined);
|
|
38
40
|
Assert.strictEqual(jwt.issuer, "issuer1");
|
|
39
41
|
Assert.strictEqual(jwt.algType, 1);
|
|
@@ -43,12 +45,13 @@ suite("Json Web Token ", () =>
|
|
|
43
45
|
|
|
44
46
|
test("should successfully create a token using hmac with 2 claims", async () =>
|
|
45
47
|
{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
const claim1 = new Claim("this_claim", "ThisValue");
|
|
49
|
+
const claim2 = new Claim("that_claim", "ThatValue");
|
|
50
|
+
const key = await SymmetricEncryption.generateKey();
|
|
51
|
+
const time = Date.now();
|
|
52
|
+
const token = JsonWebToken.fromClaims("issuer1", 1, key, time + 10000000, [claim1, claim2]).generateToken();
|
|
53
|
+
const jwt = JsonWebToken.fromToken("issuer1", 1, key, token);
|
|
54
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
52
55
|
Assert.ok(jwt !== null || jwt !== undefined);
|
|
53
56
|
Assert.strictEqual(jwt.issuer, "issuer1");
|
|
54
57
|
Assert.strictEqual(jwt.algType, 1);
|
|
@@ -58,11 +61,11 @@ suite("Json Web Token ", () =>
|
|
|
58
61
|
|
|
59
62
|
test("should throw an exception when getting JWT with a different issuer that what was user to generate token", async () =>
|
|
60
63
|
{
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
const claim1 = new Claim("this_claim", "ThisValue");
|
|
65
|
+
const claim2 = new Claim("that_claim", "ThatValue");
|
|
66
|
+
const key = await SymmetricEncryption.generateKey();
|
|
67
|
+
const time = Date.now();
|
|
68
|
+
const token = JsonWebToken.fromClaims("issuer1", 1, key, time + 10000000, [claim1, claim2]).generateToken();
|
|
66
69
|
try
|
|
67
70
|
{
|
|
68
71
|
JsonWebToken.fromToken("notTheIssuer", 1, key, token);
|
|
@@ -78,11 +81,11 @@ suite("Json Web Token ", () =>
|
|
|
78
81
|
|
|
79
82
|
test("should throw an exception when getting JWT when the token is expired", async () =>
|
|
80
83
|
{
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
const claim1 = new Claim("this_claim", "ThisValue");
|
|
85
|
+
const claim2 = new Claim("that_claim", "ThatValue");
|
|
86
|
+
const key = await SymmetricEncryption.generateKey();
|
|
87
|
+
const time = Date.now();
|
|
88
|
+
const token = JsonWebToken.fromClaims("issuer1", 1, key, time, [claim1, claim2]).generateToken();
|
|
86
89
|
try
|
|
87
90
|
{
|
|
88
91
|
JsonWebToken.fromToken("issuer1", 1, key, token);
|
|
@@ -120,12 +123,12 @@ suite("Json Web Token ", () =>
|
|
|
120
123
|
|
|
121
124
|
test("should throw an exception when getting JWT key given is different than what was used for the token generation", async () =>
|
|
122
125
|
{
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
const claim1 = new Claim("this_claim", "ThisValue");
|
|
127
|
+
const claim2 = new Claim("that_claim", "ThatValue");
|
|
128
|
+
const key = await SymmetricEncryption.generateKey();
|
|
129
|
+
const key2 = await SymmetricEncryption.generateKey();
|
|
130
|
+
const time = Date.now();
|
|
131
|
+
const token = JsonWebToken.fromClaims("issuer1", 1, key, time + 1000000, [claim1, claim2]).generateToken();
|
|
129
132
|
try
|
|
130
133
|
{
|
|
131
134
|
JsonWebToken.fromToken("issuer1", 1, key2, token);
|
|
@@ -141,10 +144,10 @@ suite("Json Web Token ", () =>
|
|
|
141
144
|
|
|
142
145
|
test("should throw an exception when getting JWT when the token is tampered with", async () =>
|
|
143
146
|
{
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
147
|
+
const claim1 = new Claim("this_claim", "ThisValue");
|
|
148
|
+
const claim2 = new Claim("that_claim", "ThatValue");
|
|
149
|
+
const key = await SymmetricEncryption.generateKey();
|
|
150
|
+
const time = Date.now();
|
|
148
151
|
let token = JsonWebToken.fromClaims("issuer1", 1, key, time + 1000000, [claim1, claim2]).generateToken();
|
|
149
152
|
token = token + "someStuff";
|
|
150
153
|
try
|
package/test/other.test.ts
CHANGED
|
@@ -4,11 +4,11 @@ suite("Other", () =>
|
|
|
4
4
|
{
|
|
5
5
|
test("encoding decoding", () =>
|
|
6
6
|
{
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
const text = "moonlight43iuj90/;msdnnksdkdkdk[[[][][";
|
|
8
|
+
const encodedText = Buffer.from(text, "utf8").toString("base64");
|
|
9
9
|
Assert.notStrictEqual(encodedText, text);
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
const decodedText = Buffer.from(encodedText, "base64").toString("utf8");
|
|
12
12
|
Assert.notStrictEqual(decodedText, encodedText);
|
|
13
13
|
Assert.strictEqual(decodedText, text);
|
|
14
14
|
});
|
|
@@ -10,16 +10,17 @@ suite("SymmetricEncryption", () =>
|
|
|
10
10
|
{
|
|
11
11
|
test("must return string value that is not null, empty or whitespace", async () =>
|
|
12
12
|
{
|
|
13
|
-
|
|
13
|
+
const key = await SymmetricEncryption.generateKey();
|
|
14
14
|
console.log("key", key);
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
15
16
|
Assert.ok(key !== null && !key.isEmptyOrWhiteSpace());
|
|
16
17
|
});
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
test("consecutive calls must yield unique values", async () =>
|
|
20
21
|
{
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
const key1 = await SymmetricEncryption.generateKey();
|
|
23
|
+
const key2 = await SymmetricEncryption.generateKey();
|
|
23
24
|
Assert.notStrictEqual(key1, key2);
|
|
24
25
|
});
|
|
25
26
|
});
|
|
@@ -28,9 +29,10 @@ suite("SymmetricEncryption", () =>
|
|
|
28
29
|
{
|
|
29
30
|
test("must return cipher text value when called with key and plain text value", async () =>
|
|
30
31
|
{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
const key = "E25B269440F88601C453CD171D76EDDC11D8CF33230742DF8CAD5873D28F78B2";
|
|
33
|
+
const value = "password";
|
|
34
|
+
const encrypted = await SymmetricEncryption.encrypt(key, value);
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
34
36
|
Assert.ok(encrypted !== null);
|
|
35
37
|
Assert.notStrictEqual(encrypted, value);
|
|
36
38
|
});
|
|
@@ -171,10 +173,10 @@ suite("SymmetricEncryption", () =>
|
|
|
171
173
|
{
|
|
172
174
|
test("must return plain text value when called with key and cipher text value", async () =>
|
|
173
175
|
{
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
176
|
+
const key = await SymmetricEncryption.generateKey();
|
|
177
|
+
const value = "password";
|
|
178
|
+
const encrypted = await SymmetricEncryption.encrypt(key, value);
|
|
179
|
+
const decrypted = SymmetricEncryption.decrypt(key, encrypted);
|
|
178
180
|
Assert.strictEqual(decrypted, value);
|
|
179
181
|
});
|
|
180
182
|
|
package/tsconfig.json
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
"module": "commonjs",
|
|
4
4
|
"target": "es2015",
|
|
5
5
|
"strict": true,
|
|
6
|
-
"strictNullChecks":
|
|
7
|
-
"strictFunctionTypes":
|
|
8
|
-
"noImplicitThis":
|
|
6
|
+
"strictNullChecks": true,
|
|
7
|
+
"strictFunctionTypes": true,
|
|
8
|
+
"noImplicitThis": true,
|
|
9
9
|
"noImplicitReturns": true,
|
|
10
10
|
"noUnusedLocals": true,
|
|
11
11
|
"noUnusedParameters": true,
|
|
@@ -14,16 +14,13 @@
|
|
|
14
14
|
"sourceMap": true,
|
|
15
15
|
"experimentalDecorators": true,
|
|
16
16
|
"emitDecoratorMetadata": true,
|
|
17
|
-
"removeComments":
|
|
17
|
+
"removeComments": false,
|
|
18
18
|
"forceConsistentCasingInFileNames": true,
|
|
19
19
|
"incremental": false,
|
|
20
|
+
"skipLibCheck": true,
|
|
21
|
+
"importHelpers": true,
|
|
22
|
+
"noEmitHelpers": true,
|
|
20
23
|
"noImplicitOverride": true,
|
|
21
|
-
"
|
|
22
|
-
{
|
|
23
|
-
"name": "typescript-tslint-plugin",
|
|
24
|
-
"configFile": "./tslint.json",
|
|
25
|
-
"alwaysShowRuleFailuresAsWarnings": false
|
|
26
|
-
}
|
|
27
|
-
]
|
|
24
|
+
"pretty": true
|
|
28
25
|
}
|
|
29
26
|
}
|
package/dist/crypto/uuid.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uuid.js","sourceRoot":"","sources":["../../src/crypto/uuid.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAI7B,MAAa,IAAI;IAEb,gBAAwB,CAAC;IAGlB,MAAM,CAAC,MAAM;QAEhB,OAAO,IAAI,CAAC,EAAE,EAAE,CAAC;IACrB,CAAC;CACJ;AATD,oBASC","sourcesContent":["import * as uuid from \"uuid\";\n\n\n// public\nexport class Uuid\n{\n private constructor() { }\n \n \n public static create(): string\n {\n return uuid.v4();\n }\n}"]}
|
package/tslint.json
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"defaultSeverity": "error",
|
|
3
|
-
"rules": {
|
|
4
|
-
"class-name": true,
|
|
5
|
-
"comment-format": [
|
|
6
|
-
true,
|
|
7
|
-
"check-space"
|
|
8
|
-
],
|
|
9
|
-
"indent": [
|
|
10
|
-
true,
|
|
11
|
-
"spaces"
|
|
12
|
-
],
|
|
13
|
-
"no-duplicate-variable": true,
|
|
14
|
-
"no-eval": true,
|
|
15
|
-
"no-internal-module": true,
|
|
16
|
-
"no-trailing-whitespace": false,
|
|
17
|
-
"no-var-keyword": true,
|
|
18
|
-
"no-default-export": true,
|
|
19
|
-
"one-line": [
|
|
20
|
-
true,
|
|
21
|
-
"check-whitespace"
|
|
22
|
-
],
|
|
23
|
-
"quotemark": [
|
|
24
|
-
true,
|
|
25
|
-
"double"
|
|
26
|
-
],
|
|
27
|
-
"semicolon": [
|
|
28
|
-
true,
|
|
29
|
-
"always"
|
|
30
|
-
],
|
|
31
|
-
"triple-equals": [
|
|
32
|
-
true,
|
|
33
|
-
"allow-null-check"
|
|
34
|
-
],
|
|
35
|
-
"typedef-whitespace": [
|
|
36
|
-
true,
|
|
37
|
-
{
|
|
38
|
-
"call-signature": "nospace",
|
|
39
|
-
"index-signature": "nospace",
|
|
40
|
-
"parameter": "nospace",
|
|
41
|
-
"property-declaration": "nospace",
|
|
42
|
-
"variable-declaration": "nospace"
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
|
-
"variable-name": [
|
|
46
|
-
true,
|
|
47
|
-
"ban-keywords"
|
|
48
|
-
],
|
|
49
|
-
"whitespace": [
|
|
50
|
-
true,
|
|
51
|
-
"check-branch",
|
|
52
|
-
"check-decl",
|
|
53
|
-
"check-operator",
|
|
54
|
-
"check-separator",
|
|
55
|
-
"check-type"
|
|
56
|
-
],
|
|
57
|
-
"interface-name": [
|
|
58
|
-
true,
|
|
59
|
-
"never-prefix"
|
|
60
|
-
],
|
|
61
|
-
"await-promise": true,
|
|
62
|
-
"no-floating-promises": true
|
|
63
|
-
}
|
|
64
|
-
}
|