New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fastly-domains

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastly-domains - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

.npmignore

39

bin/fastly-domains.js

@@ -5,32 +5,23 @@ #!/usr/bin/env node

const yargs = require('yargs');
const ora = require('ora');
const chalk = require('chalk');
const fastly = require('../src/index');
const token = require('./fastly-token');
const response = require('../test/response/domains.response');
const argv = yargs
.options({
'token': {
alias: 't',
describe: 'Fastly API token with read access',
demandOption: true,
}
})
.check(argv => {
if (argv.token.length === 32) {
return true;
} else {
throw new Error('Your token is not a valid Fastly API token! Please try again.');
}
})
.help()
.alias('help', 'h')
.version()
.alias('version', 'v')
.argv;
const spinner = ora(chalk.yellow('Fetching domains')).start();
fastly(argv.token)
fastly(token)
.then(domains => {
console.log(JSON.stringify(domains, null, 2));
spinner.succeed(chalk.green('Fetching domains'));
console.log(chalk.dim(JSON.stringify(domains, null, 2)));
})
.catch(err => {
console.error(err.message);
spinner.fail(chalk.red('Fetching domains'));
if (err.message === response.domainList.error[401] || err.message === response.domainList.error[404]) {
spinner.info(chalk.blue(err.message));
} else {
spinner.info(chalk.blue('Something went wrong! Please check your internet connection and try it again.'));
}
});
{
"name": "fastly-domains",
"version": "0.0.1",
"version": "0.1.0",
"description": "Client to list all the domains for a particular Fastly account",
"main": "src/index.js",
"scripts": {
"test": "mocha test"
"commit": "git-cz",
"check-coverage": "istanbul check-coverage --statements 100 --branches 100 --functions 100 --lines 100",
"report-coverage": "cat ./coverage/lcov.info | codecov",
"test": "istanbul cover -x *.test.js _mocha -- -R spec test",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
},

@@ -32,13 +36,32 @@ "repository": {

"homepage": "https://github.com/philippschulte/fastly-domains#readme",
"engines": {
"node": ">=7.6.0"
},
"dependencies": {
"chalk": "2.1.0",
"fastly-promises": "0.4.0",
"lodash": "4.17.4",
"ora": "1.3.0",
"yargs": "8.0.2"
},
"devDependencies": {
"codecov.io": "0.1.6",
"commitizen": "2.9.6",
"cz-conventional-changelog": "2.0.0",
"expect": "1.20.2",
"ghooks": "2.0.0",
"istanbul": "1.1.0-alpha.1",
"mocha": "3.4.2",
"nock": "9.0.14",
"rewire": "2.5.2"
"rewire": "2.5.2",
"semantic-release": "^7.0.2"
},
"config": {
"commitizen": {
"path": "node_modules/cz-conventional-changelog"
},
"ghooks": {
"pre-commit": "npm run test && npm run check-coverage"
}
}
}
}

@@ -35,2 +35,4 @@ # fastly-domains

The library doesn't provide an option to specify a particular version of a service since it fetches the domains of all serivces. Instead it uses the active version for each request to [GET /service/service_id/version/version/domain](https://docs.fastly.com/api/config#domain_6d340186666771f022ca20f81609d03d).
## Security

@@ -37,0 +39,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc