Browse Source

Merge pull request 'update all dependencies && switch to yarn' (#1) from upd-all-dependencies into master

Reviewed-on: #1
pull/2/head
rozetko 2 years ago
parent
commit
a365f94293
  1. 1
      build/webpack.dev.conf.js
  2. 1
      build/webpack.prod.conf.js
  3. 20
      package.json
  4. 3
      src/index.ts
  5. 10
      src/routes/status.ts
  6. 1
      src/services/exporter.ts
  7. 5
      tsconfig.json
  8. 1644
      yarn.lock

1
build/webpack.dev.conf.js

@ -10,4 +10,5 @@ base.externals = [
} }
]; ];
base.watch = true; base.watch = true;
base.mode = 'development';
module.exports = base; module.exports = base;

1
build/webpack.prod.conf.js

@ -1,3 +1,4 @@
var base = require('./webpack.base.conf'); var base = require('./webpack.base.conf');
base.mode = 'production';
module.exports = base; module.exports = base;

20
package.json

@ -12,15 +12,15 @@
"dependencies": {}, "dependencies": {},
"devDependencies": { "devDependencies": {
"@corpglory/tsdb-kit": "^1.1.1", "@corpglory/tsdb-kit": "^1.1.1",
"@types/express": "^4.11.1", "axios": "^1.2.1",
"@types/lodash": "^4.14.116", "express": "^4.18.2",
"axios": "^0.18.0", "fast-csv": "^4.3.6",
"express": "^4.16.3", "lodash": "^4.17.21",
"fast-csv": "^2.4.1", "moment": "^2.29.4",
"moment": "^2.22.1", "nodemon": "^2.0.20",
"nodemon": "^1.17.3", "ts-loader": "^9.4.2",
"ts-loader": "^3.5.0", "typescript": "^4.9.4",
"typescript": "^2.8.3", "webpack": "^5.75.0",
"webpack": "^3.5.6" "webpack-cli": "^5.0.1"
} }
} }

3
src/index.ts

@ -1,5 +1,6 @@
import { EXPORTED_PATH } from './config'; import { EXPORTED_PATH } from './config';
import { router as tasksRouter } from './routes/tasks'; import { router as tasksRouter } from './routes/tasks';
import { router as statusRouter } from './routes/status';
import { router as datasourceRouter } from './routes/datasource'; import { router as datasourceRouter } from './routes/datasource';
import { router as deleteRouter } from './routes/delete'; import { router as deleteRouter } from './routes/delete';
import { port } from './config'; import { port } from './config';
@ -19,6 +20,8 @@ app.use(function(req, res, next) {
next(); next();
}) })
app.use('/api/status', statusRouter);
app.use('/tasks', tasksRouter); app.use('/tasks', tasksRouter);
app.use('/datasource', datasourceRouter); app.use('/datasource', datasourceRouter);
app.use('/delete', deleteRouter); app.use('/delete', deleteRouter);

10
src/routes/status.ts

@ -0,0 +1,10 @@
import * as express from 'express'
async function deleteTask(req, res) {
res.status(200).send({ version: 123 });
}
export const router = express.Router();
router.get('/', deleteTask);

1
src/services/exporter.ts

@ -22,6 +22,7 @@ export class Exporter {
private datasource: string; private datasource: string;
private initCsvStream() { private initCsvStream() {
// @ts-ignore
const csvStream = csv.createWriteStream({ headers: true }); const csvStream = csv.createWriteStream({ headers: true });
const writableStream = fs.createWriteStream(this.getFilePath('csv')); const writableStream = fs.createWriteStream(this.getFilePath('csv'));

5
tsconfig.json

@ -4,7 +4,8 @@
"sourceMap": true, "sourceMap": true,
"noImplicitAny": false, "noImplicitAny": false,
"module": "commonjs", "module": "commonjs",
"target": "es2015", "target": "es6",
"allowJs": true "allowJs": true,
"skipLibCheck": true
} }
} }

1644
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save