Skip to content

Commit

Permalink
Create the authress sdk.
Browse files Browse the repository at this point in the history
  • Loading branch information
wparad committed Apr 30, 2020
1 parent 06618c8 commit a207534
Show file tree
Hide file tree
Showing 14 changed files with 1,740 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
17 changes: 17 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"env": {
"es6": true,
"node": true
},
"extends": [
"cimpress-atsquad"
],
"rules": {
"arrow-parens": ["error", "as-needed"],
"indent": ["error", "tab", { "SwitchCase": 1, "MemberExpression": 0 }],
"node/no-unsupported-features": ["off"],
"no-throw-literal": "off",
"spaced-comment": "off",
"no-unused-expressions": "off"
}
}
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed

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

# Coverage directory used by tools like istanbul
coverage

# 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 directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules
bin/template/yarn.lock
23 changes: 23 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
language: node_js
node_js:
- 8.10.0
before_script:
- node make.js build
before_deploy:
- node make.js after_build
deploy:
provider: npm
email: [email protected]
api_key:
secure: ZTwkKtd7ZkyccsIjzjQ9b6y37r5dlkuROx30fhhMmPurhg6E32IrCsDm5b87HxV9dYJCm0MAMB8RtDW/YQ/Bo9h48pAvGV5E1rG48h57R6rEIPGERZ0dakmlFOjt+dlaEb0C4Fv90uWT2Rg2SFS0Lob9pPsNlYvPMGoaHFEwulSCrKjEromo6adB2geAvNVwtp76Ls0IfDwinoQTMsf0/19lf0pWGPWPvfwScE0BZv5ZMVanUKBXBqV8Ipes2c0iZR2WoAOBG7u1y4tk2WSADCLCo9p2jOXCGG55JwpRfvaokjZveM4O2qfXr6BaiDiy8FaXCBpln1K6iLThniPDxE3EpcBr9aLrnPj78tImkgvRqPhNnfgfpizl6Gv6qxHJavhiPnXvi+em/NeLLF8pYPH/GRKYqdOIfp/Fyez4de80k+LhNyYiYCt18hvFOib5PYngXvcsrDM69/n4lLqvlx6yU1taAaPMWUYXHj8jT4hQTCN+z5YdVTRgvuDUdswyfqvuHfJ2CCWE9nm3i46BAkCQXDDB199qqjSiKHu2jIr4tz77iXE3StoL1ePkQofTPcawe7pSlNqj2x8qydnlaGqg3ZuZJMm9zsGzgTQRjXxrcCmSX0QShFqHTJR1VFFB89PUEthgsiKPdp94pIH+a0EIw1NQNm9A4pQY47IepN4=
skip_cleanup: true
on:
all_branches: true
condition: "$TRAVIS_BRANCH != master"
branches:
only:
- master
- "/^release.*/"
env:
global:
- secure: Uk/Id3Lxb4YVmtLx/Su+upgnp9Cc1adhI6LIT0MC12jd0XmSb5mnFKI6zzXWNiyZr6/6PFbaiYcGwUPBFRknhhr14O2kt+j9U5KXZvbdiKbl01+6gXBKiJ2SEVnxeIuibmrxEiqSAQlWUpyph/gdOKIvh8bxGzm15jg5n1A58sgJ3cEZc+aVVeZCPD11RespnWRGf2oyVQEyvt+k2KMFWB9UKuGIf4oLfz9IkD/OV5CIpJFkuPnYY+Lnt1zaTTuB1mZ2aY9bqzj6B/lQNsB4jcQxKDtABjLZhZ42yodrHl4HSiiY5odM4cVw4vIPjMgOsDyXbmiKQ5zr1IZVRIqdCRCH496Fcp5LW7db/idPcndsrENNd7d9FD93LTv5LDZfLRbXBU1wjJTnKmPOPFO1xSu5uYs+ekpeilG8gTdgEw+2t1Ew2ZPBRXWskYPzsp0d8dd3dDi438F38D+x1yFQraFYLb2HsT/I6uqZsJQ+OGtvotxF7oLO13JVywaBrkmDFVCggFseSH2G5OJ3FDtsY1FSVfa76x9OKGC6zP3fwOEa5HKVwK9TBTGGLOsNvxp01p6a2Iq4Kc/Gm/1F+CYpDVafObDmgQNGhPdLfBZNIR2GnnVijiazpYbD0Tsa2AP/P/U+ZPOGjZOz/PwHY3xutcX16Z0UpK5vVnGbJ8B3hJo=
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.exclude": {
"**/bin/": false,
}
}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Change log
This is the changelog for [Authress SDK](readme.md).

