external-editor
Advanced tools
Comparing version 3.0.2 to 3.0.3
@@ -9,5 +9,8 @@ "use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
} | ||
return function (d, b) { | ||
@@ -14,0 +17,0 @@ extendStatics(d, b); |
@@ -9,5 +9,8 @@ "use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
} | ||
return function (d, b) { | ||
@@ -14,0 +17,0 @@ extendStatics(d, b); |
@@ -9,5 +9,8 @@ "use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
} | ||
return function (d, b) { | ||
@@ -14,0 +17,0 @@ extendStatics(d, b); |
@@ -9,5 +9,8 @@ "use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
} | ||
return function (d, b) { | ||
@@ -14,0 +17,0 @@ extendStatics(d, b); |
@@ -0,1 +1,7 @@ | ||
/*** | ||
* Node External Editor | ||
* | ||
* Kevin Gravier <kevin@mrkmg.com> | ||
* MIT 2018 | ||
*/ | ||
import { CreateFileError } from "./errors/CreateFileError"; | ||
@@ -15,3 +21,3 @@ import { LaunchEditorError } from "./errors/LaunchEditorError"; | ||
export declare class ExternalEditor { | ||
private static splitStringBySpace(str); | ||
private static splitStringBySpace; | ||
text: string; | ||
@@ -27,8 +33,8 @@ tempFile: string; | ||
cleanup(): void; | ||
private determineEditor(); | ||
private createTemporaryFile(); | ||
private readTemporaryFile(); | ||
private removeTemporaryFile(); | ||
private launchEditor(); | ||
private launchEditorAsync(callback); | ||
private determineEditor; | ||
private createTemporaryFile; | ||
private readTemporaryFile; | ||
private removeTemporaryFile; | ||
private launchEditor; | ||
private launchEditorAsync; | ||
} |
@@ -142,2 +142,6 @@ "use strict"; | ||
var encoding = chardet_1.detect(tempFileBuffer).toString(); | ||
if (!iconv_lite_1.encodingExists(encoding)) { | ||
// Probably a bad idea, but will at least prevent crashing | ||
encoding = "utf8"; | ||
} | ||
this.text = iconv_lite_1.decode(tempFileBuffer, encoding); | ||
@@ -144,0 +148,0 @@ } |
{ | ||
"name": "external-editor", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "Edit a string with the users preferred text editor using $VISUAL or $ENVIRONMENT", | ||
@@ -5,0 +5,0 @@ "main": "main/index.js", |
@@ -10,3 +10,3 @@ # External Editor | ||
Version: 3.0.2 | ||
Version: 3.0.3 | ||
@@ -13,0 +13,0 @@ As of version 3.0.0, the minimum version of node supported is 4. |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
25786
485
9