@abyss-project/main 1.0.83 → 1.0.84

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/README.md CHANGED
@@ -1,2 +1,2 @@
1
- # abyss-main
1
+ # abyss-main
2
2
  https://abyss-project.gitbook.io/abyss/
@@ -1,4 +1,4 @@
1
- import { ICreateProjectBody, ICreateProjectResponse, ICreateSubscriptionProjectBody, ICreateSubscriptionProjectParams, ICreateSubscriptionProjectResponse, IDeleteProjectQuery, IDeleteProjectParams, IDeleteProjectResponse, IGetMetricsProjectParams, IGetMetricsProjectResponse, IGetProjectParams, IGetProjectResponse, ILeaveProjectParams, ILeaveProjectResponse, IListProjectResponse, IPaginateProjectQuery, IPaginateProjectResponse, IPaginateTransactionProjectParams, IPaginateTransactionProjectQuery, IPaginateTransactionProjectResponse, IRenewSubscriptionProjectParams, IRenewSubscriptionProjectResponse, ISetOwnershipProjectBody, ISetOwnershipProjectParams, ISetOwnershipProjectResponse, IUpdateProjectBody, IUpdateProjectParams, IUpdateProjectResponse, IUpdateSubscriptionProjectBody, IUpdateSubscriptionProjectParams, IUpdateSubscriptionProjectResponse, IPictureProjectResponse, IPictureProjectParams, IImportPictureFromCollectionProjectResponse, IImportPictureFromCollectionProjectBody, IImportPictureFromCollectionProjectParams, IListBoardProjectResponse, IListBoardProjectParams } from '../types';
1
+ import { ICreateProjectBody, ICreateProjectResponse, ICreateSubscriptionProjectBody, ICreateSubscriptionProjectParams, ICreateSubscriptionProjectResponse, IDeleteProjectQuery, IDeleteProjectParams, IDeleteProjectResponse, IGetMetricsProjectParams, IGetMetricsProjectResponse, IGetProjectParams, IGetProjectResponse, ILeaveProjectParams, ILeaveProjectResponse, IListProjectResponse, IPaginateProjectQuery, IPaginateProjectResponse, IPaginateTransactionProjectParams, IPaginateTransactionProjectQuery, IPaginateTransactionProjectResponse, IRenewSubscriptionProjectParams, IRenewSubscriptionProjectResponse, ISetOwnershipProjectBody, ISetOwnershipProjectParams, ISetOwnershipProjectResponse, IUpdateProjectBody, IUpdateProjectParams, IUpdateProjectResponse, IUpdateSubscriptionProjectBody, IUpdateSubscriptionProjectParams, IUpdateSubscriptionProjectResponse, IPictureProjectResponse, IPictureProjectParams, IImportPictureFromCollectionProjectResponse, IImportPictureFromCollectionProjectBody, IImportPictureFromCollectionProjectParams, IListBoardProjectResponse, IListBoardProjectParams, IGenerateReportProjectParams, IGenerateReportProjectBody, IGenerateReportProjectResponse } from '../types';
2
2
  export declare const getProject: (params: IGetProjectParams) => Promise<IGetProjectResponse>;
3
3
  export declare const getMetricsProject: (params: IGetMetricsProjectParams) => Promise<IGetMetricsProjectResponse>;
4
4
  export declare const paginateProject: (query: IPaginateProjectQuery) => Promise<IPaginateProjectResponse>;
