Skip to content

Commit

Permalink
修复任务管理创建视图 placeholder,更新 npm 包
Browse files Browse the repository at this point in the history
  • Loading branch information
whyour committed Sep 15, 2023
1 parent 0511a4a commit 042d7d3
Show file tree
Hide file tree
Showing 13 changed files with 101 additions and 103 deletions.
2 changes: 1 addition & 1 deletion back/config/serverEnv.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Request, Response } from 'express';
import { pick } from 'lodash';
import pick from 'lodash/pick';

let pickedEnv: Record<string, string>;

Expand Down
2 changes: 2 additions & 0 deletions back/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ declare namespace Express {
platform: 'desktop' | 'mobile';
}
}

declare module 'pstree.remy';
4 changes: 2 additions & 2 deletions back/loaders/initTask.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Container } from 'typedi';
import SystemService from '../services/system';
import ScheduleService from '../services/schedule';
import ScheduleService, { ScheduleTaskType } from '../services/schedule';
import SubscriptionService from '../services/subscription';
import config from '../config';
import { fileExist } from '../config/util';
Expand All @@ -22,7 +22,7 @@ export default async () => {
id: NaN,
name: '生成token',
command: tokenCommand,
};
} as ScheduleTaskType;
await scheduleService.cancelIntervalTask(cron);
scheduleService.createIntervalTask(cron, {
days: 28,
Expand Down
2 changes: 1 addition & 1 deletion back/services/schedule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import dayjs from 'dayjs';
import taskLimit from '../shared/pLimit';
import { spawn } from 'cross-spawn';

interface ScheduleTaskType {
export interface ScheduleTaskType {
id: number;
command: string;
name?: string;
Expand Down
4 changes: 2 additions & 2 deletions back/services/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import taskLimit from '../shared/pLimit';
import tar from 'tar';
import path from 'path';
import fs from 'fs';
import { sum } from 'lodash';
import sum from 'lodash/sum';

@Service()
export default class SystemService {
Expand Down Expand Up @@ -84,7 +84,7 @@ export default class SystemService {
});
if (info.logRemoveFrequency) {
const cron = {
id: result.id,
id: result.id || NaN,
name: '删除日志',
command: `ql rmlog ${info.logRemoveFrequency}`,
};
Expand Down
3 changes: 1 addition & 2 deletions nodemon.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"watch": ["back", ".env"],
"ext": "js,ts,json",
"ignore": ["src/**/*.spec.ts"],
"exec": "ts-node --transpile-only ./back/app.ts"
"exec": "ts-node -P tsconfig.back.json ./back/app.ts"
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"start": "concurrently -n w: npm:start:*",
"start:front": "max dev",
"start:back": "nodemon",
"start:public": "ts-node --transpile-only ./back/public.ts",
"start:rpc": "ts-node --transpile-only ./back/schedule/index.ts",
"start:public": "ts-node -P tsconfig.back.json ./back/public.ts",
"start:rpc": "ts-node -P tsconfig.back.json ./back/schedule/index.ts",
"build:front": "max build",
"build:back": "tsc -p tsconfig.back.json",
"panel": "npm run build:back && node static/build/app.js",
Expand Down Expand Up @@ -69,11 +69,11 @@
"dotenv": "^16.0.0",
"express": "^4.17.3",
"express-jwt": "^6.1.1",
"express-rate-limit": "^6.7.0",
"express-rate-limit": "^7.0.0",
"express-urlrewrite": "^1.4.0",
"form-data": "^4.0.0",
"got": "^11.8.2",
"hpagent": "^0.1.2",
"hpagent": "^1.2.0",
"http-proxy-middleware": "^2.0.6",
"iconv-lite": "^0.6.3",
"js-yaml": "^4.1.0",
Expand Down Expand Up @@ -162,7 +162,7 @@
"ts-proto": "^1.146.0",
"tslib": "^2.4.0",
"tsx": "^3.12.3",
"typescript": "4.8.4",
"typescript": "5.2.2",
"vh-check": "^2.0.5",
"virtualizedtableforantd4": "1.3.0",
"webpack": "^5.70.0",
Expand Down
Loading

0 comments on commit 042d7d3

Please sign in to comment.