twilio-sync
Advanced tools
Comparing version 0.2.8 to 0.3.0-alpha.1
@@ -1,3 +0,1 @@ | ||
'use strict'; | ||
const gulp = require('gulp'); | ||
@@ -10,2 +8,3 @@ const gutil = require('gulp-util'); | ||
const babelify = require('babelify'); | ||
const babel = require('babel-core/register'); | ||
const source = require('vinyl-source-stream'); | ||
@@ -19,6 +18,7 @@ const buffer = require('vinyl-buffer'); | ||
const rename = require('gulp-rename'); | ||
const replace = require('gulp-replace'); | ||
const uglify = require('gulp-uglify'); | ||
const cheerio = require('cheerio'); | ||
const tap = require('gulp-tap'); | ||
const derequire = require('gulp-derequire'); | ||
const isparta = require('isparta'); | ||
@@ -32,5 +32,4 @@ const pkg = require('./package'); | ||
source: { | ||
dir: 'src', | ||
name: pkg.name + '.js', | ||
lib: 'lib/*.js' | ||
lib: 'src/*.js' | ||
}, | ||
@@ -43,3 +42,3 @@ packaged: { | ||
bundled: { | ||
dir: 'src', | ||
dir: 'build', | ||
name: pkg.name + '-bundle.js' | ||
@@ -53,7 +52,6 @@ }, | ||
files: [ | ||
'lib/*.js', | ||
'!lib/utils.js', | ||
'!lib/jsondiff.js', | ||
'src/*.js', | ||
'!src/utils.js', | ||
'!src/jsondiff.js', | ||
'gulpfile.js' | ||
// 'test/*/*/*.js' | ||
] | ||
@@ -79,9 +77,9 @@ }, | ||
files: [ | ||
'./lib/client.js', | ||
'./lib/syncdocument.js', | ||
'./lib/syncmap.js', | ||
'./lib/mapitem.js', | ||
'./lib/synclist.js', | ||
'./lib/listitem.js', | ||
'./lib/paginator.js' | ||
'./src/client.js', | ||
'./src/syncdocument.js', | ||
'./src/syncmap.js', | ||
'./src/mapitem.js', | ||
'./src/synclist.js', | ||
'./src/listitem.js', | ||
'./src/paginator.js' | ||
], | ||
@@ -101,3 +99,6 @@ publicConstructors: ['Client'], | ||
return gulp.src([product.source.lib]) | ||
.pipe(istanbul()) | ||
.pipe(istanbul({ | ||
instrumenter: isparta.Instrumenter, | ||
includeUntested: true | ||
})) | ||
.pipe(istanbul.hookRequire()); | ||
@@ -108,3 +109,6 @@ }); | ||
return gulp.src(tests.unit.index, { read: false }) | ||
.pipe(mocha({ reporter: 'spec' })) | ||
.pipe(mocha({ | ||
compilers: { js: babel }, | ||
reporter: 'spec' | ||
})) | ||
.pipe(istanbul.writeReports({ | ||
@@ -124,10 +128,4 @@ dir: coverage.dir, | ||
gulp.task('bundle', function(done) { | ||
var id; | ||
browserify({ debug: false, entries: ['./' + pkg.main] }) | ||
browserify({ debug: false, standalone: 'Twilio.Sync', entries: ['./src/index.js'] }) | ||
.exclude('ws') | ||
.on('dep', function(dep) { | ||
if (dep.entry) { | ||
id = id || dep.id; | ||
} | ||
}) | ||
.transform(babelify, { | ||
@@ -137,3 +135,3 @@ global: true, | ||
presets: ['es2015'], | ||
plugins: ['transform-object-assign'] | ||
plugins: ['transform-runtime'] | ||
}) | ||
@@ -143,23 +141,16 @@ .bundle() | ||
.pipe(buffer()) | ||
.pipe(derequire()) | ||
.pipe(gulp.dest(product.bundled.dir)) | ||
.once('error', exit) | ||
.once('end', function() { | ||
gulp.src([product.bundled.dir + '/' + product.bundled.name]) | ||
.pipe(insert.wrap('(function unpack(){var id=' + id + ', bundle=', | ||
'return bundle(id)})();')) | ||
.pipe(gulp.dest(product.bundled.dir)) | ||
.once('error', exit) | ||
.once('end', done); | ||
}); | ||
.once('end', done) | ||
.once('error', exit); | ||
}); | ||
gulp.task('license', function() { | ||
const licenseContents = fs.readFileSync(product.license); | ||
var bundledJsContents = fs.readFileSync(product.bundled.dir + '/' + product.bundled.name); | ||
return gulp.src(product.source.dir + '/' + product.source.name) | ||
.pipe(replace('#include "' + product.license + '"', licenseContents)) | ||
.pipe(replace('require(\'../lib\');', bundledJsContents)) | ||
.pipe(replace(/\${name}/, pkg.name)) | ||
.pipe(replace(/\${version}/, pkg.version)) | ||
var licenseContents = fs.readFileSync(product.license); | ||
return gulp.src(product.bundled.dir + '/' + product.bundled.name) | ||
.pipe(insert.prepend( | ||
'/* ' + pkg.name + '.js ' + pkg.version + '\n' | ||
+ licenseContents | ||
+ '*/\n\n' | ||
)) | ||
.pipe(rename(product.packaged.name)) | ||
@@ -166,0 +157,0 @@ .pipe(gulp.dest(product.packaged.dir)); |
{ | ||
"name": "twilio-sync", | ||
"version": "0.2.8", | ||
"version": "0.3.0-alpha.1", | ||
"description": "Twilio Sync client library", | ||
@@ -18,5 +18,5 @@ "main": "lib/index.js", | ||
"platform": "^1.3.1", | ||
"twilio-notifications": "^0.1.6", | ||
"twilio-transport": "^0.0.2", | ||
"twilsock": "^0.1.11", | ||
"twilio-notifications": "^0.2.0-alpha", | ||
"twilio-transport": "^0.0.3", | ||
"twilsock": "^0.2.0-alpha", | ||
"uuid": "^2.0.2" | ||
@@ -27,2 +27,3 @@ }, | ||
"babel-plugin-transform-object-assign": "^6.8.0", | ||
"babel-plugin-transform-runtime": "^6.15.0", | ||
"babel-preset-es2015": "^6.9.0", | ||
@@ -37,2 +38,3 @@ "babelify": "^7.3.0", | ||
"gulp": "^3.9.1", | ||
"gulp-derequire": "^2.1.0", | ||
"gulp-eslint": "^3.0.1", | ||
@@ -49,7 +51,7 @@ "gulp-exit": "0.0.2", | ||
"ink-docstrap": "^1.2.1", | ||
"jsdoc": "^3.4.1", | ||
"isparta": "^4.0.0", | ||
"jsdoc": "^3.4.0", | ||
"jsdoc-babel": "^0.2.1", | ||
"jsonwebtoken": "^7.1.6", | ||
"mocha.parallel": "^0.12.0", | ||
"release-tool": "^0.2.2", | ||
"run-sequence": "^1.2.2", | ||
@@ -60,3 +62,2 @@ "sinon": "^1.17.5", | ||
"twilio": "^3.3.0-edge", | ||
"twilio-common": "^0.1.5", | ||
"underscore": "^1.8.3", | ||
@@ -63,0 +64,0 @@ "vinyl-buffer": "^1.0.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
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
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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 4 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
High entropy strings
Supply chain riskContains high entropy strings. This could be a sign of encrypted data, leaked secrets or obfuscated code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
2512093
52
30216
7
3
37
+ Addedtwilio-notifications@0.2.1(transitive)
+ Addedtwilio-transport@0.0.30.0.8(transitive)
+ Addedtwilsock@0.2.2(transitive)
+ Addeduuid@3.4.0(transitive)
- Removediconv-lite@0.4.24(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedtwilio-notifications@0.1.7(transitive)
- Removedtwilio-transport@0.0.2(transitive)
- Removedtwilsock@0.1.11(transitive)
- Removedurlencode@1.1.0(transitive)
Updatedtwilio-transport@^0.0.3
Updatedtwilsock@^0.2.0-alpha