From ca94c4549a0fcc02b3684120e25949350828dca1 Mon Sep 17 00:00:00 2001 From: David Mihalcik Date: Mon, 16 Dec 2024 10:41:12 -0500 Subject: [PATCH] cleanups --- cli/package-lock.json | 18 ++---------------- cli/package.json | 3 +-- cli/src/cli.ts | 3 --- lib/src/opentdf.ts | 2 +- 4 files changed, 4 insertions(+), 22 deletions(-) diff --git a/cli/package-lock.json b/cli/package-lock.json index a321c7e6..432b53b9 100644 --- a/cli/package-lock.json +++ b/cli/package-lock.json @@ -32,8 +32,7 @@ "prettier": "^3.3.3", "sinon": "^19.0.2", "ts-node": "^10.9.2", - "typescript": "^5.1.6", - "why-is-node-running": "^3.2.1" + "typescript": "^5.1.6" } }, "node_modules/@cspotcode/source-map-support": { @@ -361,7 +360,7 @@ "node_modules/@opentdf/sdk": { "version": "0.2.0", "resolved": "file:../lib/opentdf-sdk-0.2.0.tgz", - "integrity": "sha512-TCq6qVieu2PDi5lTNhxpBiZuHLBd8EaRlofZoPmHbDDVUDaY4PGswak+pnVNFXXnZe6RLAI/Edq+P8W3UZzs+g==", + "integrity": "sha512-x28SAnea/q4KaykNeep9HTfMHeWkGU+Iax8iKM8eMit1h4MsVgzdDRE6SPgLLmyzL8WTycY7cA4onuoZzcvutg==", "license": "BSD-3-Clause-Clear", "dependencies": { "browser-fs-access": "^0.34.1", @@ -3114,19 +3113,6 @@ "node": ">= 8" } }, - "node_modules/why-is-node-running": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-3.2.1.tgz", - "integrity": "sha512-Tb2FUhB4vUsGQlfSquQLYkApkuPAFQXGFzxWKHHumVz2dK+X1RUm/HnID4+TfIGYJ1kTcwOaCk/buYCEJr6YjQ==", - "dev": true, - "license": "MIT", - "bin": { - "why-is-node-running": "cli.js" - }, - "engines": { - "node": ">=20.11" - } - }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", diff --git a/cli/package.json b/cli/package.json index b970706d..c6781a3f 100644 --- a/cli/package.json +++ b/cli/package.json @@ -45,8 +45,7 @@ "prettier": "^3.3.3", "sinon": "^19.0.2", "ts-node": "^10.9.2", - "typescript": "^5.1.6", - "why-is-node-running": "^3.2.1" + "typescript": "^5.1.6" }, "dependencies": { "@opentdf/sdk": "file:../lib/opentdf-sdk-0.2.0.tgz", diff --git a/cli/src/cli.ts b/cli/src/cli.ts index 4b848543..506278ea 100644 --- a/cli/src/cli.ts +++ b/cli/src/cli.ts @@ -1,5 +1,3 @@ -import whyIsNodeRunning from 'why-is-node-running' // should be your first import - import { createWriteStream, openAsBlob } from 'node:fs'; import { stat } from 'node:fs/promises'; import { Writable } from 'node:stream'; @@ -464,7 +462,6 @@ export const handleArgs = (args: string[]) => { } console.assert(accessToken, 'No access_token found'); console.assert(!argv.dpop || dpopToken, 'DPoP requested but absent'); - setImmediate(() => whyIsNodeRunning()) } finally { client.close(); } diff --git a/lib/src/opentdf.ts b/lib/src/opentdf.ts index 2472c78f..b0b39f5f 100644 --- a/lib/src/opentdf.ts +++ b/lib/src/opentdf.ts @@ -155,7 +155,7 @@ export class NanoHeaderCache { this.cache.delete(key); } } - }, 300000); + }, 500); } get(key: Uint8Array): CryptoKey | undefined {