diff --git a/packages/xo-server-auth-saml/.babelrc b/packages/xo-server-auth-saml/.babelrc deleted file mode 100644 index 5e9978a41..000000000 --- a/packages/xo-server-auth-saml/.babelrc +++ /dev/null @@ -1,15 +0,0 @@ -{ - "comments": false, - "compact": true, - "optional": [ - // Experimental features. - // "minification.constantFolding", - // "minification.deadCodeElimination", - - "es7.asyncFunctions", - "es7.decorators", - "es7.exportExtensions", - "es7.functionBind", - "runtime" - ] -} diff --git a/packages/xo-server-auth-saml/.editorconfig b/packages/xo-server-auth-saml/.editorconfig index da21ef4c5..b6db0112a 100644 --- a/packages/xo-server-auth-saml/.editorconfig +++ b/packages/xo-server-auth-saml/.editorconfig @@ -41,7 +41,7 @@ indent_style = space # # Two spaces seems to be the standard most common style, at least in # Node.js (http://nodeguide.com/style.html#tabs-vs-spaces). -[*.js] +[*.{js,jsx,ts,tsx}] indent_size = 2 indent_style = space diff --git a/packages/xo-server-auth-saml/.gitignore b/packages/xo-server-auth-saml/.gitignore index 384949d8a..fa69f37f1 100644 --- a/packages/xo-server-auth-saml/.gitignore +++ b/packages/xo-server-auth-saml/.gitignore @@ -1,8 +1,5 @@ -/bower_components/ /dist/ +/node_modules/ npm-debug.log npm-debug.log.* - -!node_modules/* -node_modules/*/ diff --git a/packages/xo-server-auth-saml/.mocha.js b/packages/xo-server-auth-saml/.mocha.js deleted file mode 100644 index b888fb4d5..000000000 --- a/packages/xo-server-auth-saml/.mocha.js +++ /dev/null @@ -1,3 +0,0 @@ -try { require('clarify') } catch (_) {} -try { require('trace') } catch (_) {} -try { require('source-map-support/register') } catch (_) {} diff --git a/packages/xo-server-auth-saml/.mocha.opts b/packages/xo-server-auth-saml/.mocha.opts deleted file mode 100644 index 6cfd94898..000000000 --- a/packages/xo-server-auth-saml/.mocha.opts +++ /dev/null @@ -1 +0,0 @@ ---require ./.mocha.js diff --git a/packages/xo-server-auth-saml/.travis.yml b/packages/xo-server-auth-saml/.travis.yml index 502095fce..fb5d91729 100644 --- a/packages/xo-server-auth-saml/.travis.yml +++ b/packages/xo-server-auth-saml/.travis.yml @@ -2,8 +2,6 @@ language: node_js node_js: - 'stable' - '4' - - '0.12' - - '0.10' # Use containers. # http://docs.travis-ci.com/user/workers/container-based-infrastructure/ diff --git a/packages/xo-server-auth-saml/README.md b/packages/xo-server-auth-saml/README.md index 400ff966b..420d35ae5 100644 --- a/packages/xo-server-auth-saml/README.md +++ b/packages/xo-server-auth-saml/README.md @@ -21,27 +21,8 @@ Installation of the [npm package](https://npmjs.org/package/xo-server-auth-saml) > see [its documentation](https://github.com/bergie/passport-saml#configure-strategy) > for more information about the configuration. -To enable this plugin you have to add the following lines into the -configuration file of XO-Server: - -```yaml -plugins: - - auth-saml: - # Server certificate used to validate in Base64 (no comments, no line breaks). - cert: 'MIIFBjCCAu4CCQDBMhqko5KQODANBgkqhkiG9w0BAQ ...' - - # Identity provider entry point (sign in URL). - entryPoint: 'https://saml.example.org/signin/' - - # Issuer string to supply the identity provider. - issuer: 'xen-orchestra' - - # Field to use as the name of the user. - # - # Default: uid. - usernameField: 'uid' -``` +Like all other xo-server plugins, it can be configured directly via +the web iterface, see [the plugin documentation](https://xen-orchestra.com/docs/plugins.html). > Important: When registering your instance to your identity provider, > you must configure its callback URL to diff --git a/packages/xo-server-auth-saml/package.json b/packages/xo-server-auth-saml/package.json index 7a67fcbbf..64c371751 100644 --- a/packages/xo-server-auth-saml/package.json +++ b/packages/xo-server-auth-saml/package.json @@ -25,32 +25,49 @@ "files": [ "dist/" ], + "engines": { + "node": ">=4" + }, "dependencies": { - "babel-runtime": "^5.8.20", - "passport-saml": "^0.12.0" + "babel-runtime": "^6.11.6", + "passport-saml": "^0.15.0" }, "devDependencies": { - "babel": "^5.8.21", - "babel-eslint": "^4.1.0", - "clarify": "^1.0.5", - "mocha": "^2.2.5", - "must": "^0.12.0", - "source-map-support": "^0.3.2", - "standard": "^5.1.0", - "trace": "^1.2.0" + "babel-cli": "^6.14.0", + "babel-eslint": "^6.1.2", + "babel-plugin-transform-runtime": "^6.15.0", + "babel-preset-es2015": "^6.14.0", + "babel-preset-stage-0": "^6.5.0", + "dependency-check": "^2.6.0", + "ghooks": "^1.3.2", + "standard": "^8.2.0" }, "scripts": { - "build": "babel --source-maps --out-dir=dist/ src/", - "dev": "babel --watch --source-maps --out-dir=dist/ src/", + "build": "NODE_ENV=production babel --source-maps --out-dir=dist/ src/", + "depcheck": "dependency-check ./package.json", + "dev": "NODE_DEV=development babel --watch --source-maps --out-dir=dist/ src/", "lint": "standard", - "prepublish": "npm run build", - "test": "npm run lint && mocha --opts .mocha.opts \"dist/**/*.spec.js\"", - "test-dev": "mocha --opts .mocha.opts --watch --reporter=min \"dist/**/*.spec.js\"" + "posttest": "npm run lint && npm run depcheck", + "prepublish": "npm run build" + }, + "babel": { + "plugins": [ + "transform-runtime" + ], + "presets": [ + "es2015", + "stage-0" + ] }, "standard": { "ignore": [ - "dist/**" + "dist" ], "parser": "babel-eslint" + }, + "config": { + "ghooks": { + "commit-msg": "npm test" + } } }