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

remove endpoint-utils package #8217

Merged
merged 10 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
6 changes: 0 additions & 6 deletions @types/endpoint-utils/index.d.ts

This file was deleted.

127 changes: 41 additions & 86 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@
"@babel/runtime": "^7.23.2",
"@devexpress/bin-v8-flags-filter": "^1.3.0",
"@devexpress/callsite-record": "^4.1.6",
"@types/node": "^12.20.10",
"@types/node": "^20.14.5",
"address": "^2.0.2",
"async-exit-hook": "^1.1.2",
"babel-plugin-module-resolver": "5.0.0",
"babel-plugin-syntax-trailing-function-commas": "^6.22.0",
Expand All @@ -98,7 +99,6 @@
"elegant-spinner": "^1.0.1",
"email-validator": "^2.0.4",
"emittery": "^0.4.1",
"endpoint-utils": "^1.0.2",
"error-stack-parser": "^2.1.4",
"execa": "^4.0.3",
"get-os-info": "^1.0.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getFreePort } from 'endpoint-utils';
import { getFreePort } from '../../../../../utils/endpoint-utils';
import createTempProfile from './create-temp-profile';
import isDocker from 'is-docker';
import isPodman from 'is-podman';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getFreePort } from 'endpoint-utils';
import { getFreePort } from '../../../../../utils/endpoint-utils';
import createTempProfile from './create-temp-profile';


Expand Down
10 changes: 7 additions & 3 deletions src/configuration/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { GeneralError } from '../errors/runtime';
import { RUNTIME_ERRORS } from '../errors/types';
import endpointUtils from 'endpoint-utils';
import endpointUtils from '../utils/endpoint-utils';

export async function getValidHostname (hostname: string): Promise<string> {
if (hostname) {
Expand All @@ -9,8 +9,12 @@ export async function getValidHostname (hostname: string): Promise<string> {
if (!valid)
throw new GeneralError(RUNTIME_ERRORS.invalidHostname, hostname);
}
else
hostname = endpointUtils.getIPAddress();
else {
const ip = endpointUtils.getIPAddress();

if (ip)
hostname = ip;
}

return hostname;
Bayheck marked this conversation as resolved.
Show resolved Hide resolved
}
Expand Down
2 changes: 1 addition & 1 deletion src/runner/tested-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default class TestedApp {
public async kill (): Promise<void> {
this._killed = true;

const killPromise = new Promise(resolve => kill((this._process as ChildProcess).pid, 'SIGTERM', resolve));
const killPromise = new Promise(resolve => kill((this._process as ChildProcess).pid ?? 0, 'SIGTERM', resolve));

await killPromise;
}
Expand Down
Loading
Loading