@northern.tech/testing 0.7.1 → 0.8.1

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 (86) hide show
  1. package/package.json +3 -4
  2. package/dist/baseTestConfig.json +0 -17
  3. package/dist/chunk-4UV4MWUU.js +0 -188
  4. package/dist/chunk-4UV4MWUU.js.map +0 -1
  5. package/dist/chunk-5GIOT4M6.js +0 -161
  6. package/dist/chunk-5GIOT4M6.js.map +0 -1
  7. package/dist/chunk-AQYKNNMJ.js +0 -239
  8. package/dist/chunk-AQYKNNMJ.js.map +0 -1
  9. package/dist/chunk-CT35JRBC.js +0 -893
  10. package/dist/chunk-CT35JRBC.js.map +0 -1
  11. package/dist/chunk-HRGVXWMH.js +0 -17
  12. package/dist/chunk-HRGVXWMH.js.map +0 -1
  13. package/dist/chunk-RG3ICJW5.js +0 -34
  14. package/dist/chunk-RG3ICJW5.js.map +0 -1
  15. package/dist/chunk-ROSMRKMF.js +0 -265
  16. package/dist/chunk-ROSMRKMF.js.map +0 -1
  17. package/dist/chunk-TVJ6K2KG.js +0 -318
  18. package/dist/chunk-TVJ6K2KG.js.map +0 -1
  19. package/dist/chunk-WFNPT672.js +0 -29
  20. package/dist/chunk-WFNPT672.js.map +0 -1
  21. package/dist/mockData.cjs +0 -926
  22. package/dist/mockData.cjs.map +0 -1
  23. package/dist/mockData.d.cts +0 -596
  24. package/dist/mockData.d.ts +0 -596
  25. package/dist/mockData.js +0 -45
  26. package/dist/mockData.js.map +0 -1
  27. package/dist/requestHandlers/deploymentHandlers.cjs +0 -1045
  28. package/dist/requestHandlers/deploymentHandlers.cjs.map +0 -1
  29. package/dist/requestHandlers/deploymentHandlers.d.cts +0 -5
  30. package/dist/requestHandlers/deploymentHandlers.d.ts +0 -5
  31. package/dist/requestHandlers/deploymentHandlers.js +0 -8
  32. package/dist/requestHandlers/deploymentHandlers.js.map +0 -1
  33. package/dist/requestHandlers/deviceHandlers.cjs +0 -1113
  34. package/dist/requestHandlers/deviceHandlers.cjs.map +0 -1
  35. package/dist/requestHandlers/deviceHandlers.d.cts +0 -20
  36. package/dist/requestHandlers/deviceHandlers.d.ts +0 -20
  37. package/dist/requestHandlers/deviceHandlers.js +0 -12
  38. package/dist/requestHandlers/deviceHandlers.js.map +0 -1
  39. package/dist/requestHandlers/monitorHandlers.cjs +0 -835
  40. package/dist/requestHandlers/monitorHandlers.cjs.map +0 -1
  41. package/dist/requestHandlers/monitorHandlers.d.cts +0 -5
  42. package/dist/requestHandlers/monitorHandlers.d.ts +0 -5
  43. package/dist/requestHandlers/monitorHandlers.js +0 -8
  44. package/dist/requestHandlers/monitorHandlers.js.map +0 -1
  45. package/dist/requestHandlers/organizationHandlers.cjs +0 -1086
  46. package/dist/requestHandlers/organizationHandlers.cjs.map +0 -1
  47. package/dist/requestHandlers/organizationHandlers.d.cts +0 -5
  48. package/dist/requestHandlers/organizationHandlers.d.ts +0 -5
  49. package/dist/requestHandlers/organizationHandlers.js +0 -8
  50. package/dist/requestHandlers/organizationHandlers.js.map +0 -1
  51. package/dist/requestHandlers/releaseHandlers.cjs +0 -966
  52. package/dist/requestHandlers/releaseHandlers.cjs.map +0 -1
  53. package/dist/requestHandlers/releaseHandlers.d.cts +0 -5
  54. package/dist/requestHandlers/releaseHandlers.d.ts +0 -5
  55. package/dist/requestHandlers/releaseHandlers.js +0 -8
  56. package/dist/requestHandlers/releaseHandlers.js.map +0 -1
  57. package/dist/requestHandlers/requestHandlers.cjs +0 -1975
  58. package/dist/requestHandlers/requestHandlers.cjs.map +0 -1
  59. package/dist/requestHandlers/requestHandlers.d.cts +0 -5
  60. package/dist/requestHandlers/requestHandlers.d.ts +0 -5
  61. package/dist/requestHandlers/requestHandlers.js +0 -35
  62. package/dist/requestHandlers/requestHandlers.js.map +0 -1
  63. package/dist/requestHandlers/userHandlers.cjs +0 -994
  64. package/dist/requestHandlers/userHandlers.cjs.map +0 -1
  65. package/dist/requestHandlers/userHandlers.d.cts +0 -5
  66. package/dist/requestHandlers/userHandlers.d.ts +0 -5
  67. package/dist/requestHandlers/userHandlers.js +0 -8
  68. package/dist/requestHandlers/userHandlers.js.map +0 -1
  69. package/dist/setupTests.cjs +0 -996
  70. package/dist/setupTests.cjs.map +0 -1
  71. package/dist/setupTests.d.cts +0 -77
  72. package/dist/setupTests.d.ts +0 -77
  73. package/dist/setupTests.js +0 -138
  74. package/dist/setupTests.js.map +0 -1
  75. package/dist/theme/light.cjs +0 -41
  76. package/dist/theme/light.cjs.map +0 -1
  77. package/dist/theme/light.d.cts +0 -12
  78. package/dist/theme/light.d.ts +0 -12
  79. package/dist/theme/light.js +0 -7
  80. package/dist/theme/light.js.map +0 -1
  81. package/dist/utils.cjs +0 -71
  82. package/dist/utils.cjs.map +0 -1
  83. package/dist/utils.d.cts +0 -69
  84. package/dist/utils.d.ts +0 -69
  85. package/dist/utils.js +0 -12
  86. package/dist/utils.js.map +0 -1
