rty-test-cli-package 1.0.2 → 1.0.3

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/forge.config.js DELETED
@@ -1,667 +0,0 @@
1
- module.exports = ({ mode, env }) => {
2
- const generateName = (name) => {
3
- let prefix = '';
4
-
5
- if (process.env.ENV_NAME !== 'production') {
6
- prefix = ADDON_PREFIX || '';
7
- }
8
-
9
- return `${prefix} ${name}`.trim();
10
- };
11
-
12
-
13
- const FORGE_APP_ID = process.env.TF_VAR_forge_app_id || process.env.FORGE_APP_ID;
14
- const BASE_URL = process.env.TF_VAR_base_url || process.env.BASE_URL;
15
- const ADDON_KEY = process.env.TF_VAR_addon_key || process.env.ADDON_KEY;
16
- const ADDON_PREFIX = process.env.TF_VAR_addon_name || process.env.ADDON_PREFIX;
17
- const LICENSE_DISABLED = process.env.TF_VAR_license_disable || process.env.LICENSE_DISABLED;
18
- const ANALYTICS_GTM_ENABLED = process.env.ANALYTICS_GTM_ENABLED;
19
- const ANALYTICS_ACCOIL_ENABLED = process.env.ANALYTICS_ACCOIL_ENABLED;
20
- const PAGE_ICON = 'resource:global-page;assets/images/tis-color.svg';
21
-
22
- return {
23
- app: {
24
- id: `ari:cloud:ecosystem::app/${FORGE_APP_ID}`,
25
- connect: {
26
- key: ADDON_KEY,
27
- remote: 'connect',
28
- authentication: 'jwt'
29
- },
30
- runtime: {
31
- name: 'nodejs20.x'
32
- },
33
- licensing: {
34
- enabled: LICENSE_DISABLED !== 'true',
35
- editionsEnabled: LICENSE_DISABLED !== 'true'
36
- },
37
- "storage": {
38
- "entities": [
39
- {
40
- "name": "work-schedules",
41
- "attributes": {
42
- "id": { "type": "string" },
43
- "name": { "type": "string" },
44
- "createdBy": { "type": "string" },
45
- "updatedBy": { "type": "string" },
46
- "createdAt": { "type": "string" },
47
- "updatedAt": { "type": "string" },
48
- "schedule": { "type": "any" },
49
- },
50
- "indexes": [
51
- "name"
52
- ]
53
- },
54
- {
55
- "name": "custom-fields",
56
- "attributes": {
57
- "fieldId": {
58
- "type": "string"
59
- },
60
- "boardId": {
61
- "type": "integer"
62
- },
63
- "workScheduleId": {
64
- "type": "string"
65
- },
66
- "statusIds": {
67
- "type": "any"
68
- },
69
- "trashed": {
70
- "type": "boolean"
71
- },
72
- "createdAt": {
73
- "type": "string"
74
- },
75
- "createdBy": {
76
- "type": "string"
77
- },
78
- "version": {
79
- "type": "integer"
80
- }
81
- },
82
- "indexes": [
83
- "fieldId",
84
- "boardId",
85
- "trashed"
86
- ]
87
- },
88
- {
89
- "name": "presets",
90
- "attributes": {
91
- "id": {
92
- "type": "string"
93
- },
94
- "name": {
95
- "type": "string"
96
- },
97
- "reportConfig": {
98
- "type": "any"
99
- },
100
- "createdBy": {
101
- "type": "string"
102
- },
103
- "updatedAt": {
104
- "type": "string"
105
- },
106
- "createdAt": {
107
- "type": "string"
108
- },
109
- "isPublic": {
110
- "type": "boolean"
111
- }
112
- },
113
- "indexes": [
114
- "createdBy",
115
- "isPublic",
116
- "name"
117
- ]
118
- },
119
- {
120
- "name": "shared-reports",
121
- "attributes": {
122
- "id": {
123
- "type": "string"
124
- },
125
- "reportConfig": {
126
- "type": "any"
127
- },
128
- "createdBy": {
129
- "type": "string"
130
- },
131
- "createdAt": {
132
- "type": "string"
133
- },
134
- "lastVisit": {
135
- "type": "string"
136
- }
137
- }
138
- },
139
- {
140
- "name": "permissions",
141
- "attributes": {
142
- "key": {
143
- "type": "string"
144
- },
145
- "operator": {
146
- "type": "string"
147
- },
148
- "groups": {
149
- "type": "any"
150
- },
151
- "updatedAt": {
152
- "type": "string"
153
- },
154
- "updatedBy": {
155
- "type": "string"
156
- }
157
- },
158
- "indexes": [
159
- "key",
160
- "operator",
161
- "updatedBy"
162
- ]
163
- }
164
- ]
165
- }
166
- },
167
- remotes: [
168
- {
169
- key: 'connect',
170
- baseUrl: BASE_URL,
171
- operations: [
172
- 'storage',
173
- 'compute'
174
- ],
175
- auth: {
176
- appSystemToken: {
177
- enabled: true
178
- },
179
- appUserToken: {
180
- enabled: true
181
- }
182
- },
183
- storage: {
184
- inScopeEUD: true
185
- }
186
- }
187
- ],
188
- modules: {
189
- "trigger": [
190
- {
191
- "key": "app-lifecycle",
192
- "function": "lifecycle",
193
- "events": [
194
- "avi:forge:installed:app",
195
- "avi:forge:upgraded:app"
196
- ],
197
- },
198
- {
199
- "key": "custom-field-triggers",
200
- "function": "cf-triggers",
201
- "events": [
202
- "avi:jira:deleted:field",
203
- "avi:jira:restored:field",
204
- "avi:jira:trashed:field",
205
- "avi:jira-software:deleted:board"
206
- ],
207
- "filter": {
208
- "ignoreSelf": true,
209
- "onError": "RECEIVE_AND_LOG"
210
- }
211
- },
212
- // Commented out: issue update trigger temporarily disabled
213
- // {
214
- // "key": "cf-issue-updated",
215
- // "function": "cf-triggers",
216
- // "events": [
217
- // "avi:jira:updated:issue"
218
- // ],
219
- // "filter": {
220
- // "ignoreSelf": true,
221
- // "expression": "!!event.associatedStatuses\n",
222
- // "onError": "RECEIVE_AND_LOG"
223
- // }
224
- // }
225
- ],
226
- "scheduledTrigger": [
227
- {
228
- "key": "cf-hourly-trigger",
229
- "function": "cf-recompute",
230
- "interval": "hour"
231
- }
232
- ],
233
- "consumer": [
234
- {
235
- "key": "cf-queue",
236
- "queue": "cf-process-queue",
237
- "function": "cf-compute"
238
- }
239
- ],
240
- "jira:customFieldType": [
241
- {
242
- "key": "tis-custom-field-type",
243
- "name": "Time in status field type",
244
- "description": "A custom field that shows a time in status.",
245
- "icon": "resource:custom-fields;assets/tis-color.svg",
246
- "type": "number",
247
- "readOnly": true,
248
- "view": {
249
- "experience": [
250
- "issue-view"
251
- ],
252
- "value": {
253
- "function": "cf-issue-opened"
254
- },
255
- "formatter": {
256
- "expression": "let days = (value - value % 86400) / 86400;\nlet hours = ((value % 86400) - value % 3600) / 3600;\n\ndays > 0 && hours > 0\n ? `${days}d ${hours}h`\n : days > 0\n ? `${days}d`\n : `${hours}h`\n"
257
- }
258
- },
259
- "edit": {
260
- "parser": {
261
- "expression": "let dMatch = value.match(\"([0-9]+)\\s*d\");\nlet hMatch = value.match(\"([0-9]+)\\s*h\");\n\nlet days = dMatch ? Number(dMatch[1]) : 0;\nlet hours = hMatch ? Number(hMatch[1]) : 0;\n\ndays * 86400 + hours * 3600\n"
262
- }
263
- }
264
- }
265
- ],
266
- 'jira:dashboardGadget': [
267
- {
268
- key: 'status-distribution-gadget',
269
- resource: 'project-burnup',
270
- resolver: {
271
- function: 'resolver'
272
- },
273
- title: generateName('Burndown Status Tracker'),
274
- description: 'Keep work flowing. Visualize status trends over time and jump straight to the matching work items.',
275
- thumbnail: 'resource:project-burnup;assets/images/dashboard-thumbnail.svg',
276
- },
277
- ],
278
- 'jira:boardAction': [
279
- {
280
- key: 'custom-fields',
281
- resource: 'custom-fields',
282
- viewportSize: 'medium',
283
- resolver: {
284
- function: 'resolver'
285
- },
286
- title: `${ADDON_PREFIX} Agile Board`,
287
- tooltip: `${ADDON_PREFIX} Agile Board`,
288
- icon: 'resource:custom-fields;assets/tis-color.svg',
289
- displayConditions: {
290
- canAdministerJira: true,
291
- jiraExpression: 'project.style != \'next-gen\'',
292
- }
293
- },
294
- ],
295
- "jira:projectPage": [
296
- {
297
- key: "sprint-report-project-page",
298
- resource: "sprint-report",
299
- resolver: {
300
- function: 'resolver'
301
- },
302
- title: `${`${ADDON_PREFIX} `}Sprint Performance Report`,
303
- layout: "blank",
304
- icon: 'resource:sprint-report;assets/tis-color.svg',
305
- }
306
- ],
307
- 'jira:adminPage': [
308
- {
309
- key: 'tis-get-started',
310
- resource: 'get-started',
311
- title: generateName('Get started'),
312
- useAsGetStarted: true,
313
- layout: 'blank',
314
- resolver: {
315
- function: 'resolver'
316
- },
317
- conditions: [
318
- 'user_is_logged_in'
319
- ]
320
- }
321
- ],
322
- 'jira:globalPage': [
323
- {
324
- key: 'global-page',
325
- resource: 'global-page',
326
- title: ADDON_PREFIX,
327
- layout: 'blank',
328
- icon: PAGE_ICON,
329
- pages: [
330
- {
331
- title: 'Main page',
332
- route: '/main',
333
- icon: PAGE_ICON,
334
- },
335
- {
336
- title: 'Work Schedule',
337
- route: '/work-schedule',
338
- icon: PAGE_ICON,
339
- },
340
- {
341
- title: 'Permissions',
342
- route: '/permissions',
343
- icon: PAGE_ICON,
344
- }
345
- ],
346
- resolver: {
347
- function: 'resolver'
348
- },
349
- conditions: [
350
- 'user_is_logged_in'
351
- ]
352
- }
353
- ],
354
- 'jira:issueActivity': [
355
- {
356
- key: 'activity-tab',
357
- title: ADDON_PREFIX,
358
- resource: 'activity-tab',
359
- resolver: {
360
- function: 'resolver'
361
- },
362
- displayConditions: {
363
- isLoggedIn: true,
364
- },
365
- }
366
- ],
367
- function: [
368
- {
369
- key: 'resolver',
370
- handler: 'index.handler'
371
- },
372
- {
373
- "key": "cf-triggers",
374
- "handler": "index.customFieldTriggers"
375
- },
376
- {
377
- "key": "cf-issue-opened",
378
- "handler": "index.issueOpened"
379
- },
380
- {
381
- "key": "cf-recompute",
382
- "handler": "index.recomputeCustomField"
383
- },
384
- {
385
- "key": "cf-compute",
386
- "handler": "index.computeCustomField",
387
- "timeoutSeconds": 900
388
- },
389
- {
390
- "key": "calc-flagged-tis-fn",
391
- "handler": "index.calculateFlaggedStatusTime"
392
- },
393
- {
394
- "key": "lifecycle",
395
- "handler": "index.lifecycle"
396
- }
397
- ],
398
- action: [
399
- {
400
- "key": "calc-flagged-tis",
401
- "name": "Calculate Flagged Status Time",
402
- "function": "calc-flagged-tis-fn",
403
- "actionVerb": "GET",
404
- "description": "Calculate the time work items spent in each status while flagged",
405
- "inputs": {
406
- "jql": {
407
- "title": "JQL Query",
408
- "type": "string",
409
- "required": false,
410
- "description": "JQL query to filter work items"
411
- },
412
- "filterId": {
413
- "title": "Filter Id",
414
- "type": "string",
415
- "required": false,
416
- "description": "Filter Id to filter work items"
417
- },
418
- "filterName": {
419
- "title": "Filter Name",
420
- "type": "string",
421
- "required": false,
422
- "description": "Filter Name to filter work items"
423
- },
424
- "from": {
425
- "title": "From Date",
426
- "type": "string",
427
- "required": false,
428
- "description": "Start date (ISO 8601)"
429
- },
430
- "to": {
431
- "title": "To Date",
432
- "type": "string",
433
- "required": false,
434
- "description": "End date (ISO 8601)"
435
- },
436
- "timezone": {
437
- "title": "Timezone",
438
- "type": "string",
439
- "required": false,
440
- "description": "IANA timezone (e.g., America/New_York)"
441
- },
442
- "excludedStatuses": {
443
- "title": "Excluded Statuses (CSV)",
444
- "type": "string",
445
- "required": false,
446
- "description": "Comma-separated list of statuses to exclude"
447
- },
448
- "targetStatuses": {
449
- "title": "Target Statuses (CSV)",
450
- "type": "string",
451
- "required": false,
452
- "description": "Comma-separated list of statuses to include"
453
- },
454
- "maxResults": {
455
- "title": "Max Results",
456
- "type": "integer",
457
- "required": false,
458
- "description": "Maximum number of issues to process"
459
- }
460
- }
461
- }
462
- ],
463
- "rovo:agent": [
464
- {
465
- key: "time-in-status-agent",
466
- name: `FlagFocus by ${ADDON_PREFIX}`,
467
- icon: "resource:forge-static;rovo-agent-logo.svg",
468
- description:
469
- "From overview to action: totals, breakdowns, and takeaways that help teams unstick flagged work quickly.",
470
- prompt: `resource:rovoPrompts;flaggedAgent/prompt.txt`,
471
- conversationStarters: [
472
- "Tell me about yourself",
473
- "Count flagged work items for the last 30 days",
474
- "What’s the flagged time for today?"
475
- ],
476
- actions: ["calc-flagged-tis"]
477
- }
478
- ]
479
- },
480
- resources: [
481
- {
482
- key: 'custom-fields',
483
- path: '../custom-fields/dist',
484
- tunnel: {
485
- port: 3002
486
- }
487
- },
488
- {
489
- key: 'forge-static',
490
- path: 'static',
491
- },
492
- {
493
- key: 'global-page',
494
- path: '../global-page/dist',
495
- tunnel: {
496
- port: 3003
497
- }
498
- },
499
- {
500
- key: 'get-started',
501
- path: '../get-started/dist',
502
- tunnel: {
503
- port: 3001
504
- }
505
- },
506
- {
507
- key: "sprint-report",
508
- path: '../sprint-report/dist',
509
- tunnel: {
510
- port: 5173
511
- }
512
- },
513
- {
514
- key: "rovoPrompts",
515
- path: './rovo',
516
- },
517
- {
518
- key: 'activity-tab',
519
- path: '../activity-tab/dist',
520
- tunnel: {
521
- port: 3005
522
- }
523
- },
524
- {
525
- key: 'project-burnup',
526
- path: '../dashboard-project-burnup/dist',
527
- tunnel: {
528
- port: 3004
529
- }
530
- },
531
- ],
532
- connectModules: {
533
- 'jira:lifecycle': [
534
- {
535
- key: 'lifecycle-events',
536
- installed: '/installed?v=3.32.0',
537
- uninstalled: '/uninstalled'
538
- }
539
- ],
540
- 'jira:jiraDashboardItems': [
541
- {
542
- name: {
543
- value: generateName('Accurate Time in Status'),
544
- },
545
- url: '/dashboard-gadget-tis?dashboard={dashboard.id}&dashboardItem={dashboardItem.id}',
546
- cacheable: true,
547
- key: 'dashboard-gadget-tis',
548
- description: {
549
- value: 'Track time issues spend in each status. Identify delays with charts and lists. Boost efficiency now.'
550
- },
551
- thumbnailUrl: '/images/dashboard-thumbnail.svg',
552
- configurable: true,
553
- conditions: [
554
- {
555
- condition: 'user_is_logged_in'
556
- }
557
- ]
558
- }
559
- ],
560
- 'jira:webhooks': [
561
- {
562
- event: 'board_deleted',
563
- url: '/webhooks',
564
- key: 'webhook-1'
565
- },
566
- {
567
- event: 'sprint_closed',
568
- url: '/webhooks',
569
- key: 'webhook-2'
570
- },
571
- {
572
- event: 'board_configuration_changed',
573
- url: '/webhooks',
574
- key: 'webhook-3'
575
- }
576
- ],
577
- 'jira:generalPages': [
578
- {
579
- key: 'tis-access-settings',
580
- location: 'admin_plugins_menu/example-menu-section',
581
- name: {
582
- value: generateName('Time in Status Permissions'),
583
- },
584
- url: '/configuration-access',
585
- conditions: [
586
- {
587
- condition: 'user_is_logged_in'
588
- }
589
- ]
590
- },
591
- {
592
- key: 'tis-calendar-settings',
593
- location: 'admin_plugins_menu/example-menu-section',
594
- name: {
595
- value: generateName('Time in Status Work Calendars'),
596
- },
597
- url: '/configuration-calendar',
598
- conditions: [
599
- {
600
- condition: 'user_is_logged_in'
601
- }
602
- ]
603
- },
604
- {
605
- key: 'get-started',
606
- location: 'admin_plugins_menu/example-menu-section',
607
- name: {
608
- value: generateName('Get started'),
609
- },
610
- url: '/pages/get-started',
611
- conditions: [
612
- {
613
- condition: 'user_is_logged_in'
614
- }
615
- ]
616
- }
617
- ],
618
- 'jira:webSections': [
619
- {
620
- key: 'example-menu-section',
621
- location: 'admin_plugins_menu',
622
- name: {
623
- value: ADDON_PREFIX
624
- }
625
- },
626
- ]
627
- },
628
- permissions: {
629
- scopes: {
630
- "read:board-scope.admin:jira-software": {
631
- "allowImpersonation": true
632
- },
633
- "read:project:jira": {
634
- "allowImpersonation": true
635
- },
636
- "read:board-scope:jira-software": {
637
- "allowImpersonation": true
638
- },
639
- "read:issue-details:jira": {
640
- "allowImpersonation": true
641
- },
642
- "manage:jira-configuration": {},
643
- "read:app-system-token": {},
644
- "read:app-user-token": {},
645
- "read:jira-user": {},
646
- "read:jira-work": {},
647
- "read:chat:rovo": {},
648
- "read:sprint:jira-software": {},
649
- "storage:app": {},
650
- "write:app-data:jira": {},
651
- "write:board-scope:jira-software": {},
652
- "write:jira-work": {},
653
- "write:project:jira": {},
654
- "write:sprint:jira-software": {},
655
-
656
- "read:connect-jira": {},
657
- "act-as-user:connect-jira": {},
658
- "write:connect-jira": {},
659
- },
660
- content: {
661
- styles: [
662
- 'unsafe-inline'
663
- ]
664
- },
665
- }
666
- };
667
- }