Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@arkadiuminc/ng-adal
Advanced tools
Angular 4 Adal wrapper package. Can be used to authenticate Angular 4 applications to Azure Active Directory.
This project is also designed to be a functional demomonstration of how to create, build, and publish NPM modules for Angular4.
Working example at https://github.com/benbaran/adal-angular4-example.
npm install -g npm@latest
npm install -g gulp
npm install -g tslint
npm install -g typescript
npm install -g tslint
mkdir adal-angular4
cd adal-angular4
git init
npm init
git add -A
git commit -m 'Initial commit'
npm install --save rxjs@latest
npm install --save zone.js@latest
npm install --save @angular/core@latest
npm install --save @angular/common@latest
npm install --save @angular/platform-browser@latest
npm install --save @angular/http@latest
npm install --save adal-angular@latest
npm install --save-dev gulp
npm install --save-dev gulp-bump
npm install --save-dev del
npm install --save-dev merge2
npm install --save-dev typescript
npm install --save-dev gulp-typescript
npm install --save-dev @types/jasmine
eslint --init
tslint --init
mkdir src
npm adduser
npm publish
adal4-http.service.ts
adal4.user.ts
adal4.service.ts
export {Adal4User} from './adal4-user';
export {Adal4Service} from './adal4.service';
export {Adal4HTTPService} from './adal4-http.service';
// Declare all dependencies for publish process
var bump = require('gulp-bump'),
del = require('del'),
exec = require('child_process').exec,
gulp = require('gulp'),
merge = require('merge2'),
typescript = require('gulp-typescript'),
fs = require('fs');
gulp.task('clean', function () {
del(['dist/*']);
});
gulp.task('bump', ['clean'], function () {
gulp.src('./package.json')
.pipe(bump({
type: 'patch'
}))
.pipe(gulp.dest('./'));
});
gulp.task('bundle', ['bump'], function () {
var tsResult = gulp.src('src/*.ts')
.pipe(typescript({
module: "commonjs",
target: "es5",
noImplicitAny: true,
experimentalDecorators: true,
outDir: "dist/",
rootDir: "src/",
sourceMap: true,
declaration: true,
moduleResolution: "node",
removeComments: false,
lib: [
"es2015",
"dom"
],
types: ["jasmine"]
}));
return merge([
tsResult.dts.pipe(gulp.dest('dist/')),
tsResult.js.pipe(gulp.dest('dist/'))
]);
});
gulp.task('package', ['bundle'], () => {
const pkgjson = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
// remove the scripts section
delete pkgjson.scripts;
// remove the devDependencies section
delete pkgjson.devDependencies;
const filepath = './dist/package.json';
fs.writeFileSync(filepath, JSON.stringify(pkgjson, null, 2), 'utf-8');
});
gulp.task('git-add', ['package'], function (cb) {
exec('git add -A', function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
cb(err);
});
});
// Commit
gulp.task('git-commit', ['git-add'], function (cb) {
var package = require('./package.json');
exec('git commit -m "Version ' + package.version + ' release."', function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
cb(err);
});
});
gulp.task('git-push', ['git-commit'], function (cb) {
exec('git push', function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
cb(err);
});
});
gulp.task('publish', ['git-push'], function (cb) {
exec('npm publish ./dist', function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
cb(err);
});
});
gulp publish
FAQs
ADAL wrapper for Angular Framework
The npm package @arkadiuminc/ng-adal receives a total of 7 weekly downloads. As such, @arkadiuminc/ng-adal popularity was classified as not popular.
We found that @arkadiuminc/ng-adal 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.