@speedy/node-core
Advanced tools
Comparing version 1.4.0 to 1.5.0
@@ -0,1 +1,11 @@ | ||
<a name="1.5.0"></a> | ||
# [1.5.0](https://github.com/alan-agius4/speedy-node-core/compare/v1.4.0...v1.5.0) (2018-04-24) | ||
### Features | ||
* **file system:** add `copyAsync` method ([c50146b](https://github.com/alan-agius4/speedy-node-core/commit/c50146b)) | ||
<a name="1.4.0"></a> | ||
@@ -2,0 +12,0 @@ # [1.4.0](https://github.com/alan-agius4/speedy-node-core/compare/v1.3.0...v1.4.0) (2017-10-23) |
@@ -0,0 +0,0 @@ import { Dictionary } from "./dictionary"; |
@@ -0,0 +0,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -0,0 +0,0 @@ export declare namespace config { |
@@ -0,0 +0,0 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { |
export interface Dictionary<T> { | ||
[key: string]: T; | ||
} |
Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -1,4 +0,3 @@ | ||
import * as _ from "lodash"; | ||
export declare namespace fileSystem { | ||
const getRootPath: (() => string) & _.MemoizedFunction; | ||
const getRootPath: () => string; | ||
function deleteAsync(path: string): Promise<boolean>; | ||
@@ -26,2 +25,8 @@ function readFileAsync(path: string): Promise<string>; | ||
function getCanonicalPath(path: string): string; | ||
/** | ||
* Copy an array of file globs | ||
* @param source The glob of target files | ||
* @param destination The path of a destination directory | ||
*/ | ||
function copyAsync(source: string | string[], destination: string): Promise<void[]>; | ||
} |
@@ -10,2 +10,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const cpx_1 = require("cpx"); | ||
const _ = require("lodash"); | ||
@@ -18,3 +19,3 @@ const rimraf = require("rimraf"); | ||
(function (fileSystem) { | ||
fileSystem.getRootPath = _.memoize(() => findFileRecursively() || ""); | ||
fileSystem.getRootPath = _.once(() => findFileRecursively() || ""); | ||
function deleteAsync(path) { | ||
@@ -100,2 +101,16 @@ // tslint:disable-next-line:no-shadowed-variable | ||
fileSystem.getCanonicalPath = getCanonicalPath; | ||
/** | ||
* Copy an array of file globs | ||
* @param source The glob of target files | ||
* @param destination The path of a destination directory | ||
*/ | ||
function copyAsync(source, destination) { | ||
return Promise.all(_.chain(source) | ||
.castArray() | ||
.map(x => new Promise((resolve, reject) => { | ||
cpx_1.copy(x, destination, (error) => error ? reject(error) : resolve()); | ||
})) | ||
.value()); | ||
} | ||
fileSystem.copyAsync = copyAsync; | ||
})(fileSystem = exports.fileSystem || (exports.fileSystem = {})); |
@@ -0,0 +0,0 @@ export * from "./args"; |
@@ -0,0 +0,0 @@ function __export(m) { |
@@ -0,0 +0,0 @@ export declare class Logger { |
@@ -0,0 +0,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -0,0 +0,0 @@ export declare namespace packageMeta { |
@@ -0,0 +0,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -0,0 +0,0 @@ export declare namespace string { |
@@ -0,0 +0,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -0,0 +0,0 @@ import { Logger } from "./logger"; |
@@ -0,0 +0,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
{ | ||
"name": "@speedy/node-core", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "Node core functions and utils.", | ||
@@ -40,2 +40,3 @@ "main": "./dist/index.js", | ||
"chalk": "^2.2.0", | ||
"cpx": "^1.5.0", | ||
"glob": "^7.1.2", | ||
@@ -47,2 +48,3 @@ "lodash": "^4.17.4", | ||
"@speedy/commit-msg-hook": "^1.3.0", | ||
"@types/cpx": "^1.5.0", | ||
"@types/glob": "^5.0.30", | ||
@@ -49,0 +51,0 @@ "@types/jasmine": "^2.5.41", |
@@ -0,0 +0,0 @@ # @speedy/node-core |
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
26016
574
5
13
+ Addedcpx@^1.5.0
+ Addedanymatch@1.3.2(transitive)
+ Addedarr-diff@2.0.04.0.0(transitive)
+ Addedarr-flatten@1.1.0(transitive)
+ Addedarr-union@3.1.0(transitive)
+ Addedarray-unique@0.2.10.3.2(transitive)
+ Addedassign-symbols@1.0.0(transitive)
+ Addedasync-each@1.0.6(transitive)
+ Addedatob@2.1.2(transitive)
+ Addedbabel-runtime@6.26.0(transitive)
+ Addedbase@0.11.2(transitive)
+ Addedbinary-extensions@1.13.1(transitive)
+ Addedbindings@1.5.0(transitive)
+ Addedbraces@1.8.52.3.2(transitive)
+ Addedcache-base@1.0.1(transitive)
+ Addedchokidar@1.7.0(transitive)
+ Addedclass-utils@0.3.6(transitive)
+ Addedcollection-visit@1.0.0(transitive)
+ Addedcomponent-emitter@1.3.1(transitive)
+ Addedcopy-descriptor@0.1.1(transitive)
+ Addedcore-js@2.6.12(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addedcpx@1.5.0(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addeddecode-uri-component@0.2.2(transitive)
+ Addeddefine-property@0.2.51.0.02.0.2(transitive)
+ Addedduplexer@0.1.2(transitive)
+ Addedexpand-brackets@0.1.52.1.4(transitive)
+ Addedexpand-range@1.8.2(transitive)
+ Addedextend-shallow@2.0.13.0.2(transitive)
+ Addedextglob@0.3.22.0.4(transitive)
+ Addedfile-uri-to-path@1.0.0(transitive)
+ Addedfilename-regex@2.0.1(transitive)
+ Addedfill-range@2.2.44.0.0(transitive)
+ Addedfind-index@0.1.1(transitive)
+ Addedfor-in@1.0.2(transitive)
+ Addedfor-own@0.1.5(transitive)
+ Addedfragment-cache@0.2.1(transitive)
+ Addedfsevents@1.2.13(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-value@2.0.6(transitive)
+ Addedglob-base@0.3.0(transitive)
+ Addedglob-parent@2.0.0(transitive)
+ Addedglob2base@0.0.12(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedhas-value@0.3.11.0.0(transitive)
+ Addedhas-values@0.1.41.0.0(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedis-accessor-descriptor@1.0.1(transitive)
+ Addedis-binary-path@1.0.1(transitive)
+ Addedis-buffer@1.1.6(transitive)
+ Addedis-core-module@2.15.1(transitive)
+ Addedis-data-descriptor@1.0.1(transitive)
+ Addedis-descriptor@0.1.71.0.3(transitive)
+ Addedis-dotfile@1.0.3(transitive)
+ Addedis-equal-shallow@0.1.3(transitive)
+ Addedis-extendable@0.1.11.0.1(transitive)
+ Addedis-extglob@1.0.0(transitive)
+ Addedis-glob@2.0.1(transitive)
+ Addedis-number@2.1.03.0.04.0.0(transitive)
+ Addedis-plain-object@2.0.4(transitive)
+ Addedis-posix-bracket@0.1.1(transitive)
+ Addedis-primitive@2.0.0(transitive)
+ Addedis-windows@1.0.2(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedisobject@2.1.03.0.1(transitive)
+ Addedkind-of@3.2.24.0.06.0.3(transitive)
+ Addedmap-cache@0.2.2(transitive)
+ Addedmap-visit@1.0.0(transitive)
+ Addedmath-random@1.0.4(transitive)
+ Addedmicromatch@2.3.113.1.10(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmixin-deep@1.3.2(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addedms@2.0.0(transitive)
+ Addednan@2.22.0(transitive)
+ Addednanomatch@1.2.13(transitive)
+ Addednormalize-path@2.1.1(transitive)
+ Addedobject-copy@0.1.0(transitive)
+ Addedobject-visit@1.0.1(transitive)
+ Addedobject.omit@2.0.1(transitive)
+ Addedobject.pick@1.3.0(transitive)
+ Addedparse-glob@3.0.4(transitive)
+ Addedpascalcase@0.1.1(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedposix-character-classes@0.1.1(transitive)
+ Addedpreserve@0.2.0(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedrandomatic@3.1.1(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedreaddirp@2.2.1(transitive)
+ Addedregenerator-runtime@0.11.1(transitive)
+ Addedregex-cache@0.4.4(transitive)
+ Addedregex-not@1.0.2(transitive)
+ Addedremove-trailing-separator@1.1.0(transitive)
+ Addedrepeat-element@1.1.4(transitive)
+ Addedrepeat-string@1.6.1(transitive)
+ Addedresolve@1.22.8(transitive)
+ Addedresolve-url@0.2.1(transitive)
+ Addedret@0.1.15(transitive)
+ Addedsafe-buffer@5.1.25.2.1(transitive)
+ Addedsafe-regex@1.1.0(transitive)
+ Addedset-value@2.0.1(transitive)
+ Addedshell-quote@1.8.1(transitive)
+ Addedsnapdragon@0.8.2(transitive)
+ Addedsnapdragon-node@2.1.1(transitive)
+ Addedsnapdragon-util@3.0.1(transitive)
+ Addedsource-map@0.5.7(transitive)
+ Addedsource-map-resolve@0.5.3(transitive)
+ Addedsource-map-url@0.4.1(transitive)
+ Addedsplit-string@3.1.0(transitive)
+ Addedstatic-extend@0.1.2(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedsubarg@1.0.0(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
+ Addedto-object-path@0.3.0(transitive)
+ Addedto-regex@3.0.2(transitive)
+ Addedto-regex-range@2.1.1(transitive)
+ Addedunion-value@1.0.1(transitive)
+ Addedunset-value@1.0.0(transitive)
+ Addedurix@0.1.0(transitive)
+ Addeduse@3.1.1(transitive)
+ Addedutil-deprecate@1.0.2(transitive)