@@ -1,966 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/requestHandlers/releaseHandlers.ts
21
- var releaseHandlers_exports = {};
22
- __export(releaseHandlers_exports, {
23
- releaseHandlers: () => releaseHandlers
24
- });
25
- module.exports = __toCommonJS(releaseHandlers_exports);
26
- var import_constants2 = require("@northern.tech/utils/constants");
27
- var import_helpers = require("@northern.tech/utils/helpers");
28
- var import_msw = require("msw");
29
-
30
- // src/mockData.ts
31
- var import_constants = require("@northern.tech/utils/constants");
32
- var TEST_SESSION_DATETIME = "2019-01-13T13:00:00.000Z";
33
- var testDate = new Date(TEST_SESSION_DATETIME);
34
- var mockDate = new Date(testDate.setMilliseconds(testDate.getMilliseconds() + import_constants.maxSessionAge));
35
- var defaultCreationDate = "2019-01-13T06:25:00.000Z";
36
- var defaultMacAddress = "dc:a6:32:12:ad:bf";
37
- var permissionSetObjectTypes = {
38
- any: "Any",
39
- artifacts: "Artifacts",
40
- empty: "",
41
- groups: "Device groups",
42
- releases: "Releases",
43
- tenantManagement: "Tenant management",
44
- userManagement: "User management"
45
- };
46
- var commonEndpoints = {
47
- artifacts: "^/api/management/v1/deployments/artifacts",
48
- artifactDetails: "^/api/management/v1/deployments/artifacts/[^/]+",
49
- deviceManagement: "^/api/management/(v[1-9])/(devauth|inventory)/"
50
- };
51
- var userId = "a30a780b-b843-5344-80e3-0fd95a4f6fc3";
52
- var defaultUser = {
53
- created_ts: "2019-01-01T10:30:00.000Z",
54
- email: "a@b.com",
55
- id: "a1",
56
- roles: ["RBAC_ROLE_PERMIT_ALL"],
57
- tfa_status: "enabled",
58
- verified: true
59
- };
60
- var deviceTypes = { qemu: "qemux86-64" };
61
- var checkInTimeRounded = "2019-01-01T00:00:00.000Z";
62
- var checkInTimeExact = "2019-01-01T10:25:00.000Z";
63
- var mockApiResponses = {
64
- deployments: {
65
- byId: {
66
- d1: {
67
- id: "d1",
68
- name: "test deployment",
69
- created: "2019-01-01T12:30:00.000Z",
70
- devices: {
71
- a1: {
72
- id: "a1",
73
- status: "installing",
74
- attributes: {},
75
- image: { size: 123 }
76
- }
77
- },
78
- statistics: {
79
- status: {
80
- "already-installed": 0,
81
- decommissioned: 0,
82
- downloading: 0,
83
- failure: 0,
84
- installing: 1,
85
- noartifact: 0,
86
- pending: 0,
87
- rebooting: 0,
88
- success: 0
89
- },
90
- total_size: 1234
91
- }
92
- },
93
- d2: {
94
- id: "d2",
95
- name: "test deployment 2",
96
- artifact_name: "r1",
97
- artifacts: ["123"],
98
- created: "2019-01-01T12:25:00.000Z",
99
- device_count: 1,
100
- devices: {
101
- b1: {
102
- attributes: {},
103
- id: "b1",
104
- status: "pending"
105
- }
106
- },
107
- filter: void 0,
108
- group: void 0,
109
- statistics: {
110
- status: {
111
- downloading: 0,
112
- decommissioned: 0,
113
- failure: 0,
114
- installing: 0,
115
- noartifact: 0,
116
- pending: 1,
117
- rebooting: 0,
118
- success: 0,
119
- "already-installed": 0
120
- }
121
- }
122
- },
123
- d3: {
124
- id: "d3",
125
- name: "Test",
126
- phases: [
127
- { id: "0", batch_size: 2, device_count: 2 },
128
- { id: "1", start_ts: "2019-02-04T11:45:10.002Z", batch_size: 3, device_count: 3 },
129
- { id: "2", start_ts: "2019-02-05T11:45:10.002Z", batch_size: 5, device_count: 5 },
130
- { id: "3", start_ts: "2019-02-06T11:45:10.002Z", batch_size: 5, device_count: 5 },
131
- { id: "4", start_ts: "2019-02-21T11:45:10.002Z", batch_size: 5, device_count: 0 }
132
- ],
133
- max_devices: 0,
134
- created: "2019-01-31T12:59:30.020Z",
135
- devices: {},
136
- filter: void 0,
137
- group: void 0,
138
- stats: {
139
- pending: 3,
140
- decommissioned: 0,
141
- failure: 23,
142
- pause_before_committing: 0,
143
- pause_before_rebooting: 0,
144
- installing: 0,
145
- rebooting: 0,
146
- "already-installed": 0,
147
- pause_before_installing: 0,
148
- downloading: 0,
149
- success: 6,
150
- aborted: 0,
151
- noartifact: 0
152
- },
153
- statistics: { total_size: "1234" },
154
- status: "inprogress",
155
- active: true,
156
- device_count: 100,
157
- retries: "0",
158
- type: "software"
159
- }
160
- },
161
- byStatus: {
162
- pending: { deploymentIds: ["d2"] },
163
- inprogress: { deploymentIds: ["d3"] }
164
- }
165
- },
166
- devices: {
167
- byId: {
168
- a1: {
169
- id: "a1",
170
- auth_sets: [
171
- {
172
- id: "auth1",
173
- identity_data: { mac: defaultMacAddress },
174
- pubkey: "-----BEGIN PUBLIC KEY-----\nMIIBojWELzgJ62hcXIhAfqfoNiaB1326XZByZwcnHr5BuSPAgMBAAE=\n-----END PUBLIC KEY-----\n",
175
- status: "accepted",
176
- ts: defaultCreationDate
177
- }
178
- ],
179
- updated_ts: "2019-01-01T09:25:00.000Z"
180
- },
181
- b1: {
182
- id: "b1",
183
- attributes: {
184
- ipv4_wlan0: "192.168.10.141/24",
185
- device_type: [deviceTypes.qemu]
186
- },
187
- system: {
188
- check_in_time: checkInTimeRounded
189
- },
190
- check_in_time: checkInTimeExact,
191
- check_in_time_exact: checkInTimeExact,
192
- check_in_time_rounded: checkInTimeRounded,
193
- identity_data: { mac: defaultMacAddress },
194
- status: "accepted",
195
- decommissioning: false,
196
- created_ts: defaultCreationDate,
197
- updated_ts: "2019-01-01T09:25:00.000Z",
198
- auth_sets: [
199
- {
200
- id: "auth1",
201
- identity_data: { mac: defaultMacAddress },
202
- pubkey: "-----BEGIN PUBLIC KEY-----\nMIIBojWELzgJ62hcXIhAfqfoNiaB1326XZByZwcnHr5BuSPAgMBAAE=\n-----END PUBLIC KEY-----\n",
203
- ts: defaultCreationDate,
204
- status: "accepted"
205
- }
206
- ]
207
- }
208
- },
209
- groups: {
210
- byId: {
211
- testGroup: {
212
- deviceIds: ["a1", "b1"],
213
- filters: [],
214
- total: 2
215
- },
216
- testGroupDynamic: {
217
- id: "filter1",
218
- name: "filter1",
219
- filters: [{ scope: "system", key: "group", operator: "$eq", value: "things" }]
220
- }
221
- }
222
- },
223
- limits: { standard: 500, micro: 0, system: 0 },
224
- byStatus: {
225
- accepted: { deviceIds: ["a1", "b1"], total: 2 },
226
- active: { deviceIds: [], total: 0 },
227
- inactive: { deviceIds: [], total: 0 },
228
- pending: { deviceIds: ["c1"], total: 1 },
229
- preauthorized: { deviceIds: [], total: 0 },
230
- rejected: { deviceIds: [], total: 0 }
231
- }
232
- },
233
- organization: {
234
- organization: {
235
- id: "1",
236
- addons: [],
237
- name: "test",
238
- plan: "os",
239
- trial: false
240
- },
241
- products: [
242
- {
243
- name: "mender_standard",
244
- billing_unit: "devices",
245
- prices: [
246
- {
247
- plan: "os",
248
- constraints: {
249
- min: 50,
250
- max: 1e3,
251
- div: 50
252
- }
253
- },
254
- {
255
- plan: "professional",
256
- constraints: {
257
- min: 250,
258
- max: 1e4,
259
- div: 50
260
- }
261
- }
262
- ],
263
- addons: [
264
- {
265
- name: "troubleshoot",
266
- prices: [{ plan: "os" }, { plan: "professional" }]
267
- },
268
- {
269
- name: "configure",
270
- prices: [{ plan: "os" }, { plan: "professional" }]
271
- },
272
- {
273
- name: "monitor",
274
- prices: [{ plan: "professional" }]
275
- }
276
- ]
277
- },
278
- {
279
- name: "mender_micro",
280
- billing_unit: "devices",
281
- prices: [
282
- {
283
- plan: "os",
284
- constraints: {
285
- min: 50,
286
- max: 5e3,
287
- div: 50
288
- }
289
- },
290
- {
291
- plan: "professional",
292
- constraints: {
293
- min: 500,
294
- max: 1e5,
295
- div: 50
296
- }
297
- }
298
- ]
299
- }
300
- ],
301
- intentId: "testIntent",
302
- auditlog: {
303
- events: [
304
- {
305
- actor: {
306
- id: "string",
307
- type: "user",
308
- email: "string@example.com"
309
- },
310
- time: "2019-01-01T12:10:22.667Z",
311
- action: "create",
312
- object: {
313
- id: "string",
314
- type: "user",
315
- user: {
316
- email: "user@acme.com"
317
- }
318
- },
319
- change: "change1"
320
- },
321
- {
322
- actor: {
323
- id: "string",
324
- type: "user",
325
- email: "string",
326
- identity_data: "string"
327
- },
328
- time: "2019-01-01T12:16:22.667Z",
329
- action: "create",
330
- object: {
331
- id: "string",
332
- type: "deployment",
333
- deployment: {
334
- name: "production",
335
- artifact_name: "Application 0.0.1"
336
- }
337
- },
338
- change: "change2"
339
- },
340
- {
341
- actor: {
342
- id: "string",
343
- type: "user",
344
- email: "string@example.com"
345
- },
346
- time: "2019-01-01T12:10:22.669Z",
347
- action: "open_terminal",
348
- meta: {
349
- session_id: ["abd313a8-ee88-48ab-9c99-fbcd80048e6e"]
350
- },
351
- object: {
352
- id: "a1",
353
- type: "device"
354
- },
355
- change: "change3"
356
- }
357
- ]
358
- }
359
- },
360
- releases: {
361
- byId: {
362
- r1: {
363
- name: "r1",
364
- artifacts: [
365
- {
366
- id: "art1",
367
- description: "test description",
368
- device_types_compatible: [deviceTypes.qemu],
369
- modified: "2020-09-10T12:16:22.667Z",
370
- updates: [{ type_info: { type: "testtype" } }],
371
- artifact_depends: {
372
- device_type: [deviceTypes.qemu]
373
- },
374
- artifact_provides: {
375
- artifact_name: "myapp",
376
- "data-partition.myapp.version": "v2020.10",
377
- list_of_fancy: [deviceTypes.qemu, "x172"]
378
- },
379
- clears_artifact_provides: ["data-partition.myapp.*"]
380
- }
381
- ],
382
- device_types_compatible: [deviceTypes.qemu],
383
- modified: "2020-09-10T12:16:22.667Z",
384
- metaData: {}
385
- }
386
- }
387
- },
388
- users: {
389
- byId: {
390
- a1: defaultUser,
391
- [userId]: { ...defaultUser, id: userId, email: "a2@b.com", created_ts: "2019-01-01T12:30:00.000Z" }
392
- },
393
- rolesById: {
394
- admin: {
395
- name: "admin",
396
- description: "Administrator role",
397
- permissions: []
398
- },
399
- test: { name: "test", description: "test description", permissions: [] }
400
- },
401
- globalSettings: {
402
- "2fa": "enabled",
403
- id_attribute: void 0,
404
- previousFilters: []
405
- },
406
- userSettings: {
407
- "2fa": "disabled",
408
- columnSelection: [],
409
- onboarding: { something: "here" },
410
- tooltips: {},
411
- previousFilters: []
412
- }
413
- }
414
- };
415
- var releasesList = Array.from({ length: 5e3 }, (x, i) => ({
416
- artifacts: [
417
- {
418
- id: "art1",
419
- description: "test description",
420
- device_types_compatible: [deviceTypes.qemu],
421
- modified: "2020-09-10T12:16:22.667Z",
422
- updates: [{ type_info: { type: "testtype" } }],
423
- artifact_depends: {
424
- device_type: [deviceTypes.qemu]
425
- },
426
- artifact_provides: {
427
- artifact_name: "myapp",
428
- "data-partition.myapp.version": "v2020.10",
429
- list_of_fancy: [deviceTypes.qemu, "x172"]
430
- },
431
- clears_artifact_provides: ["data-partition.myapp.*"]
432
- }
433
- ],
434
- device_types_compatible: [deviceTypes.qemu],
435
- metaData: {},
436
- name: `release-${i + 1}`,
437
- modified: i
438
- }));
439
- var permissionSets = [
440
- {
441
- ...import_constants.defaultPermissionSets.Basic,
442
- object: permissionSetObjectTypes.empty,
443
- description: "Set containing basic permissions.",
444
- permissions: [
445
- { action: "http", object: { type: "any", value: "^/api/management/v1/useradm/settings$" } },
446
- { action: "http", object: { type: "any", value: "^/api/management/v1/useradm/users/me$" } },
447
- { action: "http", object: { type: "any", value: "^/api/management/1.0/auth/verify$" } },
448
- { action: "http", object: { type: "PUT", value: "^/api/management/v1/useradm/2faverify$" } },
449
- { action: "http", object: { type: "POST", value: "^/api/management/v1/useradm/users/me/2fa/(enable|disable)$" } },
450
- { action: "http", object: { type: "GET", value: "^/api/management/(v[1-9])/useradm/roles" } },
451
- { action: "http", object: { type: "GET", value: "^/api/management/(v[1-9])/tenantadm/user/tenant" } }
452
- ]
453
- },
454
- {
455
- ...import_constants.defaultPermissionSets.ManageReleases,
456
- action: import_constants.uiPermissionsById.manage.title,
457
- object: permissionSetObjectTypes.releases,
458
- description: "Set of permissions which allows user to manage releases",
459
- permissions: [
460
- { action: "http", object: { type: "GET", value: commonEndpoints.artifacts } },
461
- { action: "http", object: { type: "GET", value: commonEndpoints.artifactDetails } },
462
- { action: "http", object: { type: "PUT", value: commonEndpoints.artifactDetails } },
463
- { action: "http", object: { type: "DELETE", value: commonEndpoints.artifactDetails } },
464
- { action: "http", object: { type: "GET", value: "^/api/management/v1/deployments/artifacts/[^/]+/download" } }
465
- ]
466
- },
467
- {
468
- ...import_constants.defaultPermissionSets.ReadUsers,
469
- action: import_constants.uiPermissionsById.read.title,
470
- object: permissionSetObjectTypes.userManagement,
471
- description: "Set of permissions which allows user to view other users",
472
- permissions: [{ action: "http", object: { type: "GET", value: "^/api/management/(v[1-9])/useradm/" } }]
473
- },
474
- {
475
- ...import_constants.defaultPermissionSets.ManageUsers,
476
- action: import_constants.uiPermissionsById.manage.title,
477
- object: permissionSetObjectTypes.userManagement,
478
- description: "Set of permissions which allows user manage other user accounts",
479
- permissions: [{ action: "http", object: { type: "any", value: "^/api/management/(v[1-9])/useradm/" } }]
480
- },
481
- {
482
- ...import_constants.defaultPermissionSets.ReadTenants,
483
- action: import_constants.uiPermissionsById.read.title,
484
- object: permissionSetObjectTypes.tenantManagement,
485
- description: "Set of permissions which allows user to list other tenants and their config",
486
- permissions: [
487
- { action: "http", object: { type: "GET", value: "^/api/management/(v[1-9])/tenantadm/" } },
488
- { action: "http", object: { type: "POST", value: "^/api/management/(v[1-9])/tenantadm/" } }
489
- ]
490
- },
491
- {
492
- ...import_constants.defaultPermissionSets.ManageTenants,
493
- action: import_constants.uiPermissionsById.manage.title,
494
- object: permissionSetObjectTypes.tenantManagement,
495
- description: "Set of permissions which allows user to manage other tenants and their config",
496
- permissions: [
497
- { action: "http", object: { type: "GET", value: "^/api/management/(v[1-9])/tenantadm/" } },
498
- { action: "http", object: { type: "POST", value: "^/api/management/(v[1-9])/tenantadm/" } },
499
- { action: "http", object: { type: "PUT", value: "^/api/management/(v[1-9])/tenantadm/" } }
500
- ]
501
- },
502
- {
503
- ...import_constants.defaultPermissionSets.ReadAuditLogs,
504
- action: import_constants.uiPermissionsById.read.title,
505
- object: "System Audit Log",
506
- description: "Set of permissions which allows user to view system audit log",
507
- permissions: [{ action: "http", object: { type: "GET", value: "^/api/management/(v[1-9]|0.1.0)/auditlogs/logs" } }]
508
- },
509
- {
510
- ...import_constants.defaultPermissionSets.DeployToDevices,
511
- action: "Deploy",
512
- object: permissionSetObjectTypes.groups,
513
- description: "Set of permissions which allows user to deploy to devices",
514
- permissions: [{ action: "http", object: { type: "any", value: "^/api/management/(v[1-9])/(deployments|deviceconfig)/" } }],
515
- supported_scope_types: [import_constants.scopedPermissionAreas.groups.scopeType]
516
- },
517
- {
518
- ...import_constants.defaultPermissionSets.ConfigureDevices,
519
- action: "Configure",
520
- object: permissionSetObjectTypes.groups,
521
- description: "Set of permissions which allows user to manage configuration of the devices",
522
- permissions: [{ action: "http", object: { type: "any", value: "^/api/management/(v[1-9])/deviceconfig/" } }],
523
- supported_scope_types: [import_constants.scopedPermissionAreas.groups.scopeType]
524
- },
525
- {
526
- ...import_constants.defaultPermissionSets.ConnectToDevices,
527
- action: "Connect",
528
- object: permissionSetObjectTypes.groups,
529
- description: "Set of permissions which allows user to use remote terminal and file transfer",
530
- permissions: [
531
- { action: "http", object: { type: "GET", value: "^/api/management/(v[1-9]|0.1.0)/deviceconnect/devices/[^/]+/connect$" } },
532
- { action: "http", object: { type: "GET", value: "^/api/management/(v[1-9]|0.1.0)/deviceconnect/devices/[^/]+/download\\?path=[^&]+$" } },
533
- { action: "http", object: { type: "PUT", value: "^/api/management/(v[1-9]|0.1.0)/deviceconnect/devices/[^/]+/upload$" } }
534
- ],
535
- supported_scope_types: [import_constants.scopedPermissionAreas.groups.scopeType]
536
- },
537
- {
538
- ...import_constants.defaultPermissionSets.SuperUser,
539
- action: "Any",
540
- object: permissionSetObjectTypes.any,
541
- description: "Set of permissions which allows user to do anything",
542
- permissions: [{ action: "any", object: { type: "any", value: "any" } }]
543
- },
544
- {
545
- ...import_constants.defaultPermissionSets.UploadArtifacts,
546
- action: "Upload",
547
- object: permissionSetObjectTypes.artifacts,
548
- description: "Set of permissions which allows user to upload artifacts",
549
- permissions: [
550
- { action: "http", object: { type: "POST", value: commonEndpoints.artifacts } },
551
- { action: "http", object: { type: "POST", value: "^/api/management/v1/deployments/artifacts/generate" } }
552
- ]
553
- },
554
- {
555
- ...import_constants.defaultPermissionSets.ReadDevices,
556
- action: import_constants.uiPermissionsById.read.title,
557
- object: permissionSetObjectTypes.groups,
558
- description: "Set of permissions which allows user to view devices",
559
- permissions: [
560
- { action: "http", object: { type: "POST", value: "^/api/management/v2/inventory/filters/search" } },
561
- { action: "http", object: { type: "POST", value: "^/api/management/v1/reporting/devices/search" } },
562
- { action: "http", object: { type: "GET", value: "^/api/management/(v[1-9])/(deployments|devauth|inventory|deviceconfig|devicemonitor)/" } },
563
- { action: "http", object: { type: "GET", value: "^/api/management/(v[1-9]|0.1.0)/deviceconnect/devices/[^/]+$" } }
564
- ],
565
- supported_scope_types: [import_constants.scopedPermissionAreas.groups.scopeType]
566
- },
567
- {
568
- ...import_constants.defaultPermissionSets.ManageDevices,
569
- action: import_constants.uiPermissionsById.manage.title,
570
- object: permissionSetObjectTypes.groups,
571
- description: "Set of permissions which allows user to manage devices",
572
- permissions: [
573
- { action: "http", object: { type: "POST", value: commonEndpoints.deviceManagement } },
574
- { action: "http", object: { type: "PUT", value: commonEndpoints.deviceManagement } },
575
- { action: "http", object: { type: "DELETE", value: commonEndpoints.deviceManagement } }
576
- ],
577
- supported_scope_types: [import_constants.scopedPermissionAreas.groups.scopeType]
578
- },
579
- {
580
- ...import_constants.defaultPermissionSets.ReadReleases,
581
- action: import_constants.uiPermissionsById.read.title,
582
- object: permissionSetObjectTypes.releases,
583
- description: "Set of permissions which allows user to view releases",
584
- permissions: [
585
- { action: "http", object: { type: "GET", value: commonEndpoints.artifacts } },
586
- { action: "http", object: { type: "GET", value: commonEndpoints.artifactDetails } },
587
- { action: "http", object: { type: "GET", value: "^/api/management/v1/deployments/artifacts/[^/]+/download" } }
588
- ]
589
- },
590
- {
591
- name: "almostAdmin",
592
- object: permissionSetObjectTypes.empty,
593
- description: "Set containing all the permissions.",
594
- permissions: [
595
- { action: "http", object: { type: "any", value: "^/api/management/(v[1-9])/auditlogs/.*" } },
596
- { action: "http", object: { type: "any", value: "^/api/management/(v[1-9])/deployments/.*" } },
597
- { action: "http", object: { type: "any", value: "^/api/management/(v[1-9])/deployments/config/.*" } },
598
- { action: "http", object: { type: "any", value: "^/api/management/(v[1-9])/deployments/deployments/.*" } },
599
- { action: "http", object: { type: "any", value: "^/api/management/(v[1-9])/deployments/deployments/releases/.*" } },
600
- { action: "http", object: { type: "any", value: "^/api/management/(v[1-9])/devauth/.*" } },
601
- { action: "http", object: { type: "any", value: "^/api/management/(v[1-9])/deviceconfig/.*" } },
602
- { action: "http", object: { type: "any", value: "^/api/management/(v[1-9])/deviceconnect/.*" } },
603
- { action: "http", object: { type: "any", value: "^/api/management/(v[1-9])/deviceconnect/devices" } },
604
- { action: "http", object: { type: "any", value: "^/api/management/(v[1-9])/inventory/.*" } },
605
- { action: "http", object: { type: "any", value: "^/api/management/(v[1-9])/iot-manager/.*" } },
606
- { action: "http", object: { type: "any", value: "^/api/management/(v[1-9])/monitor/.*" } },
607
- { action: "http", object: { type: "any", value: "^/api/management/(v[1-9])/useradm/.*" } }
608
- ]
609
- }
610
- ];
611
- var rbacRoles = [
612
- {
613
- name: "dyn",
614
- description: "",
615
- permissions: [
616
- { action: "CREATE_DEPLOYMENT", object: { type: "DEVICE_GROUP", value: "dyn" } },
617
- { action: "VIEW_DEVICE", object: { type: "DEVICE_GROUP", value: "dyn" } }
618
- ]
619
- },
620
- { name: "asdasd", description: "123", permissions: [{ action: "http", object: { type: "any", value: "/api/management/v1/useradm/.*" } }] },
621
- {
622
- name: "141sasd",
623
- description: "1313adg",
624
- permission_sets_with_scope: [
625
- { ...import_constants.defaultPermissionSets.ReadDevices, scope: { type: import_constants.scopedPermissionAreas.groups.scopeType, value: ["bestgroup"] } },
626
- { ...import_constants.defaultPermissionSets.ConnectToDevices, scope: { type: import_constants.scopedPermissionAreas.groups.scopeType, value: ["bestgroup"] } },
627
- { ...import_constants.defaultPermissionSets.ManageUsers }
628
- ]
629
- },
630
- {
631
- name: "kljlkk",
632
- description: "lkl",
633
- permission_sets_with_scope: [{ ...import_constants.defaultPermissionSets.ConnectToDevices, scope: { type: import_constants.scopedPermissionAreas.groups.scopeType, value: ["bestgroup"] } }]
634
- },
635
- {
636
- name: "yyyyy",
637
- description: "asd",
638
- permission_sets_with_scope: [
639
- { ...import_constants.defaultPermissionSets.ManageDevices, scope: { type: import_constants.scopedPermissionAreas.groups.scopeType, value: ["dockerclient"] } },
640
- { ...import_constants.defaultPermissionSets.ManageReleases }
641
- ]
642
- },
643
- {
644
- name: "RBAC_ROLE_DEPLOYMENTS_MANAGER",
645
- description: "Intended for users responsible for managing deployments, this role can create and abort deployments",
646
- permission_sets_with_scope: [{ ...import_constants.defaultPermissionSets.DeployToDevices }]
647
- },
648
- {
649
- name: "RBAC_ROLE_REMOTE_TERMINAL",
650
- description: `Intended for tech support accounts, this role can access the devices' Remote Terminal.`,
651
- permission_sets_with_scope: [{ ...import_constants.defaultPermissionSets.ConnectToDevices }]
652
- },
653
- { name: "RBAC_ROLE_PERMIT_ALL", description: "", permission_sets_with_scope: [{ ...import_constants.defaultPermissionSets.SuperUser }] },
654
- {
655
- name: "RBAC_ROLE_OBSERVER",
656
- description: "Intended for team leaders or limited tech support accounts, this role can see all Devices, Artifacts and Deployment reports but not make any changes.",
657
- permission_sets_with_scope: [{ ...import_constants.defaultPermissionSets.ReadReleases }, { ...import_constants.defaultPermissionSets.ReadDevices }]
658
- },
659
- {
660
- name: "RBAC_ROLE_CI",
661
- description: "Intended for automation accounts building software (e.g. CI/CD systems), this role can only manage Artifacts, including upload new Artifacts and delete Artifacts. It does not have access to Devices or Deployments.",
662
- permission_sets_with_scope: [
663
- { ...import_constants.defaultPermissionSets.ReadReleases },
664
- { ...import_constants.defaultPermissionSets.ManageReleases },
665
- { ...import_constants.defaultPermissionSets.UploadArtifacts }
666
- ]
667
- },
668
- {
669
- name: "almostAdmin",
670
- description: "almost admin rights",
671
- permissions: permissionSets.find((item) => item.name === "almostAdmin")?.permissions
672
- },
673
- {
674
- name: "almostAdminNew",
675
- description: "almost admin rights",
676
- permission_sets_with_scope: Object.values(import_constants.defaultPermissionSets)
677
- }
678
- ];
679
- var expectedParsedRoles = {
680
- "141sasd": {
681
- editable: true,
682
- isCustom: void 0,
683
- uiPermissions: {
684
- ...import_constants.emptyUiPermissions,
685
- groups: { bestgroup: [import_constants.uiPermissionsById.read.value, import_constants.uiPermissionsById.connect.value] },
686
- userManagement: [import_constants.uiPermissionsById.manage.value]
687
- }
688
- },
689
- asdasd: {
690
- editable: false,
691
- isCustom: true,
692
- uiPermissions: { ...import_constants.emptyUiPermissions, userManagement: [import_constants.uiPermissionsById.read.value, import_constants.uiPermissionsById.manage.value] }
693
- },
694
- dyn: {
695
- editable: false,
696
- isCustom: true,
697
- uiPermissions: {
698
- ...import_constants.emptyUiPermissions,
699
- deployments: [import_constants.uiPermissionsById.deploy.value],
700
- groups: { dyn: [import_constants.uiPermissionsById.read.value, import_constants.uiPermissionsById.deploy.value] }
701
- }
702
- },
703
- kljlkk: {
704
- editable: true,
705
- isCustom: false,
706
- uiPermissions: { ...import_constants.emptyUiPermissions, groups: { bestgroup: [import_constants.uiPermissionsById.read.value, import_constants.uiPermissionsById.connect.value] } }
707
- },
708
- yyyyy: {
709
- editable: true,
710
- isCustom: void 0,
711
- uiPermissions: {
712
- ...import_constants.emptyUiPermissions,
713
- groups: { dockerclient: [import_constants.uiPermissionsById.read.value, import_constants.uiPermissionsById.manage.value] },
714
- releases: { [import_constants.ALL_RELEASES]: [import_constants.uiPermissionsById.manage.value] }
715
- }
716
- },
717
- almostAdmin: {
718
- editable: false,
719
- isCustom: true,
720
- uiPermissions: {
721
- ...import_constants.emptyUiPermissions,
722
- auditlog: [import_constants.uiPermissionsById.read.value],
723
- deployments: [import_constants.uiPermissionsById.manage.value, import_constants.uiPermissionsById.deploy.value, import_constants.uiPermissionsById.read.value],
724
- groups: {
725
- [import_constants.ALL_DEVICES]: [
726
- import_constants.uiPermissionsById.read.value,
727
- // we can't assign deployment permissions to devices here, since the old path based rbac controls don't allow the scoped permissions
728
- // uiPermissionsById.deploy.value,
729
- import_constants.uiPermissionsById.manage.value,
730
- import_constants.uiPermissionsById.connect.value,
731
- import_constants.uiPermissionsById.configure.value
732
- ]
733
- },
734
- releases: {
735
- [import_constants.ALL_RELEASES]: [import_constants.uiPermissionsById.read.value, import_constants.uiPermissionsById.upload.value, import_constants.uiPermissionsById.manage.value]
736
- },
737
- userManagement: [import_constants.uiPermissionsById.read.value, import_constants.uiPermissionsById.manage.value]
738
- }
739
- },
740
- almostAdminNew: {
741
- editable: true,
742
- isCustom: void 0,
743
- uiPermissions: {
744
- ...import_constants.emptyUiPermissions,
745
- auditlog: [import_constants.uiPermissionsById.read.value],
746
- deployments: [import_constants.uiPermissionsById.read.value, import_constants.uiPermissionsById.deploy.value, import_constants.uiPermissionsById.manage.value],
747
- groups: {
748
- [import_constants.ALL_DEVICES]: [
749
- import_constants.uiPermissionsById.read.value,
750
- import_constants.uiPermissionsById.manage.value,
751
- import_constants.uiPermissionsById.deploy.value,
752
- import_constants.uiPermissionsById.connect.value,
753
- import_constants.uiPermissionsById.configure.value
754
- ]
755
- },
756
- releases: {
757
- [import_constants.ALL_RELEASES]: [import_constants.uiPermissionsById.manage.value, import_constants.uiPermissionsById.upload.value, import_constants.uiPermissionsById.read.value]
758
- },
759
- tenantManagement: [import_constants.uiPermissionsById.read.value, import_constants.uiPermissionsById.manage.value],
760
- userManagement: [import_constants.uiPermissionsById.read.value, import_constants.uiPermissionsById.manage.value]
761
- }
762
- }
763
- };
764
- var defaultRolesById = {
765
- ...import_constants.rolesById,
766
- test: {
767
- ...import_constants.emptyRole,
768
- name: "test",
769
- description: "test description",
770
- editable: true,
771
- uiPermissions: {
772
- ...import_constants.emptyUiPermissions,
773
- groups: { testGroup: [import_constants.uiPermissionsById.read.value] },
774
- releases: { bar: [import_constants.uiPermissionsById.read.value] }
775
- }
776
- }
777
- };
778
- var receivedRoles = rbacRoles.reduce(
779
- (accu, role) => {
780
- const { name, description, ...roleRemainder } = role;
781
- if (name.startsWith("RBAC")) {
782
- accu[name] = {
783
- ...defaultRolesById[name],
784
- ...roleRemainder,
785
- editable: false,
786
- isCustom: false,
787
- description: defaultRolesById[name].description ? defaultRolesById[name].description : description
788
- };
789
- } else {
790
- const result = expectedParsedRoles[name] ?? {};
791
- accu[name] = {
792
- ...import_constants.emptyRole,
793
- ...role,
794
- ...result,
795
- name
796
- };
797
- }
798
- return accu;
799
- },
800
- { ...defaultRolesById }
801
- );
802
- var receivedPermissionSets = permissionSets.reduce((accu, set) => {
803
- const result = import_constants.defaultPermissionSets[set.name]?.result ?? {};
804
- accu[set.name] = {
805
- ...set,
806
- result: {
807
- ...import_constants.emptyUiPermissions,
808
- ...result
809
- }
810
- };
811
- return accu;
812
- }, {});
813
-
814
- // src/requestHandlers/releaseHandlers.ts
815
- var deltaJobs = {
816
- "delta-job-1": {
817
- id: "delta-job-1",
818
- to_release: "mender-demo-artifact-3.3.1",
819
- from_release: "mender-demo-artifact-3.2.1",
820
- to_version: "mender-demo-artifact-3.3.1",
821
- from_version: "mender-demo-artifact-3.2.1",
822
- device_types_compatible: ["qemux86-64"],
823
- started: "2022-07-11T20:49:00.000Z",
824
- status: "success"
825
- },
826
- "delta-job-2": {
827
- id: "delta-job-2",
828
- to_release: "mender-demo-artifact-3.3.1",
829
- from_release: "mender-demo-artifact-3.3.0",
830
- to_version: "mender-demo-artifact-3.3.1",
831
- from_version: "mender-demo-artifact-3.3.0",
832
- device_types_compatible: ["raspberrypi0w", "raspberrypi0-wifi", "raspberrypi3", "raspberrypi4"],
833
- started: "2022-07-11T20:49:00.000Z",
834
- status: "failed"
835
- },
836
- "delta-job-3": {
837
- id: "delta-job-3",
838
- to_release: "mender-demo-artifact-3.3.1",
839
- from_release: "mender-demo-artifact-3.3.0",
840
- to_version: "mender-demo-artifact-3.3.1",
841
- from_version: "mender-demo-artifact-3.3.0",
842
- device_types_compatible: ["beaglebone", "beaglebone-yocto", "beaglebone-yocto"],
843
- started: "2022-07-11T20:49:00.000Z",
844
- status: "pending"
845
- },
846
- "delta-job-4": {
847
- id: "delta-job-4",
848
- to_release: "mender-demo-artifact-3.2.0",
849
- from_release: "mender-demo-artifact-3.1.0",
850
- to_version: "mender-demo-artifact-3.2.0",
851
- from_version: "mender-demo-artifact-3.1.0",
852
- device_types_compatible: ["qemux86-64"],
853
- started: "2022-07-10T15:30:00.000Z",
854
- status: "artifact_uploaded"
855
- }
856
- };
857
- var mockDeltaJobDetails = {
858
- "delta-job-1": {
859
- ...deltaJobs["delta-job-1"],
860
- delta_artifact_size: 1024e3,
861
- deployment_id: "d1",
862
- devices_types_compatible: ["qemux86-64"],
863
- exit_code: 0,
864
- log: "Delta generation started at 2022-07-11T20:49:00.000Z\nProcessing artifacts...\nDelta generation completed successfully at 2022-07-11T20:52:15.000Z",
865
- to_artifact_size: 2048e3
866
- },
867
- "delta-job-2": {
868
- ...deltaJobs["delta-job-2"],
869
- delta_artifact_size: null,
870
- deployment_id: "d2",
871
- devices_types_compatible: ["raspberrypi0w", "raspberrypi0-wifi", "raspberrypi3", "raspberrypi4"],
872
- exit_code: 1,
873
- log: "Delta generation started at 2022-07-11T20:49:00.000Z\nError: incompatible artifact types\nDelta generation failed at 2022-07-11T20:51:30.000Z",
874
- to_artifact_size: 3072e3
875
- },
876
- "delta-job-3": {
877
- ...deltaJobs["delta-job-3"],
878
- delta_artifact_size: null,
879
- deployment_id: "d3",
880
- devices_types_compatible: ["beaglebone", "beaglebone-yocto"],
881
- exit_code: null,
882
- log: "Delta generation started at 2022-07-11T20:49:00.000Z\nQueued for processing...",
883
- to_artifact_size: 256e4
884
- },
885
- "delta-job-4": {
886
- ...deltaJobs["delta-job-4"],
887
- delta_artifact_size: 512e3,
888
- deployment_id: "d1",
889
- devices_types_compatible: ["qemux86-64"],
890
- exit_code: 0,
891
- log: "Delta generation started at 2022-07-10T15:30:00.000Z\nProcessing artifacts...\nArtifact uploaded successfully at 2022-07-10T15:45:20.000Z",
892
- to_artifact_size: 1536e3
893
- }
894
- };
895
- var releaseHandlers = [
896
- import_msw.http.get(`${import_constants2.deploymentsApiUrl}/artifacts/:id`, () => new import_msw.HttpResponse(null, { status: 200 })),
897
- import_msw.http.get(`${import_constants2.deploymentsApiUrl}/artifacts/:id/download`, () => import_msw.HttpResponse.json({ uri: "https://testlocation.com/artifact.mender" })),
898
- import_msw.http.delete(
899
- `${import_constants2.deploymentsApiUrl}/artifacts/:id`,
900
- ({ params: { id } }) => new import_msw.HttpResponse(null, { status: id === mockApiResponses.releases.byId.r1.artifacts[0].id ? 200 : 591 })
901
- ),
902
- import_msw.http.put(`${import_constants2.deploymentsApiUrl}/artifacts/:id`, async ({ params: { id }, request }) => {
903
- const { description } = await request.json();
904
- return new import_msw.HttpResponse(null, { status: id === mockApiResponses.releases.byId.r1.artifacts[0].id && description ? 200 : 592 });
905
- }),
906
- import_msw.http.post(
907
- `${import_constants2.deploymentsApiUrl}/artifacts/generate`,
908
- () => new import_msw.HttpResponse(null, {
909
- headers: { [import_constants2.headerNames.location]: `${import_constants2.deploymentsApiUrl}/artifacts/generate/${mockApiResponses.releases.byId.r1.artifacts[0].id}`, status: 201 }
910
- })
911
- ),
912
- import_msw.http.post(`${import_constants2.deploymentsApiUrl}/artifacts`, () => new import_msw.HttpResponse(null, { status: 200 })),
913
- import_msw.http.get(`${import_constants2.deploymentsApiUrlV2}/deployments/releases`, async ({ request }) => {
914
- const { searchParams } = new URL(request.url);
915
- const page = Number(searchParams.get("page"));
916
- const perPage = Number(searchParams.get("per_page"));
917
- if (!page || ![1, 10, 20, 50, 100, 250, 500].includes(perPage)) {
918
- return new import_msw.HttpResponse(null, { status: 593 });
919
- }
920
- if (searchParams.get("device_type")) {
921
- return import_msw.HttpResponse.json([]);
922
- }
923
- if (page == 42) {
924
- return new import_msw.HttpResponse(JSON.stringify([mockApiResponses.releases.byId.r1]), { headers: { [import_constants2.headerNames.total]: 1 } });
925
- }
926
- const sort = searchParams.get("sort");
927
- const releaseListSection = releasesList.sort((0, import_helpers.customSort)(sort.includes(import_constants2.SORTING_OPTIONS.desc), "name")).slice((page - 1) * perPage, page * perPage);
928
- if (page === 1 && perPage === 1 && searchParams.get("name")) {
929
- return import_msw.HttpResponse.json([mockApiResponses.releases.byId.r1]);
930
- }
931
- if (searchParams.get("name")) {
932
- return new import_msw.HttpResponse(JSON.stringify(releaseListSection), { headers: { [import_constants2.headerNames.total]: 1234 } });
933
- }
934
- return new import_msw.HttpResponse(JSON.stringify(releaseListSection), { headers: { [import_constants2.headerNames.total]: releasesList.length } });
935
- }),
936
- import_msw.http.get(`${import_constants2.deploymentsApiUrlV2}/deployments/releases/:name`, () => import_msw.HttpResponse.json(mockApiResponses.releases.byId.r1)),
937
- import_msw.http.get(`${import_constants2.deploymentsApiUrlV2}/releases/all/tags`, () => import_msw.HttpResponse.json(["foo", "bar"])),
938
- import_msw.http.get(`${import_constants2.deploymentsApiUrlV2}/releases/all/types`, () => import_msw.HttpResponse.json(["single-file", "not-this"])),
939
- import_msw.http.put(`${import_constants2.deploymentsApiUrlV2}/deployments/releases/:name/tags`, async ({ params: { name }, request }) => {
940
- const tags = await request.json();
941
- if (name && tags.every((i) => i && i.toString() === i)) {
942
- return new import_msw.HttpResponse(null, { status: 200 });
943
- }
944
- return new import_msw.HttpResponse(null, { status: 593 });
945
- }),
946
- import_msw.http.patch(`${import_constants2.deploymentsApiUrlV2}/deployments/releases/:name`, async ({ params: { name }, request }) => {
947
- const { notes } = await request.json();
948
- return new import_msw.HttpResponse(null, { status: name && notes.length ? 200 : 594 });
949
- }),
950
- import_msw.http.get(`${import_constants2.deploymentsApiUrlV2}/deployments/releases/delta/jobs`, () => {
951
- const jobs = Object.values(deltaJobs);
952
- return new import_msw.HttpResponse(JSON.stringify(jobs), { headers: { [import_constants2.headerNames.total]: jobs.length } });
953
- }),
954
- import_msw.http.get(`${import_constants2.deploymentsApiUrlV2}/deployments/releases/delta/jobs/:jobId`, ({ params: { jobId } }) => {
955
- const jobDetails = mockDeltaJobDetails[jobId];
956
- if (jobDetails) {
957
- return import_msw.HttpResponse.json(jobDetails);
958
- }
959
- return new import_msw.HttpResponse(null, { status: 404 });
960
- })
961
- ];
962
- // Annotate the CommonJS export names for ESM import in node:
963
- 0 && (module.exports = {
964
- releaseHandlers
965
- });
966
- //# sourceMappingURL=releaseHandlers.cjs.map