Fix client peer dependencies
authorChocobozzz <florian.bigard@gmail.com>
Tue, 20 Sep 2016 20:45:14 +0000 (22:45 +0200)
committerChocobozzz <florian.bigard@gmail.com>
Tue, 20 Sep 2016 20:45:14 +0000 (22:45 +0200)
client/config/webpack.dev.js
client/package.json
server/middlewares/oauth.js
server/tests/api/check-params.js

index 5e4c708d67426f6353acba1d7f2d29ffa38d77a2..0b6c00cbde54eca23acc9718fbbe97134e858a4c 100644 (file)
@@ -27,135 +27,136 @@ const METADATA = webpackMerge(commonConfig({env: ENV}).metadata, {
  *
  * See: http://webpack.github.io/docs/configuration.html#cli
  */
-module.exports = webpackMerge(commonConfig({env: ENV}), {
-  /**
-   * Merged metadata from webpack.common.js for index.html
-   *
-   * See: (custom attribute)
-   */
-  metadata: METADATA,
-
-  /**
-   * Switch loaders to debug mode.
-   *
-   * See: http://webpack.github.io/docs/configuration.html#debug
-   */
-  debug: true,
-
-  /**
-   * Developer tool to enhance debugging
-   *
-   * See: http://webpack.github.io/docs/configuration.html#devtool
-   * See: https://github.com/webpack/docs/wiki/build-performance#sourcemaps
-   */
-  devtool: 'cheap-module-source-map',
-
-  /**
-   * Options affecting the output of the compilation.
-   *
-   * See: http://webpack.github.io/docs/configuration.html#output
-   */
-  output: {
+module.exports = function (env) {
+  return webpackMerge(commonConfig({env: ENV}), {
     /**
-     * The output directory as absolute path (required).
+     * Merged metadata from webpack.common.js for index.html
      *
-     * See: http://webpack.github.io/docs/configuration.html#output-path
+     * See: (custom attribute)
      */
-    path: helpers.root('dist'),
+    metadata: METADATA,
 
     /**
-     * Specifies the name of each output file on disk.
-     * IMPORTANT: You must not specify an absolute path here!
+     * Switch loaders to debug mode.
      *
-     * See: http://webpack.github.io/docs/configuration.html#output-filename
+     * See: http://webpack.github.io/docs/configuration.html#debug
      */
-    filename: '[name].bundle.js',
+    debug: true,
 
     /**
-     * The filename of the SourceMaps for the JavaScript files.
-     * They are inside the output.path directory.
+     * Developer tool to enhance debugging
      *
-     * See: http://webpack.github.io/docs/configuration.html#output-sourcemapfilename
+     * See: http://webpack.github.io/docs/configuration.html#devtool
+     * See: https://github.com/webpack/docs/wiki/build-performance#sourcemaps
      */
-    sourceMapFilename: '[name].map',
+    devtool: 'cheap-module-source-map',
 
-    /** The filename of non-entry chunks as relative path
-     * inside the output.path directory.
+    /**
+     * Options affecting the output of the compilation.
      *
-     * See: http://webpack.github.io/docs/configuration.html#output-chunkfilename
+     * See: http://webpack.github.io/docs/configuration.html#output
      */
-    chunkFilename: '[id].chunk.js',
+    output: {
+      /**
+       * The output directory as absolute path (required).
+       *
+       * See: http://webpack.github.io/docs/configuration.html#output-path
+       */
+      path: helpers.root('dist'),
+
+      /**
+       * Specifies the name of each output file on disk.
+       * IMPORTANT: You must not specify an absolute path here!
+       *
+       * See: http://webpack.github.io/docs/configuration.html#output-filename
+       */
+      filename: '[name].bundle.js',
+
+      /**
+       * The filename of the SourceMaps for the JavaScript files.
+       * They are inside the output.path directory.
+       *
+       * See: http://webpack.github.io/docs/configuration.html#output-sourcemapfilename
+       */
+      sourceMapFilename: '[name].map',
+
+      /** The filename of non-entry chunks as relative path
+       * inside the output.path directory.
+       *
+       * See: http://webpack.github.io/docs/configuration.html#output-chunkfilename
+       */
+      chunkFilename: '[id].chunk.js',
+
+      library: 'ac_[name]',
+      libraryTarget: 'var'
 
-    library: 'ac_[name]',
-    libraryTarget: 'var'
+    },
 
-  },
+    externals: {
+      webtorrent: 'WebTorrent'
+    },
 
-  externals: {
-    webtorrent: 'WebTorrent'
-  },
+    plugins: [
+
+      /**
+       * Plugin: DefinePlugin
+       * Description: Define free variables.
+       * Useful for having development builds with debug logging or adding global constants.
+       *
+       * Environment helpers
+       *
+       * See: https://webpack.github.io/docs/list-of-plugins.html#defineplugin
+       */
+      // NOTE: when adding more properties, make sure you include them in custom-typings.d.ts
+      new DefinePlugin({
+        'ENV': JSON.stringify(METADATA.ENV),
+        'HMR': METADATA.HMR,
+        'process.env': {
+          'ENV': JSON.stringify(METADATA.ENV),
+          'NODE_ENV': JSON.stringify(METADATA.ENV),
+          'HMR': METADATA.HMR
+        }
+      }),
 
-  plugins: [
+      new NamedModulesPlugin()
+    ],
 
     /**
-     * Plugin: DefinePlugin
-     * Description: Define free variables.
-     * Useful for having development builds with debug logging or adding global constants.
-     *
-     * Environment helpers
+     * Static analysis linter for TypeScript advanced options configuration
+     * Description: An extensible linter for the TypeScript language.
      *
-     * See: https://webpack.github.io/docs/list-of-plugins.html#defineplugin
+     * See: https://github.com/wbuchwalter/tslint-loader
      */
-    // NOTE: when adding more properties, make sure you include them in custom-typings.d.ts
-    new DefinePlugin({
-      'ENV': JSON.stringify(METADATA.ENV),
-      'HMR': METADATA.HMR,
-      'process.env': {
-        'ENV': JSON.stringify(METADATA.ENV),
-        'NODE_ENV': JSON.stringify(METADATA.ENV),
-        'HMR': METADATA.HMR
-      }
-    }),
-
-    new NamedModulesPlugin()
-  ],
-
-  /**
-   * Static analysis linter for TypeScript advanced options configuration
-   * Description: An extensible linter for the TypeScript language.
-   *
-   * See: https://github.com/wbuchwalter/tslint-loader
-   */
-  tslint: {
-    emitErrors: false,
-    failOnHint: false,
-    resourcePath: 'src'
-  },
-
-  devServer: {
-    port: METADATA.port,
-    host: METADATA.host,
-    historyApiFallback: true,
-    watchOptions: {
-      aggregateTimeout: 300,
-      poll: 1000
+    tslint: {
+      emitErrors: false,
+      failOnHint: false,
+      resourcePath: 'src'
     },
-    outputPath: helpers.root('dist')
-  },
-
-  /*
-   * Include polyfills or mocks for various node stuff
-   * Description: Node configuration
-   *
-   * See: https://webpack.github.io/docs/configuration.html#node
-   */
-  node: {
-    global: 'window',
-    crypto: 'empty',
-    process: true,
-    module: false,
-    clearImmediate: false,
-    setImmediate: false
-  }
 
-})
+    devServer: {
+      port: METADATA.port,
+      host: METADATA.host,
+      historyApiFallback: true,
+      watchOptions: {
+        aggregateTimeout: 300,
+        poll: 1000
+      },
+      outputPath: helpers.root('dist')
+    },
+
+    /*
+     * Include polyfills or mocks for various node stuff
+     * Description: Node configuration
+     *
+     * See: https://webpack.github.io/docs/configuration.html#node
+     */
+    node: {
+      global: 'window',
+      crypto: 'empty',
+      process: true,
+      module: false,
+      clearImmediate: false,
+      setImmediate: false
+    }
+  })
+}
index 94b028ffd227e162d7c21b152141cbdcdc11ad9f..629723b542864db48222fdcffd54660b92c32336 100644 (file)
     "angular2-template-loader": "^0.5.0",
     "assets-webpack-plugin": "^3.4.0",
     "awesome-typescript-loader": "^2.2.1",
-    "bootstrap-loader": "^1.0.8",
+    "bootstrap-loader": "^2.0.0-beta.11",
     "bootstrap-sass": "^3.3.6",
     "compression-webpack-plugin": "^0.3.1",
     "copy-webpack-plugin": "^3.0.1",
     "core-js": "^2.4.1",
     "css-loader": "^0.25.0",
-    "css-to-string-loader": "^0.1.1",
+    "css-to-string-loader": "https://github.com/Chocobozzz/css-to-string-loader#patch-1",
     "es6-promise": "^3.0.2",
     "es6-promise-loader": "^1.0.1",
     "es6-shim": "^0.35.0",
+    "extract-text-webpack-plugin": "^2.0.0-beta.4",
     "file-loader": "^0.9.0",
     "html-webpack-plugin": "^2.19.0",
     "ie-shim": "^0.1.0",
@@ -69,7 +70,7 @@
     "tslint-loader": "^2.1.4",
     "typescript": "^2.0.0",
     "url-loader": "^0.5.7",
-    "webpack": "^2.1.0-beta.21",
+    "webpack": "2.1.0-beta.22",
     "webpack-md5-hash": "0.0.5",
     "webpack-merge": "^0.14.1",
     "webpack-notifier": "^1.3.0",
index 91a99050913eead153e1c281bd5b86c524fc5993..08584c41c7358ff00f19c40015cf18344084d623 100644 (file)
@@ -23,7 +23,7 @@ function authenticate (req, res, next) {
       return res.sendStatus(500)
     }
 
-    if (res.statusCode === 401 || res.statusCode === 400) return res.end()
+    if (res.statusCode === 401 || res.statusCode === 400 || res.statusCode === 503) return res.end()
 
     return next()
   })
index a696bc171795d512e14db6bf9856355b4ac07ee0..57b5ca024d797685ab333f21a602343030b9f3c5 100644 (file)
@@ -697,13 +697,6 @@ describe('Test parameters validator', function () {
           .set('Authorization', 'Bearer ' + server.accessToken)
           .expect(404, done)
       })
-
-      it('Should success with the correct parameters', function (done) {
-        request(server.url)
-          .delete(path + userId)
-          .set('Authorization', 'Bearer ' + server.accessToken)
-          .expect(204, done)
-      })
     })
   })