@augment-vir/node-js
Advanced tools
Comparing version 12.6.1 to 12.7.0
/// <reference types="node" /> | ||
import { RequireExactlyOne } from 'type-fest'; | ||
export declare function createSymLink( | ||
@@ -26,2 +27,12 @@ /** | ||
export declare function readFileIfExists(path: string): Promise<string | undefined>; | ||
/** | ||
* Reads all files within a directory and then filters them by the given extension or extensions. | ||
* Returns that filtered list. | ||
*/ | ||
export declare function readDirFilesByExtension({ dirPath, extension, extensions, }: { | ||
dirPath: string; | ||
} & RequireExactlyOne<{ | ||
extension: string; | ||
extensions: ReadonlyArray<string>; | ||
}>): Promise<string[]>; | ||
//# sourceMappingURL=file-system.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.readFileIfExists = exports.readDirRecursive = exports.writeFileAndDir = exports.createSymLink = void 0; | ||
exports.readDirFilesByExtension = exports.readFileIfExists = exports.readDirRecursive = exports.writeFileAndDir = exports.createSymLink = void 0; | ||
const fs_1 = require("fs"); | ||
@@ -73,1 +73,12 @@ const fs_extra_1 = require("fs-extra"); | ||
exports.readFileIfExists = readFileIfExists; | ||
/** | ||
* Reads all files within a directory and then filters them by the given extension or extensions. | ||
* Returns that filtered list. | ||
*/ | ||
async function readDirFilesByExtension({ dirPath, extension, extensions, }) { | ||
const extensionsToCheck = extensions ? extensions : [extension]; | ||
const fileNames = await (0, promises_1.readdir)(dirPath); | ||
const filteredFileNames = fileNames.filter((fileName) => extensionsToCheck.some((extensionToCheck) => fileName.endsWith(extensionToCheck))); | ||
return filteredFileNames; | ||
} | ||
exports.readDirFilesByExtension = readDirFilesByExtension; |
@@ -1,2 +0,2 @@ | ||
export declare const repoDir: string; | ||
export declare const packageDir: string; | ||
export declare const longRunningFile: string; | ||
@@ -3,0 +3,0 @@ export declare const longRunningFileWithStderr: string; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.recursiveFileReadDir = exports.longRunningFileWithStderr = exports.longRunningFile = exports.repoDir = void 0; | ||
exports.recursiveFileReadDir = exports.longRunningFileWithStderr = exports.longRunningFile = exports.packageDir = void 0; | ||
const path_1 = require("path"); | ||
exports.repoDir = (0, path_1.dirname)(__dirname); | ||
const testFilesDir = (0, path_1.join)(exports.repoDir, 'test-files'); | ||
exports.packageDir = (0, path_1.dirname)(__dirname); | ||
const testFilesDir = (0, path_1.join)(exports.packageDir, 'test-files'); | ||
const longRunningFileDir = (0, path_1.join)(testFilesDir, 'long-running-test-file'); | ||
@@ -8,0 +8,0 @@ exports.longRunningFile = (0, path_1.join)(longRunningFileDir, 'long-running-file.ts'); |
{ | ||
"name": "@augment-vir/node-js", | ||
"version": "12.6.1", | ||
"version": "12.7.0", | ||
"homepage": "https://github.com/electrovir/augment-vir/tree/main/packages/node-js", | ||
@@ -20,3 +20,3 @@ "bugs": { | ||
"scripts": { | ||
"compile": "tsc --pretty", | ||
"compile": "tsc", | ||
"test": "virmator test", | ||
@@ -26,3 +26,3 @@ "test:coverage": "npm test coverage" | ||
"dependencies": { | ||
"@augment-vir/common": "^12.6.1", | ||
"@augment-vir/common": "^12.7.0", | ||
"ansi-colors": "^4.1.3", | ||
@@ -35,2 +35,3 @@ "axios": "^1.3.3", | ||
"devDependencies": { | ||
"@augment-vir/chai": "^12.7.0", | ||
"@electrovir/nyc": "^15.1.0-fix0", | ||
@@ -37,0 +38,0 @@ "@istanbuljs/nyc-config-typescript": "^1.0.2", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33243
753
15
Updated@augment-vir/common@^12.7.0