Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
appium-gulp-plugins
Advanced tools
Custom plugins used accross appium modules
Traceur compilation, sourcemaps and file renaming functionality in one plugin. .es7.js
and .es6.js
files will be automatically
renamed to .js files
. The necessary sourcemaps and traceur comments and imports are also automatically added.
1/ Configure gulp as below:
var gulp = require('gulp'),
transpile = require('appium-gulp-plugins').gulpTranspile
gulp.task('transpile', function () {
return gulp.src('test/fixtures/es7/**/*.js')
.pipe(transpile())
.pipe(gulp.dest('build'));
});
2/ in your code you need to mark the main and mocha files as below:
// transpile:main
at the beginning of the file (example here) .// transpile:mocha
at the beginning of the file (example here)Regular lib files do not need any extra comments.
Set the following env variable to skip the traceur runtime declaration.
process.env.SKIP_TRACEUR_RUNTIME = true;
There are some issues Gulp 3.x error handling which cause the default gulp-watch to hang. This pluging is a small hack which solves that by respawning the whole process on error. This should not be needed is gulp 4.0.
var gulp = require('gulp'),
spawnWatcher = require('./index').spawnWatcher.use(gulp);
spawnWatcher.configure('watch', ['lib/**/*.js','test/**/*.js','!test/fixtures'], function() {
// this is the watch action
return runSequence('test');
});
The spawn needs to catch error as soon as they happen. To do so use the
spawnWatcher.handleError
method, for instance:
// add error handling where needed
gulp.task('transpile', function () {
return gulp.src('test/es7/**/*.js')
.pipe(transpile())
.on('error', spawnWatcher.handleError)
.pipe(gulp.dest('build'));
});
gulp.task('test', ['transpile'] , function () {
process.env.SKIP_TRACEUR_RUNTIME = true;
return gulp.src('build/test/a-specs.js')
.pipe(mocha())
.on('error', spawnWatcher.handleError);
});
Terminal is cleared by default. To avoid that call:
spawnWatcher.clear(false);
FAQs
Custom gulp plugins to be used across all appium modules
The npm package appium-gulp-plugins receives a total of 660 weekly downloads. As such, appium-gulp-plugins popularity was classified as not popular.
We found that appium-gulp-plugins demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.