vita-playwright 0.1.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.
- package/.prettierrc +9 -0
- package/README.md +617 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/src/helpers/api-helpers.d.ts +5 -0
- package/dist/src/helpers/api-helpers.js +52 -0
- package/dist/src/helpers/api-helpers.js.map +1 -0
- package/dist/src/helpers/ui-helpers.d.ts +24 -0
- package/dist/src/helpers/ui-helpers.js +172 -0
- package/dist/src/helpers/ui-helpers.js.map +1 -0
- package/dist/src/utils/api_axios.d.ts +5 -0
- package/dist/src/utils/api_axios.js +35 -0
- package/dist/src/utils/api_axios.js.map +1 -0
- package/dist/src/utils/azure_storage_methods.d.ts +4 -0
- package/dist/src/utils/azure_storage_methods.js +130 -0
- package/dist/src/utils/azure_storage_methods.js.map +1 -0
- package/dist/src/utils/comparisions.d.ts +12 -0
- package/dist/src/utils/comparisions.js +98 -0
- package/dist/src/utils/comparisions.js.map +1 -0
- package/dist/src/utils/date_utilitites.d.ts +9 -0
- package/dist/src/utils/date_utilitites.js +30 -0
- package/dist/src/utils/date_utilitites.js.map +1 -0
- package/dist/src/utils/document_utility.d.ts +8 -0
- package/dist/src/utils/document_utility.js +77 -0
- package/dist/src/utils/document_utility.js.map +1 -0
- package/dist/src/utils/email_sender.d.ts +14 -0
- package/dist/src/utils/email_sender.js +58 -0
- package/dist/src/utils/email_sender.js.map +1 -0
- package/dist/src/utils/keyvault_methods.d.ts +3 -0
- package/dist/src/utils/keyvault_methods.js +30 -0
- package/dist/src/utils/keyvault_methods.js.map +1 -0
- package/dist/src/utils/lighhouse_utility.d.ts +12 -0
- package/dist/src/utils/lighhouse_utility.js +132 -0
- package/dist/src/utils/lighhouse_utility.js.map +1 -0
- package/dist/src/utils/test_data.d.ts +9 -0
- package/dist/src/utils/test_data.js +142 -0
- package/dist/src/utils/test_data.js.map +1 -0
- package/dist/src/utils/xmlToJson.d.ts +3 -0
- package/dist/src/utils/xmlToJson.js +57 -0
- package/dist/src/utils/xmlToJson.js.map +1 -0
- package/index.ts +25 -0
- package/package.json +58 -0
- package/src/helpers/api-helpers.ts +38 -0
- package/src/helpers/ui-helpers.ts +148 -0
- package/src/utils/api_axios.ts +16 -0
- package/src/utils/azure_storage_methods.ts +171 -0
- package/src/utils/comparisions.ts +99 -0
- package/src/utils/date_utilitites.ts +39 -0
- package/src/utils/document_utility.ts +81 -0
- package/src/utils/email_sender.ts +36 -0
- package/src/utils/keyvault_methods.ts +15 -0
- package/src/utils/lighhouse_utility.ts +123 -0
- package/src/utils/test_data.ts +121 -0
- package/src/utils/xmlToJson.ts +41 -0
- package/tsconfig.json +106 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TokenGenerators } from './api_axios';
|
|
2
|
+
|
|
3
|
+
export class KeyVaultMethods {
|
|
4
|
+
static async getSecrets(secretName: any) {
|
|
5
|
+
const keyvault = `${process.env.subscription}conm${process.env.env}${process.env.locationshortcut}securekv`;
|
|
6
|
+
const token = await TokenGenerators.generateKeyVaultAccessToken();
|
|
7
|
+
const config = {
|
|
8
|
+
method: 'get',
|
|
9
|
+
url: `https://${keyvault}.vault.azure.net/secrets/${secretName}?api-version=2016-10-01`,
|
|
10
|
+
headers: { Authorization: `Bearer ${token}` },
|
|
11
|
+
};
|
|
12
|
+
const response = await TokenGenerators.request(config);
|
|
13
|
+
return response.data;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import lighthouseDesktopConfig from 'lighthouse/lighthouse-core/config/lr-desktop-config';
|
|
2
|
+
import lighthouseMobileConfig from 'lighthouse/lighthouse-core/config/lr-mobile-config';
|
|
3
|
+
import { playAudit } from 'playwright-lighthouse';
|
|
4
|
+
import fs from 'fs';
|
|
5
|
+
|
|
6
|
+
export class LightHouseUtility {
|
|
7
|
+
static async auditLightHouse(
|
|
8
|
+
pageurl: string,
|
|
9
|
+
deviceType,
|
|
10
|
+
filename,
|
|
11
|
+
customThresholds = {
|
|
12
|
+
performance: 80,
|
|
13
|
+
accessibility: 70,
|
|
14
|
+
'best-practices': 70,
|
|
15
|
+
seo: 70,
|
|
16
|
+
pwa: 70,
|
|
17
|
+
},
|
|
18
|
+
format = { html: true }
|
|
19
|
+
) {
|
|
20
|
+
deviceType =
|
|
21
|
+
deviceType === 'mobile'
|
|
22
|
+
? lighthouseMobileConfig
|
|
23
|
+
: lighthouseDesktopConfig;
|
|
24
|
+
const options = {
|
|
25
|
+
loglevel: 'info',
|
|
26
|
+
};
|
|
27
|
+
await playAudit({
|
|
28
|
+
url: pageurl,
|
|
29
|
+
opts: options,
|
|
30
|
+
config: deviceType,
|
|
31
|
+
thresholds: customThresholds,
|
|
32
|
+
ignoreError: true,
|
|
33
|
+
port: 9222,
|
|
34
|
+
reports: {
|
|
35
|
+
formats: format,
|
|
36
|
+
name: filename,
|
|
37
|
+
directory: `${process.cwd()}/lighthouse/pages/`,
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
static async createLightHouseReport(
|
|
43
|
+
dirPath: string,
|
|
44
|
+
savefilepath: string,
|
|
45
|
+
applicationName
|
|
46
|
+
) {
|
|
47
|
+
let str = ``;
|
|
48
|
+
let sno = 0;
|
|
49
|
+
fs.readdir(dirPath, (err, filenames) => {
|
|
50
|
+
if (err) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
filenames.forEach((file) => {
|
|
54
|
+
sno = sno + 1;
|
|
55
|
+
str =
|
|
56
|
+
str +
|
|
57
|
+
'<tr class="center"><td> ' +
|
|
58
|
+
sno +
|
|
59
|
+
' </td><td>' +
|
|
60
|
+
file.split('.')[0] +
|
|
61
|
+
'</td><td>\n<iframe src="./' +
|
|
62
|
+
dirPath.split('/')[dirPath.split('/').length - 1] +
|
|
63
|
+
'/' +
|
|
64
|
+
file +
|
|
65
|
+
'" width="100%" height="300" scrolling="no"></iframe></td><td>\n<p> <a href="./' +
|
|
66
|
+
dirPath.split('/')[dirPath.split('/').length - 1] +
|
|
67
|
+
'/' +
|
|
68
|
+
file +
|
|
69
|
+
'" target="_blank">open in new tab</a></p></td></tr>';
|
|
70
|
+
});
|
|
71
|
+
str =
|
|
72
|
+
`<html>
|
|
73
|
+
<head>
|
|
74
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
75
|
+
<style>
|
|
76
|
+
table, th, td {
|
|
77
|
+
border: 1px solid black;
|
|
78
|
+
border-collapse: collapse;
|
|
79
|
+
}
|
|
80
|
+
table {
|
|
81
|
+
width: 55%;
|
|
82
|
+
}
|
|
83
|
+
td, th {
|
|
84
|
+
text-align: center;
|
|
85
|
+
color: #080;
|
|
86
|
+
}
|
|
87
|
+
h1 {
|
|
88
|
+
text-align: center;
|
|
89
|
+
color: #fa3
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.center {
|
|
93
|
+
margin-left: auto;
|
|
94
|
+
margin-right: auto;
|
|
95
|
+
}
|
|
96
|
+
div{
|
|
97
|
+
overflow-x:auto;
|
|
98
|
+
}
|
|
99
|
+
</style>
|
|
100
|
+
</head>
|
|
101
|
+
<body>
|
|
102
|
+
|
|
103
|
+
<h1><u>` +
|
|
104
|
+
applicationName +
|
|
105
|
+
` Performance Testing Status</u></h1>
|
|
106
|
+
<div>
|
|
107
|
+
<table class='center'>
|
|
108
|
+
<tr class='center'>
|
|
109
|
+
<th> Sno </th>
|
|
110
|
+
<th>Pagename</th>
|
|
111
|
+
<th>Status</th>
|
|
112
|
+
<th> Link </th>
|
|
113
|
+
</tr>` +
|
|
114
|
+
str +
|
|
115
|
+
`
|
|
116
|
+
</table>
|
|
117
|
+
</div>
|
|
118
|
+
</body>
|
|
119
|
+
</html>`;
|
|
120
|
+
fs.writeFileSync(savefilepath, str);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import sql from 'mssql';
|
|
2
|
+
|
|
3
|
+
export class TestData {
|
|
4
|
+
static async sqlDBConnection(configuration: any) {
|
|
5
|
+
// const server = "zwetrvl2sqd001.database.windows.net";
|
|
6
|
+
// const database ="zwetrvl2sqd001-DB002";
|
|
7
|
+
const config = {
|
|
8
|
+
server: configuration.server,
|
|
9
|
+
// user: "zwetrvl2sqd001-admin",
|
|
10
|
+
// password: "SADJ+zyhcj2l(SY9",
|
|
11
|
+
user: configuration.user,
|
|
12
|
+
password: configuration.password,
|
|
13
|
+
database: configuration.database,
|
|
14
|
+
requestTimeout: 600000,
|
|
15
|
+
port: 1433,
|
|
16
|
+
options: {
|
|
17
|
+
encrypt: true, // Use this if you're on Windows Azure
|
|
18
|
+
},
|
|
19
|
+
authentication: {
|
|
20
|
+
// type: "azure-active-directory-service-principal-secret",
|
|
21
|
+
type: 'default',
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
const conn = new sql.ConnectionPool(config);
|
|
25
|
+
return conn;
|
|
26
|
+
}
|
|
27
|
+
static async executeSqlQuery(connectionObj: any, queryString: any) {
|
|
28
|
+
const pool1Connect = await connectionObj.connect();
|
|
29
|
+
connectionObj.on('error', (err) => {
|
|
30
|
+
console.log(err);
|
|
31
|
+
return;
|
|
32
|
+
});
|
|
33
|
+
await pool1Connect;
|
|
34
|
+
try {
|
|
35
|
+
const request = connectionObj.request(); // or: new sql.Request(pool1)
|
|
36
|
+
const result = await request.query(queryString);
|
|
37
|
+
return result;
|
|
38
|
+
} catch (err) {
|
|
39
|
+
console.error('SQL error', err);
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
connectionObj.close();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
static async generateRandomUniqeIDNumber() {
|
|
46
|
+
const d = new Date();
|
|
47
|
+
let minutes = d.getMinutes();
|
|
48
|
+
let seconds = d.getSeconds();
|
|
49
|
+
let hour = d.getHours();
|
|
50
|
+
const result = Math.random().toString(36).substring(2, 5).toUpperCase();
|
|
51
|
+
let localUid = 'SNO' + result + hour + minutes.toString() + seconds;
|
|
52
|
+
return localUid;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
static async getUTCTimeCustom24hrs(localTime: string) {
|
|
56
|
+
console.log(localTime);
|
|
57
|
+
const localDate = new Date();
|
|
58
|
+
|
|
59
|
+
localDate.setHours(parseInt(localTime.split(':')[0].trim()));
|
|
60
|
+
|
|
61
|
+
localDate.setMinutes(
|
|
62
|
+
parseInt(localTime.split(':')[1].substring(0, 2).trim())
|
|
63
|
+
);
|
|
64
|
+
localDate.setSeconds(0, 0);
|
|
65
|
+
console.log('**** Returning time ' + localDate.toISOString());
|
|
66
|
+
return localDate.toISOString();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
static async waitFortimeOut(waitTime: any) {
|
|
70
|
+
const sleep = (waitTimeInMs: any) =>
|
|
71
|
+
new Promise((resolve) => setTimeout(resolve, waitTimeInMs));
|
|
72
|
+
await sleep(waitTime);
|
|
73
|
+
}
|
|
74
|
+
static async executeCosmosQuery(queryString: any) {
|
|
75
|
+
/*const endpoint = process.env.cosmosConfig.endpoint;
|
|
76
|
+
const key = process.env.cosmosConfig.key;
|
|
77
|
+
const databaseId = process.env.cosmosConfig.databaseId;
|
|
78
|
+
const containerId = process.env.cosmosConfig.containerId;
|
|
79
|
+
const client = new cosmosClient({ endpoint, key });
|
|
80
|
+
|
|
81
|
+
const database = client.database(databaseId);
|
|
82
|
+
const container = database.container(containerId);
|
|
83
|
+
console.log(`Querying container: Items`);
|
|
84
|
+
|
|
85
|
+
// query to return all items
|
|
86
|
+
const querySpec = {
|
|
87
|
+
query: queryString
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
// read all items in the Items container
|
|
91
|
+
const {resources: items} = await container.items.query(querySpec).fetchAll();
|
|
92
|
+
return items;*/
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
static async getUTCTimeCustom(localTime: any) {
|
|
96
|
+
console.log(localTime);
|
|
97
|
+
const localDate = new Date();
|
|
98
|
+
const hours = parseInt(localTime.split(':')[0].trim());
|
|
99
|
+
if (localTime.includes('PM')) {
|
|
100
|
+
if (hours == 12) {
|
|
101
|
+
localDate.setHours(parseInt(localTime.split(':')[0].trim()));
|
|
102
|
+
} else {
|
|
103
|
+
localDate.setHours(
|
|
104
|
+
parseInt(localTime.split(':')[0].trim()) + 12
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
} else {
|
|
108
|
+
if (hours == 12) {
|
|
109
|
+
localDate.setHours(0);
|
|
110
|
+
} else {
|
|
111
|
+
localDate.setHours(parseInt(localTime.split(':')[0].trim()));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
localDate.setMinutes(
|
|
115
|
+
parseInt(localTime.split(':')[1].substring(0, 2).trim())
|
|
116
|
+
);
|
|
117
|
+
localDate.setSeconds(0, 0);
|
|
118
|
+
console.log('**** Returning time ' + localDate.toISOString());
|
|
119
|
+
return localDate.toISOString();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export class XmlToJson {
|
|
2
|
+
static async xmlToJson(xml: any) {
|
|
3
|
+
// Create the return object
|
|
4
|
+
let obj: any = {};
|
|
5
|
+
|
|
6
|
+
if (xml.nodeType == 1) {
|
|
7
|
+
// element
|
|
8
|
+
// do attributes
|
|
9
|
+
if (xml.attributes.length > 0) {
|
|
10
|
+
obj['@attributes'] = {};
|
|
11
|
+
for (let j = 0; j < xml.attributes.length; j++) {
|
|
12
|
+
const attribute = xml.attributes.item(j);
|
|
13
|
+
obj['@attributes'][attribute.nodeName] =
|
|
14
|
+
attribute.nodeValue;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
} else if (xml.nodeType == 3) {
|
|
18
|
+
// text
|
|
19
|
+
obj = xml.nodeValue;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// do children
|
|
23
|
+
if (xml.hasChildNodes()) {
|
|
24
|
+
for (let i = 0; i < xml.childNodes.length; i++) {
|
|
25
|
+
const item = xml.childNodes.item(i);
|
|
26
|
+
const nodeName = item.nodeName;
|
|
27
|
+
if (typeof obj[nodeName] == 'undefined') {
|
|
28
|
+
obj[nodeName] = this.xmlToJson(item);
|
|
29
|
+
} else {
|
|
30
|
+
if (typeof obj[nodeName].push == 'undefined') {
|
|
31
|
+
const old = obj[nodeName];
|
|
32
|
+
obj[nodeName] = [];
|
|
33
|
+
obj[nodeName].push(old);
|
|
34
|
+
}
|
|
35
|
+
obj[nodeName].push(this.xmlToJson(item));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return obj;
|
|
40
|
+
}
|
|
41
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"sourceMap": true,
|
|
4
|
+
/* Visit https://aka.ms/tsconfig to read more about this file */
|
|
5
|
+
|
|
6
|
+
/* Projects */
|
|
7
|
+
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
|
|
8
|
+
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
|
9
|
+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
|
|
10
|
+
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
|
|
11
|
+
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
|
12
|
+
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
|
13
|
+
|
|
14
|
+
/* Language and Environment */
|
|
15
|
+
"target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
|
|
16
|
+
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
|
17
|
+
// "jsx": "preserve", /* Specify what JSX code is generated. */
|
|
18
|
+
// "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
|
|
19
|
+
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
|
20
|
+
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
|
|
21
|
+
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
|
22
|
+
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
|
|
23
|
+
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
|
|
24
|
+
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
|
25
|
+
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
|
26
|
+
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
|
27
|
+
|
|
28
|
+
/* Modules */
|
|
29
|
+
"module": "commonjs", /* Specify what module code is generated. */
|
|
30
|
+
"rootDir": "./", /* Specify the root folder within your source files. */
|
|
31
|
+
"moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
|
|
32
|
+
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
|
33
|
+
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
|
34
|
+
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
|
35
|
+
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
|
|
36
|
+
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
|
|
37
|
+
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
38
|
+
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
|
|
39
|
+
"resolveJsonModule": true, /* Enable importing .json files. */
|
|
40
|
+
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
|
|
41
|
+
|
|
42
|
+
/* JavaScript Support */
|
|
43
|
+
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
|
|
44
|
+
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
|
45
|
+
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
|
46
|
+
|
|
47
|
+
/* Emit */
|
|
48
|
+
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
|
49
|
+
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
|
50
|
+
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
|
51
|
+
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
|
52
|
+
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
|
|
53
|
+
"outDir": "./dist", /* Specify an output folder for all emitted files. */
|
|
54
|
+
// "removeComments": true, /* Disable emitting comments. */
|
|
55
|
+
// "noEmit": true, /* Disable emitting files from a compilation. */
|
|
56
|
+
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
|
57
|
+
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
|
|
58
|
+
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
|
59
|
+
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
|
60
|
+
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
61
|
+
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
|
62
|
+
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
|
63
|
+
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
|
64
|
+
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
|
65
|
+
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
|
|
66
|
+
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
|
|
67
|
+
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
|
68
|
+
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
|
|
69
|
+
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
|
70
|
+
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
|
71
|
+
|
|
72
|
+
/* Interop Constraints */
|
|
73
|
+
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
|
74
|
+
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
|
75
|
+
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
|
|
76
|
+
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
|
77
|
+
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
|
|
78
|
+
|
|
79
|
+
/* Type Checking */
|
|
80
|
+
"strict": false, /* Enable all strict type-checking options. */
|
|
81
|
+
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
|
|
82
|
+
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
|
|
83
|
+
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
|
84
|
+
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
|
|
85
|
+
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
|
86
|
+
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
|
|
87
|
+
"useUnknownInCatchVariables": false, /* Default catch clause variables as 'unknown' instead of 'any'. */
|
|
88
|
+
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
|
89
|
+
// "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
|
|
90
|
+
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
|
|
91
|
+
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
|
92
|
+
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
|
93
|
+
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
|
94
|
+
// "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
|
95
|
+
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
|
96
|
+
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
|
97
|
+
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
|
98
|
+
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
|
99
|
+
|
|
100
|
+
/* Completeness */
|
|
101
|
+
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
|
102
|
+
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
|
103
|
+
},
|
|
104
|
+
"include": ["src/**/*.ts", "index.ts"],
|
|
105
|
+
"exclude": ["node_modules"]
|
|
106
|
+
}
|