@@ -15,3 +15,4 @@ export declare const setOwnershipProject: (params: ISetOwnershipProjectParams, b
15
15
  export declare const pictureProject: (params: IPictureProjectParams) => Promise<IPictureProjectResponse>;
16
16
  export declare const importProfilePictureFromCollectionProject: (params: IImportPictureFromCollectionProjectParams, body: IImportPictureFromCollectionProjectBody) => Promise<IImportPictureFromCollectionProjectResponse>;
17
17
  export declare const listBoardProject: (params: IListBoardProjectParams) => Promise<IListBoardProjectResponse>;
18
+ export declare const generateReportProject: (params: IGenerateReportProjectParams, body: IGenerateReportProjectBody) => Promise<IGenerateReportProjectResponse>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.listBoardProject = exports.importProfilePictureFromCollectionProject = exports.pictureProject = exports.setOwnershipProject = exports.updateSubscriptionProject = exports.renewSubscriptionProject = exports.createSubscriptionProject = exports.leaveProject = exports.createProject = exports.updateProject = exports.deleteProject = exports.listProject = exports.paginateTransactionProject = exports.paginateProject = exports.getMetricsProject = exports.getProject = void 0;
3
+ exports.generateReportProject = exports.listBoardProject = exports.importProfilePictureFromCollectionProject = exports.pictureProject = exports.setOwnershipProject = exports.updateSubscriptionProject = exports.renewSubscriptionProject = exports.createSubscriptionProject = exports.leaveProject = exports.createProject = exports.updateProject = exports.deleteProject = exports.listProject = exports.paginateTransactionProject = exports.paginateProject = exports.getMetricsProject = exports.getProject = void 0;
4
4
  const __1 = require("..");
5
5
  const getProject = async (params) => {
6
6
  return (await __1.AbyssCore.axios.get(`project/${params.projectId}`)).data;
@@ -72,3 +72,7 @@ const listBoardProject = async (params) => {
72
72
  return (await __1.AbyssCore.axios.get(`project/${params.projectId}/board/list`)).data;
73
73
  };
74
74
  exports.listBoardProject = listBoardProject;
75
+ const generateReportProject = async (params, body) => {
76
+ return (await __1.AbyssCore.axios.post(`project/${params.projectId}/report/generate`, body)).data;
77
+ };
78
+ exports.generateReportProject = generateReportProject;
@@ -1,7 +1,8 @@
1
- import type { IPaginateReportAdminQuery, IPaginateReportAdminResponse, IGetReportAdminParams, IGetReportAdminResponse, ICreateYearlyReportAdminResponse, ICreateMonthlyReportAdminResponse } from '../types';
1
+ import type { IPaginateReportAdminQuery, IPaginateReportAdminResponse, IGetReportAdminParams, IGetReportAdminResponse, ICreateYearlyReportAdminResponse, ICreateMonthlyReportAdminResponse, ICreateDailyReportAdminResponse } from '../types';
2
2
  export declare const reportAdminApi: {
3
3
  createYearlyReport: () => Promise<ICreateYearlyReportAdminResponse>;
4
4
  createMonthlyReport: () => Promise<ICreateMonthlyReportAdminResponse>;
5
+ createDailyReport: () => Promise<ICreateDailyReportAdminResponse>;
5
6
  paginate: (query: IPaginateReportAdminQuery) => Promise<IPaginateReportAdminResponse>;
6
7
  get: (params: IGetReportAdminParams) => Promise<IGetReportAdminResponse>;
7
8
  };
@@ -11,6 +11,10 @@ exports.reportAdminApi = {
11
11
  const response = await index_1.AbyssCore.axios.post('/admin/report/monthly-report');
12
12
  return response.data;
13
13
  },
14
+ createDailyReport: async () => {
15
+ const response = await index_1.AbyssCore.axios.post('/admin/report/daily-report');
16
+ return response.data;
17
+ },
14
18
  paginate: async (query) => {
15
19
  const response = await index_1.AbyssCore.axios.get('/admin/report/paginate', { params: query });
16
20
  return response.data;
@@ -72,3 +72,12 @@ export interface IImportPictureFromCollectionProjectBody {
72
72
  export interface IListBoardProjectParams {
73
73
  projectId: string;
74
74
  }
75
+ export interface IGenerateReportProjectParams {
76
+ projectId: string;
77
+ }
78
+ export interface IGenerateReportProjectBody {
79
+ applicationIds: string[];
80
+ startDate: Date;
81
+ endDate: Date;
82
+ save?: boolean;
83
+ }
@@ -1,8 +1,31 @@
1
1
  import { ReportType } from '../../models/report.model';
2
2
  import { QueryPaginate } from '../type-message/base-paginate';
3
3
  export interface ICreateYearlyReportAdminBody {
4
+ year?: number;
5
+ allUsers?: boolean;
6
+ allProjects?: boolean;
7
+ userIds?: string[];
8
+ projectIds?: string[];
9
+ skipUserIds?: string[];
10
+ skipProjectIds?: string[];
4
11
  }
5
12
  export interface ICreateMonthlyReportAdminBody {
13
+ year?: number;
14
+ month?: number;
15
+ allUsers?: boolean;
16
+ allProjects?: boolean;
17
+ userIds?: string[];
18
+ projectIds?: string[];
19
+ skipUserIds?: string[];
20
+ skipProjectIds?: string[];
21
+ }
22
+ export interface ICreateDailyReportAdminBody {
23
+ year?: number;
24
+ month?: number;
25
+ day?: number;
26
+ allProjects?: boolean;
27
+ projectIds?: string[];
28
+ skipProjectIds?: string[];
6
29
  }
7
30
  export interface IGetReportAdminParams {
8
31
  reportId: string;
@@ -5,6 +5,7 @@ import { IBoard } from '../../models/board.model';
5
5
  import { IProjectAccess } from '../../models/project-access.model';
6
6
  import { IProject } from '../../models/project.model';
7
7
  import { IUserTransaction } from '../../models/user-transaction.model';
8
+ import { IReport } from '../../models/report.model';
8
9
  import { IResponse } from '../type-message/response';
9
10
  export type ProjectWithoutApplication = Overwrite<IProject & IListBoardUserData, {
10
11
  application: {
@@ -125,3 +126,8 @@ export interface IListBoardProjectData {
125
126
  }[];
126
127
  }
127
128
  export type IListBoardProjectResponse = IResponse<IListBoardProjectData>;
129
+ export interface IGenerateReportProjectData {
130
+ report: Record<string, unknown>;
131
+ saved?: IReport;
132
+ }
133
+ export type IGenerateReportProjectResponse = IResponse<IGenerateReportProjectData>;
@@ -6,6 +6,9 @@ export type ICreateYearlyReportAdminResponse = IResponse<ICreateYearlyReportAdmi
6
6
  export interface ICreateMonthlyReportAdminData {
7
7
  }
8
8
  export type ICreateMonthlyReportAdminResponse = IResponse<ICreateMonthlyReportAdminData>;
9
+ export interface ICreateDailyReportAdminData {
10
+ }
11
+ export type ICreateDailyReportAdminResponse = IResponse<ICreateDailyReportAdminData>;
9
12
  export type IGetReportAdminData = {
10
13
  report: IReport;
11
14
  };
@@ -2,7 +2,9 @@ import { IProject } from './project.model';
2
2
  import { IUser } from './user.model';
3
3
  export declare enum ReportType {
4
4
  YEARLY = "YEARLY",
5
- MONTHLY = "MONTHLY"
5
+ MONTHLY = "MONTHLY",
6
+ DAILY = "DAILY",
7
+ CUSTOM = "CUSTOM"
6
8
  }
7
9
  export interface IReportData extends Record<string, unknown> {
8
10
  userCount?: number;
@@ -5,4 +5,6 @@ var ReportType;
5
5
  (function (ReportType) {
6
6
  ReportType["YEARLY"] = "YEARLY";
7
7
  ReportType["MONTHLY"] = "MONTHLY";
8
+ ReportType["DAILY"] = "DAILY";
9
+ ReportType["CUSTOM"] = "CUSTOM";
8
10
  })(ReportType || (exports.ReportType = ReportType = {}));
@@ -17,3 +17,4 @@ export * from './icons.utils';
17
17
  export * from './string.utils';
18
18
  export * from './tracking.utils';
19
19
  export * from './duration.utils';
20
+ export * from './time-period.utils';
@@ -33,3 +33,4 @@ __exportStar(require("./icons.utils"), exports);
33
33
  __exportStar(require("./string.utils"), exports);
34
34
  __exportStar(require("./tracking.utils"), exports);
35
35
  __exportStar(require("./duration.utils"), exports);
36
+ __exportStar(require("./time-period.utils"), exports);
@@ -46,7 +46,7 @@ const textToSvg = (position, style, text) => {
46
46
  const y = position.y;
47
47
  const fillColor = style.fillColor === 'none' ? 'none' : style.fillColor;
48
48
  const strokeColor = style.strokeColor === 'none' ? 'none' : style.strokeColor;
49
- return `<text x="${x}" y="${y}" fill="${fillColor}" stroke="${strokeColor}" stroke-width="${style.strokeWidth}" opacity="${style.opacity}" font-size="${style.fontSize}" font-family="${style.fontFamily}"
49
+ return `<text x="${x}" y="${y}" fill="${fillColor}" stroke="${strokeColor}" stroke-width="${style.strokeWidth}" opacity="${style.opacity}" font-size="${style.fontSize}" font-family="${style.fontFamily}"
50
50
  stroke-dasharray="${style.lineDash || 'none'}" text-anchor="middle" dominant-baseline="middle" transform="rotate(${style.rotation} ${x} ${y})">${text}</text>`;
51
51
  };
52
52
  exports.textToSvg = textToSvg;
@@ -79,15 +79,15 @@ const commentToSvg = (position, size, style, id) => {
79
79
  const fontSize = size.width * 0.6;
80
80
  const textX = cx;
81
81
  const textY = cy + fontSize * 0.35;
82
- return `
83
- <g opacity="${style.opacity}" transform="rotate(${style.rotation} ${cx} ${cy})">
84
- <defs>
85
- <filter id="comment-shadow-${id}" x="-50%" y="-50%" width="200%" height="200%">
86
- <feDropShadow dx="2" dy="2" stdDeviation="5" flood-color="black" flood-opacity="0.3"/>
87
- </filter>
88
- </defs>
89
- <circle cx="${cx}" cy="${cy}" r="${radius}" fill="${fillColor}" stroke="${strokeColor}" stroke-width="${style.strokeWidth}" filter="url(#comment-shadow-${id})" />
90
- <text x="${textX}" y="${textY}" fill="white" font-size="${fontSize}" font-family="Arial" text-anchor="middle" dominant-baseline="middle" font-weight="bold">!</text>
82
+ return `
83
+ <g opacity="${style.opacity}" transform="rotate(${style.rotation} ${cx} ${cy})">
84
+ <defs>
85
+ <filter id="comment-shadow-${id}" x="-50%" y="-50%" width="200%" height="200%">
86
+ <feDropShadow dx="2" dy="2" stdDeviation="5" flood-color="black" flood-opacity="0.3"/>
87
+ </filter>
88
+ </defs>
89
+ <circle cx="${cx}" cy="${cy}" r="${radius}" fill="${fillColor}" stroke="${strokeColor}" stroke-width="${style.strokeWidth}" filter="url(#comment-shadow-${id})" />
90
+ <text x="${textX}" y="${textY}" fill="white" font-size="${fontSize}" font-family="Arial" text-anchor="middle" dominant-baseline="middle" font-weight="bold">!</text>
91
91
  </g>`;
92
92
  };
93
93
  exports.commentToSvg = commentToSvg;
@@ -167,15 +167,15 @@ const sceneToSVG = (shapes, width, height) => {
167
167
  return '';
168
168
  }
169
169
  });
170
- const defs = `
171
- <defs>
172
- <marker id="arrow" markerWidth="10" markerHeight="10" refX="10" refY="5" orient="auto-start-reverse">
173
- <path d="M0,0 L10,5 L0,10 z" fill="currentColor"/>
174
- </marker>
170
+ const defs = `
171
+ <defs>
172
+ <marker id="arrow" markerWidth="10" markerHeight="10" refX="10" refY="5" orient="auto-start-reverse">
173
+ <path d="M0,0 L10,5 L0,10 z" fill="currentColor"/>
174
+ </marker>
175
175
  </defs>`;
176
- return `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}">
177
- ${defs}
178
- ${shapeEls.join('\n')}
176
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}">
177
+ ${defs}
178
+ ${shapeEls.join('\n')}
179
179
  </svg>`;
180
180
  };
181
181
  exports.sceneToSVG = sceneToSVG;
@@ -0,0 +1,12 @@
1
+ export type TimePeriod = 'minute' | 'hour' | 'day' | 'month';
2
+ export interface TimePeriodBreakpoints {
3
+ minuteThresholdHours: number;
4
+ hourThresholdDays: number;
5
+ dayThresholdDays: number;
6
+ }
7
+ export declare const DEFAULT_TIME_PERIOD_BREAKPOINTS: TimePeriodBreakpoints;
8
+ export declare const determineTimePeriod: (startDate: Date, endDate: Date, breakpoints?: TimePeriodBreakpoints) => TimePeriod;
9
+ export declare const getTimeGroupExpression: (period: TimePeriod, columnName: string) => string;
10
+ export declare const truncateDate: (date: Date, period: TimePeriod) => Date;
11
+ export declare const addPeriod: (date: Date, period: TimePeriod) => Date;
12
+ export declare const generateTimeSeries: (startDate: Date, endDate: Date, period?: TimePeriod, breakpoints?: TimePeriodBreakpoints) => Date[];
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateTimeSeries = exports.addPeriod = exports.truncateDate = exports.getTimeGroupExpression = exports.determineTimePeriod = exports.DEFAULT_TIME_PERIOD_BREAKPOINTS = void 0;
4
+ const date_fns_1 = require("date-fns");
5
+ exports.DEFAULT_TIME_PERIOD_BREAKPOINTS = {
6
+ minuteThresholdHours: 2,
7
+ hourThresholdDays: 2,
8
+ dayThresholdDays: 60,
9
+ };
10
+ const determineTimePeriod = (startDate, endDate, breakpoints = exports.DEFAULT_TIME_PERIOD_BREAKPOINTS) => {
11
+ const diffHours = (0, date_fns_1.differenceInHours)(endDate, startDate);
12
+ const diffDays = (0, date_fns_1.differenceInDays)(endDate, startDate);
13
+ if (diffHours < breakpoints.minuteThresholdHours) {
14
+ return 'minute';
15
+ }
16
+ if (diffDays < breakpoints.hourThresholdDays) {
17
+ return 'hour';
18
+ }
19
+ if (diffDays < breakpoints.dayThresholdDays) {
20
+ return 'day';
21
+ }
22
+ return 'month';
23
+ };
24
+ exports.determineTimePeriod = determineTimePeriod;
25
+ const getTimeGroupExpression = (period, columnName) => {
26
+ switch (period) {
27
+ case 'minute':
28
+ return `DATE_TRUNC('minute', ${columnName})`;
29
+ case 'hour':
30
+ return `DATE_TRUNC('hour', ${columnName})`;
31
+ case 'day':
32
+ return `DATE_TRUNC('day', ${columnName})`;
33
+ case 'month':
34
+ return `DATE_TRUNC('month', ${columnName})`;
35
+ }
36
+ };
37
+ exports.getTimeGroupExpression = getTimeGroupExpression;
38
+ const truncateDate = (date, period) => {
39
+ switch (period) {
40
+ case 'minute':
41
+ return (0, date_fns_1.startOfMinute)(date);
42
+ case 'hour':
43
+ return (0, date_fns_1.startOfHour)(date);
44
+ case 'day':
45
+ return (0, date_fns_1.startOfDay)(date);
46
+ case 'month':
47
+ return (0, date_fns_1.startOfMonth)(date);
48
+ }
49
+ };
50
+ exports.truncateDate = truncateDate;
51
+ const addPeriod = (date, period) => {
52
+ switch (period) {
53
+ case 'minute':
54
+ return (0, date_fns_1.addMinutes)(date, 1);
55
+ case 'hour':
56
+ return (0, date_fns_1.addHours)(date, 1);
57
+ case 'day':
58
+ return (0, date_fns_1.addDays)(date, 1);
59
+ case 'month':
60
+ return (0, date_fns_1.addMonths)(date, 1);
61
+ }
62
+ };
63
+ exports.addPeriod = addPeriod;
64
+ const generateTimeSeries = (startDate, endDate, period, breakpoints = exports.DEFAULT_TIME_PERIOD_BREAKPOINTS) => {
65
+ const actualPeriod = period || (0, exports.determineTimePeriod)(startDate, endDate, breakpoints);
66
+ const result = [];
67
+ let current = (0, exports.truncateDate)(startDate, actualPeriod);
68
+ const end = (0, exports.truncateDate)(endDate, actualPeriod);
69
+ while ((0, date_fns_1.isBefore)(current, end) || (0, date_fns_1.isEqual)(current, end)) {
70
+ result.push(new Date(current));
71
+ current = (0, exports.addPeriod)(current, actualPeriod);
72
+ }
73
+ return result;
74
+ };
75
+ exports.generateTimeSeries = generateTimeSeries;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abyss-project/main",
3
- "version": "1.0.83",
3
+ "version": "1.0.84",
4
4
  "description": "Core package to interact with Abyss-Project",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/tsconfig.json CHANGED
@@ -1,105 +1,105 @@
1
- {
2
- "compilerOptions": {
3
- /* Visit https://aka.ms/tsconfig.json to read more about this file */
4
-
5
- /* Projects */
6
- "incremental": false /* Enable incremental compilation */,
7
- // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8
- // "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
9
- // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */
10
- // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11
- // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12
-
13
- /* Language and Environment */
14
- "target": "es2019" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
15
- "lib": [
16
- "dom",
17
- "ES2019"
18
- ] /* Specify a set of bundled library declaration files that describe the target runtime environment. */,
19
- // "jsx": "preserve", /* Specify what JSX code is generated. */
20
- "experimentalDecorators": true /* Enable experimental support for TC39 stage 2 draft decorators. */,
21
- "emitDecoratorMetadata": true /* Emit design-type metadata for decorated declarations in source files. */,
22
- // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */
23
- // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
24
- // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */
25
- // "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */
26
- // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
27
- // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
28
-
29
- /* Modules */
30
- "module": "commonjs" /* Specify what module code is generated. */,
31
- "rootDir": "./src" /* Specify the root folder within your source files. */,
32
- "moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
33
- // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
34
- // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
35
- // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
36
- // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */
37
- // "types": [], /* Specify type package names to be included without being referenced in a source file. */
38
- // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
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": true /* 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": false, /* 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": true, /* Type catch clause variables as 'unknown' instead of 'any'. */
88
- // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
89
- // "noUnusedLocals": true, /* Enable error reporting when a 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, /* Include 'undefined' in index signature results */
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
- "exclude": ["./dist/**/*"]
105
- }
1
+ {
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig.json to read more about this file */
4
+
5
+ /* Projects */
6
+ "incremental": false /* Enable incremental compilation */,
7
+ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8
+ // "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
9
+ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */
10
+ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11
+ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12
+
13
+ /* Language and Environment */
14
+ "target": "es2019" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
15
+ "lib": [
16
+ "dom",
17
+ "ES2019"
18
+ ] /* Specify a set of bundled library declaration files that describe the target runtime environment. */,
19
+ // "jsx": "preserve", /* Specify what JSX code is generated. */
20
+ "experimentalDecorators": true /* Enable experimental support for TC39 stage 2 draft decorators. */,
21
+ "emitDecoratorMetadata": true /* Emit design-type metadata for decorated declarations in source files. */,
22
+ // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */
23
+ // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
24
+ // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */
25
+ // "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */
26
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
27
+ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
28
+
29
+ /* Modules */
30
+ "module": "commonjs" /* Specify what module code is generated. */,
31
+ "rootDir": "./src" /* Specify the root folder within your source files. */,
32
+ "moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
33
+ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
34
+ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
35
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
36
+ // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */
37
+ // "types": [], /* Specify type package names to be included without being referenced in a source file. */
38
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
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": true /* 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": false, /* 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": true, /* Type catch clause variables as 'unknown' instead of 'any'. */
88
+ // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
89
+ // "noUnusedLocals": true, /* Enable error reporting when a 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, /* Include 'undefined' in index signature results */
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
+ "exclude": ["./dist/**/*"]
105
+ }