@ttoss/cloud-auth 0.8.6 → 0.8.9

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.
@@ -1,358 +0,0 @@
1
- TN:
2
- SF:src/config.ts
3
- FNF:0
4
- FNH:0
5
- DA:1,1
6
- LF:1
7
- LH:1
8
- BRF:0
9
- BRH:0
10
- end_of_record
11
- TN:
12
- SF:src/index.ts
13
- FNF:0
14
- FNH:0
15
- DA:1,1
16
- DA:2,1
17
- LF:2
18
- LH:2
19
- BRDA:1,0,0,2
20
- BRDA:1,1,0,1
21
- BRDA:1,2,0,0
22
- BRDA:1,3,0,1
23
- BRDA:1,4,0,0
24
- BRDA:1,5,0,0
25
- BRDA:1,6,0,1
26
- BRF:7
27
- BRH:4
28
- end_of_record
29
- TN:
30
- SF:src/template.ts
31
- FN:22,createAuthTemplate
32
- FNF:1
33
- FNH:1
34
- FNDA:12,createAuthTemplate
35
- DA:1,1
36
- DA:2,1
37
- DA:3,1
38
- DA:4,1
39
- DA:5,1
40
- DA:6,1
41
- DA:7,1
42
- DA:8,1
43
- DA:9,1
44
- DA:10,1
45
- DA:11,1
46
- DA:12,1
47
- DA:13,1
48
- DA:14,1
49
- DA:15,1
50
- DA:16,1
51
- DA:17,1
52
- DA:18,1
53
- DA:19,1
54
- DA:20,1
55
- DA:21,1
56
- DA:22,1
57
- DA:23,12
58
- DA:24,12
59
- DA:25,12
60
- DA:26,12
61
- DA:27,12
62
- DA:28,12
63
- DA:29,12
64
- DA:30,12
65
- DA:31,12
66
- DA:32,12
67
- DA:33,12
68
- DA:34,12
69
- DA:35,12
70
- DA:36,12
71
- DA:37,12
72
- DA:38,12
73
- DA:39,12
74
- DA:40,12
75
- DA:41,12
76
- DA:42,12
77
- DA:43,12
78
- DA:44,12
79
- DA:45,12
80
- DA:46,12
81
- DA:47,12
82
- DA:48,12
83
- DA:49,12
84
- DA:50,12
85
- DA:51,12
86
- DA:52,12
87
- DA:53,12
88
- DA:54,12
89
- DA:55,12
90
- DA:56,9
91
- DA:57,12
92
- DA:58,12
93
- DA:59,12
94
- DA:60,12
95
- DA:61,12
96
- DA:62,12
97
- DA:63,12
98
- DA:64,12
99
- DA:65,12
100
- DA:66,12
101
- DA:67,12
102
- DA:68,12
103
- DA:69,12
104
- DA:70,12
105
- DA:71,12
106
- DA:72,12
107
- DA:73,12
108
- DA:74,12
109
- DA:75,12
110
- DA:76,12
111
- DA:77,12
112
- DA:78,12
113
- DA:79,12
114
- DA:80,12
115
- DA:81,12
116
- DA:82,12
117
- DA:83,12
118
- DA:84,12
119
- DA:85,12
120
- DA:86,12
121
- DA:87,12
122
- DA:88,12
123
- DA:89,12
124
- DA:90,12
125
- DA:91,12
126
- DA:92,12
127
- DA:93,12
128
- DA:94,12
129
- DA:95,12
130
- DA:96,12
131
- DA:97,12
132
- DA:98,12
133
- DA:99,12
134
- DA:100,12
135
- DA:101,12
136
- DA:102,12
137
- DA:103,12
138
- DA:104,12
139
- DA:105,12
140
- DA:106,12
141
- DA:107,12
142
- DA:108,12
143
- DA:109,12
144
- DA:110,12
145
- DA:111,12
146
- DA:112,12
147
- DA:113,12
148
- DA:114,12
149
- DA:115,12
150
- DA:116,12
151
- DA:117,12
152
- DA:118,12
153
- DA:119,12
154
- DA:120,12
155
- DA:121,12
156
- DA:122,12
157
- DA:123,12
158
- DA:124,12
159
- DA:125,12
160
- DA:126,12
161
- DA:127,12
162
- DA:128,12
163
- DA:129,12
164
- DA:130,12
165
- DA:131,12
166
- DA:132,12
167
- DA:133,12
168
- DA:134,12
169
- DA:135,1
170
- DA:136,1
171
- DA:137,1
172
- DA:138,1
173
- DA:139,0
174
- DA:140,0
175
- DA:141,0
176
- DA:142,0
177
- DA:143,0
178
- DA:144,1
179
- DA:145,1
180
- DA:146,1
181
- DA:147,1
182
- DA:148,1
183
- DA:149,1
184
- DA:150,1
185
- DA:151,1
186
- DA:152,1
187
- DA:153,1
188
- DA:154,1
189
- DA:155,1
190
- DA:156,1
191
- DA:157,1
192
- DA:158,1
193
- DA:159,1
194
- DA:160,1
195
- DA:161,1
196
- DA:162,1
197
- DA:163,1
198
- DA:164,1
199
- DA:165,1
200
- DA:166,1
201
- DA:167,12
202
- DA:168,12
203
- DA:169,2
204
- DA:170,2
205
- DA:171,2
206
- DA:172,2
207
- DA:173,2
208
- DA:174,2
209
- DA:175,2
210
- DA:176,2
211
- DA:177,2
212
- DA:178,2
213
- DA:179,2
214
- DA:180,2
215
- DA:181,2
216
- DA:182,2
217
- DA:183,2
218
- DA:184,2
219
- DA:185,2
220
- DA:186,2
221
- DA:187,2
222
- DA:188,2
223
- DA:189,2
224
- DA:190,2
225
- DA:191,2
226
- DA:192,2
227
- DA:193,2
228
- DA:194,2
229
- DA:195,2
230
- DA:196,2
231
- DA:197,2
232
- DA:198,2
233
- DA:199,2
234
- DA:200,2
235
- DA:201,2
236
- DA:202,2
237
- DA:203,2
238
- DA:204,2
239
- DA:205,2
240
- DA:206,2
241
- DA:207,2
242
- DA:208,2
243
- DA:209,2
244
- DA:210,2
245
- DA:211,2
246
- DA:212,2
247
- DA:213,2
248
- DA:214,2
249
- DA:215,2
250
- DA:216,2
251
- DA:217,2
252
- DA:218,2
253
- DA:219,2
254
- DA:220,2
255
- DA:221,2
256
- DA:222,2
257
- DA:223,2
258
- DA:224,2
259
- DA:225,2
260
- DA:226,2
261
- DA:227,2
262
- DA:228,2
263
- DA:229,2
264
- DA:230,2
265
- DA:231,2
266
- DA:232,2
267
- DA:233,2
268
- DA:234,2
269
- DA:235,2
270
- DA:236,2
271
- DA:237,2
272
- DA:238,2
273
- DA:239,2
274
- DA:240,2
275
- DA:241,2
276
- DA:242,2
277
- DA:243,2
278
- DA:244,2
279
- DA:245,2
280
- DA:246,2
281
- DA:247,2
282
- DA:248,2
283
- DA:249,2
284
- DA:250,2
285
- DA:251,2
286
- DA:252,2
287
- DA:253,2
288
- DA:254,2
289
- DA:255,2
290
- DA:256,2
291
- DA:257,2
292
- DA:258,2
293
- DA:259,2
294
- DA:260,2
295
- DA:261,2
296
- DA:262,2
297
- DA:263,2
298
- DA:264,2
299
- DA:265,2
300
- DA:266,2
301
- DA:267,2
302
- DA:268,2
303
- DA:269,2
304
- DA:270,2
305
- DA:271,2
306
- DA:272,2
307
- DA:273,2
308
- DA:274,2
309
- DA:275,2
310
- DA:276,2
311
- DA:277,2
312
- DA:278,2
313
- DA:279,2
314
- DA:280,2
315
- DA:281,2
316
- DA:282,2
317
- DA:283,2
318
- DA:284,0
319
- DA:285,0
320
- DA:286,2
321
- DA:287,2
322
- DA:288,2
323
- DA:289,2
324
- DA:290,2
325
- DA:291,2
326
- DA:292,2
327
- DA:293,2
328
- DA:294,2
329
- DA:295,2
330
- DA:296,2
331
- DA:297,2
332
- DA:298,2
333
- DA:299,2
334
- DA:300,2
335
- DA:301,2
336
- DA:302,12
337
- DA:303,12
338
- DA:304,12
339
- DA:305,1
340
- DA:306,1
341
- DA:307,1
342
- DA:308,1
343
- DA:309,1
344
- LF:309
345
- LH:302
346
- BRDA:22,0,0,12
347
- BRDA:55,1,0,10
348
- BRDA:56,2,0,9
349
- BRDA:57,3,0,3
350
- BRDA:134,4,0,1
351
- BRDA:168,5,0,4
352
- BRDA:168,6,0,2
353
- BRDA:283,7,0,0
354
- BRDA:135,8,0,1
355
- BRDA:138,9,0,0
356
- BRF:10
357
- BRH:8
358
- end_of_record
package/jest.config.ts DELETED
@@ -1,5 +0,0 @@
1
- import { jestConfig } from '@ttoss/config';
2
-
3
- const config = jestConfig({});
4
-
5
- export default config;
@@ -1,100 +0,0 @@
1
- import { createAuthTemplate } from '../../src';
2
-
3
- describe('user pool', () => {
4
- test('do not add schema if not provided', () => {
5
- const template = createAuthTemplate();
6
- expect(
7
- template.Resources.CognitoUserPool.Properties.Schema
8
- ).toBeUndefined();
9
- });
10
-
11
- test('add schema if provided', () => {
12
- const schema = [
13
- {
14
- attributeDataType: 'String' as const,
15
- developerOnlyAttribute: false,
16
- mutable: true,
17
- name: 'email',
18
- required: true,
19
- stringAttributeConstraints: {
20
- maxLength: '2048',
21
- minLength: '0',
22
- },
23
- },
24
- ];
25
-
26
- const template = createAuthTemplate({ schema });
27
- expect(template.Resources.CognitoUserPool.Properties.Schema).toEqual([
28
- {
29
- AttributeDataType: 'String',
30
- DeveloperOnlyAttribute: false,
31
- Mutable: true,
32
- Name: 'email',
33
- Required: true,
34
- StringAttributeConstraints: {
35
- MaxLength: '2048',
36
- MinLength: '0',
37
- },
38
- },
39
- ]);
40
- });
41
-
42
- test('should have autoVerifiedAttributes equal email by default', () => {
43
- const template = createAuthTemplate();
44
- expect(
45
- template.Resources.CognitoUserPool.Properties.AutoVerifiedAttributes
46
- ).toEqual(['email']);
47
- });
48
-
49
- test('default usernameAttributes should be email', () => {
50
- const template = createAuthTemplate();
51
- expect(
52
- template.Resources.CognitoUserPool.Properties.UsernameAttributes
53
- ).toEqual(['email']);
54
- });
55
-
56
- test.each([[], null, false])(
57
- 'should have autoVerifiedAttributes undefined: %p',
58
- (autoVerifiedAttributes: any) => {
59
- const template = createAuthTemplate({ autoVerifiedAttributes });
60
- expect(
61
- template.Resources.CognitoUserPool.Properties.AutoVerifiedAttributes
62
- ).toEqual([]);
63
- }
64
- );
65
-
66
- test('should retain user pool', () => {
67
- const template = createAuthTemplate();
68
- expect(template.Resources.CognitoUserPool.DeletionPolicy).toEqual('Retain');
69
- });
70
- });
71
-
72
- describe('identity pool', () => {
73
- test.each([false, undefined])(
74
- 'should not have identity pool by default or false: %p',
75
- (enabled) => {
76
- const template = createAuthTemplate({ identityPool: { enabled } });
77
- expect(template.Resources.CognitoIdentityPool).not.toBeDefined();
78
- expect(template.Outputs?.IdentityPoolId).not.toBeDefined();
79
- }
80
- );
81
-
82
- test('should have identity pool if false', () => {
83
- const template = createAuthTemplate({
84
- identityPool: {
85
- enabled: true,
86
- },
87
- });
88
- expect(template.Resources.CognitoIdentityPool).toBeDefined();
89
- expect(template.Outputs?.IdentityPoolId).toBeDefined();
90
- });
91
-
92
- test('should have identity pool role attachment', () => {
93
- const template = createAuthTemplate({
94
- identityPool: {
95
- enabled: true,
96
- },
97
- });
98
- expect(template.Resources.CognitoIdentityPoolRoleAttachment).toBeDefined();
99
- });
100
- });
package/tsconfig.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "extends": "@ttoss/config/tsconfig.json"
3
- }
package/tsup.config.ts DELETED
@@ -1,3 +0,0 @@
1
- import { tsupConfig } from '@ttoss/config';
2
-
3
- export const tsup = tsupConfig({});