@oneuptime/common 9.2.18 → 9.2.21
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/Server/Services/AIService.ts +1 -1
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +78 -1
- package/Server/Utils/Workspace/Slack/Slack.ts +80 -1
- package/Tests/Server/API/BaseAPI.test.ts +9 -4
- package/Tests/Server/Middleware/ProjectAuthorization.test.ts +133 -162
- package/Tests/Server/Services/ProbeService.test.ts +91 -784
- package/Tests/Server/Services/ScheduledMaintenanceService.test.ts +131 -112
- package/Tests/Server/Services/TeamMemberService.test.ts +87 -1343
- package/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.ts +18 -9
- package/Tests/Server/Utils/Cookie.test.ts +10 -2
- package/Tests/Types/HashedString.test.ts +52 -8
- package/Tests/UI/Components/404.test.tsx +10 -15
- package/Tests/UI/Components/Breadcrumbs.test.tsx +6 -2
- package/Tests/UI/Components/Button.test.tsx +12 -12
- package/Tests/UI/Components/Card.test.tsx +4 -2
- package/Tests/UI/Components/ConfirmModal.test.tsx +1 -1
- package/Tests/UI/Components/Dropdown.test.tsx +37 -4
- package/Tests/UI/Components/DuplicateModel.test.tsx +49 -45
- package/Tests/UI/Components/FilePicker.test.tsx +258 -178
- package/Tests/UI/Components/List.test.tsx +3 -1
- package/Tests/UI/Components/MarkdownEditor.test.tsx +6 -5
- package/Tests/UI/Components/MasterPage.test.tsx +1 -1
- package/Tests/UI/Components/Modal.test.tsx +5 -5
- package/Tests/UI/Components/NavBar.test.tsx +14 -1
- package/Tests/UI/Components/OrderedStatesList.test.tsx +1 -1
- package/Tests/UI/Components/Pagination.test.tsx +6 -2
- package/Tests/Utils/API.test.ts +133 -11
- package/Tests/__mocks__/azure.js +2 -0
- package/Tests/__mocks__/botbuilder-stdlib.js +2 -0
- package/Tests/__mocks__/botbuilder.js +10 -0
- package/Tests/__mocks__/locter.js +5 -0
- package/Tests/__mocks__/otpauth.js +30 -0
- package/Tests/__mocks__/simplewebauthn.js +34 -0
- package/Tests/__mocks__/styleMock.js +1 -0
- package/Tests/__mocks__/uuid.js +31 -0
- package/Tests/__mocks__/yaml.js +11 -0
- package/Tests/jest.setup.ts +14 -0
- package/UI/Components/AI/AITemplates.ts +226 -0
- package/UI/Components/AI/GenerateFromAIModal.tsx +21 -270
- package/build/dist/Server/Services/AIService.js +1 -1
- package/build/dist/Server/Services/AIService.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +59 -2
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Slack.js +61 -1
- package/build/dist/Server/Utils/Workspace/Slack/Slack.js.map +1 -1
- package/build/dist/Tests/Server/API/BaseAPI.test.js +7 -2
- package/build/dist/Tests/Server/API/BaseAPI.test.js.map +1 -1
- package/build/dist/Tests/Server/Middleware/ProjectAuthorization.test.js +89 -101
- package/build/dist/Tests/Server/Middleware/ProjectAuthorization.test.js.map +1 -1
- package/build/dist/Tests/Server/Services/ProbeService.test.js +95 -687
- package/build/dist/Tests/Server/Services/ProbeService.test.js.map +1 -1
- package/build/dist/Tests/Server/Services/ScheduledMaintenanceService.test.js +108 -89
- package/build/dist/Tests/Server/Services/ScheduledMaintenanceService.test.js.map +1 -1
- package/build/dist/Tests/Server/Services/TeamMemberService.test.js +85 -924
- package/build/dist/Tests/Server/Services/TeamMemberService.test.js.map +1 -1
- package/build/dist/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.js +14 -9
- package/build/dist/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.js.map +1 -1
- package/build/dist/Tests/Server/Utils/Cookie.test.js +10 -4
- package/build/dist/Tests/Server/Utils/Cookie.test.js.map +1 -1
- package/build/dist/Tests/Types/HashedString.test.js +39 -6
- package/build/dist/Tests/Types/HashedString.test.js.map +1 -1
- package/build/dist/Tests/UI/Components/404.test.js +10 -10
- package/build/dist/Tests/UI/Components/404.test.js.map +1 -1
- package/build/dist/Tests/UI/Components/Breadcrumbs.test.js +6 -2
- package/build/dist/Tests/UI/Components/Breadcrumbs.test.js.map +1 -1
- package/build/dist/Tests/UI/Components/Button.test.js +12 -12
- package/build/dist/Tests/UI/Components/Card.test.js +4 -2
- package/build/dist/Tests/UI/Components/Card.test.js.map +1 -1
- package/build/dist/Tests/UI/Components/ConfirmModal.test.js +1 -1
- package/build/dist/Tests/UI/Components/ConfirmModal.test.js.map +1 -1
- package/build/dist/Tests/UI/Components/Dropdown.test.js +19 -3
- package/build/dist/Tests/UI/Components/Dropdown.test.js.map +1 -1
- package/build/dist/Tests/UI/Components/DuplicateModel.test.js +46 -41
- package/build/dist/Tests/UI/Components/DuplicateModel.test.js.map +1 -1
- package/build/dist/Tests/UI/Components/FilePicker.test.js +210 -117
- package/build/dist/Tests/UI/Components/FilePicker.test.js.map +1 -1
- package/build/dist/Tests/UI/Components/List.test.js +3 -1
- package/build/dist/Tests/UI/Components/List.test.js.map +1 -1
- package/build/dist/Tests/UI/Components/MarkdownEditor.test.js +6 -5
- package/build/dist/Tests/UI/Components/MarkdownEditor.test.js.map +1 -1
- package/build/dist/Tests/UI/Components/MasterPage.test.js +1 -1
- package/build/dist/Tests/UI/Components/MasterPage.test.js.map +1 -1
- package/build/dist/Tests/UI/Components/Modal.test.js +5 -5
- package/build/dist/Tests/UI/Components/Modal.test.js.map +1 -1
- package/build/dist/Tests/UI/Components/NavBar.test.js +13 -1
- package/build/dist/Tests/UI/Components/NavBar.test.js.map +1 -1
- package/build/dist/Tests/UI/Components/OrderedStatesList.test.js +1 -1
- package/build/dist/Tests/UI/Components/OrderedStatesList.test.js.map +1 -1
- package/build/dist/Tests/UI/Components/Pagination.test.js +6 -2
- package/build/dist/Tests/UI/Components/Pagination.test.js.map +1 -1
- package/build/dist/Tests/Utils/API.test.js +100 -9
- package/build/dist/Tests/Utils/API.test.js.map +1 -1
- package/build/dist/Tests/jest.setup.js +13 -0
- package/build/dist/Tests/jest.setup.js.map +1 -0
- package/build/dist/UI/Components/AI/AITemplates.js +218 -0
- package/build/dist/UI/Components/AI/AITemplates.js.map +1 -0
- package/build/dist/UI/Components/AI/GenerateFromAIModal.js +5 -238
- package/build/dist/UI/Components/AI/GenerateFromAIModal.js.map +1 -1
- package/jest.config.json +18 -1
- package/package.json +1 -1
|
@@ -1,253 +1,20 @@
|
|
|
1
1
|
import React, { useState, useEffect, } from "react";
|
|
2
2
|
import Modal, { ModalWidth } from "../Modal/Modal";
|
|
3
3
|
import AILoader from "./AILoader";
|
|
4
|
-
import
|
|
4
|
+
import Alert, { AlertType } from "../Alerts/Alert";
|
|
5
5
|
import ButtonType from "../Button/ButtonTypes";
|
|
6
6
|
import { ButtonStyleType } from "../Button/Button";
|
|
7
7
|
import IconProp from "../../../Types/Icon/IconProp";
|
|
8
8
|
import Dropdown from "../Dropdown/Dropdown";
|
|
9
9
|
import MarkdownEditor from "../Markdown.tsx/MarkdownEditor";
|
|
10
|
-
// Default hardcoded templates for incident postmortem
|
|
11
|
-
const POSTMORTEM_TEMPLATES = [
|
|
12
|
-
{
|
|
13
|
-
id: "default-standard",
|
|
14
|
-
name: "Standard Postmortem",
|
|
15
|
-
content: `## Executive Summary
|
|
16
|
-
[Brief overview of the incident, its impact, and resolution]
|
|
17
|
-
|
|
18
|
-
## Incident Timeline
|
|
19
|
-
| Time | Event |
|
|
20
|
-
|------|-------|
|
|
21
|
-
| [Time] | [Event description] |
|
|
22
|
-
|
|
23
|
-
## Root Cause Analysis
|
|
24
|
-
[Detailed analysis of what caused the incident]
|
|
25
|
-
|
|
26
|
-
## Impact Assessment
|
|
27
|
-
- **Duration**: [How long the incident lasted]
|
|
28
|
-
- **Users Affected**: [Number or percentage of affected users]
|
|
29
|
-
- **Services Affected**: [List of affected services]
|
|
30
|
-
|
|
31
|
-
## Resolution
|
|
32
|
-
[Steps taken to resolve the incident]
|
|
33
|
-
|
|
34
|
-
## Action Items
|
|
35
|
-
- [ ] [Action item 1]
|
|
36
|
-
- [ ] [Action item 2]
|
|
37
|
-
- [ ] [Action item 3]
|
|
38
|
-
|
|
39
|
-
## Lessons Learned
|
|
40
|
-
[Key takeaways and improvements identified]`,
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
id: "default-detailed",
|
|
44
|
-
name: "Detailed Technical Postmortem",
|
|
45
|
-
content: `## Incident Overview
|
|
46
|
-
**Incident Title**: [Title]
|
|
47
|
-
**Severity**: [P1/P2/P3/P4]
|
|
48
|
-
**Duration**: [Start time] - [End time]
|
|
49
|
-
**Authors**: [Names]
|
|
50
|
-
|
|
51
|
-
## Summary
|
|
52
|
-
[2-3 sentence summary of the incident]
|
|
53
|
-
|
|
54
|
-
## Detection
|
|
55
|
-
- **How was the incident detected?** [Monitoring alert / Customer report / etc.]
|
|
56
|
-
- **Time to detection**: [Duration from start to detection]
|
|
57
|
-
|
|
58
|
-
## Timeline
|
|
59
|
-
| Timestamp | Action | Owner |
|
|
60
|
-
|-----------|--------|-------|
|
|
61
|
-
| [Time] | [What happened] | [Who did it] |
|
|
62
|
-
|
|
63
|
-
## Root Cause
|
|
64
|
-
### Primary Cause
|
|
65
|
-
[Detailed explanation of the root cause]
|
|
66
|
-
|
|
67
|
-
### Contributing Factors
|
|
68
|
-
1. [Factor 1]
|
|
69
|
-
2. [Factor 2]
|
|
70
|
-
|
|
71
|
-
## Impact
|
|
72
|
-
### Customer Impact
|
|
73
|
-
[Description of how customers were affected]
|
|
74
|
-
|
|
75
|
-
### Business Impact
|
|
76
|
-
[Description of business consequences]
|
|
77
|
-
|
|
78
|
-
### Technical Impact
|
|
79
|
-
[Systems and services affected]
|
|
80
|
-
|
|
81
|
-
## Mitigation & Resolution
|
|
82
|
-
### Immediate Actions
|
|
83
|
-
[Steps taken to stop the bleeding]
|
|
84
|
-
|
|
85
|
-
### Permanent Fix
|
|
86
|
-
[Long-term solution implemented]
|
|
87
|
-
|
|
88
|
-
## Prevention
|
|
89
|
-
### What Went Well
|
|
90
|
-
- [Item 1]
|
|
91
|
-
- [Item 2]
|
|
92
|
-
|
|
93
|
-
### What Went Wrong
|
|
94
|
-
- [Item 1]
|
|
95
|
-
- [Item 2]
|
|
96
|
-
|
|
97
|
-
### Where We Got Lucky
|
|
98
|
-
- [Item 1]
|
|
99
|
-
|
|
100
|
-
## Action Items
|
|
101
|
-
| Action | Owner | Priority | Due Date |
|
|
102
|
-
|--------|-------|----------|----------|
|
|
103
|
-
| [Action] | [Name] | [High/Medium/Low] | [Date] |
|
|
104
|
-
|
|
105
|
-
## Appendix
|
|
106
|
-
[Any additional technical details, logs, or graphs]`,
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
id: "default-brief",
|
|
110
|
-
name: "Brief Postmortem",
|
|
111
|
-
content: `## What Happened
|
|
112
|
-
[Concise description of the incident]
|
|
113
|
-
|
|
114
|
-
## Why It Happened
|
|
115
|
-
[Root cause explanation]
|
|
116
|
-
|
|
117
|
-
## How We Fixed It
|
|
118
|
-
[Resolution steps]
|
|
119
|
-
|
|
120
|
-
## How We Prevent It
|
|
121
|
-
- [ ] [Prevention action 1]
|
|
122
|
-
- [ ] [Prevention action 2]`,
|
|
123
|
-
},
|
|
124
|
-
];
|
|
125
|
-
// Default templates for public notes (customer-facing)
|
|
126
|
-
const PUBLIC_NOTE_TEMPLATES = [
|
|
127
|
-
{
|
|
128
|
-
id: "public-status-update",
|
|
129
|
-
name: "Status Update",
|
|
130
|
-
content: `## Current Status
|
|
131
|
-
[Brief description of the current situation]
|
|
132
|
-
|
|
133
|
-
## What We're Doing
|
|
134
|
-
[Actions being taken to resolve the issue]
|
|
135
|
-
|
|
136
|
-
## Next Update
|
|
137
|
-
[Expected time for next update or resolution]`,
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
id: "public-resolution",
|
|
141
|
-
name: "Resolution Notice",
|
|
142
|
-
content: `## Issue Resolved
|
|
143
|
-
[Brief description of what was resolved]
|
|
144
|
-
|
|
145
|
-
## Summary
|
|
146
|
-
[What happened and how it was fixed]
|
|
147
|
-
|
|
148
|
-
## Prevention
|
|
149
|
-
[Steps taken to prevent recurrence]
|
|
150
|
-
|
|
151
|
-
Thank you for your patience.`,
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
id: "public-maintenance",
|
|
155
|
-
name: "Maintenance Update",
|
|
156
|
-
content: `## Maintenance Status
|
|
157
|
-
[Current phase of the maintenance]
|
|
158
|
-
|
|
159
|
-
## Progress
|
|
160
|
-
[What has been completed]
|
|
161
|
-
|
|
162
|
-
## Remaining Work
|
|
163
|
-
[What still needs to be done]
|
|
164
|
-
|
|
165
|
-
## Expected Completion
|
|
166
|
-
[Estimated completion time]`,
|
|
167
|
-
},
|
|
168
|
-
];
|
|
169
|
-
// Default templates for internal notes (team-facing)
|
|
170
|
-
const INTERNAL_NOTE_TEMPLATES = [
|
|
171
|
-
{
|
|
172
|
-
id: "internal-investigation",
|
|
173
|
-
name: "Investigation Update",
|
|
174
|
-
content: `## Current Investigation Status
|
|
175
|
-
[What we're looking at]
|
|
176
|
-
|
|
177
|
-
## Findings So Far
|
|
178
|
-
- [Finding 1]
|
|
179
|
-
- [Finding 2]
|
|
180
|
-
|
|
181
|
-
## Hypothesis
|
|
182
|
-
[Current theory about the root cause]
|
|
183
|
-
|
|
184
|
-
## Next Steps
|
|
185
|
-
- [ ] [Action 1]
|
|
186
|
-
- [ ] [Action 2]`,
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
id: "internal-technical",
|
|
190
|
-
name: "Technical Analysis",
|
|
191
|
-
content: `## Technical Details
|
|
192
|
-
[Detailed technical observations]
|
|
193
|
-
|
|
194
|
-
## Metrics/Logs
|
|
195
|
-
[Relevant metrics or log entries]
|
|
196
|
-
|
|
197
|
-
## Impact Assessment
|
|
198
|
-
[Technical impact analysis]
|
|
199
|
-
|
|
200
|
-
## Recommendations
|
|
201
|
-
[Technical recommendations for resolution]`,
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
id: "internal-handoff",
|
|
205
|
-
name: "Shift Handoff",
|
|
206
|
-
content: `## Current State
|
|
207
|
-
[Where things stand now]
|
|
208
|
-
|
|
209
|
-
## Actions Taken
|
|
210
|
-
[What has been done so far]
|
|
211
|
-
|
|
212
|
-
## Open Questions
|
|
213
|
-
[Things that still need investigation]
|
|
214
|
-
|
|
215
|
-
## Immediate Priorities
|
|
216
|
-
- [ ] [Priority 1]
|
|
217
|
-
- [ ] [Priority 2]
|
|
218
|
-
|
|
219
|
-
## Contacts
|
|
220
|
-
[Key people involved or to contact]`,
|
|
221
|
-
},
|
|
222
|
-
];
|
|
223
|
-
// Function to get default templates based on note type
|
|
224
|
-
const getDefaultTemplates = (noteType) => {
|
|
225
|
-
switch (noteType) {
|
|
226
|
-
case "postmortem":
|
|
227
|
-
return POSTMORTEM_TEMPLATES;
|
|
228
|
-
case "public-note":
|
|
229
|
-
return PUBLIC_NOTE_TEMPLATES;
|
|
230
|
-
case "internal-note":
|
|
231
|
-
return INTERNAL_NOTE_TEMPLATES;
|
|
232
|
-
default:
|
|
233
|
-
return POSTMORTEM_TEMPLATES;
|
|
234
|
-
}
|
|
235
|
-
};
|
|
236
10
|
const GenerateFromAIModal = (props) => {
|
|
237
11
|
var _a;
|
|
238
|
-
// Get default templates based on note type
|
|
239
|
-
const defaultTemplates = getDefaultTemplates(props.noteType || "postmortem");
|
|
240
12
|
const [isGenerating, setIsGenerating] = useState(false);
|
|
241
13
|
const [error, setError] = useState("");
|
|
242
|
-
const [selectedTemplateId, setSelectedTemplateId] = useState(((_a =
|
|
14
|
+
const [selectedTemplateId, setSelectedTemplateId] = useState(((_a = props.templates[0]) === null || _a === void 0 ? void 0 : _a.id) || "");
|
|
243
15
|
const [templateContent, setTemplateContent] = useState("");
|
|
244
|
-
// Combine default templates with custom templates
|
|
245
|
-
const allTemplates = [
|
|
246
|
-
...defaultTemplates,
|
|
247
|
-
...(props.templates || []),
|
|
248
|
-
];
|
|
249
16
|
// Build dropdown options
|
|
250
|
-
const templateOptions =
|
|
17
|
+
const templateOptions = props.templates.map((template) => {
|
|
251
18
|
return {
|
|
252
19
|
label: template.name,
|
|
253
20
|
value: template.id,
|
|
@@ -256,7 +23,7 @@ const GenerateFromAIModal = (props) => {
|
|
|
256
23
|
// Update template content when selection changes
|
|
257
24
|
useEffect(() => {
|
|
258
25
|
if (selectedTemplateId) {
|
|
259
|
-
const selectedTemplate =
|
|
26
|
+
const selectedTemplate = props.templates.find((t) => {
|
|
260
27
|
return t.id === selectedTemplateId;
|
|
261
28
|
});
|
|
262
29
|
setTemplateContent((selectedTemplate === null || selectedTemplate === void 0 ? void 0 : selectedTemplate.content) || "");
|
|
@@ -297,7 +64,7 @@ const GenerateFromAIModal = (props) => {
|
|
|
297
64
|
}
|
|
298
65
|
}, submitButtonText: isGenerating ? "Generating..." : "Generate with AI", submitButtonStyleType: ButtonStyleType.PRIMARY, submitButtonType: ButtonType.Button, isLoading: isGenerating, disableSubmitButton: isGenerating, onSubmit: handleGenerate, modalWidth: ModalWidth.Large, icon: IconProp.Bolt },
|
|
299
66
|
React.createElement(React.Fragment, null,
|
|
300
|
-
error && React.createElement(
|
|
67
|
+
error && (React.createElement(Alert, { type: AlertType.DANGER, strongTitle: "Error", title: error, className: "mb-4" })),
|
|
301
68
|
isGenerating && React.createElement(AILoader, null),
|
|
302
69
|
!isGenerating && (React.createElement("div", { className: "space-y-4" },
|
|
303
70
|
React.createElement("div", null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenerateFromAIModal.js","sourceRoot":"","sources":["../../../../../UI/Components/AI/GenerateFromAIModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAGZ,QAAQ,EACR,SAAS,GACV,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,
|
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BACE,+BAAO,SAAS,EAAC,8CAA8C,uBAEvD;oBACR,2BAAG,SAAS,EAAC,4BAA4B,gFAGrC;oBACJ,6BAAK,SAAS,EAAC,EAAE;wBACf,oBAAC,cAAc,IACb,GAAG,EAAE,kBAAkB,EACvB,YAAY,EAAE,eAAe,EAC7B,QAAQ,EAAE,CAAC,KAAa,EAAE,EAAE;gCAC1B,kBAAkB,CAAC,KAAK,CAAC,CAAC;4BAC5B,CAAC,EACD,WAAW,EAAC,qBAAqB,GACjC,CACE,CACF,CACP,CACG,CACP,CACA,CACG,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
package/jest.config.json
CHANGED
|
@@ -15,7 +15,18 @@
|
|
|
15
15
|
"<rootDir>/build/dist"
|
|
16
16
|
],
|
|
17
17
|
"moduleNameMapper": {
|
|
18
|
-
"Common/(.*)": "<rootDir>/$1"
|
|
18
|
+
"Common/(.*)": "<rootDir>/$1",
|
|
19
|
+
"\\.(css|less|scss|sass)$": "<rootDir>/Tests/__mocks__/styleMock.js",
|
|
20
|
+
"^uuid$": "<rootDir>/Tests/__mocks__/uuid.js",
|
|
21
|
+
"^locter$": "<rootDir>/Tests/__mocks__/locter.js",
|
|
22
|
+
"^yaml$": "<rootDir>/Tests/__mocks__/yaml.js",
|
|
23
|
+
"^otpauth$": "<rootDir>/Tests/__mocks__/otpauth.js",
|
|
24
|
+
"^@simplewebauthn/server$": "<rootDir>/Tests/__mocks__/simplewebauthn.js",
|
|
25
|
+
"^botbuilder$": "<rootDir>/Tests/__mocks__/botbuilder.js",
|
|
26
|
+
"^botbuilder-core$": "<rootDir>/Tests/__mocks__/botbuilder.js",
|
|
27
|
+
"^botbuilder-stdlib$": "<rootDir>/Tests/__mocks__/botbuilder-stdlib.js",
|
|
28
|
+
"^botframework-connector$": "<rootDir>/Tests/__mocks__/botbuilder.js",
|
|
29
|
+
"^@azure/(.*)$": "<rootDir>/Tests/__mocks__/azure.js"
|
|
19
30
|
},
|
|
20
31
|
"moduleFileExtensions": [
|
|
21
32
|
"ts",
|
|
@@ -26,7 +37,13 @@
|
|
|
26
37
|
"transform": {
|
|
27
38
|
".(ts|tsx)": "ts-jest"
|
|
28
39
|
},
|
|
40
|
+
"transformIgnorePatterns": [
|
|
41
|
+
"node_modules/(?!(uuid|locter|yaml|@azure)/)"
|
|
42
|
+
],
|
|
29
43
|
"testEnvironment": "jsdom",
|
|
44
|
+
"setupFilesAfterEnv": [
|
|
45
|
+
"<rootDir>/Tests/jest.setup.ts"
|
|
46
|
+
],
|
|
30
47
|
"collectCoverage": false,
|
|
31
48
|
"coverageReporters": [
|
|
32
49
|
"text",
|