@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.
Files changed (48) hide show
  1. package/.eslintignore +2 -0
  2. package/.eslintrc +335 -0
  3. package/dist/api-security/alg-type.js +2 -0
  4. package/dist/api-security/alg-type.js.map +1 -1
  5. package/dist/api-security/claim.d.ts +2 -2
  6. package/dist/api-security/claim.js +3 -1
  7. package/dist/api-security/claim.js.map +1 -1
  8. package/dist/api-security/claims-identity.js +2 -1
  9. package/dist/api-security/claims-identity.js.map +1 -1
  10. package/dist/api-security/expired-token-exception.js +2 -1
  11. package/dist/api-security/expired-token-exception.js.map +1 -1
  12. package/dist/api-security/invalid-token-exception.js +3 -2
  13. package/dist/api-security/invalid-token-exception.js.map +1 -1
  14. package/dist/api-security/json-web-token.d.ts +3 -3
  15. package/dist/api-security/json-web-token.js +57 -37
  16. package/dist/api-security/json-web-token.js.map +1 -1
  17. package/dist/api-security/security-token.js +2 -2
  18. package/dist/api-security/security-token.js.map +1 -1
  19. package/dist/crypto/asymmetric-encryption.js +49 -0
  20. package/dist/crypto/asymmetric-encryption.js.map +1 -1
  21. package/dist/crypto/crypto-exception.js +1 -0
  22. package/dist/crypto/crypto-exception.js.map +1 -1
  23. package/dist/crypto/digital-signature.js +51 -0
  24. package/dist/crypto/digital-signature.js.map +1 -1
  25. package/dist/crypto/hash.js +4 -3
  26. package/dist/crypto/hash.js.map +1 -1
  27. package/dist/crypto/hmac.js +3 -2
  28. package/dist/crypto/hmac.js.map +1 -1
  29. package/dist/crypto/symmetric-encryption.js +5 -4
  30. package/dist/crypto/symmetric-encryption.js.map +1 -1
  31. package/dist/index.js +2 -0
  32. package/dist/index.js.map +1 -1
  33. package/package.json +12 -11
  34. package/src/api-security/claim.ts +5 -4
  35. package/src/api-security/claims-identity.ts +1 -1
  36. package/src/api-security/expired-token-exception.ts +1 -1
  37. package/src/api-security/invalid-token-exception.ts +2 -2
  38. package/src/api-security/json-web-token.ts +68 -66
  39. package/src/crypto/hash.ts +1 -2
  40. package/src/crypto/symmetric-encryption.ts +0 -2
  41. package/test/hash.test.ts +34 -32
  42. package/test/hmac.test.ts +24 -23
  43. package/test/json-web-token.test.ts +40 -37
  44. package/test/other.test.ts +3 -3
  45. package/test/symmetric-encryption.test.ts +12 -10
  46. package/tsconfig.json +8 -11
  47. package/dist/crypto/uuid.js.map +0 -1
  48. 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
- let input = "hello world";
13
- let hash = Hash.create(input);
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
- let input = "hello world";
21
- let hash1 = Hash.create(input);
22
- let hash2 = Hash.create(input);
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
- let input1 = "hello world";
29
- let hash1 = Hash.create(input1);
30
- let input2 = "goodbye world";
31
- let hash2 = Hash.create(input2);
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
- let input = "hello world";
97
- let salt = "salt";
98
- let hash = Hash.createUsingSalt(input, salt);
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
- let input = "hello world";
107
- let salt = "salt";
108
- let hash1 = Hash.createUsingSalt(input, salt);
109
- let hash2 = Hash.createUsingSalt(input, salt);
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
- let input1 = "hello world";
116
- let salt1 = "salt-1";
117
- let hash1 = Hash.createUsingSalt(input1, salt1);
117
+ const input1 = "hello world";
118
+ const salt1 = "salt-1";
119
+ const hash1 = Hash.createUsingSalt(input1, salt1);
118
120
 
119
- let input2 = "goodbye world";
120
- let salt2 = "salt-2";
121
- let hash2 = Hash.createUsingSalt(input2, salt2);
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
- let input1 = "hello world";
129
- let salt1 = "salt-1";
130
- let hash1 = Hash.createUsingSalt(input1, salt1);
130
+ const input1 = "hello world";
131
+ const salt1 = "salt-1";
132
+ const hash1 = Hash.createUsingSalt(input1, salt1);
131
133
 
132
- let input2 = "goodbye world";
133
- let hash2 = Hash.createUsingSalt(input2, salt1);
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
- let input = "hello world";
141
- let salt1 = "salt-1";
142
- let hash1 = Hash.createUsingSalt(input, salt1);
142
+ const input = "hello world";
143
+ const salt1 = "salt-1";
144
+ const hash1 = Hash.createUsingSalt(input, salt1);
143
145
 
144
- let salt2 = "salt-2";
145
- let hash2 = Hash.createUsingSalt(input, salt2);
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
- let key = await SymmetricEncryption.generateKey();
13
- let value = "hello world";
14
- let hmac = Hmac.create(key, value);
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
- let key = await SymmetricEncryption.generateKey();
23
- let value = "hello world";
24
- let hmac1 = Hmac.create(key, value);
25
- let hmac2 = Hmac.create(key, value);
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
- let key1 = await SymmetricEncryption.generateKey();
32
- let value1 = "hello world";
33
- let hmac1 = Hmac.create(key1, value1);
32
+ const key1 = await SymmetricEncryption.generateKey();
33
+ const value1 = "hello world";
34
+ const hmac1 = Hmac.create(key1, value1);
34
35
 
