backup-github-repo
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -10,7 +10,14 @@ const { homedir } = require('os') | ||
let resolvedConfig | ||
module.exports = () => { | ||
if (resolvedConfig) return resolvedConfig | ||
for (const configPath of configPaths) { | ||
try { | ||
const config = readFileSync(configPath).toString() | ||
if (config) return { config, configPath } | ||
if (config) { | ||
resolvedConfig = { config: JSON.parse(config), configPath } | ||
return resolvedConfig | ||
} | ||
} catch (err) { | ||
@@ -20,3 +27,3 @@ if (err.code !== 'ENOENT') throw err | ||
} | ||
return {} | ||
return { config: {} } | ||
} |
@@ -5,6 +5,7 @@ const fetch = require('node-fetch') | ||
const { config } = require('../lib/config/get_config')() | ||
// Register OAuth application to increase quotas | ||
// https://developer.github.com/v3/#rate-limiting | ||
// https://github.com/settings/tokens | ||
const token = require('../lib/token') | ||
const { token } = config | ||
@@ -11,0 +12,0 @@ const headers = { |
{ | ||
"name": "backup-github-repo", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Backup all the issues and pull requests of a Github repo, including the comments, events, and labels, as JSON and as HTML", | ||
"bin": { | ||
"backup-github-repo": "./bin/backup-github-repo", | ||
"download-github-repo-json": "./bin/download-github-repo-json", | ||
"download-github-repo-html": "./bin/download-github-repo-html", | ||
"backup-github-repo_repository-name": "./bin/repository_name", | ||
"backup-github-repo_github-token": "./bin/github_token" | ||
"backup-github-repo": "./bin/backup-github-repo.sh", | ||
"download-github-repo-json": "./bin/download-github-repo-json.js", | ||
"download-github-repo-html": "./bin/download-github-repo-html.sh", | ||
"backup-github-repo_get_repository_name": "./bin/get_repository_name.js", | ||
"backup-github-repo_get_github_token": "./bin/get_github_token.js", | ||
"backup-github-repo_init_config": "./bin/init_config.js" | ||
}, | ||
@@ -17,4 +18,3 @@ "main": "index.js", | ||
"files": [ | ||
"lib", | ||
"scripts" | ||
"lib" | ||
], | ||
@@ -21,0 +21,0 @@ "scripts": { |
@@ -15,3 +15,3 @@ # backup-github-repo | ||
* [NodeJS](https://nodejs.org) >= 7.6 | ||
* curl | ||
* [curl](https://curl.se/) | ||
* [jq](https://stedolan.github.io/jq/) | ||
@@ -21,8 +21,3 @@ | ||
```sh | ||
git clone https://github.com/maxlath/backup-github-repo | ||
cd backup-github-repo | ||
npm install | ||
# Make backup-github-repo available globally, so that all place with `Executables declared in package.json` | ||
# can find the executable they depend on. Alternatively, edit those scripts to rely on the executables full paths | ||
npm link | ||
npm install -g backup-github-repo | ||
``` | ||
@@ -29,0 +24,0 @@ |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
13784
255
33
5