You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

emitty

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emitty - npm Package Compare versions

Comparing version

to
1.3.1

0

out/emitty.d.ts

@@ -0,0 +0,0 @@ /// <reference types="node" />

3

out/emitty.js
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const storage_1 = require("./services/storage");

@@ -27,3 +28,3 @@ const config_1 = require("./services/config");

cleanupInterval: null,
log: (filepath) => console.log,
log: () => console.log,
vinylFile: false

@@ -30,0 +31,0 @@ }, options);

import { ILanguage } from '../services/config';
export declare function parseDependencies(content: string, language: ILanguage): string[];
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const path = require("path");

@@ -9,2 +10,7 @@ function normalizeExtension(filepath, extensions) {

}
function isCommentLine(line, re) {
const textBeforeComment = line.substring(0, re.index);
// Comment line should started with only with spaces
return /^\s*$/.test(textBeforeComment);
}
/**

@@ -26,4 +32,4 @@ * Search for dependencies in the languages is based on indentation.

comment = reCommentStart.exec(line);
// indent === -1 - because Jade & Pug supports nested comments
if (indent === -1 && comment) {
// Indent === -1 - because Jade & Pug supports nested comments
if (indent === -1 && comment && isCommentLine(line, comment)) {
indent = comment.index;

@@ -30,0 +36,0 @@ continue;

@@ -0,0 +0,0 @@ import { Storage } from '../services/storage';

'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const micromatch = require("micromatch");

@@ -3,0 +4,0 @@ const paths_1 = require("../utils/paths");

@@ -0,0 +0,0 @@ /// <reference types="node" />

@@ -7,5 +7,6 @@ 'use strict';

function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments)).next());
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const path = require("path");

@@ -24,4 +25,4 @@ const through2 = require("through2");

this.options = options;
this.scanner = new scanner_1.Scanner(root, storage, language, options);
this.resolver = new resolver_1.Resolver(storage);
this.scanner = new scanner_1.Scanner(this.root, this.storage, this.language, this.options);
this.resolver = new resolver_1.Resolver(this.storage);
}

@@ -32,3 +33,3 @@ /**

run(filepath, stats) {
const _this = this;
const self = this;
// Protection against undefined

@@ -39,13 +40,13 @@ if (typeof filepath !== 'string') {

}
return through2.obj(function (file, enc, cb) {
let mainFile = _this.makeMainFilePath(_this.root, file);
return through2.obj(function (file, _enc, cb) {
const mainFile = self.makeMainFilePath(self.root, file);
// Update Storage
_this.scanner.scan(filepath, stats).then((lastChangedFile) => {
self.scanner.scan(filepath, stats).then((lastChangedFile) => {
// Protection against bad paths
if (!filepath && !lastChangedFile) {
_this.pushFile(this, file, mainFile);
self.pushFile(this, file, mainFile);
return cb();
}
filepath = filepath ? filepath : lastChangedFile;
_this.filterFileByDependencies(filepath, mainFile, this, file, cb);
self.filterFileByDependencies(filepath, mainFile, this, file, cb);
}).catch(cb);

@@ -58,11 +59,11 @@ });

filter(filepath) {
const _this = this;
return through2.obj(function (file, enc, cb) {
let mainFile = _this.makeMainFilePath(_this.root, file);
const self = this;
return through2.obj(function (file, _enc, cb) {
const mainFile = self.makeMainFilePath(self.root, file);
// Protection against bad paths
if (!filepath) {
_this.pushFile(this, file, mainFile);
self.pushFile(this, file, mainFile);
return cb();
}
_this.filterFileByDependencies(filepath, mainFile, this, file, cb);
self.filterFileByDependencies(filepath, mainFile, this, file, cb);
});

@@ -69,0 +70,0 @@ }

@@ -0,0 +0,0 @@ export interface ILanguageComment {

'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
exports.builtInConfigs = {

@@ -3,0 +4,0 @@ jade: {

@@ -0,0 +0,0 @@ /// <reference types="node" />

'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const path = require("path");

@@ -47,3 +48,3 @@ const readdir = require("readdir-enhanced");

this.changedFile = null;
return new Promise((resolve, reject) => {
return new Promise((resolve) => {
const stream = readdir.readdirStreamStat(this.root, {

@@ -50,0 +51,0 @@ basePath: path.resolve(this.root),

@@ -0,0 +0,0 @@ export interface IStorageItem {

'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
class Storage {

@@ -3,0 +4,0 @@ constructor() {

@@ -0,0 +0,0 @@ /// <reference types="node" />

'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const fs = require("fs");

@@ -3,0 +4,0 @@ function pathExists(filepath) {

@@ -0,0 +0,0 @@ export declare function normalize(filepath: string): string;

'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const path = require("path");

@@ -3,0 +4,0 @@ // RegExp's

{
"name": "emitty",
"version": "1.3.0",
"version": "1.3.1",
"description": "Determine the inheritance of template and style files",

@@ -33,10 +33,11 @@ "license": "MIT",

"@types/micromatch": "^2.3.29",
"@types/mocha": "^2.2.33",
"@types/node": "^0.0.2",
"@types/mocha": "^2.2.39",
"@types/node": "^7.0.5",
"@types/through2": "^2.0.32",
"@types/vinyl": "^2.0.0",
"mocha": "^3.2.0",
"rimraf": "^2.5.4",
"tslint": "^3.15.1",
"typescript": "^2.0.10",
"rimraf": "^2.6.1",
"tslint": "^4.4.2",
"tslint-config-xo": "^1.1.0",
"typescript": "^2.2.1",
"vinyl": "^2.0.1"

@@ -43,0 +44,0 @@ },