Skip to content

Commit 94e42f5

Browse files
committed
Merge branch 'master' into next
2 parents c7d88f6 + c719805 commit 94e42f5

File tree

20 files changed

+2412
-60
lines changed

20 files changed

+2412
-60
lines changed

api/utils/common.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
* @typedef {import('../../types/requestProcessor').Params} Params
77
* @typedef {import('../../types/common').TimeObject} TimeObject
88
* @typedef {import('mongodb').ObjectId} ObjectId
9-
* typedef {import('moment-timezone').Moment} MomentTimezone
9+
* @typedef {import('moment-timezone').Moment} MomentTimezone
1010
*/
1111

1212
/** @lends module:api/utils/common **/
13-
/** @type(import('../../types/common').Common) */
13+
/** @type {import('../../types/common').Common} */
1414
const common = {};
1515

16-
/** @type(import('moment-timezone')) */
16+
/** @type {import('moment-timezone')} */
1717
const moment = require('moment-timezone');
1818
const crypto = require('crypto');
1919
const logger = require('./log.js');
@@ -3465,5 +3465,5 @@ common.trimWhitespaceStartEnd = function(value) {
34653465
return value;
34663466
};
34673467

3468-
/** @type(import('../../types/common').Common) */
3468+
/** @type {import('../../types/common').Common} */
34693469
module.exports = common;

api/utils/localization.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @module api/utils/localization
44
*/
55

6-
/** @type(import('../../types/localization').Locale) */
6+
/** @type {import('../../types/localization').Locale} */
77
var locale = {},
88
fs = require('fs'),
99
path = require('path'),
@@ -91,5 +91,5 @@ locale.getProperties = function(lang, callback) {
9191
}
9292
};
9393

94-
/** @type(import('../../types/localization').Locale) */
94+
/** @type {import('../../types/localization').Locale} */
9595
module.exports = locale;

frontend/express/public/javascripts/countly/vue/templates/content/content-header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
isToggleDisabled ? 'is-disabled' : '',
9090
toggleLocalValue ? 'el-button--warning' : 'el-button--success'
9191
]"
92-
test-id="journey-publish"
92+
:data-test-id="'journey-' + (toggleLocalValue ? 'Pause' : 'Publish').toLowerCase() + '-button'"
9393
:disabled="false"
9494
@click="onPublishButtonClick"
9595
>

tsconfig.json

Lines changed: 39 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,47 @@
22
// npm i typescript --save-dev
33
//
44
// to run the summary check, call:
5-
// npx tsc
5+
// npx tsc --checkJs --noEmit
66
{
7-
"include": [
8-
//"plugins/push/**/*.ts",
9-
//"plugins/push/**/*.js"
10-
"api/utils/common.js",
11-
"api/utils/localization.js",
12-
"api/lib/countly.common.js",
13-
"api/utils/requestProcessor.js"
14-
],
15-
"exclude": [
16-
"node_modules"
7+
// Explicitly specify which files to include in compilation
8+
"files": [
9+
"types/global.d.ts", // Global type declarations for legacy compatibility
10+
"types/common.d.ts", // Common utility functions type definitions
11+
"types/requestProcessor.d.ts", // Request processor type definitions
12+
"types/localization.d.ts", // Localization module type definitions
13+
"types/log.d.ts", // Logging module type definitions
14+
"types/config.d.ts", // Configuration type definitions
15+
"types/pluginManager.d.ts", // Plugin manager type definitions
16+
"types/utils.d.ts", // Utility functions type definitions
17+
"types/batcher.d.ts", // Database batcher type definitions
18+
"types/rights.d.ts", // Rights validation type definitions
19+
"types/events.d.ts", // Events processing type definitions
20+
"types/usage.d.ts", // Usage processing type definitions
21+
"api/utils/localization.js" // Include JS file for type checking
1722
],
1823
"compilerOptions": {
19-
"outDir": "dist", // we're not building the app. but still necessary for, reasons...
20-
"allowJs": true,
21-
"checkJs": true,
22-
"resolveJsonModule": true,
23-
"strict": true
24+
// Language and Environment
25+
"target": "ES2022", // Set the JavaScript language version for emitted JavaScript
26+
"lib": ["ES2022", "DOM"], // Specify a set of bundled library declaration files
27+
28+
// Modules
29+
"moduleResolution": "Node", // Specify how TypeScript looks up a file from a given module specifier
30+
"baseUrl": ".", // Specify the base directory to resolve non-relative module names
31+
"paths": { // Specify a set of entries that re-map imports to additional lookup locations
32+
"@countly/*": ["./api/*"], // Map @countly imports to api directory
33+
"@plugins/*": ["./plugins/*"], // Map @plugins imports to plugins directory
34+
"@frontend/*": ["./frontend/*"] // Map @frontend imports to frontend directory
35+
},
36+
"resolveJsonModule": true, // Enable importing .json files
37+
38+
// JavaScript Support
39+
"allowJs": true, // Allow JavaScript files to be a part of your program
40+
41+
// Interop Constraints
42+
"esModuleInterop": true, // Emit additional JavaScript to ease support for importing CommonJS modules
43+
"forceConsistentCasingInFileNames": true, // Ensure that casing is correct in imports
44+
45+
// Completeness
46+
"typeRoots": ["./types", "./node_modules/@types"] // Specify multiple folders that act like './node_modules/@types'
2447
}
2548
}

0 commit comments

Comments
 (0)