35
- let key2 = await SymmetricEncryption.generateKey();
36
- let value2 = "goodbye world";
37
- let hmac2 = Hmac.create(key2, value2);
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
- let key = await SymmetricEncryption.generateKey();
44
- let value1 = "hello world";
45
- let value2 = "goodbye world";
46
- let hmac1 = Hmac.create(key, value1);
47
- let hmac2 = Hmac.create(key, value2);
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
- let key1 = await SymmetricEncryption.generateKey();
54
- let key2 = await SymmetricEncryption.generateKey();
55
- let value = "hello world";
56
- let hmac1 = Hmac.create(key1, value);
57
- let hmac2 = Hmac.create(key2, value);
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
- let claim = new Claim("this_claim", "ThisValue");
18
- let key = await SymmetricEncryption.generateKey();
19
- let time = Date.now();
20
- let token = JsonWebToken.fromClaims("issuer1", 1, key, time + 10000000, [claim]).generateToken();
21
- let jwt = JsonWebToken.fromToken("issuer1", 1, key, token);
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
- let claim1 = new Claim("this_claim", "ThisValue");
32
- let claim2 = new Claim("that_claim", "ThatValue");
33
- let key = await SymmetricEncryption.generateKey();
34
- let time = Date.now();
35
- let token = JsonWebToken.fromClaims("issuer1", 1, key, time + 10000000, [claim1, claim2]).generateToken();
36
- let jwt = JsonWebToken.fromToken("issuer1", 1, key, token);
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
- let claim1 = new Claim("this_claim", "ThisValue");
47
- let claim2 = new Claim("that_claim", "ThatValue");
48
- let key = await SymmetricEncryption.generateKey();
49
- let time = Date.now();
50
- let token = JsonWebToken.fromClaims("issuer1", 1, key, time + 10000000, [claim1, claim2]).generateToken();
51
- let jwt = JsonWebToken.fromToken("issuer1", 1, key, token);
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
- let claim1 = new Claim("this_claim", "ThisValue");
62
- let claim2 = new Claim("that_claim", "ThatValue");
63
- let key = await SymmetricEncryption.generateKey();
64
- let time = Date.now();
65
- let token = JsonWebToken.fromClaims("issuer1", 1, key, time + 10000000, [claim1, claim2]).generateToken();
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
- let claim1 = new Claim("this_claim", "ThisValue");
82
- let claim2 = new Claim("that_claim", "ThatValue");
83
- let key = await SymmetricEncryption.generateKey();
84
- let time = Date.now();
85
- let token = JsonWebToken.fromClaims("issuer1", 1, key, time, [claim1, claim2]).generateToken();
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
- let claim1 = new Claim("this_claim", "ThisValue");
124
- let claim2 = new Claim("that_claim", "ThatValue");
125
- let key = await SymmetricEncryption.generateKey();
126
- let key2 = await SymmetricEncryption.generateKey();
127
- let time = Date.now();
128
- let token = JsonWebToken.fromClaims("issuer1", 1, key, time + 1000000, [claim1, claim2]).generateToken();
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
- let claim1 = new Claim("this_claim", "ThisValue");
145
- let claim2 = new Claim("that_claim", "ThatValue");
146
- let key = await SymmetricEncryption.generateKey();
147
- let time = Date.now();
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
@@ -4,11 +4,11 @@ suite("Other", () =>
4
4
  {
5
5
  test("encoding decoding", () =>
6
6
  {
7
- let text = "moonlight43iuj90/;msdnnksdkdkdk[[[][][";
8
- let encodedText = Buffer.from(text, "utf8").toString("base64");
7
+ const text = "moonlight43iuj90/;msdnnksdkdkdk[[[][][";
8
+ const encodedText = Buffer.from(text, "utf8").toString("base64");
9
9
  Assert.notStrictEqual(encodedText, text);
10
10
 
11
- let decodedText = Buffer.from(encodedText, "base64").toString("utf8");
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
- let key = await SymmetricEncryption.generateKey();
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
- let key1 = await SymmetricEncryption.generateKey();
22
- let key2 = await SymmetricEncryption.generateKey();
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
- let key = "E25B269440F88601C453CD171D76EDDC11D8CF33230742DF8CAD5873D28F78B2";
32
- let value = "password";
33
- let encrypted = await SymmetricEncryption.encrypt(key, value);
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
- let key = await SymmetricEncryption.generateKey();
175
- let value = "password";
176
- let encrypted = await SymmetricEncryption.encrypt(key, value);
177
- let decrypted = SymmetricEncryption.decrypt(key, encrypted);
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": false,
7
- "strictFunctionTypes": false,
8
- "noImplicitThis": false,
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": true,
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
- "plugins": [
22
- {
23
- "name": "typescript-tslint-plugin",
24
- "configFile": "./tslint.json",
25
- "alwaysShowRuleFailuresAsWarnings": false
26
- }
27
- ]
24
+ "pretty": true
28
25
  }
29
26
  }
@@ -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
- }