Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(disk): Use types from check-disk-space package #259

Merged
merged 1 commit into from
Jun 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const terminus = ts.createProject(join(__dirname, 'tsconfig.json'));
/**
* UTIL
*/

function getFolders(dir) {
return fs
.readdirSync(dir)
Expand Down
9 changes: 2 additions & 7 deletions lib/health-indicators/disk/disk.health.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable, Inject } from '@nestjs/common';
import { isNil } from '@nestjs/common/utils/shared.utils';
import * as checkdiskspace from 'check-disk-space';
import * as checkDiskSpace from 'check-disk-space';

import { HealthIndicatorResult } from '../../interfaces';
import { HealthIndicator } from '../health-indicator';
Expand All @@ -12,12 +12,7 @@ import {
DiskOptionsWithThresholdPercent,
} from './disk-health-options.type';

/**
* The type of the check-disk-space library
*
* @internal
*/
type CheckDiskSpace = typeof checkdiskspace;
type CheckDiskSpace = typeof checkDiskSpace;

/**
* The DiskHealthIndicator contains checks which are related
Expand Down
7 changes: 0 additions & 7 deletions lib/health-indicators/disk/diskusage-lib.provider.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import { CHECKDISKSPACE_LIB } from '../../terminus.constants';

// FIXME: Add typings to check-disk-space
import * as checkdiskspace from 'check-disk-space';

/**
* The type of the check-disc-space library
*
* @internal
*/
export type CheckDiskSpace = typeof checkdiskspace;
/**
* Wrapper of the check-disk-space library.
*
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
]
},
"dependencies": {
"check-disk-space": "^2.0.0",
"check-disk-space": "^2.1.0",
"gulp": "^4.0.2",
"gulp-clean": "^0.4.0",
"gulp-typescript": "^5.0.1"
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": { "*": ["types/*"] },
"module": "commonjs",
"strict": true,
"declaration": true,
Expand Down
19 changes: 0 additions & 19 deletions types/check-disk-space.d.ts

This file was deleted.