mybase 1.1.45 → 1.1.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mybase",
3
- "version": "1.1.45",
3
+ "version": "1.1.46",
4
4
  "description": "",
5
5
  "main": "mybase.js",
6
6
  "scripts": {
@@ -7,7 +7,7 @@ exports.vaultRead = vaultRead;
7
7
  const debug_1 = require("debug");
8
8
  const path_1 = __importDefault(require("path"));
9
9
  const fs_1 = __importDefault(require("fs"));
10
- const node_fs_1 = require("node:fs");
10
+ const fs_2 = require("fs");
11
11
  const fileCacheIsValid_1 = require("./fileCacheIsValid");
12
12
  const global_1 = require("../global");
13
13
  const hash_sha512_1 = require("./hash_sha512");
@@ -18,7 +18,7 @@ function vaultRead(vaultInstance, vaultKey, cache_in_minutes = 10) {
18
18
  return new Promise((resolve, reject) => {
19
19
  let cache_file = path_1.default.join(global_1.vault_cache_folder, (0, hash_sha512_1.hash_sha512)(`${vaultInstance.endpoint}/${vaultKey}`));
20
20
  if (cache_in_minutes > 0 && (0, fileCacheIsValid_1.fileCacheIsValid)(cache_file, cache_in_minutes))
21
- return resolve(JSON.parse((0, node_fs_1.readFileSync)(cache_file).toString()));
21
+ return resolve(JSON.parse((0, fs_2.readFileSync)(cache_file).toString()));
22
22
  vaultInstance.read(vaultKey).then((r) => {
23
23
  if (r.data) {
24
24
  dbg(`vault ${vaultKey} - success`);
@@ -2,7 +2,7 @@ import { debug } from "debug"
2
2
  import nodeVault from "node-vault";
3
3
  import path from "path";
4
4
  import fs from "fs";
5
- import { readFileSync } from 'node:fs';
5
+ import { readFileSync } from 'fs';
6
6
  import { fileCacheIsValid } from "./fileCacheIsValid";
7
7
  import { vault_cache_folder } from "../global";
8
8
  import { hash_sha512 } from "./hash_sha512";