Skip to content

Commit b93454d

Browse files
initial commit
0 parents  commit b93454d

13 files changed

+844
-0
lines changed

.babelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"presets": ["node6"],
3+
"plugins": ["syntax-async-functions", "transform-async-to-generator", "transform-object-rest-spread"]
4+
}

.eslintrc.json

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
{
2+
"rules": {
3+
"camelcase": 0,
4+
"consistent-return": 0,
5+
"curly": [
6+
2,
7+
"all"
8+
],
9+
"dot-notation": 0,
10+
"eol-last": 0,
11+
"eqeqeq": [
12+
2,
13+
"always",
14+
{
15+
"null": "ignore"
16+
}
17+
],
18+
"handle-callback-err": 0,
19+
"key-spacing": [
20+
2,
21+
{
22+
"mode": "strict"
23+
}
24+
],
25+
"indent": [
26+
2,
27+
"tab",
28+
{
29+
"SwitchCase": 1
30+
}
31+
],
32+
"object-shorthand": 0,
33+
"one-var": 0,
34+
"quotes": [
35+
2,
36+
"single"
37+
],
38+
"semi": [
39+
2,
40+
"always"
41+
],
42+
"strict": [
43+
2,
44+
"never"
45+
],
46+
"wrap-iife": 0,
47+
"new-cap": [
48+
2,
49+
{
50+
"capIsNew": false
51+
}
52+
],
53+
"no-alert": 0,
54+
"no-caller": 2,
55+
"no-bitwise": 2,
56+
"no-debugger": 2,
57+
"no-empty": 2,
58+
"no-eval": 2,
59+
"no-extra-semi": 2,
60+
"no-irregular-whitespace": 0,
61+
"no-multi-spaces": 0,
62+
"no-new": 2,
63+
"no-plusplus": 0,
64+
"no-process-exit": 0,
65+
"no-redeclare": 2,
66+
"no-shadow": 0,
67+
"no-trailing-spaces": [
68+
2,
69+
{
70+
"skipBlankLines": true
71+
}
72+
],
73+
"no-underscore-dangle": 0,
74+
"no-undef": 2,
75+
"no-unused-vars": [
76+
2,
77+
{
78+
"vars": "local",
79+
"args": "none"
80+
}
81+
],
82+
"no-use-before-define": 0
83+
},
84+
"env": {
85+
"node": true,
86+
"es6": true
87+
},
88+
"parser": "babel-eslint",
89+
"parserOptions": {
90+
"ecmaVersion": 6,
91+
"sourceType": "module"
92+
}
93+
}

.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
6+
# Runtime data
7+
pids
8+
*.pid
9+
*.seed
10+
11+
# Directory for instrumented libs generated by jscoverage/JSCover
12+
lib-cov
13+
14+
# Coverage directory used by tools like istanbul
15+
coverage
16+
17+
# nyc test coverage
18+
.nyc_output
19+
20+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
21+
.grunt
22+
23+
# node-waf configuration
24+
.lock-wscript
25+
26+
# Compiled binary addons (http://nodejs.org/api/addons.html)
27+
build/Release
28+
29+
# Dependency directories
30+
node_modules
31+
jspm_packages
32+
33+
# Optional npm cache directory
34+
.npm
35+
36+
# Optional REPL history
37+
.node_repl_history

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
language: node_js
2+
node_js:
3+
- "7"
4+
- "6"
5+
- "5"
6+
- "4"

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017 [Debitoor](https://debitoor.com/)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# cloudflare-zone
2+
Syncronizes a [zone bind file](https://en.wikipedia.org/wiki/Zone_file) with [Cloudflare](https://cloudflare.com/).
3+
4+
[![Build Status](https://travis-ci.org/debitoor/cloudflare-zone.svg?branch=master)](https://travis-ci.org/debitoor/cloudflare-zone)
5+
[![NPM Version](https://img.shields.io/npm/v/cloudflare-zone.svg)](https://www.npmjs.com/package/css-bingo)
6+
7+
## Install
8+
``` bash
9+
$ npm install cloudflare-zone --save
10+
```
11+
12+
## Usage
13+
14+
``` bash
15+
$ cloudflare-zone --file ./debitoor.com.bind --authEmail ... --authKey ...
16+
```
17+
18+
Defaults to environment variables `CLOUDFLARE_AUTH_EMAIL` and `CLOUDFLARE_AUTH_KEY`.
19+
20+
## License
21+
MIT License
22+
23+
Copyright (c) 2017 [Debitoor](https://debitoor.com/)
24+
25+
Permission is hereby granted, free of charge, to any person obtaining a copy
26+
of this software and associated documentation files (the "Software"), to deal
27+
in the Software without restriction, including without limitation the rights
28+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
29+
copies of the Software, and to permit persons to whom the Software is
30+
furnished to do so, subject to the following conditions:
31+
32+
The above copyright notice and this permission notice shall be included in all
33+
copies or substantial portions of the Software.
34+
35+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
36+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
37+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
38+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
39+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
40+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
41+
SOFTWARE.

bin/cloudflare-zone.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env node
2+
'use strict';
3+
4+
var _commandLineArgs = require('command-line-args');
5+
6+
var _commandLineArgs2 = _interopRequireDefault(_commandLineArgs);
7+
8+
var _cloudflareZone = require('../lib/cloudflare-zone');
9+
10+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11+
12+
const optionDefinitions = [{ name: 'file', type: String }, { name: 'authEmail', type: String, defaultValue: process.env.CLOUDFLARE_AUTH_EMAIL }, { name: 'authKey', type: String, defaultValue: process.env.CLOUDFLARE_AUTH_KEY }];
13+
14+
const options = (0, _commandLineArgs2.default)(optionDefinitions);
15+
16+
(0, _cloudflareZone.main)(options).catch(err => {
17+
console.error(err);
18+
process.exit(1);
19+
}).then(() => {
20+
process.exit(0);
21+
});

0 commit comments

Comments
 (0)