Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatanpedersen committed May 15, 2017
0 parents commit b93454d
Show file tree
Hide file tree
Showing 13 changed files with 844 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ["node6"],
"plugins": ["syntax-async-functions", "transform-async-to-generator", "transform-object-rest-spread"]
}
93 changes: 93 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"rules": {
"camelcase": 0,
"consistent-return": 0,
"curly": [
2,
"all"
],
"dot-notation": 0,
"eol-last": 0,
"eqeqeq": [
2,
"always",
{
"null": "ignore"
}
],
"handle-callback-err": 0,
"key-spacing": [
2,
{
"mode": "strict"
}
],
"indent": [
2,
"tab",
{
"SwitchCase": 1
}
],
"object-shorthand": 0,
"one-var": 0,
"quotes": [
2,
"single"
],
"semi": [
2,
"always"
],
"strict": [
2,
"never"
],
"wrap-iife": 0,
"new-cap": [
2,
{
"capIsNew": false
}
],
"no-alert": 0,
"no-caller": 2,
"no-bitwise": 2,
"no-debugger": 2,
"no-empty": 2,
"no-eval": 2,
"no-extra-semi": 2,
"no-irregular-whitespace": 0,
"no-multi-spaces": 0,
"no-new": 2,
"no-plusplus": 0,
"no-process-exit": 0,
"no-redeclare": 2,
"no-shadow": 0,
"no-trailing-spaces": [
2,
{
"skipBlankLines": true
}
],
"no-underscore-dangle": 0,
"no-undef": 2,
"no-unused-vars": [
2,
{
"vars": "local",
"args": "none"
}
],
"no-use-before-define": 0
},
"env": {
"node": true,
"es6": true
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
}
}

This comment has been minimized.

Copy link
@eagleeye

eagleeye May 15, 2017

why not using debitoor-eslint-config?

This comment has been minimized.

Copy link
@jonatanpedersen

jonatanpedersen May 15, 2017

Author Contributor

yes, I didn't realize that debitoor-eslint-config was public

37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: node_js
node_js:
- "7"
- "6"
- "5"

This comment has been minimized.

Copy link
@eagleeye

eagleeye May 15, 2017

No reason to test node v5, because it's not LTS. It make sense to test only on LTS + latest stable

This comment has been minimized.

Copy link
@jonatanpedersen

jonatanpedersen May 15, 2017

Author Contributor

I think it makes sense to test on all of them, who are we to say what people are using?

This comment has been minimized.

Copy link
@eagleeye

eagleeye May 15, 2017

Node 5 is not maintained, so it is not secure by default. That is why.

- "4"
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 [Debitoor](https://debitoor.com/)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# cloudflare-zone
Syncronizes a [zone bind file](https://en.wikipedia.org/wiki/Zone_file) with [Cloudflare](https://cloudflare.com/).

[![Build Status](https://travis-ci.org/debitoor/cloudflare-zone.svg?branch=master)](https://travis-ci.org/debitoor/cloudflare-zone)
[![NPM Version](https://img.shields.io/npm/v/cloudflare-zone.svg)](https://www.npmjs.com/package/css-bingo)

## Install
``` bash
$ npm install cloudflare-zone --save
```

## Usage

``` bash
$ cloudflare-zone --file ./debitoor.com.bind --authEmail ... --authKey ...
```

Defaults to environment variables `CLOUDFLARE_AUTH_EMAIL` and `CLOUDFLARE_AUTH_KEY`.

## License
MIT License

Copyright (c) 2017 [Debitoor](https://debitoor.com/)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
21 changes: 21 additions & 0 deletions bin/cloudflare-zone.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env node
'use strict';

var _commandLineArgs = require('command-line-args');

var _commandLineArgs2 = _interopRequireDefault(_commandLineArgs);

var _cloudflareZone = require('../lib/cloudflare-zone');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

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 }];

const options = (0, _commandLineArgs2.default)(optionDefinitions);

(0, _cloudflareZone.main)(options).catch(err => {
console.error(err);
process.exit(1);
}).then(() => {
process.exit(0);
});
Loading

0 comments on commit b93454d

Please sign in to comment.