## 1.0 ##
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# authress-sdk.js
The Authress SDK in javascript

[![npm version](https://badge.fury.io/js/authress-sdk.svg)](https://badge.fury.io/js/authress-sdk)
[![Build Status](https://travis-ci.com/authress/authress-sdk.js.svg?branch=master)](https://travis-ci.com/authress/authress-sdk.js)
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AuthressSdk {

}

module.exports = AuthressSdk;
9 changes: 9 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"compilerOptions": {
"target": "ES6"
},
"exclude": [
"node_modules",
"**/node_modules/*"
]
}
5 changes: 5 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class libFile {

}

module.exports = libFile;
46 changes: 46 additions & 0 deletions make.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/**
* Module dependencies
*/
let commander = require('commander');
let fs = require('fs-extra');

let travis = require('travis-build-tools')(process.env.GIT_TAG_PUSHER);
let version = travis.GetVersion();
commander.version(version);

/**
* Build
*/
commander
.command('build')
.description('Setup require build files for npm package.')
.action(async () => {
let package_metadata = require('./package.json');
package_metadata.version = version;
await fs.writeJson('./package.json', package_metadata, { spaces: 2 });

console.log('Building package %s (%s)', package_metadata.name, version);
console.log('');
});

/**
* After Build
*/
commander
.command('after_build')
.description('Publishes git tags and reports failures.')
.action(() => {
let package_metadata = require('./package.json');
console.log('After build package %s (%s)', package_metadata.name, version);
console.log('');
travis.PublishGitTag();
travis.MergeDownstream('release/', 'master');
});

commander.on('*', () => {
if (commander.args.join(' ') === 'tests/**/*.js') { return; }
console.log(`Unknown Command: ${commander.args.join(' ')}`);
commander.help();
process.exit(0);
});
commander.parse(process.argv[2] ? process.argv : process.argv.concat(['build']));
52 changes: 52 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"name": "authress-sdk",
"version": "0.0.0",
"description": "Client SDK for Authress (https://authress.com)",
"main": "index.js",
"files": [
"index.js",
"index.d.ts",
"lib"
],
"scripts": {
"lint": "eslint --ext .js tests lib index.js",
"test": "mocha tests/**/*.js -R spec"
},
"dependencies": {},
"peerDependencies": {
"aws-sdk": "*"
},
"devDependencies": {
"chai": "^3.5.0",
"commander": "^2.5.0",
"eslint-config-cimpress-atsquad": "^1.0.67",
"fs-extra": "^6.0.1",
"glob": "^5.0.15",
"mocha": "^7.1.2",
"sinon": "^1.17.3",
"travis-build-tools": "~1.2"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Authress/authress-sdk.js"
},
"keywords": [
"authorization",
"authorization as a service",
"authentication",
"Authress",
"Authress client",
"access management",
"access management as a service",
"user security"
],
"author": "Authress Developers <[email protected]> (https://authress.com)",
"license": "BSD-3-Clause",
"bugs": {
"url": "https://github.com/Authress/authress-sdk.js/issues"
},
"homepage": "https://authress.com",
"engines": {
"node": ">=8.9.4"
}
}
9 changes: 9 additions & 0 deletions tests/index.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
let { describe, it } = require('mocha');

describe('index.js', () => {
describe('Syntax', () => {
it('Should be valid node', () => {
require('../index');
});
});
});
Loading

0 comments on commit a207534

Please sign in to comment.